const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/css/github-markdown-dark-Hb80yvgJ.css"])))=>i.map(i=>d[i]);
var x9=e=>{throw TypeError(e)};var Lw=(e,t,r)=>t.has(e)||x9("Cannot "+r);var Xr=(e,t,r)=>(Lw(e,t,"read from private field"),r?r.call(e):t.get(e)),so=(e,t,r)=>t.has(e)?x9("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ka=(e,t,r,n)=>(Lw(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),oo=(e,t,r)=>(Lw(e,t,"access private method"),r);var y9=(e,t,r,n)=>({set _(a){Ka(e,t,a,r)},get _(){return Xr(e,t,n)}});function mhe(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var Tv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lst(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var a=!1;try{a=this instanceof n}catch{}return a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}var Pw={exports:{}},Dh={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var _9;function ghe(){if(_9)return Dh;_9=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,i){var s=null;if(i!==void 0&&(s=""+i),a.key!==void 0&&(s=""+a.key),"key"in a){i={};for(var o in a)o!=="key"&&(i[o]=a[o])}else i=a;return a=i.ref,{$$typeof:e,type:n,key:s,ref:a!==void 0?a:null,props:i}}return Dh.Fragment=t,Dh.jsx=r,Dh.jsxs=r,Dh}var w9;function vhe(){return w9||(w9=1,Pw.exports=ghe()),Pw.exports}var g=vhe(),Fw={exports:{}},Qt={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var E9;function bhe(){if(E9)return Qt;E9=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),f=Symbol.iterator;function p(M){return M===null||typeof M!="object"?null:(M=f&&M[f]||M["@@iterator"],typeof M=="function"?M:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,v={};function y(M,Q,q){this.props=M,this.context=Q,this.refs=v,this.updater=q||m}y.prototype.isReactComponent={},y.prototype.setState=function(M,Q){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,Q,"setState")},y.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function _(){}_.prototype=y.prototype;function S(M,Q,q){this.props=M,this.context=Q,this.refs=v,this.updater=q||m}var C=S.prototype=new _;C.constructor=S,b(C,y.prototype),C.isPureReactComponent=!0;var T=Array.isArray,A={H:null,A:null,T:null,S:null,V:null},k=Object.prototype.hasOwnProperty;function N(M,Q,q,F,V,Z){return q=Z.ref,{$$typeof:e,type:M,key:Q,ref:q!==void 0?q:null,props:Z}}function L(M,Q){return N(M.type,Q,void 0,void 0,void 0,M.props)}function I(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function P(M){var Q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(q){return Q[q]})}var H=/\/+/g;function B(M,Q){return typeof M=="object"&&M!==null&&M.key!=null?P(""+M.key):Q.toString(36)}function K(){}function j(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(K,K):(M.status="pending",M.then(function(Q){M.status==="pending"&&(M.status="fulfilled",M.value=Q)},function(Q){M.status==="pending"&&(M.status="rejected",M.reason=Q)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function W(M,Q,q,F,V){var Z=typeof M;(Z==="undefined"||Z==="boolean")&&(M=null);var ee=!1;if(M===null)ee=!0;else switch(Z){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(M.$$typeof){case e:case t:ee=!0;break;case u:return ee=M._init,W(ee(M._payload),Q,q,F,V)}}if(ee)return V=V(M),ee=F===""?"."+B(M,0):F,T(V)?(q="",ee!=null&&(q=ee.replace(H,"$&/")+"/"),W(V,Q,q,"",function(pe){return pe})):V!=null&&(I(V)&&(V=L(V,q+(V.key==null||M&&M.key===V.key?"":(""+V.key).replace(H,"$&/")+"/")+ee)),Q.push(V)),1;ee=0;var te=F===""?".":F+":";if(T(M))for(var oe=0;oe<M.length;oe++)F=M[oe],Z=te+B(F,oe),ee+=W(F,Q,q,Z,V);else if(oe=p(M),typeof oe=="function")for(M=oe.call(M),oe=0;!(F=M.next()).done;)F=F.value,Z=te+B(F,oe++),ee+=W(F,Q,q,Z,V);else if(Z==="object"){if(typeof M.then=="function")return W(j(M),Q,q,F,V);throw Q=String(M),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ee}function D(M,Q,q){if(M==null)return M;var F=[],V=0;return W(M,F,"","",function(Z){return Q.call(q,Z,V++)}),F}function U(M){if(M._status===-1){var Q=M._result;Q=Q(),Q.then(function(q){(M._status===0||M._status===-1)&&(M._status=1,M._result=q)},function(q){(M._status===0||M._status===-1)&&(M._status=2,M._result=q)}),M._status===-1&&(M._status=0,M._result=Q)}if(M._status===1)return M._result.default;throw M._result}var Y=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)};function z(){}return Qt.Children={map:D,forEach:function(M,Q,q){D(M,function(){Q.apply(this,arguments)},q)},count:function(M){var Q=0;return D(M,function(){Q++}),Q},toArray:function(M){return D(M,function(Q){return Q})||[]},only:function(M){if(!I(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Qt.Component=y,Qt.Fragment=r,Qt.Profiler=a,Qt.PureComponent=S,Qt.StrictMode=n,Qt.Suspense=l,Qt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Qt.__COMPILER_RUNTIME={__proto__:null,c:function(M){return A.H.useMemoCache(M)}},Qt.cache=function(M){return function(){return M.apply(null,arguments)}},Qt.cloneElement=function(M,Q,q){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var F=b({},M.props),V=M.key,Z=void 0;if(Q!=null)for(ee in Q.ref!==void 0&&(Z=void 0),Q.key!==void 0&&(V=""+Q.key),Q)!k.call(Q,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&Q.ref===void 0||(F[ee]=Q[ee]);var ee=arguments.length-2;if(ee===1)F.children=q;else if(1<ee){for(var te=Array(ee),oe=0;oe<ee;oe++)te[oe]=arguments[oe+2];F.children=te}return N(M.type,V,void 0,void 0,Z,F)},Qt.createContext=function(M){return M={$$typeof:s,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:i,_context:M},M},Qt.createElement=function(M,Q,q){var F,V={},Z=null;if(Q!=null)for(F in Q.key!==void 0&&(Z=""+Q.key),Q)k.call(Q,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(V[F]=Q[F]);var ee=arguments.length-2;if(ee===1)V.children=q;else if(1<ee){for(var te=Array(ee),oe=0;oe<ee;oe++)te[oe]=arguments[oe+2];V.children=te}if(M&&M.defaultProps)for(F in ee=M.defaultProps,ee)V[F]===void 0&&(V[F]=ee[F]);return N(M,Z,void 0,void 0,null,V)},Qt.createRef=function(){return{current:null}},Qt.forwardRef=function(M){return{$$typeof:o,render:M}},Qt.isValidElement=I,Qt.lazy=function(M){return{$$typeof:u,_payload:{_status:-1,_result:M},_init:U}},Qt.memo=function(M,Q){return{$$typeof:c,type:M,compare:Q===void 0?null:Q}},Qt.startTransition=function(M){var Q=A.T,q={};A.T=q;try{var F=M(),V=A.S;V!==null&&V(q,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(z,Y)}catch(Z){Y(Z)}finally{A.T=Q}},Qt.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Qt.use=function(M){return A.H.use(M)},Qt.useActionState=function(M,Q,q){return A.H.useActionState(M,Q,q)},Qt.useCallback=function(M,Q){return A.H.useCallback(M,Q)},Qt.useContext=function(M){return A.H.useContext(M)},Qt.useDebugValue=function(){},Qt.useDeferredValue=function(M,Q){return A.H.useDeferredValue(M,Q)},Qt.useEffect=function(M,Q,q){var F=A.H;if(typeof q=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return F.useEffect(M,Q)},Qt.useId=function(){return A.H.useId()},Qt.useImperativeHandle=function(M,Q,q){return A.H.useImperativeHandle(M,Q,q)},Qt.useInsertionEffect=function(M,Q){return A.H.useInsertionEffect(M,Q)},Qt.useLayoutEffect=function(M,Q){return A.H.useLayoutEffect(M,Q)},Qt.useMemo=function(M,Q){return A.H.useMemo(M,Q)},Qt.useOptimistic=function(M,Q){return A.H.useOptimistic(M,Q)},Qt.useReducer=function(M,Q,q){return A.H.useReducer(M,Q,q)},Qt.useRef=function(M){return A.H.useRef(M)},Qt.useState=function(M){return A.H.useState(M)},Qt.useSyncExternalStore=function(M,Q,q){return A.H.useSyncExternalStore(M,Q,q)},Qt.useTransition=function(){return A.H.useTransition()},Qt.version="19.1.1",Qt}var S9;function Do(){return S9||(S9=1,Fw.exports=bhe()),Fw.exports}var E=Do();const ye=Fl(E),cD=mhe({__proto__:null,default:ye},[E]);var Bw={exports:{}},Oh={},zw={exports:{}},jw={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var C9;function xhe(){return C9||(C9=1,(function(e){function t(D,U){var Y=D.length;D.push(U);e:for(;0<Y;){var z=Y-1>>>1,M=D[z];if(0<a(M,U))D[z]=U,D[Y]=M,Y=z;else break e}}function r(D){return D.length===0?null:D[0]}function n(D){if(D.length===0)return null;var U=D[0],Y=D.pop();if(Y!==U){D[0]=Y;e:for(var z=0,M=D.length,Q=M>>>1;z<Q;){var q=2*(z+1)-1,F=D[q],V=q+1,Z=D[V];if(0>a(F,Y))V<M&&0>a(Z,F)?(D[z]=Z,D[V]=Y,z=V):(D[z]=F,D[q]=Y,z=q);else if(V<M&&0>a(Z,Y))D[z]=Z,D[V]=Y,z=V;else break e}}return U}function a(D,U){var Y=D.sortIndex-U.sortIndex;return Y!==0?Y:D.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],c=[],u=1,f=null,p=3,m=!1,b=!1,v=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function T(D){for(var U=r(c);U!==null;){if(U.callback===null)n(c);else if(U.startTime<=D)n(c),U.sortIndex=U.expirationTime,t(l,U);else break;U=r(c)}}function A(D){if(v=!1,T(D),!b)if(r(l)!==null)b=!0,k||(k=!0,B());else{var U=r(c);U!==null&&W(A,U.startTime-D)}}var k=!1,N=-1,L=5,I=-1;function P(){return y?!0:!(e.unstable_now()-I<L)}function H(){if(y=!1,k){var D=e.unstable_now();I=D;var U=!0;try{e:{b=!1,v&&(v=!1,S(N),N=-1),m=!0;var Y=p;try{t:{for(T(D),f=r(l);f!==null&&!(f.expirationTime>D&&P());){var z=f.callback;if(typeof z=="function"){f.callback=null,p=f.priorityLevel;var M=z(f.expirationTime<=D);if(D=e.unstable_now(),typeof M=="function"){f.callback=M,T(D),U=!0;break t}f===r(l)&&n(l),T(D)}else n(l);f=r(l)}if(f!==null)U=!0;else{var Q=r(c);Q!==null&&W(A,Q.startTime-D),U=!1}}break e}finally{f=null,p=Y,m=!1}U=void 0}}finally{U?B():k=!1}}}var B;if(typeof C=="function")B=function(){C(H)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,j=K.port2;K.port1.onmessage=H,B=function(){j.postMessage(null)}}else B=function(){_(H,0)};function W(D,U){N=_(function(){D(e.unstable_now())},U)}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(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(D){switch(p){case 1:case 2:case 3:var U=3;break;default:U=p}var Y=p;p=U;try{return D()}finally{p=Y}},e.unstable_requestPaint=function(){y=!0},e.unstable_runWithPriority=function(D,U){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var Y=p;p=D;try{return U()}finally{p=Y}},e.unstable_scheduleCallback=function(D,U,Y){var z=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?z+Y:z):Y=z,D){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=Y+M,D={id:u++,callback:U,priorityLevel:D,startTime:Y,expirationTime:M,sortIndex:-1},Y>z?(D.sortIndex=Y,t(c,D),r(l)===null&&D===r(c)&&(v?(S(N),N=-1):v=!0,W(A,Y-z))):(D.sortIndex=M,t(l,D),b||m||(b=!0,k||(k=!0,B()))),D},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(D){var U=p;return function(){var Y=p;p=U;try{return D.apply(this,arguments)}finally{p=Y}}}})(jw)),jw}var T9;function yhe(){return T9||(T9=1,zw.exports=xhe()),zw.exports}var qw={exports:{}},fa={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var A9;function _he(){if(A9)return fa;A9=1;var e=Do();function t(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)c+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(l,c,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:f==null?null:""+f,children:l,containerInfo:c,implementation:u}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return fa.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,fa.createPortal=function(l,c){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(t(299));return i(l,c,null,u)},fa.flushSync=function(l){var c=s.T,u=n.p;try{if(s.T=null,n.p=2,l)return l()}finally{s.T=c,n.p=u,n.d.f()}},fa.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,n.d.C(l,c))},fa.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},fa.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var u=c.as,f=o(u,c.crossOrigin),p=typeof c.integrity=="string"?c.integrity:void 0,m=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;u==="style"?n.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:f,integrity:p,fetchPriority:m}):u==="script"&&n.d.X(l,{crossOrigin:f,integrity:p,fetchPriority:m,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},fa.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var u=o(c.as,c.crossOrigin);n.d.M(l,{crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&n.d.M(l)},fa.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var u=c.as,f=o(u,c.crossOrigin);n.d.L(l,u,{crossOrigin:f,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},fa.preloadModule=function(l,c){if(typeof l=="string")if(c){var u=o(c.as,c.crossOrigin);n.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else n.d.m(l)},fa.requestFormReset=function(l){n.d.r(l)},fa.unstable_batchedUpdates=function(l,c){return l(c)},fa.useFormState=function(l,c,u){return s.H.useFormState(l,c,u)},fa.useFormStatus=function(){return s.H.useHostTransitionStatus()},fa.version="19.1.1",fa}var k9;function uD(){if(k9)return qw.exports;k9=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),qw.exports=_he(),qw.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var N9;function whe(){if(N9)return Oh;N9=1;var e=yhe(),t=Do(),r=uD();function n(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)h+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(d){return!(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)}function i(d){var h=d,x=d;if(d.alternate)for(;h.return;)h=h.return;else{d=h;do h=d,(h.flags&4098)!==0&&(x=h.return),d=h.return;while(d)}return h.tag===3?x:null}function s(d){if(d.tag===13){var h=d.memoizedState;if(h===null&&(d=d.alternate,d!==null&&(h=d.memoizedState)),h!==null)return h.dehydrated}return null}function o(d){if(i(d)!==d)throw Error(n(188))}function l(d){var h=d.alternate;if(!h){if(h=i(d),h===null)throw Error(n(188));return h!==d?null:d}for(var x=d,w=h;;){var R=x.return;if(R===null)break;var O=R.alternate;if(O===null){if(w=R.return,w!==null){x=w;continue}break}if(R.child===O.child){for(O=R.child;O;){if(O===x)return o(R),d;if(O===w)return o(R),h;O=O.sibling}throw Error(n(188))}if(x.return!==w.return)x=R,w=O;else{for(var J=!1,ae=R.child;ae;){if(ae===x){J=!0,x=R,w=O;break}if(ae===w){J=!0,w=R,x=O;break}ae=ae.sibling}if(!J){for(ae=O.child;ae;){if(ae===x){J=!0,x=O,w=R;break}if(ae===w){J=!0,w=O,x=R;break}ae=ae.sibling}if(!J)throw Error(n(189))}}if(x.alternate!==w)throw Error(n(190))}if(x.tag!==3)throw Error(n(188));return x.stateNode.current===x?d:h}function c(d){var h=d.tag;if(h===5||h===26||h===27||h===6)return d;for(d=d.child;d!==null;){if(h=c(d),h!==null)return h;d=d.sibling}return null}var u=Object.assign,f=Symbol.for("react.element"),p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),S=Symbol.for("react.consumer"),C=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function B(d){return d===null||typeof d!="object"?null:(d=H&&d[H]||d["@@iterator"],typeof d=="function"?d:null)}var K=Symbol.for("react.client.reference");function j(d){if(d==null)return null;if(typeof d=="function")return d.$$typeof===K?null:d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case b:return"Fragment";case y:return"Profiler";case v:return"StrictMode";case A:return"Suspense";case k:return"SuspenseList";case I:return"Activity"}if(typeof d=="object")switch(d.$$typeof){case m:return"Portal";case C:return(d.displayName||"Context")+".Provider";case S:return(d._context.displayName||"Context")+".Consumer";case T:var h=d.render;return d=d.displayName,d||(d=h.displayName||h.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case N:return h=d.displayName||null,h!==null?h:j(d.type)||"Memo";case L:h=d._payload,d=d._init;try{return j(d(h))}catch{}}return null}var W=Array.isArray,D=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},z=[],M=-1;function Q(d){return{current:d}}function q(d){0>M||(d.current=z[M],z[M]=null,M--)}function F(d,h){M++,z[M]=d.current,d.current=h}var V=Q(null),Z=Q(null),ee=Q(null),te=Q(null);function oe(d,h){switch(F(ee,h),F(Z,d),F(V,null),h.nodeType){case 9:case 11:d=(d=h.documentElement)&&(d=d.namespaceURI)?WP(d):0;break;default:if(d=h.tagName,h=h.namespaceURI)h=WP(h),d=KP(h,d);else switch(d){case"svg":d=1;break;case"math":d=2;break;default:d=0}}q(V),F(V,d)}function pe(){q(V),q(Z),q(ee)}function he(d){d.memoizedState!==null&&F(te,d);var h=V.current,x=KP(h,d.type);h!==x&&(F(Z,d),F(V,x))}function ke(d){Z.current===d&&(q(V),q(Z)),te.current===d&&(q(te),Ah._currentValue=Y)}var se=Object.prototype.hasOwnProperty,qe=e.unstable_scheduleCallback,$e=e.unstable_cancelCallback,Pe=e.unstable_shouldYield,Ce=e.unstable_requestPaint,xe=e.unstable_now,ve=e.unstable_getCurrentPriorityLevel,Ne=e.unstable_ImmediatePriority,Ue=e.unstable_UserBlockingPriority,Le=e.unstable_NormalPriority,Ye=e.unstable_LowPriority,De=e.unstable_IdlePriority,Ve=e.log,lt=e.unstable_setDisableYieldValue,Ee=null,Ae=null;function Ze(d){if(typeof Ve=="function"&&lt(d),Ae&&typeof Ae.setStrictMode=="function")try{Ae.setStrictMode(Ee,d)}catch{}}var rt=Math.clz32?Math.clz32:et,at=Math.log,bt=Math.LN2;function et(d){return d>>>=0,d===0?32:31-(at(d)/bt|0)|0}var ft=256,zt=4194304;function Cr(d){var h=d&42;if(h!==0)return h;switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return d&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return d}}function Xt(d,h,x){var w=d.pendingLanes;if(w===0)return 0;var R=0,O=d.suspendedLanes,J=d.pingedLanes;d=d.warmLanes;var ae=w&134217727;return ae!==0?(w=ae&~O,w!==0?R=Cr(w):(J&=ae,J!==0?R=Cr(J):x||(x=ae&~d,x!==0&&(R=Cr(x))))):(ae=w&~O,ae!==0?R=Cr(ae):J!==0?R=Cr(J):x||(x=w&~d,x!==0&&(R=Cr(x)))),R===0?0:h!==0&&h!==R&&(h&O)===0&&(O=R&-R,x=h&-h,O>=x||O===32&&(x&4194048)!==0)?h:R}function $r(d,h){return(d.pendingLanes&~(d.suspendedLanes&~d.pingedLanes)&h)===0}function on(d,h){switch(d){case 1:case 2:case 4:case 8:case 64:return h+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 h+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 qi(){var d=ft;return ft<<=1,(ft&4194048)===0&&(ft=256),d}function qa(){var d=zt;return zt<<=1,(zt&62914560)===0&&(zt=4194304),d}function _s(d){for(var h=[],x=0;31>x;x++)h.push(d);return h}function Ua(d,h){d.pendingLanes|=h,h!==268435456&&(d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0)}function tn(d,h,x,w,R,O){var J=d.pendingLanes;d.pendingLanes=x,d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0,d.expiredLanes&=x,d.entangledLanes&=x,d.errorRecoveryDisabledLanes&=x,d.shellSuspendCounter=0;var ae=d.entanglements,be=d.expirationTimes,Me=d.hiddenUpdates;for(x=J&~x;0<x;){var We=31-rt(x),Xe=1<<We;ae[We]=0,be[We]=-1;var Be=Me[We];if(Be!==null)for(Me[We]=null,We=0;We<Be.length;We++){var je=Be[We];je!==null&&(je.lane&=-536870913)}x&=~Xe}w!==0&&Gl(d,w,0),O!==0&&R===0&&d.tag!==0&&(d.suspendedLanes|=O&~(J&~h))}function Gl(d,h,x){d.pendingLanes|=h,d.suspendedLanes&=~h;var w=31-rt(h);d.entangledLanes|=h,d.entanglements[w]=d.entanglements[w]|1073741824|x&4194090}function Pt(d,h){var x=d.entangledLanes|=h;for(d=d.entanglements;x;){var w=31-rt(x),R=1<<w;R&h|d[w]&h&&(d[w]|=h),x&=~R}}function fr(d){switch(d){case 2:d=1;break;case 8:d=4;break;case 32:d=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:d=128;break;case 268435456:d=134217728;break;default:d=0}return d}function wr(d){return d&=-d,2<d?8<d?(d&134217727)!==0?32:268435456:8:2}function Wn(){var d=U.p;return d!==0?d:(d=window.event,d===void 0?32:h9(d.type))}function na(d,h){var x=U.p;try{return U.p=d,h()}finally{U.p=x}}var vn=Math.random().toString(36).slice(2),Dr="__reactFiber$"+vn,Er="__reactProps$"+vn,Bn="__reactContainer$"+vn,eu="__reactEvents$"+vn,z0="__reactListeners$"+vn,ne="__reactHandles$"+vn,de="__reactResources$"+vn,le="__reactMarker$"+vn;function ce(d){delete d[Dr],delete d[Er],delete d[eu],delete d[z0],delete d[ne]}function ue(d){var h=d[Dr];if(h)return h;for(var x=d.parentNode;x;){if(h=x[Bn]||x[Dr]){if(x=h.alternate,h.child!==null||x!==null&&x.child!==null)for(d=QP(d);d!==null;){if(x=d[Dr])return x;d=QP(d)}return h}d=x,x=d.parentNode}return null}function fe(d){if(d=d[Dr]||d[Bn]){var h=d.tag;if(h===5||h===6||h===13||h===26||h===27||h===3)return d}return null}function Oe(d){var h=d.tag;if(h===5||h===26||h===27||h===6)return d.stateNode;throw Error(n(33))}function Ge(d){var h=d[de];return h||(h=d[de]={hoistableStyles:new Map,hoistableScripts:new Map}),h}function Te(d){d[le]=!0}var Fe=new Set,ze={};function Qe(d,h){ot(d,h),ot(d+"Capture",h)}function ot(d,h){for(ze[d]=h,d=0;d<h.length;d++)Fe.add(h[d])}var pt=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]*$"),it={},dt={};function Ht(d){return se.call(dt,d)?!0:se.call(it,d)?!1:pt.test(d)?dt[d]=!0:(it[d]=!0,!1)}function Ar(d,h,x){if(Ht(h))if(x===null)d.removeAttribute(h);else{switch(typeof x){case"undefined":case"function":case"symbol":d.removeAttribute(h);return;case"boolean":var w=h.toLowerCase().slice(0,5);if(w!=="data-"&&w!=="aria-"){d.removeAttribute(h);return}}d.setAttribute(h,""+x)}}function kr(d,h,x){if(x===null)d.removeAttribute(h);else{switch(typeof x){case"undefined":case"function":case"symbol":case"boolean":d.removeAttribute(h);return}d.setAttribute(h,""+x)}}function Or(d,h,x,w){if(w===null)d.removeAttribute(x);else{switch(typeof w){case"undefined":case"function":case"symbol":case"boolean":d.removeAttribute(x);return}d.setAttributeNS(h,x,""+w)}}var Ui,eo;function $a(d){if(Ui===void 0)try{throw Error()}catch(x){var h=x.stack.trim().match(/\n( *(at )?)/);Ui=h&&h[1]||"",eo=-1<x.stack.indexOf(`
    at`)?" (<anonymous>)":-1<x.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Ui+d+eo}var fi=!1;function ws(d,h){if(!d||fi)return"";fi=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var w={DetermineComponentFrameRoot:function(){try{if(h){var Xe=function(){throw Error()};if(Object.defineProperty(Xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Xe,[])}catch(je){var Be=je}Reflect.construct(d,[],Xe)}else{try{Xe.call()}catch(je){Be=je}d.call(Xe.prototype)}}else{try{throw Error()}catch(je){Be=je}(Xe=d())&&typeof Xe.catch=="function"&&Xe.catch(function(){})}}catch(je){if(je&&Be&&typeof je.stack=="string")return[je.stack,Be.stack]}return[null,null]}};w.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var R=Object.getOwnPropertyDescriptor(w.DetermineComponentFrameRoot,"name");R&&R.configurable&&Object.defineProperty(w.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=w.DetermineComponentFrameRoot(),J=O[0],ae=O[1];if(J&&ae){var be=J.split(`
`),Me=ae.split(`
`);for(R=w=0;w<be.length&&!be[w].includes("DetermineComponentFrameRoot");)w++;for(;R<Me.length&&!Me[R].includes("DetermineComponentFrameRoot");)R++;if(w===be.length||R===Me.length)for(w=be.length-1,R=Me.length-1;1<=w&&0<=R&&be[w]!==Me[R];)R--;for(;1<=w&&0<=R;w--,R--)if(be[w]!==Me[R]){if(w!==1||R!==1)do if(w--,R--,0>R||be[w]!==Me[R]){var We=`
`+be[w].replace(" at new "," at ");return d.displayName&&We.includes("<anonymous>")&&(We=We.replace("<anonymous>",d.displayName)),We}while(1<=w&&0<=R);break}}}finally{fi=!1,Error.prepareStackTrace=x}return(x=d?d.displayName||d.name:"")?$a(x):""}function Es(d){switch(d.tag){case 26:case 27:case 5:return $a(d.type);case 16:return $a("Lazy");case 13:return $a("Suspense");case 19:return $a("SuspenseList");case 0:case 15:return ws(d.type,!1);case 11:return ws(d.type.render,!1);case 1:return ws(d.type,!0);case 31:return $a("Activity");default:return""}}function q8(d){try{var h="";do h+=Es(d),d=d.return;while(d);return h}catch(x){return`
Error generating stack: `+x.message+`
`+x.stack}}function $i(d){switch(typeof d){case"bigint":case"boolean":case"number":case"string":case"undefined":return d;case"object":return d;default:return""}}function U8(d){var h=d.type;return(d=d.nodeName)&&d.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function ufe(d){var h=U8(d)?"checked":"value",x=Object.getOwnPropertyDescriptor(d.constructor.prototype,h),w=""+d[h];if(!d.hasOwnProperty(h)&&typeof x<"u"&&typeof x.get=="function"&&typeof x.set=="function"){var R=x.get,O=x.set;return Object.defineProperty(d,h,{configurable:!0,get:function(){return R.call(this)},set:function(J){w=""+J,O.call(this,J)}}),Object.defineProperty(d,h,{enumerable:x.enumerable}),{getValue:function(){return w},setValue:function(J){w=""+J},stopTracking:function(){d._valueTracker=null,delete d[h]}}}}function bg(d){d._valueTracker||(d._valueTracker=ufe(d))}function $8(d){if(!d)return!1;var h=d._valueTracker;if(!h)return!0;var x=h.getValue(),w="";return d&&(w=U8(d)?d.checked?"true":"false":d.value),d=w,d!==x?(h.setValue(d),!0):!1}function xg(d){if(d=d||(typeof document<"u"?document:void 0),typeof d>"u")return null;try{return d.activeElement||d.body}catch{return d.body}}var dfe=/[\n"\\]/g;function Hi(d){return d.replace(dfe,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Dy(d,h,x,w,R,O,J,ae){d.name="",J!=null&&typeof J!="function"&&typeof J!="symbol"&&typeof J!="boolean"?d.type=J:d.removeAttribute("type"),h!=null?J==="number"?(h===0&&d.value===""||d.value!=h)&&(d.value=""+$i(h)):d.value!==""+$i(h)&&(d.value=""+$i(h)):J!=="submit"&&J!=="reset"||d.removeAttribute("value"),h!=null?Oy(d,J,$i(h)):x!=null?Oy(d,J,$i(x)):w!=null&&d.removeAttribute("value"),R==null&&O!=null&&(d.defaultChecked=!!O),R!=null&&(d.checked=R&&typeof R!="function"&&typeof R!="symbol"),ae!=null&&typeof ae!="function"&&typeof ae!="symbol"&&typeof ae!="boolean"?d.name=""+$i(ae):d.removeAttribute("name")}function H8(d,h,x,w,R,O,J,ae){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(d.type=O),h!=null||x!=null){if(!(O!=="submit"&&O!=="reset"||h!=null))return;x=x!=null?""+$i(x):"",h=h!=null?""+$i(h):x,ae||h===d.value||(d.value=h),d.defaultValue=h}w=w??R,w=typeof w!="function"&&typeof w!="symbol"&&!!w,d.checked=ae?d.checked:!!w,d.defaultChecked=!!w,J!=null&&typeof J!="function"&&typeof J!="symbol"&&typeof J!="boolean"&&(d.name=J)}function Oy(d,h,x){h==="number"&&xg(d.ownerDocument)===d||d.defaultValue===""+x||(d.defaultValue=""+x)}function Td(d,h,x,w){if(d=d.options,h){h={};for(var R=0;R<x.length;R++)h["$"+x[R]]=!0;for(x=0;x<d.length;x++)R=h.hasOwnProperty("$"+d[x].value),d[x].selected!==R&&(d[x].selected=R),R&&w&&(d[x].defaultSelected=!0)}else{for(x=""+$i(x),h=null,R=0;R<d.length;R++){if(d[R].value===x){d[R].selected=!0,w&&(d[R].defaultSelected=!0);return}h!==null||d[R].disabled||(h=d[R])}h!==null&&(h.selected=!0)}}function G8(d,h,x){if(h!=null&&(h=""+$i(h),h!==d.value&&(d.value=h),x==null)){d.defaultValue!==h&&(d.defaultValue=h);return}d.defaultValue=x!=null?""+$i(x):""}function V8(d,h,x,w){if(h==null){if(w!=null){if(x!=null)throw Error(n(92));if(W(w)){if(1<w.length)throw Error(n(93));w=w[0]}x=w}x==null&&(x=""),h=x}x=$i(h),d.defaultValue=x,w=d.textContent,w===x&&w!==""&&w!==null&&(d.value=w)}function Ad(d,h){if(h){var x=d.firstChild;if(x&&x===d.lastChild&&x.nodeType===3){x.nodeValue=h;return}}d.textContent=h}var ffe=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 W8(d,h,x){var w=h.indexOf("--")===0;x==null||typeof x=="boolean"||x===""?w?d.setProperty(h,""):h==="float"?d.cssFloat="":d[h]="":w?d.setProperty(h,x):typeof x!="number"||x===0||ffe.has(h)?h==="float"?d.cssFloat=x:d[h]=(""+x).trim():d[h]=x+"px"}function K8(d,h,x){if(h!=null&&typeof h!="object")throw Error(n(62));if(d=d.style,x!=null){for(var w in x)!x.hasOwnProperty(w)||h!=null&&h.hasOwnProperty(w)||(w.indexOf("--")===0?d.setProperty(w,""):w==="float"?d.cssFloat="":d[w]="");for(var R in h)w=h[R],h.hasOwnProperty(R)&&x[R]!==w&&W8(d,R,w)}else for(var O in h)h.hasOwnProperty(O)&&W8(d,O,h[O])}function Iy(d){if(d.indexOf("-")===-1)return!1;switch(d){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 hfe=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-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"]]),pfe=/^[\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 yg(d){return pfe.test(""+d)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":d}var Ly=null;function Py(d){return d=d.target||d.srcElement||window,d.correspondingUseElement&&(d=d.correspondingUseElement),d.nodeType===3?d.parentNode:d}var kd=null,Nd=null;function X8(d){var h=fe(d);if(h&&(d=h.stateNode)){var x=d[Er]||null;e:switch(d=h.stateNode,h.type){case"input":if(Dy(d,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name),h=x.name,x.type==="radio"&&h!=null){for(x=d;x.parentNode;)x=x.parentNode;for(x=x.querySelectorAll('input[name="'+Hi(""+h)+'"][type="radio"]'),h=0;h<x.length;h++){var w=x[h];if(w!==d&&w.form===d.form){var R=w[Er]||null;if(!R)throw Error(n(90));Dy(w,R.value,R.defaultValue,R.defaultValue,R.checked,R.defaultChecked,R.type,R.name)}}for(h=0;h<x.length;h++)w=x[h],w.form===d.form&&$8(w)}break e;case"textarea":G8(d,x.value,x.defaultValue);break e;case"select":h=x.value,h!=null&&Td(d,!!x.multiple,h,!1)}}}var Fy=!1;function Y8(d,h,x){if(Fy)return d(h,x);Fy=!0;try{var w=d(h);return w}finally{if(Fy=!1,(kd!==null||Nd!==null)&&(iv(),kd&&(h=kd,d=Nd,Nd=kd=null,X8(h),d)))for(h=0;h<d.length;h++)X8(d[h])}}function j0(d,h){var x=d.stateNode;if(x===null)return null;var w=x[Er]||null;if(w===null)return null;x=w[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(w=!w.disabled)||(d=d.type,w=!(d==="button"||d==="input"||d==="select"||d==="textarea")),d=!w;break e;default:d=!1}if(d)return null;if(x&&typeof x!="function")throw Error(n(231,h,typeof x));return x}var Ho=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),By=!1;if(Ho)try{var q0={};Object.defineProperty(q0,"passive",{get:function(){By=!0}}),window.addEventListener("test",q0,q0),window.removeEventListener("test",q0,q0)}catch{By=!1}var Vl=null,zy=null,_g=null;function Z8(){if(_g)return _g;var d,h=zy,x=h.length,w,R="value"in Vl?Vl.value:Vl.textContent,O=R.length;for(d=0;d<x&&h[d]===R[d];d++);var J=x-d;for(w=1;w<=J&&h[x-w]===R[O-w];w++);return _g=R.slice(d,1<w?1-w:void 0)}function wg(d){var h=d.keyCode;return"charCode"in d?(d=d.charCode,d===0&&h===13&&(d=13)):d=h,d===10&&(d=13),32<=d||d===13?d:0}function Eg(){return!0}function Q8(){return!1}function Ha(d){function h(x,w,R,O,J){this._reactName=x,this._targetInst=R,this.type=w,this.nativeEvent=O,this.target=J,this.currentTarget=null;for(var ae in d)d.hasOwnProperty(ae)&&(x=d[ae],this[ae]=x?x(O):O[ae]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?Eg:Q8,this.isPropagationStopped=Q8,this}return u(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var x=this.nativeEvent;x&&(x.preventDefault?x.preventDefault():typeof x.returnValue!="unknown"&&(x.returnValue=!1),this.isDefaultPrevented=Eg)},stopPropagation:function(){var x=this.nativeEvent;x&&(x.stopPropagation?x.stopPropagation():typeof x.cancelBubble!="unknown"&&(x.cancelBubble=!0),this.isPropagationStopped=Eg)},persist:function(){},isPersistent:Eg}),h}var tu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(d){return d.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sg=Ha(tu),U0=u({},tu,{view:0,detail:0}),mfe=Ha(U0),jy,qy,$0,Cg=u({},U0,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$y,button:0,buttons:0,relatedTarget:function(d){return d.relatedTarget===void 0?d.fromElement===d.srcElement?d.toElement:d.fromElement:d.relatedTarget},movementX:function(d){return"movementX"in d?d.movementX:(d!==$0&&($0&&d.type==="mousemove"?(jy=d.screenX-$0.screenX,qy=d.screenY-$0.screenY):qy=jy=0,$0=d),jy)},movementY:function(d){return"movementY"in d?d.movementY:qy}}),J8=Ha(Cg),gfe=u({},Cg,{dataTransfer:0}),vfe=Ha(gfe),bfe=u({},U0,{relatedTarget:0}),Uy=Ha(bfe),xfe=u({},tu,{animationName:0,elapsedTime:0,pseudoElement:0}),yfe=Ha(xfe),_fe=u({},tu,{clipboardData:function(d){return"clipboardData"in d?d.clipboardData:window.clipboardData}}),wfe=Ha(_fe),Efe=u({},tu,{data:0}),eL=Ha(Efe),Sfe={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cfe={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"},Tfe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Afe(d){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(d):(d=Tfe[d])?!!h[d]:!1}function $y(){return Afe}var kfe=u({},U0,{key:function(d){if(d.key){var h=Sfe[d.key]||d.key;if(h!=="Unidentified")return h}return d.type==="keypress"?(d=wg(d),d===13?"Enter":String.fromCharCode(d)):d.type==="keydown"||d.type==="keyup"?Cfe[d.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$y,charCode:function(d){return d.type==="keypress"?wg(d):0},keyCode:function(d){return d.type==="keydown"||d.type==="keyup"?d.keyCode:0},which:function(d){return d.type==="keypress"?wg(d):d.type==="keydown"||d.type==="keyup"?d.keyCode:0}}),Nfe=Ha(kfe),Rfe=u({},Cg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tL=Ha(Rfe),Mfe=u({},U0,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$y}),Dfe=Ha(Mfe),Ofe=u({},tu,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ife=Ha(Ofe),Lfe=u({},Cg,{deltaX:function(d){return"deltaX"in d?d.deltaX:"wheelDeltaX"in d?-d.wheelDeltaX:0},deltaY:function(d){return"deltaY"in d?d.deltaY:"wheelDeltaY"in d?-d.wheelDeltaY:"wheelDelta"in d?-d.wheelDelta:0},deltaZ:0,deltaMode:0}),Pfe=Ha(Lfe),Ffe=u({},tu,{newState:0,oldState:0}),Bfe=Ha(Ffe),zfe=[9,13,27,32],Hy=Ho&&"CompositionEvent"in window,H0=null;Ho&&"documentMode"in document&&(H0=document.documentMode);var jfe=Ho&&"TextEvent"in window&&!H0,rL=Ho&&(!Hy||H0&&8<H0&&11>=H0),nL=" ",aL=!1;function iL(d,h){switch(d){case"keyup":return zfe.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sL(d){return d=d.detail,typeof d=="object"&&"data"in d?d.data:null}var Rd=!1;function qfe(d,h){switch(d){case"compositionend":return sL(h);case"keypress":return h.which!==32?null:(aL=!0,nL);case"textInput":return d=h.data,d===nL&&aL?null:d;default:return null}}function Ufe(d,h){if(Rd)return d==="compositionend"||!Hy&&iL(d,h)?(d=Z8(),_g=zy=Vl=null,Rd=!1,d):null;switch(d){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return rL&&h.locale!=="ko"?null:h.data;default:return null}}var $fe={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 oL(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h==="input"?!!$fe[d.type]:h==="textarea"}function lL(d,h,x,w){kd?Nd?Nd.push(w):Nd=[w]:kd=w,h=dv(h,"onChange"),0<h.length&&(x=new Sg("onChange","change",null,x,w),d.push({event:x,listeners:h}))}var G0=null,V0=null;function Hfe(d){UP(d,0)}function Tg(d){var h=Oe(d);if($8(h))return d}function cL(d,h){if(d==="change")return h}var uL=!1;if(Ho){var Gy;if(Ho){var Vy="oninput"in document;if(!Vy){var dL=document.createElement("div");dL.setAttribute("oninput","return;"),Vy=typeof dL.oninput=="function"}Gy=Vy}else Gy=!1;uL=Gy&&(!document.documentMode||9<document.documentMode)}function fL(){G0&&(G0.detachEvent("onpropertychange",hL),V0=G0=null)}function hL(d){if(d.propertyName==="value"&&Tg(V0)){var h=[];lL(h,V0,d,Py(d)),Y8(Hfe,h)}}function Gfe(d,h,x){d==="focusin"?(fL(),G0=h,V0=x,G0.attachEvent("onpropertychange",hL)):d==="focusout"&&fL()}function Vfe(d){if(d==="selectionchange"||d==="keyup"||d==="keydown")return Tg(V0)}function Wfe(d,h){if(d==="click")return Tg(h)}function Kfe(d,h){if(d==="input"||d==="change")return Tg(h)}function Xfe(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var hi=typeof Object.is=="function"?Object.is:Xfe;function W0(d,h){if(hi(d,h))return!0;if(typeof d!="object"||d===null||typeof h!="object"||h===null)return!1;var x=Object.keys(d),w=Object.keys(h);if(x.length!==w.length)return!1;for(w=0;w<x.length;w++){var R=x[w];if(!se.call(h,R)||!hi(d[R],h[R]))return!1}return!0}function pL(d){for(;d&&d.firstChild;)d=d.firstChild;return d}function mL(d,h){var x=pL(d);d=0;for(var w;x;){if(x.nodeType===3){if(w=d+x.textContent.length,d<=h&&w>=h)return{node:x,offset:h-d};d=w}e:{for(;x;){if(x.nextSibling){x=x.nextSibling;break e}x=x.parentNode}x=void 0}x=pL(x)}}function gL(d,h){return d&&h?d===h?!0:d&&d.nodeType===3?!1:h&&h.nodeType===3?gL(d,h.parentNode):"contains"in d?d.contains(h):d.compareDocumentPosition?!!(d.compareDocumentPosition(h)&16):!1:!1}function vL(d){d=d!=null&&d.ownerDocument!=null&&d.ownerDocument.defaultView!=null?d.ownerDocument.defaultView:window;for(var h=xg(d.document);h instanceof d.HTMLIFrameElement;){try{var x=typeof h.contentWindow.location.href=="string"}catch{x=!1}if(x)d=h.contentWindow;else break;h=xg(d.document)}return h}function Wy(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h&&(h==="input"&&(d.type==="text"||d.type==="search"||d.type==="tel"||d.type==="url"||d.type==="password")||h==="textarea"||d.contentEditable==="true")}var Yfe=Ho&&"documentMode"in document&&11>=document.documentMode,Md=null,Ky=null,K0=null,Xy=!1;function bL(d,h,x){var w=x.window===x?x.document:x.nodeType===9?x:x.ownerDocument;Xy||Md==null||Md!==xg(w)||(w=Md,"selectionStart"in w&&Wy(w)?w={start:w.selectionStart,end:w.selectionEnd}:(w=(w.ownerDocument&&w.ownerDocument.defaultView||window).getSelection(),w={anchorNode:w.anchorNode,anchorOffset:w.anchorOffset,focusNode:w.focusNode,focusOffset:w.focusOffset}),K0&&W0(K0,w)||(K0=w,w=dv(Ky,"onSelect"),0<w.length&&(h=new Sg("onSelect","select",null,h,x),d.push({event:h,listeners:w}),h.target=Md)))}function ru(d,h){var x={};return x[d.toLowerCase()]=h.toLowerCase(),x["Webkit"+d]="webkit"+h,x["Moz"+d]="moz"+h,x}var Dd={animationend:ru("Animation","AnimationEnd"),animationiteration:ru("Animation","AnimationIteration"),animationstart:ru("Animation","AnimationStart"),transitionrun:ru("Transition","TransitionRun"),transitionstart:ru("Transition","TransitionStart"),transitioncancel:ru("Transition","TransitionCancel"),transitionend:ru("Transition","TransitionEnd")},Yy={},xL={};Ho&&(xL=document.createElement("div").style,"AnimationEvent"in window||(delete Dd.animationend.animation,delete Dd.animationiteration.animation,delete Dd.animationstart.animation),"TransitionEvent"in window||delete Dd.transitionend.transition);function nu(d){if(Yy[d])return Yy[d];if(!Dd[d])return d;var h=Dd[d],x;for(x in h)if(h.hasOwnProperty(x)&&x in xL)return Yy[d]=h[x];return d}var yL=nu("animationend"),_L=nu("animationiteration"),wL=nu("animationstart"),Zfe=nu("transitionrun"),Qfe=nu("transitionstart"),Jfe=nu("transitioncancel"),EL=nu("transitionend"),SL=new Map,Zy="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Zy.push("scrollEnd");function Ss(d,h){SL.set(d,h),Qe(h,[d])}var CL=new WeakMap;function Gi(d,h){if(typeof d=="object"&&d!==null){var x=CL.get(d);return x!==void 0?x:(h={value:d,source:h,stack:q8(h)},CL.set(d,h),h)}return{value:d,source:h,stack:q8(h)}}var Vi=[],Od=0,Qy=0;function Ag(){for(var d=Od,h=Qy=Od=0;h<d;){var x=Vi[h];Vi[h++]=null;var w=Vi[h];Vi[h++]=null;var R=Vi[h];Vi[h++]=null;var O=Vi[h];if(Vi[h++]=null,w!==null&&R!==null){var J=w.pending;J===null?R.next=R:(R.next=J.next,J.next=R),w.pending=R}O!==0&&TL(x,R,O)}}function kg(d,h,x,w){Vi[Od++]=d,Vi[Od++]=h,Vi[Od++]=x,Vi[Od++]=w,Qy|=w,d.lanes|=w,d=d.alternate,d!==null&&(d.lanes|=w)}function Jy(d,h,x,w){return kg(d,h,x,w),Ng(d)}function Id(d,h){return kg(d,null,null,h),Ng(d)}function TL(d,h,x){d.lanes|=x;var w=d.alternate;w!==null&&(w.lanes|=x);for(var R=!1,O=d.return;O!==null;)O.childLanes|=x,w=O.alternate,w!==null&&(w.childLanes|=x),O.tag===22&&(d=O.stateNode,d===null||d._visibility&1||(R=!0)),d=O,O=O.return;return d.tag===3?(O=d.stateNode,R&&h!==null&&(R=31-rt(x),d=O.hiddenUpdates,w=d[R],w===null?d[R]=[h]:w.push(h),h.lane=x|536870912),O):null}function Ng(d){if(50<xh)throw xh=0,iw=null,Error(n(185));for(var h=d.return;h!==null;)d=h,h=d.return;return d.tag===3?d.stateNode:null}var Ld={};function e0e(d,h,x,w){this.tag=d,this.key=x,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=w,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pi(d,h,x,w){return new e0e(d,h,x,w)}function e_(d){return d=d.prototype,!(!d||!d.isReactComponent)}function Go(d,h){var x=d.alternate;return x===null?(x=pi(d.tag,h,d.key,d.mode),x.elementType=d.elementType,x.type=d.type,x.stateNode=d.stateNode,x.alternate=d,d.alternate=x):(x.pendingProps=h,x.type=d.type,x.flags=0,x.subtreeFlags=0,x.deletions=null),x.flags=d.flags&65011712,x.childLanes=d.childLanes,x.lanes=d.lanes,x.child=d.child,x.memoizedProps=d.memoizedProps,x.memoizedState=d.memoizedState,x.updateQueue=d.updateQueue,h=d.dependencies,x.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},x.sibling=d.sibling,x.index=d.index,x.ref=d.ref,x.refCleanup=d.refCleanup,x}function AL(d,h){d.flags&=65011714;var x=d.alternate;return x===null?(d.childLanes=0,d.lanes=h,d.child=null,d.subtreeFlags=0,d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null,d.stateNode=null):(d.childLanes=x.childLanes,d.lanes=x.lanes,d.child=x.child,d.subtreeFlags=0,d.deletions=null,d.memoizedProps=x.memoizedProps,d.memoizedState=x.memoizedState,d.updateQueue=x.updateQueue,d.type=x.type,h=x.dependencies,d.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext}),d}function Rg(d,h,x,w,R,O){var J=0;if(w=d,typeof d=="function")e_(d)&&(J=1);else if(typeof d=="string")J=rhe(d,x,V.current)?26:d==="html"||d==="head"||d==="body"?27:5;else e:switch(d){case I:return d=pi(31,x,h,R),d.elementType=I,d.lanes=O,d;case b:return au(x.children,R,O,h);case v:J=8,R|=24;break;case y:return d=pi(12,x,h,R|2),d.elementType=y,d.lanes=O,d;case A:return d=pi(13,x,h,R),d.elementType=A,d.lanes=O,d;case k:return d=pi(19,x,h,R),d.elementType=k,d.lanes=O,d;default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case _:case C:J=10;break e;case S:J=9;break e;case T:J=11;break e;case N:J=14;break e;case L:J=16,w=null;break e}J=29,x=Error(n(130,d===null?"null":typeof d,"")),w=null}return h=pi(J,x,h,R),h.elementType=d,h.type=w,h.lanes=O,h}function au(d,h,x,w){return d=pi(7,d,w,h),d.lanes=x,d}function t_(d,h,x){return d=pi(6,d,null,h),d.lanes=x,d}function r_(d,h,x){return h=pi(4,d.children!==null?d.children:[],d.key,h),h.lanes=x,h.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},h}var Pd=[],Fd=0,Mg=null,Dg=0,Wi=[],Ki=0,iu=null,Vo=1,Wo="";function su(d,h){Pd[Fd++]=Dg,Pd[Fd++]=Mg,Mg=d,Dg=h}function kL(d,h,x){Wi[Ki++]=Vo,Wi[Ki++]=Wo,Wi[Ki++]=iu,iu=d;var w=Vo;d=Wo;var R=32-rt(w)-1;w&=~(1<<R),x+=1;var O=32-rt(h)+R;if(30<O){var J=R-R%5;O=(w&(1<<J)-1).toString(32),w>>=J,R-=J,Vo=1<<32-rt(h)+R|x<<R|w,Wo=O+d}else Vo=1<<O|x<<R|w,Wo=d}function n_(d){d.return!==null&&(su(d,1),kL(d,1,0))}function a_(d){for(;d===Mg;)Mg=Pd[--Fd],Pd[Fd]=null,Dg=Pd[--Fd],Pd[Fd]=null;for(;d===iu;)iu=Wi[--Ki],Wi[Ki]=null,Wo=Wi[--Ki],Wi[Ki]=null,Vo=Wi[--Ki],Wi[Ki]=null}var ka=null,ln=null,Tr=!1,ou=null,to=!1,i_=Error(n(519));function lu(d){var h=Error(n(418,""));throw Z0(Gi(h,d)),i_}function NL(d){var h=d.stateNode,x=d.type,w=d.memoizedProps;switch(h[Dr]=d,h[Er]=w,x){case"dialog":cr("cancel",h),cr("close",h);break;case"iframe":case"object":case"embed":cr("load",h);break;case"video":case"audio":for(x=0;x<_h.length;x++)cr(_h[x],h);break;case"source":cr("error",h);break;case"img":case"image":case"link":cr("error",h),cr("load",h);break;case"details":cr("toggle",h);break;case"input":cr("invalid",h),H8(h,w.value,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name,!0),bg(h);break;case"select":cr("invalid",h);break;case"textarea":cr("invalid",h),V8(h,w.value,w.defaultValue,w.children),bg(h)}x=w.children,typeof x!="string"&&typeof x!="number"&&typeof x!="bigint"||h.textContent===""+x||w.suppressHydrationWarning===!0||VP(h.textContent,x)?(w.popover!=null&&(cr("beforetoggle",h),cr("toggle",h)),w.onScroll!=null&&cr("scroll",h),w.onScrollEnd!=null&&cr("scrollend",h),w.onClick!=null&&(h.onclick=fv),h=!0):h=!1,h||lu(d)}function RL(d){for(ka=d.return;ka;)switch(ka.tag){case 5:case 13:to=!1;return;case 27:case 3:to=!0;return;default:ka=ka.return}}function X0(d){if(d!==ka)return!1;if(!Tr)return RL(d),Tr=!0,!1;var h=d.tag,x;if((x=h!==3&&h!==27)&&((x=h===5)&&(x=d.type,x=!(x!=="form"&&x!=="button")||_w(d.type,d.memoizedProps)),x=!x),x&&ln&&lu(d),RL(d),h===13){if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(n(317));e:{for(d=d.nextSibling,h=0;d;){if(d.nodeType===8)if(x=d.data,x==="/$"){if(h===0){ln=Ts(d.nextSibling);break e}h--}else x!=="$"&&x!=="$!"&&x!=="$?"||h++;d=d.nextSibling}ln=null}}else h===27?(h=ln,lc(d.type)?(d=Cw,Cw=null,ln=d):ln=h):ln=ka?Ts(d.stateNode.nextSibling):null;return!0}function Y0(){ln=ka=null,Tr=!1}function ML(){var d=ou;return d!==null&&(Wa===null?Wa=d:Wa.push.apply(Wa,d),ou=null),d}function Z0(d){ou===null?ou=[d]:ou.push(d)}var s_=Q(null),cu=null,Ko=null;function Wl(d,h,x){F(s_,h._currentValue),h._currentValue=x}function Xo(d){d._currentValue=s_.current,q(s_)}function o_(d,h,x){for(;d!==null;){var w=d.alternate;if((d.childLanes&h)!==h?(d.childLanes|=h,w!==null&&(w.childLanes|=h)):w!==null&&(w.childLanes&h)!==h&&(w.childLanes|=h),d===x)break;d=d.return}}function l_(d,h,x,w){var R=d.child;for(R!==null&&(R.return=d);R!==null;){var O=R.dependencies;if(O!==null){var J=R.child;O=O.firstContext;e:for(;O!==null;){var ae=O;O=R;for(var be=0;be<h.length;be++)if(ae.context===h[be]){O.lanes|=x,ae=O.alternate,ae!==null&&(ae.lanes|=x),o_(O.return,x,d),w||(J=null);break e}O=ae.next}}else if(R.tag===18){if(J=R.return,J===null)throw Error(n(341));J.lanes|=x,O=J.alternate,O!==null&&(O.lanes|=x),o_(J,x,d),J=null}else J=R.child;if(J!==null)J.return=R;else for(J=R;J!==null;){if(J===d){J=null;break}if(R=J.sibling,R!==null){R.return=J.return,J=R;break}J=J.return}R=J}}function Q0(d,h,x,w){d=null;for(var R=h,O=!1;R!==null;){if(!O){if((R.flags&524288)!==0)O=!0;else if((R.flags&262144)!==0)break}if(R.tag===10){var J=R.alternate;if(J===null)throw Error(n(387));if(J=J.memoizedProps,J!==null){var ae=R.type;hi(R.pendingProps.value,J.value)||(d!==null?d.push(ae):d=[ae])}}else if(R===te.current){if(J=R.alternate,J===null)throw Error(n(387));J.memoizedState.memoizedState!==R.memoizedState.memoizedState&&(d!==null?d.push(Ah):d=[Ah])}R=R.return}d!==null&&l_(h,d,x,w),h.flags|=262144}function Og(d){for(d=d.firstContext;d!==null;){if(!hi(d.context._currentValue,d.memoizedValue))return!0;d=d.next}return!1}function uu(d){cu=d,Ko=null,d=d.dependencies,d!==null&&(d.firstContext=null)}function da(d){return DL(cu,d)}function Ig(d,h){return cu===null&&uu(d),DL(d,h)}function DL(d,h){var x=h._currentValue;if(h={context:h,memoizedValue:x,next:null},Ko===null){if(d===null)throw Error(n(308));Ko=h,d.dependencies={lanes:0,firstContext:h},d.flags|=524288}else Ko=Ko.next=h;return x}var t0e=typeof AbortController<"u"?AbortController:function(){var d=[],h=this.signal={aborted:!1,addEventListener:function(x,w){d.push(w)}};this.abort=function(){h.aborted=!0,d.forEach(function(x){return x()})}},r0e=e.unstable_scheduleCallback,n0e=e.unstable_NormalPriority,zn={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function c_(){return{controller:new t0e,data:new Map,refCount:0}}function J0(d){d.refCount--,d.refCount===0&&r0e(n0e,function(){d.controller.abort()})}var eh=null,u_=0,Bd=0,zd=null;function a0e(d,h){if(eh===null){var x=eh=[];u_=0,Bd=fw(),zd={status:"pending",value:void 0,then:function(w){x.push(w)}}}return u_++,h.then(OL,OL),h}function OL(){if(--u_===0&&eh!==null){zd!==null&&(zd.status="fulfilled");var d=eh;eh=null,Bd=0,zd=null;for(var h=0;h<d.length;h++)(0,d[h])()}}function i0e(d,h){var x=[],w={status:"pending",value:null,reason:null,then:function(R){x.push(R)}};return d.then(function(){w.status="fulfilled",w.value=h;for(var R=0;R<x.length;R++)(0,x[R])(h)},function(R){for(w.status="rejected",w.reason=R,R=0;R<x.length;R++)(0,x[R])(void 0)}),w}var IL=D.S;D.S=function(d,h){typeof h=="object"&&h!==null&&typeof h.then=="function"&&a0e(d,h),IL!==null&&IL(d,h)};var du=Q(null);function d_(){var d=du.current;return d!==null?d:Hr.pooledCache}function Lg(d,h){h===null?F(du,du.current):F(du,h.pool)}function LL(){var d=d_();return d===null?null:{parent:zn._currentValue,pool:d}}var th=Error(n(460)),PL=Error(n(474)),Pg=Error(n(542)),f_={then:function(){}};function FL(d){return d=d.status,d==="fulfilled"||d==="rejected"}function Fg(){}function BL(d,h,x){switch(x=d[x],x===void 0?d.push(h):x!==h&&(h.then(Fg,Fg),h=x),h.status){case"fulfilled":return h.value;case"rejected":throw d=h.reason,jL(d),d;default:if(typeof h.status=="string")h.then(Fg,Fg);else{if(d=Hr,d!==null&&100<d.shellSuspendCounter)throw Error(n(482));d=h,d.status="pending",d.then(function(w){if(h.status==="pending"){var R=h;R.status="fulfilled",R.value=w}},function(w){if(h.status==="pending"){var R=h;R.status="rejected",R.reason=w}})}switch(h.status){case"fulfilled":return h.value;case"rejected":throw d=h.reason,jL(d),d}throw rh=h,th}}var rh=null;function zL(){if(rh===null)throw Error(n(459));var d=rh;return rh=null,d}function jL(d){if(d===th||d===Pg)throw Error(n(483))}var Kl=!1;function h_(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function p_(d,h){d=d.updateQueue,h.updateQueue===d&&(h.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,callbacks:null})}function Xl(d){return{lane:d,tag:0,payload:null,callback:null,next:null}}function Yl(d,h,x){var w=d.updateQueue;if(w===null)return null;if(w=w.shared,(Nr&2)!==0){var R=w.pending;return R===null?h.next=h:(h.next=R.next,R.next=h),w.pending=h,h=Ng(d),TL(d,null,x),h}return kg(d,w,h,x),Ng(d)}function nh(d,h,x){if(h=h.updateQueue,h!==null&&(h=h.shared,(x&4194048)!==0)){var w=h.lanes;w&=d.pendingLanes,x|=w,h.lanes=x,Pt(d,x)}}function m_(d,h){var x=d.updateQueue,w=d.alternate;if(w!==null&&(w=w.updateQueue,x===w)){var R=null,O=null;if(x=x.firstBaseUpdate,x!==null){do{var J={lane:x.lane,tag:x.tag,payload:x.payload,callback:null,next:null};O===null?R=O=J:O=O.next=J,x=x.next}while(x!==null);O===null?R=O=h:O=O.next=h}else R=O=h;x={baseState:w.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:w.shared,callbacks:w.callbacks},d.updateQueue=x;return}d=x.lastBaseUpdate,d===null?x.firstBaseUpdate=h:d.next=h,x.lastBaseUpdate=h}var g_=!1;function ah(){if(g_){var d=zd;if(d!==null)throw d}}function ih(d,h,x,w){g_=!1;var R=d.updateQueue;Kl=!1;var O=R.firstBaseUpdate,J=R.lastBaseUpdate,ae=R.shared.pending;if(ae!==null){R.shared.pending=null;var be=ae,Me=be.next;be.next=null,J===null?O=Me:J.next=Me,J=be;var We=d.alternate;We!==null&&(We=We.updateQueue,ae=We.lastBaseUpdate,ae!==J&&(ae===null?We.firstBaseUpdate=Me:ae.next=Me,We.lastBaseUpdate=be))}if(O!==null){var Xe=R.baseState;J=0,We=Me=be=null,ae=O;do{var Be=ae.lane&-536870913,je=Be!==ae.lane;if(je?(vr&Be)===Be:(w&Be)===Be){Be!==0&&Be===Bd&&(g_=!0),We!==null&&(We=We.next={lane:0,tag:ae.tag,payload:ae.payload,callback:null,next:null});e:{var jt=d,Lt=ae;Be=h;var Pr=x;switch(Lt.tag){case 1:if(jt=Lt.payload,typeof jt=="function"){Xe=jt.call(Pr,Xe,Be);break e}Xe=jt;break e;case 3:jt.flags=jt.flags&-65537|128;case 0:if(jt=Lt.payload,Be=typeof jt=="function"?jt.call(Pr,Xe,Be):jt,Be==null)break e;Xe=u({},Xe,Be);break e;case 2:Kl=!0}}Be=ae.callback,Be!==null&&(d.flags|=64,je&&(d.flags|=8192),je=R.callbacks,je===null?R.callbacks=[Be]:je.push(Be))}else je={lane:Be,tag:ae.tag,payload:ae.payload,callback:ae.callback,next:null},We===null?(Me=We=je,be=Xe):We=We.next=je,J|=Be;if(ae=ae.next,ae===null){if(ae=R.shared.pending,ae===null)break;je=ae,ae=je.next,je.next=null,R.lastBaseUpdate=je,R.shared.pending=null}}while(!0);We===null&&(be=Xe),R.baseState=be,R.firstBaseUpdate=Me,R.lastBaseUpdate=We,O===null&&(R.shared.lanes=0),ac|=J,d.lanes=J,d.memoizedState=Xe}}function qL(d,h){if(typeof d!="function")throw Error(n(191,d));d.call(h)}function UL(d,h){var x=d.callbacks;if(x!==null)for(d.callbacks=null,d=0;d<x.length;d++)qL(x[d],h)}var jd=Q(null),Bg=Q(0);function $L(d,h){d=rl,F(Bg,d),F(jd,h),rl=d|h.baseLanes}function v_(){F(Bg,rl),F(jd,jd.current)}function b_(){rl=Bg.current,q(jd),q(Bg)}var Zl=0,nr=null,Ir=null,kn=null,zg=!1,qd=!1,fu=!1,jg=0,sh=0,Ud=null,s0e=0;function bn(){throw Error(n(321))}function x_(d,h){if(h===null)return!1;for(var x=0;x<h.length&&x<d.length;x++)if(!hi(d[x],h[x]))return!1;return!0}function y_(d,h,x,w,R,O){return Zl=O,nr=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,D.H=d===null||d.memoizedState===null?T7:A7,fu=!1,O=x(w,R),fu=!1,qd&&(O=GL(h,x,w,R)),HL(d),O}function HL(d){D.H=Vg;var h=Ir!==null&&Ir.next!==null;if(Zl=0,kn=Ir=nr=null,zg=!1,sh=0,Ud=null,h)throw Error(n(300));d===null||Kn||(d=d.dependencies,d!==null&&Og(d)&&(Kn=!0))}function GL(d,h,x,w){nr=d;var R=0;do{if(qd&&(Ud=null),sh=0,qd=!1,25<=R)throw Error(n(301));if(R+=1,kn=Ir=null,d.updateQueue!=null){var O=d.updateQueue;O.lastEffect=null,O.events=null,O.stores=null,O.memoCache!=null&&(O.memoCache.index=0)}D.H=h0e,O=h(x,w)}while(qd);return O}function o0e(){var d=D.H,h=d.useState()[0];return h=typeof h.then=="function"?oh(h):h,d=d.useState()[0],(Ir!==null?Ir.memoizedState:null)!==d&&(nr.flags|=1024),h}function __(){var d=jg!==0;return jg=0,d}function w_(d,h,x){h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~x}function E_(d){if(zg){for(d=d.memoizedState;d!==null;){var h=d.queue;h!==null&&(h.pending=null),d=d.next}zg=!1}Zl=0,kn=Ir=nr=null,qd=!1,sh=jg=0,Ud=null}function Ga(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kn===null?nr.memoizedState=kn=d:kn=kn.next=d,kn}function Nn(){if(Ir===null){var d=nr.alternate;d=d!==null?d.memoizedState:null}else d=Ir.next;var h=kn===null?nr.memoizedState:kn.next;if(h!==null)kn=h,Ir=d;else{if(d===null)throw nr.alternate===null?Error(n(467)):Error(n(310));Ir=d,d={memoizedState:Ir.memoizedState,baseState:Ir.baseState,baseQueue:Ir.baseQueue,queue:Ir.queue,next:null},kn===null?nr.memoizedState=kn=d:kn=kn.next=d}return kn}function S_(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oh(d){var h=sh;return sh+=1,Ud===null&&(Ud=[]),d=BL(Ud,d,h),h=nr,(kn===null?h.memoizedState:kn.next)===null&&(h=h.alternate,D.H=h===null||h.memoizedState===null?T7:A7),d}function qg(d){if(d!==null&&typeof d=="object"){if(typeof d.then=="function")return oh(d);if(d.$$typeof===C)return da(d)}throw Error(n(438,String(d)))}function C_(d){var h=null,x=nr.updateQueue;if(x!==null&&(h=x.memoCache),h==null){var w=nr.alternate;w!==null&&(w=w.updateQueue,w!==null&&(w=w.memoCache,w!=null&&(h={data:w.data.map(function(R){return R.slice()}),index:0})))}if(h==null&&(h={data:[],index:0}),x===null&&(x=S_(),nr.updateQueue=x),x.memoCache=h,x=h.data[h.index],x===void 0)for(x=h.data[h.index]=Array(d),w=0;w<d;w++)x[w]=P;return h.index++,x}function Yo(d,h){return typeof h=="function"?h(d):h}function Ug(d){var h=Nn();return T_(h,Ir,d)}function T_(d,h,x){var w=d.queue;if(w===null)throw Error(n(311));w.lastRenderedReducer=x;var R=d.baseQueue,O=w.pending;if(O!==null){if(R!==null){var J=R.next;R.next=O.next,O.next=J}h.baseQueue=R=O,w.pending=null}if(O=d.baseState,R===null)d.memoizedState=O;else{h=R.next;var ae=J=null,be=null,Me=h,We=!1;do{var Xe=Me.lane&-536870913;if(Xe!==Me.lane?(vr&Xe)===Xe:(Zl&Xe)===Xe){var Be=Me.revertLane;if(Be===0)be!==null&&(be=be.next={lane:0,revertLane:0,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null}),Xe===Bd&&(We=!0);else if((Zl&Be)===Be){Me=Me.next,Be===Bd&&(We=!0);continue}else Xe={lane:0,revertLane:Me.revertLane,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null},be===null?(ae=be=Xe,J=O):be=be.next=Xe,nr.lanes|=Be,ac|=Be;Xe=Me.action,fu&&x(O,Xe),O=Me.hasEagerState?Me.eagerState:x(O,Xe)}else Be={lane:Xe,revertLane:Me.revertLane,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null},be===null?(ae=be=Be,J=O):be=be.next=Be,nr.lanes|=Xe,ac|=Xe;Me=Me.next}while(Me!==null&&Me!==h);if(be===null?J=O:be.next=ae,!hi(O,d.memoizedState)&&(Kn=!0,We&&(x=zd,x!==null)))throw x;d.memoizedState=O,d.baseState=J,d.baseQueue=be,w.lastRenderedState=O}return R===null&&(w.lanes=0),[d.memoizedState,w.dispatch]}function A_(d){var h=Nn(),x=h.queue;if(x===null)throw Error(n(311));x.lastRenderedReducer=d;var w=x.dispatch,R=x.pending,O=h.memoizedState;if(R!==null){x.pending=null;var J=R=R.next;do O=d(O,J.action),J=J.next;while(J!==R);hi(O,h.memoizedState)||(Kn=!0),h.memoizedState=O,h.baseQueue===null&&(h.baseState=O),x.lastRenderedState=O}return[O,w]}function VL(d,h,x){var w=nr,R=Nn(),O=Tr;if(O){if(x===void 0)throw Error(n(407));x=x()}else x=h();var J=!hi((Ir||R).memoizedState,x);J&&(R.memoizedState=x,Kn=!0),R=R.queue;var ae=XL.bind(null,w,R,d);if(lh(2048,8,ae,[d]),R.getSnapshot!==h||J||kn!==null&&kn.memoizedState.tag&1){if(w.flags|=2048,$d(9,$g(),KL.bind(null,w,R,x,h),null),Hr===null)throw Error(n(349));O||(Zl&124)!==0||WL(w,h,x)}return x}function WL(d,h,x){d.flags|=16384,d={getSnapshot:h,value:x},h=nr.updateQueue,h===null?(h=S_(),nr.updateQueue=h,h.stores=[d]):(x=h.stores,x===null?h.stores=[d]:x.push(d))}function KL(d,h,x,w){h.value=x,h.getSnapshot=w,YL(h)&&ZL(d)}function XL(d,h,x){return x(function(){YL(h)&&ZL(d)})}function YL(d){var h=d.getSnapshot;d=d.value;try{var x=h();return!hi(d,x)}catch{return!0}}function ZL(d){var h=Id(d,2);h!==null&&xi(h,d,2)}function k_(d){var h=Ga();if(typeof d=="function"){var x=d;if(d=x(),fu){Ze(!0);try{x()}finally{Ze(!1)}}}return h.memoizedState=h.baseState=d,h.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:d},h}function QL(d,h,x,w){return d.baseState=x,T_(d,Ir,typeof w=="function"?w:Yo)}function l0e(d,h,x,w,R){if(Gg(d))throw Error(n(485));if(d=h.action,d!==null){var O={payload:R,action:d,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(J){O.listeners.push(J)}};D.T!==null?x(!0):O.isTransition=!1,w(O),x=h.pending,x===null?(O.next=h.pending=O,JL(h,O)):(O.next=x.next,h.pending=x.next=O)}}function JL(d,h){var x=h.action,w=h.payload,R=d.state;if(h.isTransition){var O=D.T,J={};D.T=J;try{var ae=x(R,w),be=D.S;be!==null&&be(J,ae),e7(d,h,ae)}catch(Me){N_(d,h,Me)}finally{D.T=O}}else try{O=x(R,w),e7(d,h,O)}catch(Me){N_(d,h,Me)}}function e7(d,h,x){x!==null&&typeof x=="object"&&typeof x.then=="function"?x.then(function(w){t7(d,h,w)},function(w){return N_(d,h,w)}):t7(d,h,x)}function t7(d,h,x){h.status="fulfilled",h.value=x,r7(h),d.state=x,h=d.pending,h!==null&&(x=h.next,x===h?d.pending=null:(x=x.next,h.next=x,JL(d,x)))}function N_(d,h,x){var w=d.pending;if(d.pending=null,w!==null){w=w.next;do h.status="rejected",h.reason=x,r7(h),h=h.next;while(h!==w)}d.action=null}function r7(d){d=d.listeners;for(var h=0;h<d.length;h++)(0,d[h])()}function n7(d,h){return h}function a7(d,h){if(Tr){var x=Hr.formState;if(x!==null){e:{var w=nr;if(Tr){if(ln){t:{for(var R=ln,O=to;R.nodeType!==8;){if(!O){R=null;break t}if(R=Ts(R.nextSibling),R===null){R=null;break t}}O=R.data,R=O==="F!"||O==="F"?R:null}if(R){ln=Ts(R.nextSibling),w=R.data==="F!";break e}}lu(w)}w=!1}w&&(h=x[0])}}return x=Ga(),x.memoizedState=x.baseState=h,w={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n7,lastRenderedState:h},x.queue=w,x=E7.bind(null,nr,w),w.dispatch=x,w=k_(!1),O=I_.bind(null,nr,!1,w.queue),w=Ga(),R={state:h,dispatch:null,action:d,pending:null},w.queue=R,x=l0e.bind(null,nr,R,O,x),R.dispatch=x,w.memoizedState=d,[h,x,!1]}function i7(d){var h=Nn();return s7(h,Ir,d)}function s7(d,h,x){if(h=T_(d,h,n7)[0],d=Ug(Yo)[0],typeof h=="object"&&h!==null&&typeof h.then=="function")try{var w=oh(h)}catch(J){throw J===th?Pg:J}else w=h;h=Nn();var R=h.queue,O=R.dispatch;return x!==h.memoizedState&&(nr.flags|=2048,$d(9,$g(),c0e.bind(null,R,x),null)),[w,O,d]}function c0e(d,h){d.action=h}function o7(d){var h=Nn(),x=Ir;if(x!==null)return s7(h,x,d);Nn(),h=h.memoizedState,x=Nn();var w=x.queue.dispatch;return x.memoizedState=d,[h,w,!1]}function $d(d,h,x,w){return d={tag:d,create:x,deps:w,inst:h,next:null},h=nr.updateQueue,h===null&&(h=S_(),nr.updateQueue=h),x=h.lastEffect,x===null?h.lastEffect=d.next=d:(w=x.next,x.next=d,d.next=w,h.lastEffect=d),d}function $g(){return{destroy:void 0,resource:void 0}}function l7(){return Nn().memoizedState}function Hg(d,h,x,w){var R=Ga();w=w===void 0?null:w,nr.flags|=d,R.memoizedState=$d(1|h,$g(),x,w)}function lh(d,h,x,w){var R=Nn();w=w===void 0?null:w;var O=R.memoizedState.inst;Ir!==null&&w!==null&&x_(w,Ir.memoizedState.deps)?R.memoizedState=$d(h,O,x,w):(nr.flags|=d,R.memoizedState=$d(1|h,O,x,w))}function c7(d,h){Hg(8390656,8,d,h)}function u7(d,h){lh(2048,8,d,h)}function d7(d,h){return lh(4,2,d,h)}function f7(d,h){return lh(4,4,d,h)}function h7(d,h){if(typeof h=="function"){d=d();var x=h(d);return function(){typeof x=="function"?x():h(null)}}if(h!=null)return d=d(),h.current=d,function(){h.current=null}}function p7(d,h,x){x=x!=null?x.concat([d]):null,lh(4,4,h7.bind(null,h,d),x)}function R_(){}function m7(d,h){var x=Nn();h=h===void 0?null:h;var w=x.memoizedState;return h!==null&&x_(h,w[1])?w[0]:(x.memoizedState=[d,h],d)}function g7(d,h){var x=Nn();h=h===void 0?null:h;var w=x.memoizedState;if(h!==null&&x_(h,w[1]))return w[0];if(w=d(),fu){Ze(!0);try{d()}finally{Ze(!1)}}return x.memoizedState=[w,h],w}function M_(d,h,x){return x===void 0||(Zl&1073741824)!==0?d.memoizedState=h:(d.memoizedState=x,d=xP(),nr.lanes|=d,ac|=d,x)}function v7(d,h,x,w){return hi(x,h)?x:jd.current!==null?(d=M_(d,x,w),hi(d,h)||(Kn=!0),d):(Zl&42)===0?(Kn=!0,d.memoizedState=x):(d=xP(),nr.lanes|=d,ac|=d,h)}function b7(d,h,x,w,R){var O=U.p;U.p=O!==0&&8>O?O:8;var J=D.T,ae={};D.T=ae,I_(d,!1,h,x);try{var be=R(),Me=D.S;if(Me!==null&&Me(ae,be),be!==null&&typeof be=="object"&&typeof be.then=="function"){var We=i0e(be,w);ch(d,h,We,bi(d))}else ch(d,h,w,bi(d))}catch(Xe){ch(d,h,{then:function(){},status:"rejected",reason:Xe},bi())}finally{U.p=O,D.T=J}}function u0e(){}function D_(d,h,x,w){if(d.tag!==5)throw Error(n(476));var R=x7(d).queue;b7(d,R,h,Y,x===null?u0e:function(){return y7(d),x(w)})}function x7(d){var h=d.memoizedState;if(h!==null)return h;h={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:Y},next:null};var x={};return h.next={memoizedState:x,baseState:x,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:x},next:null},d.memoizedState=h,d=d.alternate,d!==null&&(d.memoizedState=h),h}function y7(d){var h=x7(d).next.queue;ch(d,h,{},bi())}function O_(){return da(Ah)}function _7(){return Nn().memoizedState}function w7(){return Nn().memoizedState}function d0e(d){for(var h=d.return;h!==null;){switch(h.tag){case 24:case 3:var x=bi();d=Xl(x);var w=Yl(h,d,x);w!==null&&(xi(w,h,x),nh(w,h,x)),h={cache:c_()},d.payload=h;return}h=h.return}}function f0e(d,h,x){var w=bi();x={lane:w,revertLane:0,action:x,hasEagerState:!1,eagerState:null,next:null},Gg(d)?S7(h,x):(x=Jy(d,h,x,w),x!==null&&(xi(x,d,w),C7(x,h,w)))}function E7(d,h,x){var w=bi();ch(d,h,x,w)}function ch(d,h,x,w){var R={lane:w,revertLane:0,action:x,hasEagerState:!1,eagerState:null,next:null};if(Gg(d))S7(h,R);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=h.lastRenderedReducer,O!==null))try{var J=h.lastRenderedState,ae=O(J,x);if(R.hasEagerState=!0,R.eagerState=ae,hi(ae,J))return kg(d,h,R,0),Hr===null&&Ag(),!1}catch{}finally{}if(x=Jy(d,h,R,w),x!==null)return xi(x,d,w),C7(x,h,w),!0}return!1}function I_(d,h,x,w){if(w={lane:2,revertLane:fw(),action:w,hasEagerState:!1,eagerState:null,next:null},Gg(d)){if(h)throw Error(n(479))}else h=Jy(d,x,w,2),h!==null&&xi(h,d,2)}function Gg(d){var h=d.alternate;return d===nr||h!==null&&h===nr}function S7(d,h){qd=zg=!0;var x=d.pending;x===null?h.next=h:(h.next=x.next,x.next=h),d.pending=h}function C7(d,h,x){if((x&4194048)!==0){var w=h.lanes;w&=d.pendingLanes,x|=w,h.lanes=x,Pt(d,x)}}var Vg={readContext:da,use:qg,useCallback:bn,useContext:bn,useEffect:bn,useImperativeHandle:bn,useLayoutEffect:bn,useInsertionEffect:bn,useMemo:bn,useReducer:bn,useRef:bn,useState:bn,useDebugValue:bn,useDeferredValue:bn,useTransition:bn,useSyncExternalStore:bn,useId:bn,useHostTransitionStatus:bn,useFormState:bn,useActionState:bn,useOptimistic:bn,useMemoCache:bn,useCacheRefresh:bn},T7={readContext:da,use:qg,useCallback:function(d,h){return Ga().memoizedState=[d,h===void 0?null:h],d},useContext:da,useEffect:c7,useImperativeHandle:function(d,h,x){x=x!=null?x.concat([d]):null,Hg(4194308,4,h7.bind(null,h,d),x)},useLayoutEffect:function(d,h){return Hg(4194308,4,d,h)},useInsertionEffect:function(d,h){Hg(4,2,d,h)},useMemo:function(d,h){var x=Ga();h=h===void 0?null:h;var w=d();if(fu){Ze(!0);try{d()}finally{Ze(!1)}}return x.memoizedState=[w,h],w},useReducer:function(d,h,x){var w=Ga();if(x!==void 0){var R=x(h);if(fu){Ze(!0);try{x(h)}finally{Ze(!1)}}}else R=h;return w.memoizedState=w.baseState=R,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:R},w.queue=d,d=d.dispatch=f0e.bind(null,nr,d),[w.memoizedState,d]},useRef:function(d){var h=Ga();return d={current:d},h.memoizedState=d},useState:function(d){d=k_(d);var h=d.queue,x=E7.bind(null,nr,h);return h.dispatch=x,[d.memoizedState,x]},useDebugValue:R_,useDeferredValue:function(d,h){var x=Ga();return M_(x,d,h)},useTransition:function(){var d=k_(!1);return d=b7.bind(null,nr,d.queue,!0,!1),Ga().memoizedState=d,[!1,d]},useSyncExternalStore:function(d,h,x){var w=nr,R=Ga();if(Tr){if(x===void 0)throw Error(n(407));x=x()}else{if(x=h(),Hr===null)throw Error(n(349));(vr&124)!==0||WL(w,h,x)}R.memoizedState=x;var O={value:x,getSnapshot:h};return R.queue=O,c7(XL.bind(null,w,O,d),[d]),w.flags|=2048,$d(9,$g(),KL.bind(null,w,O,x,h),null),x},useId:function(){var d=Ga(),h=Hr.identifierPrefix;if(Tr){var x=Wo,w=Vo;x=(w&~(1<<32-rt(w)-1)).toString(32)+x,h="«"+h+"R"+x,x=jg++,0<x&&(h+="H"+x.toString(32)),h+="»"}else x=s0e++,h="«"+h+"r"+x.toString(32)+"»";return d.memoizedState=h},useHostTransitionStatus:O_,useFormState:a7,useActionState:a7,useOptimistic:function(d){var h=Ga();h.memoizedState=h.baseState=d;var x={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return h.queue=x,h=I_.bind(null,nr,!0,x),x.dispatch=h,[d,h]},useMemoCache:C_,useCacheRefresh:function(){return Ga().memoizedState=d0e.bind(null,nr)}},A7={readContext:da,use:qg,useCallback:m7,useContext:da,useEffect:u7,useImperativeHandle:p7,useInsertionEffect:d7,useLayoutEffect:f7,useMemo:g7,useReducer:Ug,useRef:l7,useState:function(){return Ug(Yo)},useDebugValue:R_,useDeferredValue:function(d,h){var x=Nn();return v7(x,Ir.memoizedState,d,h)},useTransition:function(){var d=Ug(Yo)[0],h=Nn().memoizedState;return[typeof d=="boolean"?d:oh(d),h]},useSyncExternalStore:VL,useId:_7,useHostTransitionStatus:O_,useFormState:i7,useActionState:i7,useOptimistic:function(d,h){var x=Nn();return QL(x,Ir,d,h)},useMemoCache:C_,useCacheRefresh:w7},h0e={readContext:da,use:qg,useCallback:m7,useContext:da,useEffect:u7,useImperativeHandle:p7,useInsertionEffect:d7,useLayoutEffect:f7,useMemo:g7,useReducer:A_,useRef:l7,useState:function(){return A_(Yo)},useDebugValue:R_,useDeferredValue:function(d,h){var x=Nn();return Ir===null?M_(x,d,h):v7(x,Ir.memoizedState,d,h)},useTransition:function(){var d=A_(Yo)[0],h=Nn().memoizedState;return[typeof d=="boolean"?d:oh(d),h]},useSyncExternalStore:VL,useId:_7,useHostTransitionStatus:O_,useFormState:o7,useActionState:o7,useOptimistic:function(d,h){var x=Nn();return Ir!==null?QL(x,Ir,d,h):(x.baseState=d,[d,x.queue.dispatch])},useMemoCache:C_,useCacheRefresh:w7},Hd=null,uh=0;function Wg(d){var h=uh;return uh+=1,Hd===null&&(Hd=[]),BL(Hd,d,h)}function dh(d,h){h=h.props.ref,d.ref=h!==void 0?h:null}function Kg(d,h){throw h.$$typeof===f?Error(n(525)):(d=Object.prototype.toString.call(h),Error(n(31,d==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":d)))}function k7(d){var h=d._init;return h(d._payload)}function N7(d){function h(Se,_e){if(d){var Re=Se.deletions;Re===null?(Se.deletions=[_e],Se.flags|=16):Re.push(_e)}}function x(Se,_e){if(!d)return null;for(;_e!==null;)h(Se,_e),_e=_e.sibling;return null}function w(Se){for(var _e=new Map;Se!==null;)Se.key!==null?_e.set(Se.key,Se):_e.set(Se.index,Se),Se=Se.sibling;return _e}function R(Se,_e){return Se=Go(Se,_e),Se.index=0,Se.sibling=null,Se}function O(Se,_e,Re){return Se.index=Re,d?(Re=Se.alternate,Re!==null?(Re=Re.index,Re<_e?(Se.flags|=67108866,_e):Re):(Se.flags|=67108866,_e)):(Se.flags|=1048576,_e)}function J(Se){return d&&Se.alternate===null&&(Se.flags|=67108866),Se}function ae(Se,_e,Re,Ke){return _e===null||_e.tag!==6?(_e=t_(Re,Se.mode,Ke),_e.return=Se,_e):(_e=R(_e,Re),_e.return=Se,_e)}function be(Se,_e,Re,Ke){var _t=Re.type;return _t===b?We(Se,_e,Re.props.children,Ke,Re.key):_e!==null&&(_e.elementType===_t||typeof _t=="object"&&_t!==null&&_t.$$typeof===L&&k7(_t)===_e.type)?(_e=R(_e,Re.props),dh(_e,Re),_e.return=Se,_e):(_e=Rg(Re.type,Re.key,Re.props,null,Se.mode,Ke),dh(_e,Re),_e.return=Se,_e)}function Me(Se,_e,Re,Ke){return _e===null||_e.tag!==4||_e.stateNode.containerInfo!==Re.containerInfo||_e.stateNode.implementation!==Re.implementation?(_e=r_(Re,Se.mode,Ke),_e.return=Se,_e):(_e=R(_e,Re.children||[]),_e.return=Se,_e)}function We(Se,_e,Re,Ke,_t){return _e===null||_e.tag!==7?(_e=au(Re,Se.mode,Ke,_t),_e.return=Se,_e):(_e=R(_e,Re),_e.return=Se,_e)}function Xe(Se,_e,Re){if(typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint")return _e=t_(""+_e,Se.mode,Re),_e.return=Se,_e;if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case p:return Re=Rg(_e.type,_e.key,_e.props,null,Se.mode,Re),dh(Re,_e),Re.return=Se,Re;case m:return _e=r_(_e,Se.mode,Re),_e.return=Se,_e;case L:var Ke=_e._init;return _e=Ke(_e._payload),Xe(Se,_e,Re)}if(W(_e)||B(_e))return _e=au(_e,Se.mode,Re,null),_e.return=Se,_e;if(typeof _e.then=="function")return Xe(Se,Wg(_e),Re);if(_e.$$typeof===C)return Xe(Se,Ig(Se,_e),Re);Kg(Se,_e)}return null}function Be(Se,_e,Re,Ke){var _t=_e!==null?_e.key:null;if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return _t!==null?null:ae(Se,_e,""+Re,Ke);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case p:return Re.key===_t?be(Se,_e,Re,Ke):null;case m:return Re.key===_t?Me(Se,_e,Re,Ke):null;case L:return _t=Re._init,Re=_t(Re._payload),Be(Se,_e,Re,Ke)}if(W(Re)||B(Re))return _t!==null?null:We(Se,_e,Re,Ke,null);if(typeof Re.then=="function")return Be(Se,_e,Wg(Re),Ke);if(Re.$$typeof===C)return Be(Se,_e,Ig(Se,Re),Ke);Kg(Se,Re)}return null}function je(Se,_e,Re,Ke,_t){if(typeof Ke=="string"&&Ke!==""||typeof Ke=="number"||typeof Ke=="bigint")return Se=Se.get(Re)||null,ae(_e,Se,""+Ke,_t);if(typeof Ke=="object"&&Ke!==null){switch(Ke.$$typeof){case p:return Se=Se.get(Ke.key===null?Re:Ke.key)||null,be(_e,Se,Ke,_t);case m:return Se=Se.get(Ke.key===null?Re:Ke.key)||null,Me(_e,Se,Ke,_t);case L:var ir=Ke._init;return Ke=ir(Ke._payload),je(Se,_e,Re,Ke,_t)}if(W(Ke)||B(Ke))return Se=Se.get(Re)||null,We(_e,Se,Ke,_t,null);if(typeof Ke.then=="function")return je(Se,_e,Re,Wg(Ke),_t);if(Ke.$$typeof===C)return je(Se,_e,Re,Ig(_e,Ke),_t);Kg(_e,Ke)}return null}function jt(Se,_e,Re,Ke){for(var _t=null,ir=null,At=_e,Ft=_e=0,Yn=null;At!==null&&Ft<Re.length;Ft++){At.index>Ft?(Yn=At,At=null):Yn=At.sibling;var Sr=Be(Se,At,Re[Ft],Ke);if(Sr===null){At===null&&(At=Yn);break}d&&At&&Sr.alternate===null&&h(Se,At),_e=O(Sr,_e,Ft),ir===null?_t=Sr:ir.sibling=Sr,ir=Sr,At=Yn}if(Ft===Re.length)return x(Se,At),Tr&&su(Se,Ft),_t;if(At===null){for(;Ft<Re.length;Ft++)At=Xe(Se,Re[Ft],Ke),At!==null&&(_e=O(At,_e,Ft),ir===null?_t=At:ir.sibling=At,ir=At);return Tr&&su(Se,Ft),_t}for(At=w(At);Ft<Re.length;Ft++)Yn=je(At,Se,Ft,Re[Ft],Ke),Yn!==null&&(d&&Yn.alternate!==null&&At.delete(Yn.key===null?Ft:Yn.key),_e=O(Yn,_e,Ft),ir===null?_t=Yn:ir.sibling=Yn,ir=Yn);return d&&At.forEach(function(hc){return h(Se,hc)}),Tr&&su(Se,Ft),_t}function Lt(Se,_e,Re,Ke){if(Re==null)throw Error(n(151));for(var _t=null,ir=null,At=_e,Ft=_e=0,Yn=null,Sr=Re.next();At!==null&&!Sr.done;Ft++,Sr=Re.next()){At.index>Ft?(Yn=At,At=null):Yn=At.sibling;var hc=Be(Se,At,Sr.value,Ke);if(hc===null){At===null&&(At=Yn);break}d&&At&&hc.alternate===null&&h(Se,At),_e=O(hc,_e,Ft),ir===null?_t=hc:ir.sibling=hc,ir=hc,At=Yn}if(Sr.done)return x(Se,At),Tr&&su(Se,Ft),_t;if(At===null){for(;!Sr.done;Ft++,Sr=Re.next())Sr=Xe(Se,Sr.value,Ke),Sr!==null&&(_e=O(Sr,_e,Ft),ir===null?_t=Sr:ir.sibling=Sr,ir=Sr);return Tr&&su(Se,Ft),_t}for(At=w(At);!Sr.done;Ft++,Sr=Re.next())Sr=je(At,Se,Ft,Sr.value,Ke),Sr!==null&&(d&&Sr.alternate!==null&&At.delete(Sr.key===null?Ft:Sr.key),_e=O(Sr,_e,Ft),ir===null?_t=Sr:ir.sibling=Sr,ir=Sr);return d&&At.forEach(function(phe){return h(Se,phe)}),Tr&&su(Se,Ft),_t}function Pr(Se,_e,Re,Ke){if(typeof Re=="object"&&Re!==null&&Re.type===b&&Re.key===null&&(Re=Re.props.children),typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case p:e:{for(var _t=Re.key;_e!==null;){if(_e.key===_t){if(_t=Re.type,_t===b){if(_e.tag===7){x(Se,_e.sibling),Ke=R(_e,Re.props.children),Ke.return=Se,Se=Ke;break e}}else if(_e.elementType===_t||typeof _t=="object"&&_t!==null&&_t.$$typeof===L&&k7(_t)===_e.type){x(Se,_e.sibling),Ke=R(_e,Re.props),dh(Ke,Re),Ke.return=Se,Se=Ke;break e}x(Se,_e);break}else h(Se,_e);_e=_e.sibling}Re.type===b?(Ke=au(Re.props.children,Se.mode,Ke,Re.key),Ke.return=Se,Se=Ke):(Ke=Rg(Re.type,Re.key,Re.props,null,Se.mode,Ke),dh(Ke,Re),Ke.return=Se,Se=Ke)}return J(Se);case m:e:{for(_t=Re.key;_e!==null;){if(_e.key===_t)if(_e.tag===4&&_e.stateNode.containerInfo===Re.containerInfo&&_e.stateNode.implementation===Re.implementation){x(Se,_e.sibling),Ke=R(_e,Re.children||[]),Ke.return=Se,Se=Ke;break e}else{x(Se,_e);break}else h(Se,_e);_e=_e.sibling}Ke=r_(Re,Se.mode,Ke),Ke.return=Se,Se=Ke}return J(Se);case L:return _t=Re._init,Re=_t(Re._payload),Pr(Se,_e,Re,Ke)}if(W(Re))return jt(Se,_e,Re,Ke);if(B(Re)){if(_t=B(Re),typeof _t!="function")throw Error(n(150));return Re=_t.call(Re),Lt(Se,_e,Re,Ke)}if(typeof Re.then=="function")return Pr(Se,_e,Wg(Re),Ke);if(Re.$$typeof===C)return Pr(Se,_e,Ig(Se,Re),Ke);Kg(Se,Re)}return typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint"?(Re=""+Re,_e!==null&&_e.tag===6?(x(Se,_e.sibling),Ke=R(_e,Re),Ke.return=Se,Se=Ke):(x(Se,_e),Ke=t_(Re,Se.mode,Ke),Ke.return=Se,Se=Ke),J(Se)):x(Se,_e)}return function(Se,_e,Re,Ke){try{uh=0;var _t=Pr(Se,_e,Re,Ke);return Hd=null,_t}catch(At){if(At===th||At===Pg)throw At;var ir=pi(29,At,null,Se.mode);return ir.lanes=Ke,ir.return=Se,ir}finally{}}}var Gd=N7(!0),R7=N7(!1),Xi=Q(null),ro=null;function Ql(d){var h=d.alternate;F(jn,jn.current&1),F(Xi,d),ro===null&&(h===null||jd.current!==null||h.memoizedState!==null)&&(ro=d)}function M7(d){if(d.tag===22){if(F(jn,jn.current),F(Xi,d),ro===null){var h=d.alternate;h!==null&&h.memoizedState!==null&&(ro=d)}}else Jl()}function Jl(){F(jn,jn.current),F(Xi,Xi.current)}function Zo(d){q(Xi),ro===d&&(ro=null),q(jn)}var jn=Q(0);function Xg(d){for(var h=d;h!==null;){if(h.tag===13){var x=h.memoizedState;if(x!==null&&(x=x.dehydrated,x===null||x.data==="$?"||Sw(x)))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}function L_(d,h,x,w){h=d.memoizedState,x=x(w,h),x=x==null?h:u({},h,x),d.memoizedState=x,d.lanes===0&&(d.updateQueue.baseState=x)}var P_={enqueueSetState:function(d,h,x){d=d._reactInternals;var w=bi(),R=Xl(w);R.payload=h,x!=null&&(R.callback=x),h=Yl(d,R,w),h!==null&&(xi(h,d,w),nh(h,d,w))},enqueueReplaceState:function(d,h,x){d=d._reactInternals;var w=bi(),R=Xl(w);R.tag=1,R.payload=h,x!=null&&(R.callback=x),h=Yl(d,R,w),h!==null&&(xi(h,d,w),nh(h,d,w))},enqueueForceUpdate:function(d,h){d=d._reactInternals;var x=bi(),w=Xl(x);w.tag=2,h!=null&&(w.callback=h),h=Yl(d,w,x),h!==null&&(xi(h,d,x),nh(h,d,x))}};function D7(d,h,x,w,R,O,J){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(w,O,J):h.prototype&&h.prototype.isPureReactComponent?!W0(x,w)||!W0(R,O):!0}function O7(d,h,x,w){d=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(x,w),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(x,w),h.state!==d&&P_.enqueueReplaceState(h,h.state,null)}function hu(d,h){var x=h;if("ref"in h){x={};for(var w in h)w!=="ref"&&(x[w]=h[w])}if(d=d.defaultProps){x===h&&(x=u({},x));for(var R in d)x[R]===void 0&&(x[R]=d[R])}return x}var Yg=typeof reportError=="function"?reportError:function(d){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var h=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof d=="object"&&d!==null&&typeof d.message=="string"?String(d.message):String(d),error:d});if(!window.dispatchEvent(h))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",d);return}console.error(d)};function I7(d){Yg(d)}function L7(d){console.error(d)}function P7(d){Yg(d)}function Zg(d,h){try{var x=d.onUncaughtError;x(h.value,{componentStack:h.stack})}catch(w){setTimeout(function(){throw w})}}function F7(d,h,x){try{var w=d.onCaughtError;w(x.value,{componentStack:x.stack,errorBoundary:h.tag===1?h.stateNode:null})}catch(R){setTimeout(function(){throw R})}}function F_(d,h,x){return x=Xl(x),x.tag=3,x.payload={element:null},x.callback=function(){Zg(d,h)},x}function B7(d){return d=Xl(d),d.tag=3,d}function z7(d,h,x,w){var R=x.type.getDerivedStateFromError;if(typeof R=="function"){var O=w.value;d.payload=function(){return R(O)},d.callback=function(){F7(h,x,w)}}var J=x.stateNode;J!==null&&typeof J.componentDidCatch=="function"&&(d.callback=function(){F7(h,x,w),typeof R!="function"&&(ic===null?ic=new Set([this]):ic.add(this));var ae=w.stack;this.componentDidCatch(w.value,{componentStack:ae!==null?ae:""})})}function p0e(d,h,x,w,R){if(x.flags|=32768,w!==null&&typeof w=="object"&&typeof w.then=="function"){if(h=x.alternate,h!==null&&Q0(h,x,R,!0),x=Xi.current,x!==null){switch(x.tag){case 13:return ro===null?ow():x.alternate===null&&cn===0&&(cn=3),x.flags&=-257,x.flags|=65536,x.lanes=R,w===f_?x.flags|=16384:(h=x.updateQueue,h===null?x.updateQueue=new Set([w]):h.add(w),cw(d,w,R)),!1;case 22:return x.flags|=65536,w===f_?x.flags|=16384:(h=x.updateQueue,h===null?(h={transitions:null,markerInstances:null,retryQueue:new Set([w])},x.updateQueue=h):(x=h.retryQueue,x===null?h.retryQueue=new Set([w]):x.add(w)),cw(d,w,R)),!1}throw Error(n(435,x.tag))}return cw(d,w,R),ow(),!1}if(Tr)return h=Xi.current,h!==null?((h.flags&65536)===0&&(h.flags|=256),h.flags|=65536,h.lanes=R,w!==i_&&(d=Error(n(422),{cause:w}),Z0(Gi(d,x)))):(w!==i_&&(h=Error(n(423),{cause:w}),Z0(Gi(h,x))),d=d.current.alternate,d.flags|=65536,R&=-R,d.lanes|=R,w=Gi(w,x),R=F_(d.stateNode,w,R),m_(d,R),cn!==4&&(cn=2)),!1;var O=Error(n(520),{cause:w});if(O=Gi(O,x),bh===null?bh=[O]:bh.push(O),cn!==4&&(cn=2),h===null)return!0;w=Gi(w,x),x=h;do{switch(x.tag){case 3:return x.flags|=65536,d=R&-R,x.lanes|=d,d=F_(x.stateNode,w,d),m_(x,d),!1;case 1:if(h=x.type,O=x.stateNode,(x.flags&128)===0&&(typeof h.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(ic===null||!ic.has(O))))return x.flags|=65536,R&=-R,x.lanes|=R,R=B7(R),z7(R,d,x,w),m_(x,R),!1}x=x.return}while(x!==null);return!1}var j7=Error(n(461)),Kn=!1;function aa(d,h,x,w){h.child=d===null?R7(h,null,x,w):Gd(h,d.child,x,w)}function q7(d,h,x,w,R){x=x.render;var O=h.ref;if("ref"in w){var J={};for(var ae in w)ae!=="ref"&&(J[ae]=w[ae])}else J=w;return uu(h),w=y_(d,h,x,J,O,R),ae=__(),d!==null&&!Kn?(w_(d,h,R),Qo(d,h,R)):(Tr&&ae&&n_(h),h.flags|=1,aa(d,h,w,R),h.child)}function U7(d,h,x,w,R){if(d===null){var O=x.type;return typeof O=="function"&&!e_(O)&&O.defaultProps===void 0&&x.compare===null?(h.tag=15,h.type=O,$7(d,h,O,w,R)):(d=Rg(x.type,null,w,h,h.mode,R),d.ref=h.ref,d.return=h,h.child=d)}if(O=d.child,!G_(d,R)){var J=O.memoizedProps;if(x=x.compare,x=x!==null?x:W0,x(J,w)&&d.ref===h.ref)return Qo(d,h,R)}return h.flags|=1,d=Go(O,w),d.ref=h.ref,d.return=h,h.child=d}function $7(d,h,x,w,R){if(d!==null){var O=d.memoizedProps;if(W0(O,w)&&d.ref===h.ref)if(Kn=!1,h.pendingProps=w=O,G_(d,R))(d.flags&131072)!==0&&(Kn=!0);else return h.lanes=d.lanes,Qo(d,h,R)}return B_(d,h,x,w,R)}function H7(d,h,x){var w=h.pendingProps,R=w.children,O=d!==null?d.memoizedState:null;if(w.mode==="hidden"){if((h.flags&128)!==0){if(w=O!==null?O.baseLanes|x:x,d!==null){for(R=h.child=d.child,O=0;R!==null;)O=O|R.lanes|R.childLanes,R=R.sibling;h.childLanes=O&~w}else h.childLanes=0,h.child=null;return G7(d,h,w,x)}if((x&536870912)!==0)h.memoizedState={baseLanes:0,cachePool:null},d!==null&&Lg(h,O!==null?O.cachePool:null),O!==null?$L(h,O):v_(),M7(h);else return h.lanes=h.childLanes=536870912,G7(d,h,O!==null?O.baseLanes|x:x,x)}else O!==null?(Lg(h,O.cachePool),$L(h,O),Jl(),h.memoizedState=null):(d!==null&&Lg(h,null),v_(),Jl());return aa(d,h,R,x),h.child}function G7(d,h,x,w){var R=d_();return R=R===null?null:{parent:zn._currentValue,pool:R},h.memoizedState={baseLanes:x,cachePool:R},d!==null&&Lg(h,null),v_(),M7(h),d!==null&&Q0(d,h,w,!0),null}function Qg(d,h){var x=h.ref;if(x===null)d!==null&&d.ref!==null&&(h.flags|=4194816);else{if(typeof x!="function"&&typeof x!="object")throw Error(n(284));(d===null||d.ref!==x)&&(h.flags|=4194816)}}function B_(d,h,x,w,R){return uu(h),x=y_(d,h,x,w,void 0,R),w=__(),d!==null&&!Kn?(w_(d,h,R),Qo(d,h,R)):(Tr&&w&&n_(h),h.flags|=1,aa(d,h,x,R),h.child)}function V7(d,h,x,w,R,O){return uu(h),h.updateQueue=null,x=GL(h,w,x,R),HL(d),w=__(),d!==null&&!Kn?(w_(d,h,O),Qo(d,h,O)):(Tr&&w&&n_(h),h.flags|=1,aa(d,h,x,O),h.child)}function W7(d,h,x,w,R){if(uu(h),h.stateNode===null){var O=Ld,J=x.contextType;typeof J=="object"&&J!==null&&(O=da(J)),O=new x(w,O),h.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,O.updater=P_,h.stateNode=O,O._reactInternals=h,O=h.stateNode,O.props=w,O.state=h.memoizedState,O.refs={},h_(h),J=x.contextType,O.context=typeof J=="object"&&J!==null?da(J):Ld,O.state=h.memoizedState,J=x.getDerivedStateFromProps,typeof J=="function"&&(L_(h,x,J,w),O.state=h.memoizedState),typeof x.getDerivedStateFromProps=="function"||typeof O.getSnapshotBeforeUpdate=="function"||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(J=O.state,typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount(),J!==O.state&&P_.enqueueReplaceState(O,O.state,null),ih(h,w,O,R),ah(),O.state=h.memoizedState),typeof O.componentDidMount=="function"&&(h.flags|=4194308),w=!0}else if(d===null){O=h.stateNode;var ae=h.memoizedProps,be=hu(x,ae);O.props=be;var Me=O.context,We=x.contextType;J=Ld,typeof We=="object"&&We!==null&&(J=da(We));var Xe=x.getDerivedStateFromProps;We=typeof Xe=="function"||typeof O.getSnapshotBeforeUpdate=="function",ae=h.pendingProps!==ae,We||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(ae||Me!==J)&&O7(h,O,w,J),Kl=!1;var Be=h.memoizedState;O.state=Be,ih(h,w,O,R),ah(),Me=h.memoizedState,ae||Be!==Me||Kl?(typeof Xe=="function"&&(L_(h,x,Xe,w),Me=h.memoizedState),(be=Kl||D7(h,x,be,w,Be,Me,J))?(We||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount()),typeof O.componentDidMount=="function"&&(h.flags|=4194308)):(typeof O.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=w,h.memoizedState=Me),O.props=w,O.state=Me,O.context=J,w=be):(typeof O.componentDidMount=="function"&&(h.flags|=4194308),w=!1)}else{O=h.stateNode,p_(d,h),J=h.memoizedProps,We=hu(x,J),O.props=We,Xe=h.pendingProps,Be=O.context,Me=x.contextType,be=Ld,typeof Me=="object"&&Me!==null&&(be=da(Me)),ae=x.getDerivedStateFromProps,(Me=typeof ae=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(J!==Xe||Be!==be)&&O7(h,O,w,be),Kl=!1,Be=h.memoizedState,O.state=Be,ih(h,w,O,R),ah();var je=h.memoizedState;J!==Xe||Be!==je||Kl||d!==null&&d.dependencies!==null&&Og(d.dependencies)?(typeof ae=="function"&&(L_(h,x,ae,w),je=h.memoizedState),(We=Kl||D7(h,x,We,w,Be,je,be)||d!==null&&d.dependencies!==null&&Og(d.dependencies))?(Me||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(w,je,be),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(w,je,be)),typeof O.componentDidUpdate=="function"&&(h.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof O.componentDidUpdate!="function"||J===d.memoizedProps&&Be===d.memoizedState||(h.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||J===d.memoizedProps&&Be===d.memoizedState||(h.flags|=1024),h.memoizedProps=w,h.memoizedState=je),O.props=w,O.state=je,O.context=be,w=We):(typeof O.componentDidUpdate!="function"||J===d.memoizedProps&&Be===d.memoizedState||(h.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||J===d.memoizedProps&&Be===d.memoizedState||(h.flags|=1024),w=!1)}return O=w,Qg(d,h),w=(h.flags&128)!==0,O||w?(O=h.stateNode,x=w&&typeof x.getDerivedStateFromError!="function"?null:O.render(),h.flags|=1,d!==null&&w?(h.child=Gd(h,d.child,null,R),h.child=Gd(h,null,x,R)):aa(d,h,x,R),h.memoizedState=O.state,d=h.child):d=Qo(d,h,R),d}function K7(d,h,x,w){return Y0(),h.flags|=256,aa(d,h,x,w),h.child}var z_={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function j_(d){return{baseLanes:d,cachePool:LL()}}function q_(d,h,x){return d=d!==null?d.childLanes&~x:0,h&&(d|=Yi),d}function X7(d,h,x){var w=h.pendingProps,R=!1,O=(h.flags&128)!==0,J;if((J=O)||(J=d!==null&&d.memoizedState===null?!1:(jn.current&2)!==0),J&&(R=!0,h.flags&=-129),J=(h.flags&32)!==0,h.flags&=-33,d===null){if(Tr){if(R?Ql(h):Jl(),Tr){var ae=ln,be;if(be=ae){e:{for(be=ae,ae=to;be.nodeType!==8;){if(!ae){ae=null;break e}if(be=Ts(be.nextSibling),be===null){ae=null;break e}}ae=be}ae!==null?(h.memoizedState={dehydrated:ae,treeContext:iu!==null?{id:Vo,overflow:Wo}:null,retryLane:536870912,hydrationErrors:null},be=pi(18,null,null,0),be.stateNode=ae,be.return=h,h.child=be,ka=h,ln=null,be=!0):be=!1}be||lu(h)}if(ae=h.memoizedState,ae!==null&&(ae=ae.dehydrated,ae!==null))return Sw(ae)?h.lanes=32:h.lanes=536870912,null;Zo(h)}return ae=w.children,w=w.fallback,R?(Jl(),R=h.mode,ae=Jg({mode:"hidden",children:ae},R),w=au(w,R,x,null),ae.return=h,w.return=h,ae.sibling=w,h.child=ae,R=h.child,R.memoizedState=j_(x),R.childLanes=q_(d,J,x),h.memoizedState=z_,w):(Ql(h),U_(h,ae))}if(be=d.memoizedState,be!==null&&(ae=be.dehydrated,ae!==null)){if(O)h.flags&256?(Ql(h),h.flags&=-257,h=$_(d,h,x)):h.memoizedState!==null?(Jl(),h.child=d.child,h.flags|=128,h=null):(Jl(),R=w.fallback,ae=h.mode,w=Jg({mode:"visible",children:w.children},ae),R=au(R,ae,x,null),R.flags|=2,w.return=h,R.return=h,w.sibling=R,h.child=w,Gd(h,d.child,null,x),w=h.child,w.memoizedState=j_(x),w.childLanes=q_(d,J,x),h.memoizedState=z_,h=R);else if(Ql(h),Sw(ae)){if(J=ae.nextSibling&&ae.nextSibling.dataset,J)var Me=J.dgst;J=Me,w=Error(n(419)),w.stack="",w.digest=J,Z0({value:w,source:null,stack:null}),h=$_(d,h,x)}else if(Kn||Q0(d,h,x,!1),J=(x&d.childLanes)!==0,Kn||J){if(J=Hr,J!==null&&(w=x&-x,w=(w&42)!==0?1:fr(w),w=(w&(J.suspendedLanes|x))!==0?0:w,w!==0&&w!==be.retryLane))throw be.retryLane=w,Id(d,w),xi(J,d,w),j7;ae.data==="$?"||ow(),h=$_(d,h,x)}else ae.data==="$?"?(h.flags|=192,h.child=d.child,h=null):(d=be.treeContext,ln=Ts(ae.nextSibling),ka=h,Tr=!0,ou=null,to=!1,d!==null&&(Wi[Ki++]=Vo,Wi[Ki++]=Wo,Wi[Ki++]=iu,Vo=d.id,Wo=d.overflow,iu=h),h=U_(h,w.children),h.flags|=4096);return h}return R?(Jl(),R=w.fallback,ae=h.mode,be=d.child,Me=be.sibling,w=Go(be,{mode:"hidden",children:w.children}),w.subtreeFlags=be.subtreeFlags&65011712,Me!==null?R=Go(Me,R):(R=au(R,ae,x,null),R.flags|=2),R.return=h,w.return=h,w.sibling=R,h.child=w,w=R,R=h.child,ae=d.child.memoizedState,ae===null?ae=j_(x):(be=ae.cachePool,be!==null?(Me=zn._currentValue,be=be.parent!==Me?{parent:Me,pool:Me}:be):be=LL(),ae={baseLanes:ae.baseLanes|x,cachePool:be}),R.memoizedState=ae,R.childLanes=q_(d,J,x),h.memoizedState=z_,w):(Ql(h),x=d.child,d=x.sibling,x=Go(x,{mode:"visible",children:w.children}),x.return=h,x.sibling=null,d!==null&&(J=h.deletions,J===null?(h.deletions=[d],h.flags|=16):J.push(d)),h.child=x,h.memoizedState=null,x)}function U_(d,h){return h=Jg({mode:"visible",children:h},d.mode),h.return=d,d.child=h}function Jg(d,h){return d=pi(22,d,null,h),d.lanes=0,d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},d}function $_(d,h,x){return Gd(h,d.child,null,x),d=U_(h,h.pendingProps.children),d.flags|=2,h.memoizedState=null,d}function Y7(d,h,x){d.lanes|=h;var w=d.alternate;w!==null&&(w.lanes|=h),o_(d.return,h,x)}function H_(d,h,x,w,R){var O=d.memoizedState;O===null?d.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:w,tail:x,tailMode:R}:(O.isBackwards=h,O.rendering=null,O.renderingStartTime=0,O.last=w,O.tail=x,O.tailMode=R)}function Z7(d,h,x){var w=h.pendingProps,R=w.revealOrder,O=w.tail;if(aa(d,h,w.children,x),w=jn.current,(w&2)!==0)w=w&1|2,h.flags|=128;else{if(d!==null&&(d.flags&128)!==0)e:for(d=h.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&Y7(d,x,h);else if(d.tag===19)Y7(d,x,h);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===h)break e;for(;d.sibling===null;){if(d.return===null||d.return===h)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}w&=1}switch(F(jn,w),R){case"forwards":for(x=h.child,R=null;x!==null;)d=x.alternate,d!==null&&Xg(d)===null&&(R=x),x=x.sibling;x=R,x===null?(R=h.child,h.child=null):(R=x.sibling,x.sibling=null),H_(h,!1,R,x,O);break;case"backwards":for(x=null,R=h.child,h.child=null;R!==null;){if(d=R.alternate,d!==null&&Xg(d)===null){h.child=R;break}d=R.sibling,R.sibling=x,x=R,R=d}H_(h,!0,x,null,O);break;case"together":H_(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function Qo(d,h,x){if(d!==null&&(h.dependencies=d.dependencies),ac|=h.lanes,(x&h.childLanes)===0)if(d!==null){if(Q0(d,h,x,!1),(x&h.childLanes)===0)return null}else return null;if(d!==null&&h.child!==d.child)throw Error(n(153));if(h.child!==null){for(d=h.child,x=Go(d,d.pendingProps),h.child=x,x.return=h;d.sibling!==null;)d=d.sibling,x=x.sibling=Go(d,d.pendingProps),x.return=h;x.sibling=null}return h.child}function G_(d,h){return(d.lanes&h)!==0?!0:(d=d.dependencies,!!(d!==null&&Og(d)))}function m0e(d,h,x){switch(h.tag){case 3:oe(h,h.stateNode.containerInfo),Wl(h,zn,d.memoizedState.cache),Y0();break;case 27:case 5:he(h);break;case 4:oe(h,h.stateNode.containerInfo);break;case 10:Wl(h,h.type,h.memoizedProps.value);break;case 13:var w=h.memoizedState;if(w!==null)return w.dehydrated!==null?(Ql(h),h.flags|=128,null):(x&h.child.childLanes)!==0?X7(d,h,x):(Ql(h),d=Qo(d,h,x),d!==null?d.sibling:null);Ql(h);break;case 19:var R=(d.flags&128)!==0;if(w=(x&h.childLanes)!==0,w||(Q0(d,h,x,!1),w=(x&h.childLanes)!==0),R){if(w)return Z7(d,h,x);h.flags|=128}if(R=h.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),F(jn,jn.current),w)break;return null;case 22:case 23:return h.lanes=0,H7(d,h,x);case 24:Wl(h,zn,d.memoizedState.cache)}return Qo(d,h,x)}function Q7(d,h,x){if(d!==null)if(d.memoizedProps!==h.pendingProps)Kn=!0;else{if(!G_(d,x)&&(h.flags&128)===0)return Kn=!1,m0e(d,h,x);Kn=(d.flags&131072)!==0}else Kn=!1,Tr&&(h.flags&1048576)!==0&&kL(h,Dg,h.index);switch(h.lanes=0,h.tag){case 16:e:{d=h.pendingProps;var w=h.elementType,R=w._init;if(w=R(w._payload),h.type=w,typeof w=="function")e_(w)?(d=hu(w,d),h.tag=1,h=W7(null,h,w,d,x)):(h.tag=0,h=B_(null,h,w,d,x));else{if(w!=null){if(R=w.$$typeof,R===T){h.tag=11,h=q7(null,h,w,d,x);break e}else if(R===N){h.tag=14,h=U7(null,h,w,d,x);break e}}throw h=j(w)||w,Error(n(306,h,""))}}return h;case 0:return B_(d,h,h.type,h.pendingProps,x);case 1:return w=h.type,R=hu(w,h.pendingProps),W7(d,h,w,R,x);case 3:e:{if(oe(h,h.stateNode.containerInfo),d===null)throw Error(n(387));w=h.pendingProps;var O=h.memoizedState;R=O.element,p_(d,h),ih(h,w,null,x);var J=h.memoizedState;if(w=J.cache,Wl(h,zn,w),w!==O.cache&&l_(h,[zn],x,!0),ah(),w=J.element,O.isDehydrated)if(O={element:w,isDehydrated:!1,cache:J.cache},h.updateQueue.baseState=O,h.memoizedState=O,h.flags&256){h=K7(d,h,w,x);break e}else if(w!==R){R=Gi(Error(n(424)),h),Z0(R),h=K7(d,h,w,x);break e}else{switch(d=h.stateNode.containerInfo,d.nodeType){case 9:d=d.body;break;default:d=d.nodeName==="HTML"?d.ownerDocument.body:d}for(ln=Ts(d.firstChild),ka=h,Tr=!0,ou=null,to=!0,x=R7(h,null,w,x),h.child=x;x;)x.flags=x.flags&-3|4096,x=x.sibling}else{if(Y0(),w===R){h=Qo(d,h,x);break e}aa(d,h,w,x)}h=h.child}return h;case 26:return Qg(d,h),d===null?(x=r9(h.type,null,h.pendingProps,null))?h.memoizedState=x:Tr||(x=h.type,d=h.pendingProps,w=hv(ee.current).createElement(x),w[Dr]=h,w[Er]=d,sa(w,x,d),Te(w),h.stateNode=w):h.memoizedState=r9(h.type,d.memoizedProps,h.pendingProps,d.memoizedState),null;case 27:return he(h),d===null&&Tr&&(w=h.stateNode=JP(h.type,h.pendingProps,ee.current),ka=h,to=!0,R=ln,lc(h.type)?(Cw=R,ln=Ts(w.firstChild)):ln=R),aa(d,h,h.pendingProps.children,x),Qg(d,h),d===null&&(h.flags|=4194304),h.child;case 5:return d===null&&Tr&&((R=w=ln)&&(w=$0e(w,h.type,h.pendingProps,to),w!==null?(h.stateNode=w,ka=h,ln=Ts(w.firstChild),to=!1,R=!0):R=!1),R||lu(h)),he(h),R=h.type,O=h.pendingProps,J=d!==null?d.memoizedProps:null,w=O.children,_w(R,O)?w=null:J!==null&&_w(R,J)&&(h.flags|=32),h.memoizedState!==null&&(R=y_(d,h,o0e,null,null,x),Ah._currentValue=R),Qg(d,h),aa(d,h,w,x),h.child;case 6:return d===null&&Tr&&((d=x=ln)&&(x=H0e(x,h.pendingProps,to),x!==null?(h.stateNode=x,ka=h,ln=null,d=!0):d=!1),d||lu(h)),null;case 13:return X7(d,h,x);case 4:return oe(h,h.stateNode.containerInfo),w=h.pendingProps,d===null?h.child=Gd(h,null,w,x):aa(d,h,w,x),h.child;case 11:return q7(d,h,h.type,h.pendingProps,x);case 7:return aa(d,h,h.pendingProps,x),h.child;case 8:return aa(d,h,h.pendingProps.children,x),h.child;case 12:return aa(d,h,h.pendingProps.children,x),h.child;case 10:return w=h.pendingProps,Wl(h,h.type,w.value),aa(d,h,w.children,x),h.child;case 9:return R=h.type._context,w=h.pendingProps.children,uu(h),R=da(R),w=w(R),h.flags|=1,aa(d,h,w,x),h.child;case 14:return U7(d,h,h.type,h.pendingProps,x);case 15:return $7(d,h,h.type,h.pendingProps,x);case 19:return Z7(d,h,x);case 31:return w=h.pendingProps,x=h.mode,w={mode:w.mode,children:w.children},d===null?(x=Jg(w,x),x.ref=h.ref,h.child=x,x.return=h,h=x):(x=Go(d.child,w),x.ref=h.ref,h.child=x,x.return=h,h=x),h;case 22:return H7(d,h,x);case 24:return uu(h),w=da(zn),d===null?(R=d_(),R===null&&(R=Hr,O=c_(),R.pooledCache=O,O.refCount++,O!==null&&(R.pooledCacheLanes|=x),R=O),h.memoizedState={parent:w,cache:R},h_(h),Wl(h,zn,R)):((d.lanes&x)!==0&&(p_(d,h),ih(h,null,null,x),ah()),R=d.memoizedState,O=h.memoizedState,R.parent!==w?(R={parent:w,cache:w},h.memoizedState=R,h.lanes===0&&(h.memoizedState=h.updateQueue.baseState=R),Wl(h,zn,w)):(w=O.cache,Wl(h,zn,w),w!==R.cache&&l_(h,[zn],x,!0))),aa(d,h,h.pendingProps.children,x),h.child;case 29:throw h.pendingProps}throw Error(n(156,h.tag))}function Jo(d){d.flags|=4}function J7(d,h){if(h.type!=="stylesheet"||(h.state.loading&4)!==0)d.flags&=-16777217;else if(d.flags|=16777216,!o9(h)){if(h=Xi.current,h!==null&&((vr&4194048)===vr?ro!==null:(vr&62914560)!==vr&&(vr&536870912)===0||h!==ro))throw rh=f_,PL;d.flags|=8192}}function ev(d,h){h!==null&&(d.flags|=4),d.flags&16384&&(h=d.tag!==22?qa():536870912,d.lanes|=h,Xd|=h)}function fh(d,h){if(!Tr)switch(d.tailMode){case"hidden":h=d.tail;for(var x=null;h!==null;)h.alternate!==null&&(x=h),h=h.sibling;x===null?d.tail=null:x.sibling=null;break;case"collapsed":x=d.tail;for(var w=null;x!==null;)x.alternate!==null&&(w=x),x=x.sibling;w===null?h||d.tail===null?d.tail=null:d.tail.sibling=null:w.sibling=null}}function rn(d){var h=d.alternate!==null&&d.alternate.child===d.child,x=0,w=0;if(h)for(var R=d.child;R!==null;)x|=R.lanes|R.childLanes,w|=R.subtreeFlags&65011712,w|=R.flags&65011712,R.return=d,R=R.sibling;else for(R=d.child;R!==null;)x|=R.lanes|R.childLanes,w|=R.subtreeFlags,w|=R.flags,R.return=d,R=R.sibling;return d.subtreeFlags|=w,d.childLanes=x,h}function g0e(d,h,x){var w=h.pendingProps;switch(a_(h),h.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rn(h),null;case 1:return rn(h),null;case 3:return x=h.stateNode,w=null,d!==null&&(w=d.memoizedState.cache),h.memoizedState.cache!==w&&(h.flags|=2048),Xo(zn),pe(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),(d===null||d.child===null)&&(X0(h)?Jo(h):d===null||d.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,ML())),rn(h),null;case 26:return x=h.memoizedState,d===null?(Jo(h),x!==null?(rn(h),J7(h,x)):(rn(h),h.flags&=-16777217)):x?x!==d.memoizedState?(Jo(h),rn(h),J7(h,x)):(rn(h),h.flags&=-16777217):(d.memoizedProps!==w&&Jo(h),rn(h),h.flags&=-16777217),null;case 27:ke(h),x=ee.current;var R=h.type;if(d!==null&&h.stateNode!=null)d.memoizedProps!==w&&Jo(h);else{if(!w){if(h.stateNode===null)throw Error(n(166));return rn(h),null}d=V.current,X0(h)?NL(h):(d=JP(R,w,x),h.stateNode=d,Jo(h))}return rn(h),null;case 5:if(ke(h),x=h.type,d!==null&&h.stateNode!=null)d.memoizedProps!==w&&Jo(h);else{if(!w){if(h.stateNode===null)throw Error(n(166));return rn(h),null}if(d=V.current,X0(h))NL(h);else{switch(R=hv(ee.current),d){case 1:d=R.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:d=R.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":d=R.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":d=R.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":d=R.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof w.is=="string"?R.createElement("select",{is:w.is}):R.createElement("select"),w.multiple?d.multiple=!0:w.size&&(d.size=w.size);break;default:d=typeof w.is=="string"?R.createElement(x,{is:w.is}):R.createElement(x)}}d[Dr]=h,d[Er]=w;e:for(R=h.child;R!==null;){if(R.tag===5||R.tag===6)d.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===h)break e;for(;R.sibling===null;){if(R.return===null||R.return===h)break e;R=R.return}R.sibling.return=R.return,R=R.sibling}h.stateNode=d;e:switch(sa(d,x,w),x){case"button":case"input":case"select":case"textarea":d=!!w.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Jo(h)}}return rn(h),h.flags&=-16777217,null;case 6:if(d&&h.stateNode!=null)d.memoizedProps!==w&&Jo(h);else{if(typeof w!="string"&&h.stateNode===null)throw Error(n(166));if(d=ee.current,X0(h)){if(d=h.stateNode,x=h.memoizedProps,w=null,R=ka,R!==null)switch(R.tag){case 27:case 5:w=R.memoizedProps}d[Dr]=h,d=!!(d.nodeValue===x||w!==null&&w.suppressHydrationWarning===!0||VP(d.nodeValue,x)),d||lu(h)}else d=hv(d).createTextNode(w),d[Dr]=h,h.stateNode=d}return rn(h),null;case 13:if(w=h.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(R=X0(h),w!==null&&w.dehydrated!==null){if(d===null){if(!R)throw Error(n(318));if(R=h.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(n(317));R[Dr]=h}else Y0(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;rn(h),R=!1}else R=ML(),d!==null&&d.memoizedState!==null&&(d.memoizedState.hydrationErrors=R),R=!0;if(!R)return h.flags&256?(Zo(h),h):(Zo(h),null)}if(Zo(h),(h.flags&128)!==0)return h.lanes=x,h;if(x=w!==null,d=d!==null&&d.memoizedState!==null,x){w=h.child,R=null,w.alternate!==null&&w.alternate.memoizedState!==null&&w.alternate.memoizedState.cachePool!==null&&(R=w.alternate.memoizedState.cachePool.pool);var O=null;w.memoizedState!==null&&w.memoizedState.cachePool!==null&&(O=w.memoizedState.cachePool.pool),O!==R&&(w.flags|=2048)}return x!==d&&x&&(h.child.flags|=8192),ev(h,h.updateQueue),rn(h),null;case 4:return pe(),d===null&&gw(h.stateNode.containerInfo),rn(h),null;case 10:return Xo(h.type),rn(h),null;case 19:if(q(jn),R=h.memoizedState,R===null)return rn(h),null;if(w=(h.flags&128)!==0,O=R.rendering,O===null)if(w)fh(R,!1);else{if(cn!==0||d!==null&&(d.flags&128)!==0)for(d=h.child;d!==null;){if(O=Xg(d),O!==null){for(h.flags|=128,fh(R,!1),d=O.updateQueue,h.updateQueue=d,ev(h,d),h.subtreeFlags=0,d=x,x=h.child;x!==null;)AL(x,d),x=x.sibling;return F(jn,jn.current&1|2),h.child}d=d.sibling}R.tail!==null&&xe()>nv&&(h.flags|=128,w=!0,fh(R,!1),h.lanes=4194304)}else{if(!w)if(d=Xg(O),d!==null){if(h.flags|=128,w=!0,d=d.updateQueue,h.updateQueue=d,ev(h,d),fh(R,!0),R.tail===null&&R.tailMode==="hidden"&&!O.alternate&&!Tr)return rn(h),null}else 2*xe()-R.renderingStartTime>nv&&x!==536870912&&(h.flags|=128,w=!0,fh(R,!1),h.lanes=4194304);R.isBackwards?(O.sibling=h.child,h.child=O):(d=R.last,d!==null?d.sibling=O:h.child=O,R.last=O)}return R.tail!==null?(h=R.tail,R.rendering=h,R.tail=h.sibling,R.renderingStartTime=xe(),h.sibling=null,d=jn.current,F(jn,w?d&1|2:d&1),h):(rn(h),null);case 22:case 23:return Zo(h),b_(),w=h.memoizedState!==null,d!==null?d.memoizedState!==null!==w&&(h.flags|=8192):w&&(h.flags|=8192),w?(x&536870912)!==0&&(h.flags&128)===0&&(rn(h),h.subtreeFlags&6&&(h.flags|=8192)):rn(h),x=h.updateQueue,x!==null&&ev(h,x.retryQueue),x=null,d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(x=d.memoizedState.cachePool.pool),w=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(w=h.memoizedState.cachePool.pool),w!==x&&(h.flags|=2048),d!==null&&q(du),null;case 24:return x=null,d!==null&&(x=d.memoizedState.cache),h.memoizedState.cache!==x&&(h.flags|=2048),Xo(zn),rn(h),null;case 25:return null;case 30:return null}throw Error(n(156,h.tag))}function v0e(d,h){switch(a_(h),h.tag){case 1:return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 3:return Xo(zn),pe(),d=h.flags,(d&65536)!==0&&(d&128)===0?(h.flags=d&-65537|128,h):null;case 26:case 27:case 5:return ke(h),null;case 13:if(Zo(h),d=h.memoizedState,d!==null&&d.dehydrated!==null){if(h.alternate===null)throw Error(n(340));Y0()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 19:return q(jn),null;case 4:return pe(),null;case 10:return Xo(h.type),null;case 22:case 23:return Zo(h),b_(),d!==null&&q(du),d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 24:return Xo(zn),null;case 25:return null;default:return null}}function eP(d,h){switch(a_(h),h.tag){case 3:Xo(zn),pe();break;case 26:case 27:case 5:ke(h);break;case 4:pe();break;case 13:Zo(h);break;case 19:q(jn);break;case 10:Xo(h.type);break;case 22:case 23:Zo(h),b_(),d!==null&&q(du);break;case 24:Xo(zn)}}function hh(d,h){try{var x=h.updateQueue,w=x!==null?x.lastEffect:null;if(w!==null){var R=w.next;x=R;do{if((x.tag&d)===d){w=void 0;var O=x.create,J=x.inst;w=O(),J.destroy=w}x=x.next}while(x!==R)}}catch(ae){zr(h,h.return,ae)}}function ec(d,h,x){try{var w=h.updateQueue,R=w!==null?w.lastEffect:null;if(R!==null){var O=R.next;w=O;do{if((w.tag&d)===d){var J=w.inst,ae=J.destroy;if(ae!==void 0){J.destroy=void 0,R=h;var be=x,Me=ae;try{Me()}catch(We){zr(R,be,We)}}}w=w.next}while(w!==O)}}catch(We){zr(h,h.return,We)}}function tP(d){var h=d.updateQueue;if(h!==null){var x=d.stateNode;try{UL(h,x)}catch(w){zr(d,d.return,w)}}}function rP(d,h,x){x.props=hu(d.type,d.memoizedProps),x.state=d.memoizedState;try{x.componentWillUnmount()}catch(w){zr(d,h,w)}}function ph(d,h){try{var x=d.ref;if(x!==null){switch(d.tag){case 26:case 27:case 5:var w=d.stateNode;break;case 30:w=d.stateNode;break;default:w=d.stateNode}typeof x=="function"?d.refCleanup=x(w):x.current=w}}catch(R){zr(d,h,R)}}function no(d,h){var x=d.ref,w=d.refCleanup;if(x!==null)if(typeof w=="function")try{w()}catch(R){zr(d,h,R)}finally{d.refCleanup=null,d=d.alternate,d!=null&&(d.refCleanup=null)}else if(typeof x=="function")try{x(null)}catch(R){zr(d,h,R)}else x.current=null}function nP(d){var h=d.type,x=d.memoizedProps,w=d.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":x.autoFocus&&w.focus();break e;case"img":x.src?w.src=x.src:x.srcSet&&(w.srcset=x.srcSet)}}catch(R){zr(d,d.return,R)}}function V_(d,h,x){try{var w=d.stateNode;B0e(w,d.type,x,h),w[Er]=h}catch(R){zr(d,d.return,R)}}function aP(d){return d.tag===5||d.tag===3||d.tag===26||d.tag===27&&lc(d.type)||d.tag===4}function W_(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||aP(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.tag===27&&lc(d.type)||d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function K_(d,h,x){var w=d.tag;if(w===5||w===6)d=d.stateNode,h?(x.nodeType===9?x.body:x.nodeName==="HTML"?x.ownerDocument.body:x).insertBefore(d,h):(h=x.nodeType===9?x.body:x.nodeName==="HTML"?x.ownerDocument.body:x,h.appendChild(d),x=x._reactRootContainer,x!=null||h.onclick!==null||(h.onclick=fv));else if(w!==4&&(w===27&&lc(d.type)&&(x=d.stateNode,h=null),d=d.child,d!==null))for(K_(d,h,x),d=d.sibling;d!==null;)K_(d,h,x),d=d.sibling}function tv(d,h,x){var w=d.tag;if(w===5||w===6)d=d.stateNode,h?x.insertBefore(d,h):x.appendChild(d);else if(w!==4&&(w===27&&lc(d.type)&&(x=d.stateNode),d=d.child,d!==null))for(tv(d,h,x),d=d.sibling;d!==null;)tv(d,h,x),d=d.sibling}function iP(d){var h=d.stateNode,x=d.memoizedProps;try{for(var w=d.type,R=h.attributes;R.length;)h.removeAttributeNode(R[0]);sa(h,w,x),h[Dr]=d,h[Er]=x}catch(O){zr(d,d.return,O)}}var el=!1,xn=!1,X_=!1,sP=typeof WeakSet=="function"?WeakSet:Set,Xn=null;function b0e(d,h){if(d=d.containerInfo,xw=xv,d=vL(d),Wy(d)){if("selectionStart"in d)var x={start:d.selectionStart,end:d.selectionEnd};else e:{x=(x=d.ownerDocument)&&x.defaultView||window;var w=x.getSelection&&x.getSelection();if(w&&w.rangeCount!==0){x=w.anchorNode;var R=w.anchorOffset,O=w.focusNode;w=w.focusOffset;try{x.nodeType,O.nodeType}catch{x=null;break e}var J=0,ae=-1,be=-1,Me=0,We=0,Xe=d,Be=null;t:for(;;){for(var je;Xe!==x||R!==0&&Xe.nodeType!==3||(ae=J+R),Xe!==O||w!==0&&Xe.nodeType!==3||(be=J+w),Xe.nodeType===3&&(J+=Xe.nodeValue.length),(je=Xe.firstChild)!==null;)Be=Xe,Xe=je;for(;;){if(Xe===d)break t;if(Be===x&&++Me===R&&(ae=J),Be===O&&++We===w&&(be=J),(je=Xe.nextSibling)!==null)break;Xe=Be,Be=Xe.parentNode}Xe=je}x=ae===-1||be===-1?null:{start:ae,end:be}}else x=null}x=x||{start:0,end:0}}else x=null;for(yw={focusedElem:d,selectionRange:x},xv=!1,Xn=h;Xn!==null;)if(h=Xn,d=h.child,(h.subtreeFlags&1024)!==0&&d!==null)d.return=h,Xn=d;else for(;Xn!==null;){switch(h=Xn,O=h.alternate,d=h.flags,h.tag){case 0:break;case 11:case 15:break;case 1:if((d&1024)!==0&&O!==null){d=void 0,x=h,R=O.memoizedProps,O=O.memoizedState,w=x.stateNode;try{var jt=hu(x.type,R,x.elementType===x.type);d=w.getSnapshotBeforeUpdate(jt,O),w.__reactInternalSnapshotBeforeUpdate=d}catch(Lt){zr(x,x.return,Lt)}}break;case 3:if((d&1024)!==0){if(d=h.stateNode.containerInfo,x=d.nodeType,x===9)Ew(d);else if(x===1)switch(d.nodeName){case"HEAD":case"HTML":case"BODY":Ew(d);break;default:d.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((d&1024)!==0)throw Error(n(163))}if(d=h.sibling,d!==null){d.return=h.return,Xn=d;break}Xn=h.return}}function oP(d,h,x){var w=x.flags;switch(x.tag){case 0:case 11:case 15:tc(d,x),w&4&&hh(5,x);break;case 1:if(tc(d,x),w&4)if(d=x.stateNode,h===null)try{d.componentDidMount()}catch(J){zr(x,x.return,J)}else{var R=hu(x.type,h.memoizedProps);h=h.memoizedState;try{d.componentDidUpdate(R,h,d.__reactInternalSnapshotBeforeUpdate)}catch(J){zr(x,x.return,J)}}w&64&&tP(x),w&512&&ph(x,x.return);break;case 3:if(tc(d,x),w&64&&(d=x.updateQueue,d!==null)){if(h=null,x.child!==null)switch(x.child.tag){case 27:case 5:h=x.child.stateNode;break;case 1:h=x.child.stateNode}try{UL(d,h)}catch(J){zr(x,x.return,J)}}break;case 27:h===null&&w&4&&iP(x);case 26:case 5:tc(d,x),h===null&&w&4&&nP(x),w&512&&ph(x,x.return);break;case 12:tc(d,x);break;case 13:tc(d,x),w&4&&uP(d,x),w&64&&(d=x.memoizedState,d!==null&&(d=d.dehydrated,d!==null&&(x=A0e.bind(null,x),G0e(d,x))));break;case 22:if(w=x.memoizedState!==null||el,!w){h=h!==null&&h.memoizedState!==null||xn,R=el;var O=xn;el=w,(xn=h)&&!O?rc(d,x,(x.subtreeFlags&8772)!==0):tc(d,x),el=R,xn=O}break;case 30:break;default:tc(d,x)}}function lP(d){var h=d.alternate;h!==null&&(d.alternate=null,lP(h)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(h=d.stateNode,h!==null&&ce(h)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}var Kr=null,Va=!1;function tl(d,h,x){for(x=x.child;x!==null;)cP(d,h,x),x=x.sibling}function cP(d,h,x){if(Ae&&typeof Ae.onCommitFiberUnmount=="function")try{Ae.onCommitFiberUnmount(Ee,x)}catch{}switch(x.tag){case 26:xn||no(x,h),tl(d,h,x),x.memoizedState?x.memoizedState.count--:x.stateNode&&(x=x.stateNode,x.parentNode.removeChild(x));break;case 27:xn||no(x,h);var w=Kr,R=Va;lc(x.type)&&(Kr=x.stateNode,Va=!1),tl(d,h,x),Eh(x.stateNode),Kr=w,Va=R;break;case 5:xn||no(x,h);case 6:if(w=Kr,R=Va,Kr=null,tl(d,h,x),Kr=w,Va=R,Kr!==null)if(Va)try{(Kr.nodeType===9?Kr.body:Kr.nodeName==="HTML"?Kr.ownerDocument.body:Kr).removeChild(x.stateNode)}catch(O){zr(x,h,O)}else try{Kr.removeChild(x.stateNode)}catch(O){zr(x,h,O)}break;case 18:Kr!==null&&(Va?(d=Kr,ZP(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,x.stateNode),Mh(d)):ZP(Kr,x.stateNode));break;case 4:w=Kr,R=Va,Kr=x.stateNode.containerInfo,Va=!0,tl(d,h,x),Kr=w,Va=R;break;case 0:case 11:case 14:case 15:xn||ec(2,x,h),xn||ec(4,x,h),tl(d,h,x);break;case 1:xn||(no(x,h),w=x.stateNode,typeof w.componentWillUnmount=="function"&&rP(x,h,w)),tl(d,h,x);break;case 21:tl(d,h,x);break;case 22:xn=(w=xn)||x.memoizedState!==null,tl(d,h,x),xn=w;break;default:tl(d,h,x)}}function uP(d,h){if(h.memoizedState===null&&(d=h.alternate,d!==null&&(d=d.memoizedState,d!==null&&(d=d.dehydrated,d!==null))))try{Mh(d)}catch(x){zr(h,h.return,x)}}function x0e(d){switch(d.tag){case 13:case 19:var h=d.stateNode;return h===null&&(h=d.stateNode=new sP),h;case 22:return d=d.stateNode,h=d._retryCache,h===null&&(h=d._retryCache=new sP),h;default:throw Error(n(435,d.tag))}}function Y_(d,h){var x=x0e(d);h.forEach(function(w){var R=k0e.bind(null,d,w);x.has(w)||(x.add(w),w.then(R,R))})}function mi(d,h){var x=h.deletions;if(x!==null)for(var w=0;w<x.length;w++){var R=x[w],O=d,J=h,ae=J;e:for(;ae!==null;){switch(ae.tag){case 27:if(lc(ae.type)){Kr=ae.stateNode,Va=!1;break e}break;case 5:Kr=ae.stateNode,Va=!1;break e;case 3:case 4:Kr=ae.stateNode.containerInfo,Va=!0;break e}ae=ae.return}if(Kr===null)throw Error(n(160));cP(O,J,R),Kr=null,Va=!1,O=R.alternate,O!==null&&(O.return=null),R.return=null}if(h.subtreeFlags&13878)for(h=h.child;h!==null;)dP(h,d),h=h.sibling}var Cs=null;function dP(d,h){var x=d.alternate,w=d.flags;switch(d.tag){case 0:case 11:case 14:case 15:mi(h,d),gi(d),w&4&&(ec(3,d,d.return),hh(3,d),ec(5,d,d.return));break;case 1:mi(h,d),gi(d),w&512&&(xn||x===null||no(x,x.return)),w&64&&el&&(d=d.updateQueue,d!==null&&(w=d.callbacks,w!==null&&(x=d.shared.hiddenCallbacks,d.shared.hiddenCallbacks=x===null?w:x.concat(w))));break;case 26:var R=Cs;if(mi(h,d),gi(d),w&512&&(xn||x===null||no(x,x.return)),w&4){var O=x!==null?x.memoizedState:null;if(w=d.memoizedState,x===null)if(w===null)if(d.stateNode===null){e:{w=d.type,x=d.memoizedProps,R=R.ownerDocument||R;t:switch(w){case"title":O=R.getElementsByTagName("title")[0],(!O||O[le]||O[Dr]||O.namespaceURI==="http://www.w3.org/2000/svg"||O.hasAttribute("itemprop"))&&(O=R.createElement(w),R.head.insertBefore(O,R.querySelector("head > title"))),sa(O,w,x),O[Dr]=d,Te(O),w=O;break e;case"link":var J=i9("link","href",R).get(w+(x.href||""));if(J){for(var ae=0;ae<J.length;ae++)if(O=J[ae],O.getAttribute("href")===(x.href==null||x.href===""?null:x.href)&&O.getAttribute("rel")===(x.rel==null?null:x.rel)&&O.getAttribute("title")===(x.title==null?null:x.title)&&O.getAttribute("crossorigin")===(x.crossOrigin==null?null:x.crossOrigin)){J.splice(ae,1);break t}}O=R.createElement(w),sa(O,w,x),R.head.appendChild(O);break;case"meta":if(J=i9("meta","content",R).get(w+(x.content||""))){for(ae=0;ae<J.length;ae++)if(O=J[ae],O.getAttribute("content")===(x.content==null?null:""+x.content)&&O.getAttribute("name")===(x.name==null?null:x.name)&&O.getAttribute("property")===(x.property==null?null:x.property)&&O.getAttribute("http-equiv")===(x.httpEquiv==null?null:x.httpEquiv)&&O.getAttribute("charset")===(x.charSet==null?null:x.charSet)){J.splice(ae,1);break t}}O=R.createElement(w),sa(O,w,x),R.head.appendChild(O);break;default:throw Error(n(468,w))}O[Dr]=d,Te(O),w=O}d.stateNode=w}else s9(R,d.type,d.stateNode);else d.stateNode=a9(R,w,d.memoizedProps);else O!==w?(O===null?x.stateNode!==null&&(x=x.stateNode,x.parentNode.removeChild(x)):O.count--,w===null?s9(R,d.type,d.stateNode):a9(R,w,d.memoizedProps)):w===null&&d.stateNode!==null&&V_(d,d.memoizedProps,x.memoizedProps)}break;case 27:mi(h,d),gi(d),w&512&&(xn||x===null||no(x,x.return)),x!==null&&w&4&&V_(d,d.memoizedProps,x.memoizedProps);break;case 5:if(mi(h,d),gi(d),w&512&&(xn||x===null||no(x,x.return)),d.flags&32){R=d.stateNode;try{Ad(R,"")}catch(je){zr(d,d.return,je)}}w&4&&d.stateNode!=null&&(R=d.memoizedProps,V_(d,R,x!==null?x.memoizedProps:R)),w&1024&&(X_=!0);break;case 6:if(mi(h,d),gi(d),w&4){if(d.stateNode===null)throw Error(n(162));w=d.memoizedProps,x=d.stateNode;try{x.nodeValue=w}catch(je){zr(d,d.return,je)}}break;case 3:if(gv=null,R=Cs,Cs=pv(h.containerInfo),mi(h,d),Cs=R,gi(d),w&4&&x!==null&&x.memoizedState.isDehydrated)try{Mh(h.containerInfo)}catch(je){zr(d,d.return,je)}X_&&(X_=!1,fP(d));break;case 4:w=Cs,Cs=pv(d.stateNode.containerInfo),mi(h,d),gi(d),Cs=w;break;case 12:mi(h,d),gi(d);break;case 13:mi(h,d),gi(d),d.child.flags&8192&&d.memoizedState!==null!=(x!==null&&x.memoizedState!==null)&&(rw=xe()),w&4&&(w=d.updateQueue,w!==null&&(d.updateQueue=null,Y_(d,w)));break;case 22:R=d.memoizedState!==null;var be=x!==null&&x.memoizedState!==null,Me=el,We=xn;if(el=Me||R,xn=We||be,mi(h,d),xn=We,el=Me,gi(d),w&8192)e:for(h=d.stateNode,h._visibility=R?h._visibility&-2:h._visibility|1,R&&(x===null||be||el||xn||pu(d)),x=null,h=d;;){if(h.tag===5||h.tag===26){if(x===null){be=x=h;try{if(O=be.stateNode,R)J=O.style,typeof J.setProperty=="function"?J.setProperty("display","none","important"):J.display="none";else{ae=be.stateNode;var Xe=be.memoizedProps.style,Be=Xe!=null&&Xe.hasOwnProperty("display")?Xe.display:null;ae.style.display=Be==null||typeof Be=="boolean"?"":(""+Be).trim()}}catch(je){zr(be,be.return,je)}}}else if(h.tag===6){if(x===null){be=h;try{be.stateNode.nodeValue=R?"":be.memoizedProps}catch(je){zr(be,be.return,je)}}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===d)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break e;for(;h.sibling===null;){if(h.return===null||h.return===d)break e;x===h&&(x=null),h=h.return}x===h&&(x=null),h.sibling.return=h.return,h=h.sibling}w&4&&(w=d.updateQueue,w!==null&&(x=w.retryQueue,x!==null&&(w.retryQueue=null,Y_(d,x))));break;case 19:mi(h,d),gi(d),w&4&&(w=d.updateQueue,w!==null&&(d.updateQueue=null,Y_(d,w)));break;case 30:break;case 21:break;default:mi(h,d),gi(d)}}function gi(d){var h=d.flags;if(h&2){try{for(var x,w=d.return;w!==null;){if(aP(w)){x=w;break}w=w.return}if(x==null)throw Error(n(160));switch(x.tag){case 27:var R=x.stateNode,O=W_(d);tv(d,O,R);break;case 5:var J=x.stateNode;x.flags&32&&(Ad(J,""),x.flags&=-33);var ae=W_(d);tv(d,ae,J);break;case 3:case 4:var be=x.stateNode.containerInfo,Me=W_(d);K_(d,Me,be);break;default:throw Error(n(161))}}catch(We){zr(d,d.return,We)}d.flags&=-3}h&4096&&(d.flags&=-4097)}function fP(d){if(d.subtreeFlags&1024)for(d=d.child;d!==null;){var h=d;fP(h),h.tag===5&&h.flags&1024&&h.stateNode.reset(),d=d.sibling}}function tc(d,h){if(h.subtreeFlags&8772)for(h=h.child;h!==null;)oP(d,h.alternate,h),h=h.sibling}function pu(d){for(d=d.child;d!==null;){var h=d;switch(h.tag){case 0:case 11:case 14:case 15:ec(4,h,h.return),pu(h);break;case 1:no(h,h.return);var x=h.stateNode;typeof x.componentWillUnmount=="function"&&rP(h,h.return,x),pu(h);break;case 27:Eh(h.stateNode);case 26:case 5:no(h,h.return),pu(h);break;case 22:h.memoizedState===null&&pu(h);break;case 30:pu(h);break;default:pu(h)}d=d.sibling}}function rc(d,h,x){for(x=x&&(h.subtreeFlags&8772)!==0,h=h.child;h!==null;){var w=h.alternate,R=d,O=h,J=O.flags;switch(O.tag){case 0:case 11:case 15:rc(R,O,x),hh(4,O);break;case 1:if(rc(R,O,x),w=O,R=w.stateNode,typeof R.componentDidMount=="function")try{R.componentDidMount()}catch(Me){zr(w,w.return,Me)}if(w=O,R=w.updateQueue,R!==null){var ae=w.stateNode;try{var be=R.shared.hiddenCallbacks;if(be!==null)for(R.shared.hiddenCallbacks=null,R=0;R<be.length;R++)qL(be[R],ae)}catch(Me){zr(w,w.return,Me)}}x&&J&64&&tP(O),ph(O,O.return);break;case 27:iP(O);case 26:case 5:rc(R,O,x),x&&w===null&&J&4&&nP(O),ph(O,O.return);break;case 12:rc(R,O,x);break;case 13:rc(R,O,x),x&&J&4&&uP(R,O);break;case 22:O.memoizedState===null&&rc(R,O,x),ph(O,O.return);break;case 30:break;default:rc(R,O,x)}h=h.sibling}}function Z_(d,h){var x=null;d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(x=d.memoizedState.cachePool.pool),d=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(d=h.memoizedState.cachePool.pool),d!==x&&(d!=null&&d.refCount++,x!=null&&J0(x))}function Q_(d,h){d=null,h.alternate!==null&&(d=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==d&&(h.refCount++,d!=null&&J0(d))}function ao(d,h,x,w){if(h.subtreeFlags&10256)for(h=h.child;h!==null;)hP(d,h,x,w),h=h.sibling}function hP(d,h,x,w){var R=h.flags;switch(h.tag){case 0:case 11:case 15:ao(d,h,x,w),R&2048&&hh(9,h);break;case 1:ao(d,h,x,w);break;case 3:ao(d,h,x,w),R&2048&&(d=null,h.alternate!==null&&(d=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==d&&(h.refCount++,d!=null&&J0(d)));break;case 12:if(R&2048){ao(d,h,x,w),d=h.stateNode;try{var O=h.memoizedProps,J=O.id,ae=O.onPostCommit;typeof ae=="function"&&ae(J,h.alternate===null?"mount":"update",d.passiveEffectDuration,-0)}catch(be){zr(h,h.return,be)}}else ao(d,h,x,w);break;case 13:ao(d,h,x,w);break;case 23:break;case 22:O=h.stateNode,J=h.alternate,h.memoizedState!==null?O._visibility&2?ao(d,h,x,w):mh(d,h):O._visibility&2?ao(d,h,x,w):(O._visibility|=2,Vd(d,h,x,w,(h.subtreeFlags&10256)!==0)),R&2048&&Z_(J,h);break;case 24:ao(d,h,x,w),R&2048&&Q_(h.alternate,h);break;default:ao(d,h,x,w)}}function Vd(d,h,x,w,R){for(R=R&&(h.subtreeFlags&10256)!==0,h=h.child;h!==null;){var O=d,J=h,ae=x,be=w,Me=J.flags;switch(J.tag){case 0:case 11:case 15:Vd(O,J,ae,be,R),hh(8,J);break;case 23:break;case 22:var We=J.stateNode;J.memoizedState!==null?We._visibility&2?Vd(O,J,ae,be,R):mh(O,J):(We._visibility|=2,Vd(O,J,ae,be,R)),R&&Me&2048&&Z_(J.alternate,J);break;case 24:Vd(O,J,ae,be,R),R&&Me&2048&&Q_(J.alternate,J);break;default:Vd(O,J,ae,be,R)}h=h.sibling}}function mh(d,h){if(h.subtreeFlags&10256)for(h=h.child;h!==null;){var x=d,w=h,R=w.flags;switch(w.tag){case 22:mh(x,w),R&2048&&Z_(w.alternate,w);break;case 24:mh(x,w),R&2048&&Q_(w.alternate,w);break;default:mh(x,w)}h=h.sibling}}var gh=8192;function Wd(d){if(d.subtreeFlags&gh)for(d=d.child;d!==null;)pP(d),d=d.sibling}function pP(d){switch(d.tag){case 26:Wd(d),d.flags&gh&&d.memoizedState!==null&&ahe(Cs,d.memoizedState,d.memoizedProps);break;case 5:Wd(d);break;case 3:case 4:var h=Cs;Cs=pv(d.stateNode.containerInfo),Wd(d),Cs=h;break;case 22:d.memoizedState===null&&(h=d.alternate,h!==null&&h.memoizedState!==null?(h=gh,gh=16777216,Wd(d),gh=h):Wd(d));break;default:Wd(d)}}function mP(d){var h=d.alternate;if(h!==null&&(d=h.child,d!==null)){h.child=null;do h=d.sibling,d.sibling=null,d=h;while(d!==null)}}function vh(d){var h=d.deletions;if((d.flags&16)!==0){if(h!==null)for(var x=0;x<h.length;x++){var w=h[x];Xn=w,vP(w,d)}mP(d)}if(d.subtreeFlags&10256)for(d=d.child;d!==null;)gP(d),d=d.sibling}function gP(d){switch(d.tag){case 0:case 11:case 15:vh(d),d.flags&2048&&ec(9,d,d.return);break;case 3:vh(d);break;case 12:vh(d);break;case 22:var h=d.stateNode;d.memoizedState!==null&&h._visibility&2&&(d.return===null||d.return.tag!==13)?(h._visibility&=-3,rv(d)):vh(d);break;default:vh(d)}}function rv(d){var h=d.deletions;if((d.flags&16)!==0){if(h!==null)for(var x=0;x<h.length;x++){var w=h[x];Xn=w,vP(w,d)}mP(d)}for(d=d.child;d!==null;){switch(h=d,h.tag){case 0:case 11:case 15:ec(8,h,h.return),rv(h);break;case 22:x=h.stateNode,x._visibility&2&&(x._visibility&=-3,rv(h));break;default:rv(h)}d=d.sibling}}function vP(d,h){for(;Xn!==null;){var x=Xn;switch(x.tag){case 0:case 11:case 15:ec(8,x,h);break;case 23:case 22:if(x.memoizedState!==null&&x.memoizedState.cachePool!==null){var w=x.memoizedState.cachePool.pool;w!=null&&w.refCount++}break;case 24:J0(x.memoizedState.cache)}if(w=x.child,w!==null)w.return=x,Xn=w;else e:for(x=d;Xn!==null;){w=Xn;var R=w.sibling,O=w.return;if(lP(w),w===x){Xn=null;break e}if(R!==null){R.return=O,Xn=R;break e}Xn=O}}}var y0e={getCacheForType:function(d){var h=da(zn),x=h.data.get(d);return x===void 0&&(x=d(),h.data.set(d,x)),x}},_0e=typeof WeakMap=="function"?WeakMap:Map,Nr=0,Hr=null,lr=null,vr=0,Rr=0,vi=null,nc=!1,Kd=!1,J_=!1,rl=0,cn=0,ac=0,mu=0,ew=0,Yi=0,Xd=0,bh=null,Wa=null,tw=!1,rw=0,nv=1/0,av=null,ic=null,ia=0,sc=null,Yd=null,Zd=0,nw=0,aw=null,bP=null,xh=0,iw=null;function bi(){if((Nr&2)!==0&&vr!==0)return vr&-vr;if(D.T!==null){var d=Bd;return d!==0?d:fw()}return Wn()}function xP(){Yi===0&&(Yi=(vr&536870912)===0||Tr?qi():536870912);var d=Xi.current;return d!==null&&(d.flags|=32),Yi}function xi(d,h,x){(d===Hr&&(Rr===2||Rr===9)||d.cancelPendingCommit!==null)&&(Qd(d,0),oc(d,vr,Yi,!1)),Ua(d,x),((Nr&2)===0||d!==Hr)&&(d===Hr&&((Nr&2)===0&&(mu|=x),cn===4&&oc(d,vr,Yi,!1)),io(d))}function yP(d,h,x){if((Nr&6)!==0)throw Error(n(327));var w=!x&&(h&124)===0&&(h&d.expiredLanes)===0||$r(d,h),R=w?S0e(d,h):lw(d,h,!0),O=w;do{if(R===0){Kd&&!w&&oc(d,h,0,!1);break}else{if(x=d.current.alternate,O&&!w0e(x)){R=lw(d,h,!1),O=!1;continue}if(R===2){if(O=h,d.errorRecoveryDisabledLanes&O)var J=0;else J=d.pendingLanes&-536870913,J=J!==0?J:J&536870912?536870912:0;if(J!==0){h=J;e:{var ae=d;R=bh;var be=ae.current.memoizedState.isDehydrated;if(be&&(Qd(ae,J).flags|=256),J=lw(ae,J,!1),J!==2){if(J_&&!be){ae.errorRecoveryDisabledLanes|=O,mu|=O,R=4;break e}O=Wa,Wa=R,O!==null&&(Wa===null?Wa=O:Wa.push.apply(Wa,O))}R=J}if(O=!1,R!==2)continue}}if(R===1){Qd(d,0),oc(d,h,0,!0);break}e:{switch(w=d,O=R,O){case 0:case 1:throw Error(n(345));case 4:if((h&4194048)!==h)break;case 6:oc(w,h,Yi,!nc);break e;case 2:Wa=null;break;case 3:case 5:break;default:throw Error(n(329))}if((h&62914560)===h&&(R=rw+300-xe(),10<R)){if(oc(w,h,Yi,!nc),Xt(w,0,!0)!==0)break e;w.timeoutHandle=XP(_P.bind(null,w,x,Wa,av,tw,h,Yi,mu,Xd,nc,O,2,-0,0),R);break e}_P(w,x,Wa,av,tw,h,Yi,mu,Xd,nc,O,0,-0,0)}}break}while(!0);io(d)}function _P(d,h,x,w,R,O,J,ae,be,Me,We,Xe,Be,je){if(d.timeoutHandle=-1,Xe=h.subtreeFlags,(Xe&8192||(Xe&16785408)===16785408)&&(Th={stylesheets:null,count:0,unsuspend:nhe},pP(h),Xe=ihe(),Xe!==null)){d.cancelPendingCommit=Xe(kP.bind(null,d,h,O,x,w,R,J,ae,be,We,1,Be,je)),oc(d,O,J,!Me);return}kP(d,h,O,x,w,R,J,ae,be)}function w0e(d){for(var h=d;;){var x=h.tag;if((x===0||x===11||x===15)&&h.flags&16384&&(x=h.updateQueue,x!==null&&(x=x.stores,x!==null)))for(var w=0;w<x.length;w++){var R=x[w],O=R.getSnapshot;R=R.value;try{if(!hi(O(),R))return!1}catch{return!1}}if(x=h.child,h.subtreeFlags&16384&&x!==null)x.return=h,h=x;else{if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function oc(d,h,x,w){h&=~ew,h&=~mu,d.suspendedLanes|=h,d.pingedLanes&=~h,w&&(d.warmLanes|=h),w=d.expirationTimes;for(var R=h;0<R;){var O=31-rt(R),J=1<<O;w[O]=-1,R&=~J}x!==0&&Gl(d,x,h)}function iv(){return(Nr&6)===0?(yh(0),!1):!0}function sw(){if(lr!==null){if(Rr===0)var d=lr.return;else d=lr,Ko=cu=null,E_(d),Hd=null,uh=0,d=lr;for(;d!==null;)eP(d.alternate,d),d=d.return;lr=null}}function Qd(d,h){var x=d.timeoutHandle;x!==-1&&(d.timeoutHandle=-1,j0e(x)),x=d.cancelPendingCommit,x!==null&&(d.cancelPendingCommit=null,x()),sw(),Hr=d,lr=x=Go(d.current,null),vr=h,Rr=0,vi=null,nc=!1,Kd=$r(d,h),J_=!1,Xd=Yi=ew=mu=ac=cn=0,Wa=bh=null,tw=!1,(h&8)!==0&&(h|=h&32);var w=d.entangledLanes;if(w!==0)for(d=d.entanglements,w&=h;0<w;){var R=31-rt(w),O=1<<R;h|=d[R],w&=~O}return rl=h,Ag(),x}function wP(d,h){nr=null,D.H=Vg,h===th||h===Pg?(h=zL(),Rr=3):h===PL?(h=zL(),Rr=4):Rr=h===j7?8:h!==null&&typeof h=="object"&&typeof h.then=="function"?6:1,vi=h,lr===null&&(cn=1,Zg(d,Gi(h,d.current)))}function EP(){var d=D.H;return D.H=Vg,d===null?Vg:d}function SP(){var d=D.A;return D.A=y0e,d}function ow(){cn=4,nc||(vr&4194048)!==vr&&Xi.current!==null||(Kd=!0),(ac&134217727)===0&&(mu&134217727)===0||Hr===null||oc(Hr,vr,Yi,!1)}function lw(d,h,x){var w=Nr;Nr|=2;var R=EP(),O=SP();(Hr!==d||vr!==h)&&(av=null,Qd(d,h)),h=!1;var J=cn;e:do try{if(Rr!==0&&lr!==null){var ae=lr,be=vi;switch(Rr){case 8:sw(),J=6;break e;case 3:case 2:case 9:case 6:Xi.current===null&&(h=!0);var Me=Rr;if(Rr=0,vi=null,Jd(d,ae,be,Me),x&&Kd){J=0;break e}break;default:Me=Rr,Rr=0,vi=null,Jd(d,ae,be,Me)}}E0e(),J=cn;break}catch(We){wP(d,We)}while(!0);return h&&d.shellSuspendCounter++,Ko=cu=null,Nr=w,D.H=R,D.A=O,lr===null&&(Hr=null,vr=0,Ag()),J}function E0e(){for(;lr!==null;)CP(lr)}function S0e(d,h){var x=Nr;Nr|=2;var w=EP(),R=SP();Hr!==d||vr!==h?(av=null,nv=xe()+500,Qd(d,h)):Kd=$r(d,h);e:do try{if(Rr!==0&&lr!==null){h=lr;var O=vi;t:switch(Rr){case 1:Rr=0,vi=null,Jd(d,h,O,1);break;case 2:case 9:if(FL(O)){Rr=0,vi=null,TP(h);break}h=function(){Rr!==2&&Rr!==9||Hr!==d||(Rr=7),io(d)},O.then(h,h);break e;case 3:Rr=7;break e;case 4:Rr=5;break e;case 7:FL(O)?(Rr=0,vi=null,TP(h)):(Rr=0,vi=null,Jd(d,h,O,7));break;case 5:var J=null;switch(lr.tag){case 26:J=lr.memoizedState;case 5:case 27:var ae=lr;if(!J||o9(J)){Rr=0,vi=null;var be=ae.sibling;if(be!==null)lr=be;else{var Me=ae.return;Me!==null?(lr=Me,sv(Me)):lr=null}break t}}Rr=0,vi=null,Jd(d,h,O,5);break;case 6:Rr=0,vi=null,Jd(d,h,O,6);break;case 8:sw(),cn=6;break e;default:throw Error(n(462))}}C0e();break}catch(We){wP(d,We)}while(!0);return Ko=cu=null,D.H=w,D.A=R,Nr=x,lr!==null?0:(Hr=null,vr=0,Ag(),cn)}function C0e(){for(;lr!==null&&!Pe();)CP(lr)}function CP(d){var h=Q7(d.alternate,d,rl);d.memoizedProps=d.pendingProps,h===null?sv(d):lr=h}function TP(d){var h=d,x=h.alternate;switch(h.tag){case 15:case 0:h=V7(x,h,h.pendingProps,h.type,void 0,vr);break;case 11:h=V7(x,h,h.pendingProps,h.type.render,h.ref,vr);break;case 5:E_(h);default:eP(x,h),h=lr=AL(h,rl),h=Q7(x,h,rl)}d.memoizedProps=d.pendingProps,h===null?sv(d):lr=h}function Jd(d,h,x,w){Ko=cu=null,E_(h),Hd=null,uh=0;var R=h.return;try{if(p0e(d,R,h,x,vr)){cn=1,Zg(d,Gi(x,d.current)),lr=null;return}}catch(O){if(R!==null)throw lr=R,O;cn=1,Zg(d,Gi(x,d.current)),lr=null;return}h.flags&32768?(Tr||w===1?d=!0:Kd||(vr&536870912)!==0?d=!1:(nc=d=!0,(w===2||w===9||w===3||w===6)&&(w=Xi.current,w!==null&&w.tag===13&&(w.flags|=16384))),AP(h,d)):sv(h)}function sv(d){var h=d;do{if((h.flags&32768)!==0){AP(h,nc);return}d=h.return;var x=g0e(h.alternate,h,rl);if(x!==null){lr=x;return}if(h=h.sibling,h!==null){lr=h;return}lr=h=d}while(h!==null);cn===0&&(cn=5)}function AP(d,h){do{var x=v0e(d.alternate,d);if(x!==null){x.flags&=32767,lr=x;return}if(x=d.return,x!==null&&(x.flags|=32768,x.subtreeFlags=0,x.deletions=null),!h&&(d=d.sibling,d!==null)){lr=d;return}lr=d=x}while(d!==null);cn=6,lr=null}function kP(d,h,x,w,R,O,J,ae,be){d.cancelPendingCommit=null;do ov();while(ia!==0);if((Nr&6)!==0)throw Error(n(327));if(h!==null){if(h===d.current)throw Error(n(177));if(O=h.lanes|h.childLanes,O|=Qy,tn(d,x,O,J,ae,be),d===Hr&&(lr=Hr=null,vr=0),Yd=h,sc=d,Zd=x,nw=O,aw=R,bP=w,(h.subtreeFlags&10256)!==0||(h.flags&10256)!==0?(d.callbackNode=null,d.callbackPriority=0,N0e(Le,function(){return OP(),null})):(d.callbackNode=null,d.callbackPriority=0),w=(h.flags&13878)!==0,(h.subtreeFlags&13878)!==0||w){w=D.T,D.T=null,R=U.p,U.p=2,J=Nr,Nr|=4;try{b0e(d,h,x)}finally{Nr=J,U.p=R,D.T=w}}ia=1,NP(),RP(),MP()}}function NP(){if(ia===1){ia=0;var d=sc,h=Yd,x=(h.flags&13878)!==0;if((h.subtreeFlags&13878)!==0||x){x=D.T,D.T=null;var w=U.p;U.p=2;var R=Nr;Nr|=4;try{dP(h,d);var O=yw,J=vL(d.containerInfo),ae=O.focusedElem,be=O.selectionRange;if(J!==ae&&ae&&ae.ownerDocument&&gL(ae.ownerDocument.documentElement,ae)){if(be!==null&&Wy(ae)){var Me=be.start,We=be.end;if(We===void 0&&(We=Me),"selectionStart"in ae)ae.selectionStart=Me,ae.selectionEnd=Math.min(We,ae.value.length);else{var Xe=ae.ownerDocument||document,Be=Xe&&Xe.defaultView||window;if(Be.getSelection){var je=Be.getSelection(),jt=ae.textContent.length,Lt=Math.min(be.start,jt),Pr=be.end===void 0?Lt:Math.min(be.end,jt);!je.extend&&Lt>Pr&&(J=Pr,Pr=Lt,Lt=J);var Se=mL(ae,Lt),_e=mL(ae,Pr);if(Se&&_e&&(je.rangeCount!==1||je.anchorNode!==Se.node||je.anchorOffset!==Se.offset||je.focusNode!==_e.node||je.focusOffset!==_e.offset)){var Re=Xe.createRange();Re.setStart(Se.node,Se.offset),je.removeAllRanges(),Lt>Pr?(je.addRange(Re),je.extend(_e.node,_e.offset)):(Re.setEnd(_e.node,_e.offset),je.addRange(Re))}}}}for(Xe=[],je=ae;je=je.parentNode;)je.nodeType===1&&Xe.push({element:je,left:je.scrollLeft,top:je.scrollTop});for(typeof ae.focus=="function"&&ae.focus(),ae=0;ae<Xe.length;ae++){var Ke=Xe[ae];Ke.element.scrollLeft=Ke.left,Ke.element.scrollTop=Ke.top}}xv=!!xw,yw=xw=null}finally{Nr=R,U.p=w,D.T=x}}d.current=h,ia=2}}function RP(){if(ia===2){ia=0;var d=sc,h=Yd,x=(h.flags&8772)!==0;if((h.subtreeFlags&8772)!==0||x){x=D.T,D.T=null;var w=U.p;U.p=2;var R=Nr;Nr|=4;try{oP(d,h.alternate,h)}finally{Nr=R,U.p=w,D.T=x}}ia=3}}function MP(){if(ia===4||ia===3){ia=0,Ce();var d=sc,h=Yd,x=Zd,w=bP;(h.subtreeFlags&10256)!==0||(h.flags&10256)!==0?ia=5:(ia=0,Yd=sc=null,DP(d,d.pendingLanes));var R=d.pendingLanes;if(R===0&&(ic=null),wr(x),h=h.stateNode,Ae&&typeof Ae.onCommitFiberRoot=="function")try{Ae.onCommitFiberRoot(Ee,h,void 0,(h.current.flags&128)===128)}catch{}if(w!==null){h=D.T,R=U.p,U.p=2,D.T=null;try{for(var O=d.onRecoverableError,J=0;J<w.length;J++){var ae=w[J];O(ae.value,{componentStack:ae.stack})}}finally{D.T=h,U.p=R}}(Zd&3)!==0&&ov(),io(d),R=d.pendingLanes,(x&4194090)!==0&&(R&42)!==0?d===iw?xh++:(xh=0,iw=d):xh=0,yh(0)}}function DP(d,h){(d.pooledCacheLanes&=h)===0&&(h=d.pooledCache,h!=null&&(d.pooledCache=null,J0(h)))}function ov(d){return NP(),RP(),MP(),OP()}function OP(){if(ia!==5)return!1;var d=sc,h=nw;nw=0;var x=wr(Zd),w=D.T,R=U.p;try{U.p=32>x?32:x,D.T=null,x=aw,aw=null;var O=sc,J=Zd;if(ia=0,Yd=sc=null,Zd=0,(Nr&6)!==0)throw Error(n(331));var ae=Nr;if(Nr|=4,gP(O.current),hP(O,O.current,J,x),Nr=ae,yh(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot=="function")try{Ae.onPostCommitFiberRoot(Ee,O)}catch{}return!0}finally{U.p=R,D.T=w,DP(d,h)}}function IP(d,h,x){h=Gi(x,h),h=F_(d.stateNode,h,2),d=Yl(d,h,2),d!==null&&(Ua(d,2),io(d))}function zr(d,h,x){if(d.tag===3)IP(d,d,x);else for(;h!==null;){if(h.tag===3){IP(h,d,x);break}else if(h.tag===1){var w=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(ic===null||!ic.has(w))){d=Gi(x,d),x=B7(2),w=Yl(h,x,2),w!==null&&(z7(x,w,h,d),Ua(w,2),io(w));break}}h=h.return}}function cw(d,h,x){var w=d.pingCache;if(w===null){w=d.pingCache=new _0e;var R=new Set;w.set(h,R)}else R=w.get(h),R===void 0&&(R=new Set,w.set(h,R));R.has(x)||(J_=!0,R.add(x),d=T0e.bind(null,d,h,x),h.then(d,d))}function T0e(d,h,x){var w=d.pingCache;w!==null&&w.delete(h),d.pingedLanes|=d.suspendedLanes&x,d.warmLanes&=~x,Hr===d&&(vr&x)===x&&(cn===4||cn===3&&(vr&62914560)===vr&&300>xe()-rw?(Nr&2)===0&&Qd(d,0):ew|=x,Xd===vr&&(Xd=0)),io(d)}function LP(d,h){h===0&&(h=qa()),d=Id(d,h),d!==null&&(Ua(d,h),io(d))}function A0e(d){var h=d.memoizedState,x=0;h!==null&&(x=h.retryLane),LP(d,x)}function k0e(d,h){var x=0;switch(d.tag){case 13:var w=d.stateNode,R=d.memoizedState;R!==null&&(x=R.retryLane);break;case 19:w=d.stateNode;break;case 22:w=d.stateNode._retryCache;break;default:throw Error(n(314))}w!==null&&w.delete(h),LP(d,x)}function N0e(d,h){return qe(d,h)}var lv=null,ef=null,uw=!1,cv=!1,dw=!1,gu=0;function io(d){d!==ef&&d.next===null&&(ef===null?lv=ef=d:ef=ef.next=d),cv=!0,uw||(uw=!0,M0e())}function yh(d,h){if(!dw&&cv){dw=!0;do for(var x=!1,w=lv;w!==null;){if(d!==0){var R=w.pendingLanes;if(R===0)var O=0;else{var J=w.suspendedLanes,ae=w.pingedLanes;O=(1<<31-rt(42|d)+1)-1,O&=R&~(J&~ae),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(x=!0,zP(w,O))}else O=vr,O=Xt(w,w===Hr?O:0,w.cancelPendingCommit!==null||w.timeoutHandle!==-1),(O&3)===0||$r(w,O)||(x=!0,zP(w,O));w=w.next}while(x);dw=!1}}function R0e(){PP()}function PP(){cv=uw=!1;var d=0;gu!==0&&(z0e()&&(d=gu),gu=0);for(var h=xe(),x=null,w=lv;w!==null;){var R=w.next,O=FP(w,h);O===0?(w.next=null,x===null?lv=R:x.next=R,R===null&&(ef=x)):(x=w,(d!==0||(O&3)!==0)&&(cv=!0)),w=R}yh(d)}function FP(d,h){for(var x=d.suspendedLanes,w=d.pingedLanes,R=d.expirationTimes,O=d.pendingLanes&-62914561;0<O;){var J=31-rt(O),ae=1<<J,be=R[J];be===-1?((ae&x)===0||(ae&w)!==0)&&(R[J]=on(ae,h)):be<=h&&(d.expiredLanes|=ae),O&=~ae}if(h=Hr,x=vr,x=Xt(d,d===h?x:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),w=d.callbackNode,x===0||d===h&&(Rr===2||Rr===9)||d.cancelPendingCommit!==null)return w!==null&&w!==null&&$e(w),d.callbackNode=null,d.callbackPriority=0;if((x&3)===0||$r(d,x)){if(h=x&-x,h===d.callbackPriority)return h;switch(w!==null&&$e(w),wr(x)){case 2:case 8:x=Ue;break;case 32:x=Le;break;case 268435456:x=De;break;default:x=Le}return w=BP.bind(null,d),x=qe(x,w),d.callbackPriority=h,d.callbackNode=x,h}return w!==null&&w!==null&&$e(w),d.callbackPriority=2,d.callbackNode=null,2}function BP(d,h){if(ia!==0&&ia!==5)return d.callbackNode=null,d.callbackPriority=0,null;var x=d.callbackNode;if(ov()&&d.callbackNode!==x)return null;var w=vr;return w=Xt(d,d===Hr?w:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),w===0?null:(yP(d,w,h),FP(d,xe()),d.callbackNode!=null&&d.callbackNode===x?BP.bind(null,d):null)}function zP(d,h){if(ov())return null;yP(d,h,!0)}function M0e(){q0e(function(){(Nr&6)!==0?qe(Ne,R0e):PP()})}function fw(){return gu===0&&(gu=qi()),gu}function jP(d){return d==null||typeof d=="symbol"||typeof d=="boolean"?null:typeof d=="function"?d:yg(""+d)}function qP(d,h){var x=h.ownerDocument.createElement("input");return x.name=h.name,x.value=h.value,d.id&&x.setAttribute("form",d.id),h.parentNode.insertBefore(x,h),d=new FormData(d),x.parentNode.removeChild(x),d}function D0e(d,h,x,w,R){if(h==="submit"&&x&&x.stateNode===R){var O=jP((R[Er]||null).action),J=w.submitter;J&&(h=(h=J[Er]||null)?jP(h.formAction):J.getAttribute("formAction"),h!==null&&(O=h,J=null));var ae=new Sg("action","action",null,w,R);d.push({event:ae,listeners:[{instance:null,listener:function(){if(w.defaultPrevented){if(gu!==0){var be=J?qP(R,J):new FormData(R);D_(x,{pending:!0,data:be,method:R.method,action:O},null,be)}}else typeof O=="function"&&(ae.preventDefault(),be=J?qP(R,J):new FormData(R),D_(x,{pending:!0,data:be,method:R.method,action:O},O,be))},currentTarget:R}]})}}for(var hw=0;hw<Zy.length;hw++){var pw=Zy[hw],O0e=pw.toLowerCase(),I0e=pw[0].toUpperCase()+pw.slice(1);Ss(O0e,"on"+I0e)}Ss(yL,"onAnimationEnd"),Ss(_L,"onAnimationIteration"),Ss(wL,"onAnimationStart"),Ss("dblclick","onDoubleClick"),Ss("focusin","onFocus"),Ss("focusout","onBlur"),Ss(Zfe,"onTransitionRun"),Ss(Qfe,"onTransitionStart"),Ss(Jfe,"onTransitionCancel"),Ss(EL,"onTransitionEnd"),ot("onMouseEnter",["mouseout","mouseover"]),ot("onMouseLeave",["mouseout","mouseover"]),ot("onPointerEnter",["pointerout","pointerover"]),ot("onPointerLeave",["pointerout","pointerover"]),Qe("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qe("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qe("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qe("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qe("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qe("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _h="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(" "),L0e=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_h));function UP(d,h){h=(h&4)!==0;for(var x=0;x<d.length;x++){var w=d[x],R=w.event;w=w.listeners;e:{var O=void 0;if(h)for(var J=w.length-1;0<=J;J--){var ae=w[J],be=ae.instance,Me=ae.currentTarget;if(ae=ae.listener,be!==O&&R.isPropagationStopped())break e;O=ae,R.currentTarget=Me;try{O(R)}catch(We){Yg(We)}R.currentTarget=null,O=be}else for(J=0;J<w.length;J++){if(ae=w[J],be=ae.instance,Me=ae.currentTarget,ae=ae.listener,be!==O&&R.isPropagationStopped())break e;O=ae,R.currentTarget=Me;try{O(R)}catch(We){Yg(We)}R.currentTarget=null,O=be}}}}function cr(d,h){var x=h[eu];x===void 0&&(x=h[eu]=new Set);var w=d+"__bubble";x.has(w)||($P(h,d,2,!1),x.add(w))}function mw(d,h,x){var w=0;h&&(w|=4),$P(x,d,w,h)}var uv="_reactListening"+Math.random().toString(36).slice(2);function gw(d){if(!d[uv]){d[uv]=!0,Fe.forEach(function(x){x!=="selectionchange"&&(L0e.has(x)||mw(x,!1,d),mw(x,!0,d))});var h=d.nodeType===9?d:d.ownerDocument;h===null||h[uv]||(h[uv]=!0,mw("selectionchange",!1,h))}}function $P(d,h,x,w){switch(h9(h)){case 2:var R=lhe;break;case 8:R=che;break;default:R=Rw}x=R.bind(null,h,x,d),R=void 0,!By||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(R=!0),w?R!==void 0?d.addEventListener(h,x,{capture:!0,passive:R}):d.addEventListener(h,x,!0):R!==void 0?d.addEventListener(h,x,{passive:R}):d.addEventListener(h,x,!1)}function vw(d,h,x,w,R){var O=w;if((h&1)===0&&(h&2)===0&&w!==null)e:for(;;){if(w===null)return;var J=w.tag;if(J===3||J===4){var ae=w.stateNode.containerInfo;if(ae===R)break;if(J===4)for(J=w.return;J!==null;){var be=J.tag;if((be===3||be===4)&&J.stateNode.containerInfo===R)return;J=J.return}for(;ae!==null;){if(J=ue(ae),J===null)return;if(be=J.tag,be===5||be===6||be===26||be===27){w=O=J;continue e}ae=ae.parentNode}}w=w.return}Y8(function(){var Me=O,We=Py(x),Xe=[];e:{var Be=SL.get(d);if(Be!==void 0){var je=Sg,jt=d;switch(d){case"keypress":if(wg(x)===0)break e;case"keydown":case"keyup":je=Nfe;break;case"focusin":jt="focus",je=Uy;break;case"focusout":jt="blur",je=Uy;break;case"beforeblur":case"afterblur":je=Uy;break;case"click":if(x.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":je=J8;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":je=vfe;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":je=Dfe;break;case yL:case _L:case wL:je=yfe;break;case EL:je=Ife;break;case"scroll":case"scrollend":je=mfe;break;case"wheel":je=Pfe;break;case"copy":case"cut":case"paste":je=wfe;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":je=tL;break;case"toggle":case"beforetoggle":je=Bfe}var Lt=(h&4)!==0,Pr=!Lt&&(d==="scroll"||d==="scrollend"),Se=Lt?Be!==null?Be+"Capture":null:Be;Lt=[];for(var _e=Me,Re;_e!==null;){var Ke=_e;if(Re=Ke.stateNode,Ke=Ke.tag,Ke!==5&&Ke!==26&&Ke!==27||Re===null||Se===null||(Ke=j0(_e,Se),Ke!=null&&Lt.push(wh(_e,Ke,Re))),Pr)break;_e=_e.return}0<Lt.length&&(Be=new je(Be,jt,null,x,We),Xe.push({event:Be,listeners:Lt}))}}if((h&7)===0){e:{if(Be=d==="mouseover"||d==="pointerover",je=d==="mouseout"||d==="pointerout",Be&&x!==Ly&&(jt=x.relatedTarget||x.fromElement)&&(ue(jt)||jt[Bn]))break e;if((je||Be)&&(Be=We.window===We?We:(Be=We.ownerDocument)?Be.defaultView||Be.parentWindow:window,je?(jt=x.relatedTarget||x.toElement,je=Me,jt=jt?ue(jt):null,jt!==null&&(Pr=i(jt),Lt=jt.tag,jt!==Pr||Lt!==5&&Lt!==27&&Lt!==6)&&(jt=null)):(je=null,jt=Me),je!==jt)){if(Lt=J8,Ke="onMouseLeave",Se="onMouseEnter",_e="mouse",(d==="pointerout"||d==="pointerover")&&(Lt=tL,Ke="onPointerLeave",Se="onPointerEnter",_e="pointer"),Pr=je==null?Be:Oe(je),Re=jt==null?Be:Oe(jt),Be=new Lt(Ke,_e+"leave",je,x,We),Be.target=Pr,Be.relatedTarget=Re,Ke=null,ue(We)===Me&&(Lt=new Lt(Se,_e+"enter",jt,x,We),Lt.target=Re,Lt.relatedTarget=Pr,Ke=Lt),Pr=Ke,je&&jt)t:{for(Lt=je,Se=jt,_e=0,Re=Lt;Re;Re=tf(Re))_e++;for(Re=0,Ke=Se;Ke;Ke=tf(Ke))Re++;for(;0<_e-Re;)Lt=tf(Lt),_e--;for(;0<Re-_e;)Se=tf(Se),Re--;for(;_e--;){if(Lt===Se||Se!==null&&Lt===Se.alternate)break t;Lt=tf(Lt),Se=tf(Se)}Lt=null}else Lt=null;je!==null&&HP(Xe,Be,je,Lt,!1),jt!==null&&Pr!==null&&HP(Xe,Pr,jt,Lt,!0)}}e:{if(Be=Me?Oe(Me):window,je=Be.nodeName&&Be.nodeName.toLowerCase(),je==="select"||je==="input"&&Be.type==="file")var _t=cL;else if(oL(Be))if(uL)_t=Kfe;else{_t=Vfe;var ir=Gfe}else je=Be.nodeName,!je||je.toLowerCase()!=="input"||Be.type!=="checkbox"&&Be.type!=="radio"?Me&&Iy(Me.elementType)&&(_t=cL):_t=Wfe;if(_t&&(_t=_t(d,Me))){lL(Xe,_t,x,We);break e}ir&&ir(d,Be,Me),d==="focusout"&&Me&&Be.type==="number"&&Me.memoizedProps.value!=null&&Oy(Be,"number",Be.value)}switch(ir=Me?Oe(Me):window,d){case"focusin":(oL(ir)||ir.contentEditable==="true")&&(Md=ir,Ky=Me,K0=null);break;case"focusout":K0=Ky=Md=null;break;case"mousedown":Xy=!0;break;case"contextmenu":case"mouseup":case"dragend":Xy=!1,bL(Xe,x,We);break;case"selectionchange":if(Yfe)break;case"keydown":case"keyup":bL(Xe,x,We)}var At;if(Hy)e:{switch(d){case"compositionstart":var Ft="onCompositionStart";break e;case"compositionend":Ft="onCompositionEnd";break e;case"compositionupdate":Ft="onCompositionUpdate";break e}Ft=void 0}else Rd?iL(d,x)&&(Ft="onCompositionEnd"):d==="keydown"&&x.keyCode===229&&(Ft="onCompositionStart");Ft&&(rL&&x.locale!=="ko"&&(Rd||Ft!=="onCompositionStart"?Ft==="onCompositionEnd"&&Rd&&(At=Z8()):(Vl=We,zy="value"in Vl?Vl.value:Vl.textContent,Rd=!0)),ir=dv(Me,Ft),0<ir.length&&(Ft=new eL(Ft,d,null,x,We),Xe.push({event:Ft,listeners:ir}),At?Ft.data=At:(At=sL(x),At!==null&&(Ft.data=At)))),(At=jfe?qfe(d,x):Ufe(d,x))&&(Ft=dv(Me,"onBeforeInput"),0<Ft.length&&(ir=new eL("onBeforeInput","beforeinput",null,x,We),Xe.push({event:ir,listeners:Ft}),ir.data=At)),D0e(Xe,d,Me,x,We)}UP(Xe,h)})}function wh(d,h,x){return{instance:d,listener:h,currentTarget:x}}function dv(d,h){for(var x=h+"Capture",w=[];d!==null;){var R=d,O=R.stateNode;if(R=R.tag,R!==5&&R!==26&&R!==27||O===null||(R=j0(d,x),R!=null&&w.unshift(wh(d,R,O)),R=j0(d,h),R!=null&&w.push(wh(d,R,O))),d.tag===3)return w;d=d.return}return[]}function tf(d){if(d===null)return null;do d=d.return;while(d&&d.tag!==5&&d.tag!==27);return d||null}function HP(d,h,x,w,R){for(var O=h._reactName,J=[];x!==null&&x!==w;){var ae=x,be=ae.alternate,Me=ae.stateNode;if(ae=ae.tag,be!==null&&be===w)break;ae!==5&&ae!==26&&ae!==27||Me===null||(be=Me,R?(Me=j0(x,O),Me!=null&&J.unshift(wh(x,Me,be))):R||(Me=j0(x,O),Me!=null&&J.push(wh(x,Me,be)))),x=x.return}J.length!==0&&d.push({event:h,listeners:J})}var P0e=/\r\n?/g,F0e=/\u0000|\uFFFD/g;function GP(d){return(typeof d=="string"?d:""+d).replace(P0e,`
`).replace(F0e,"")}function VP(d,h){return h=GP(h),GP(d)===h}function fv(){}function Lr(d,h,x,w,R,O){switch(x){case"children":typeof w=="string"?h==="body"||h==="textarea"&&w===""||Ad(d,w):(typeof w=="number"||typeof w=="bigint")&&h!=="body"&&Ad(d,""+w);break;case"className":kr(d,"class",w);break;case"tabIndex":kr(d,"tabindex",w);break;case"dir":case"role":case"viewBox":case"width":case"height":kr(d,x,w);break;case"style":K8(d,w,O);break;case"data":if(h!=="object"){kr(d,"data",w);break}case"src":case"href":if(w===""&&(h!=="a"||x!=="href")){d.removeAttribute(x);break}if(w==null||typeof w=="function"||typeof w=="symbol"||typeof w=="boolean"){d.removeAttribute(x);break}w=yg(""+w),d.setAttribute(x,w);break;case"action":case"formAction":if(typeof w=="function"){d.setAttribute(x,"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 O=="function"&&(x==="formAction"?(h!=="input"&&Lr(d,h,"name",R.name,R,null),Lr(d,h,"formEncType",R.formEncType,R,null),Lr(d,h,"formMethod",R.formMethod,R,null),Lr(d,h,"formTarget",R.formTarget,R,null)):(Lr(d,h,"encType",R.encType,R,null),Lr(d,h,"method",R.method,R,null),Lr(d,h,"target",R.target,R,null)));if(w==null||typeof w=="symbol"||typeof w=="boolean"){d.removeAttribute(x);break}w=yg(""+w),d.setAttribute(x,w);break;case"onClick":w!=null&&(d.onclick=fv);break;case"onScroll":w!=null&&cr("scroll",d);break;case"onScrollEnd":w!=null&&cr("scrollend",d);break;case"dangerouslySetInnerHTML":if(w!=null){if(typeof w!="object"||!("__html"in w))throw Error(n(61));if(x=w.__html,x!=null){if(R.children!=null)throw Error(n(60));d.innerHTML=x}}break;case"multiple":d.multiple=w&&typeof w!="function"&&typeof w!="symbol";break;case"muted":d.muted=w&&typeof w!="function"&&typeof w!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(w==null||typeof w=="function"||typeof w=="boolean"||typeof w=="symbol"){d.removeAttribute("xlink:href");break}x=yg(""+w),d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",x);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":w!=null&&typeof w!="function"&&typeof w!="symbol"?d.setAttribute(x,""+w):d.removeAttribute(x);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":w&&typeof w!="function"&&typeof w!="symbol"?d.setAttribute(x,""):d.removeAttribute(x);break;case"capture":case"download":w===!0?d.setAttribute(x,""):w!==!1&&w!=null&&typeof w!="function"&&typeof w!="symbol"?d.setAttribute(x,w):d.removeAttribute(x);break;case"cols":case"rows":case"size":case"span":w!=null&&typeof w!="function"&&typeof w!="symbol"&&!isNaN(w)&&1<=w?d.setAttribute(x,w):d.removeAttribute(x);break;case"rowSpan":case"start":w==null||typeof w=="function"||typeof w=="symbol"||isNaN(w)?d.removeAttribute(x):d.setAttribute(x,w);break;case"popover":cr("beforetoggle",d),cr("toggle",d),Ar(d,"popover",w);break;case"xlinkActuate":Or(d,"http://www.w3.org/1999/xlink","xlink:actuate",w);break;case"xlinkArcrole":Or(d,"http://www.w3.org/1999/xlink","xlink:arcrole",w);break;case"xlinkRole":Or(d,"http://www.w3.org/1999/xlink","xlink:role",w);break;case"xlinkShow":Or(d,"http://www.w3.org/1999/xlink","xlink:show",w);break;case"xlinkTitle":Or(d,"http://www.w3.org/1999/xlink","xlink:title",w);break;case"xlinkType":Or(d,"http://www.w3.org/1999/xlink","xlink:type",w);break;case"xmlBase":Or(d,"http://www.w3.org/XML/1998/namespace","xml:base",w);break;case"xmlLang":Or(d,"http://www.w3.org/XML/1998/namespace","xml:lang",w);break;case"xmlSpace":Or(d,"http://www.w3.org/XML/1998/namespace","xml:space",w);break;case"is":Ar(d,"is",w);break;case"innerText":case"textContent":break;default:(!(2<x.length)||x[0]!=="o"&&x[0]!=="O"||x[1]!=="n"&&x[1]!=="N")&&(x=hfe.get(x)||x,Ar(d,x,w))}}function bw(d,h,x,w,R,O){switch(x){case"style":K8(d,w,O);break;case"dangerouslySetInnerHTML":if(w!=null){if(typeof w!="object"||!("__html"in w))throw Error(n(61));if(x=w.__html,x!=null){if(R.children!=null)throw Error(n(60));d.innerHTML=x}}break;case"children":typeof w=="string"?Ad(d,w):(typeof w=="number"||typeof w=="bigint")&&Ad(d,""+w);break;case"onScroll":w!=null&&cr("scroll",d);break;case"onScrollEnd":w!=null&&cr("scrollend",d);break;case"onClick":w!=null&&(d.onclick=fv);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ze.hasOwnProperty(x))e:{if(x[0]==="o"&&x[1]==="n"&&(R=x.endsWith("Capture"),h=x.slice(2,R?x.length-7:void 0),O=d[Er]||null,O=O!=null?O[x]:null,typeof O=="function"&&d.removeEventListener(h,O,R),typeof w=="function")){typeof O!="function"&&O!==null&&(x in d?d[x]=null:d.hasAttribute(x)&&d.removeAttribute(x)),d.addEventListener(h,w,R);break e}x in d?d[x]=w:w===!0?d.setAttribute(x,""):Ar(d,x,w)}}}function sa(d,h,x){switch(h){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":cr("error",d),cr("load",d);var w=!1,R=!1,O;for(O in x)if(x.hasOwnProperty(O)){var J=x[O];if(J!=null)switch(O){case"src":w=!0;break;case"srcSet":R=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,h));default:Lr(d,h,O,J,x,null)}}R&&Lr(d,h,"srcSet",x.srcSet,x,null),w&&Lr(d,h,"src",x.src,x,null);return;case"input":cr("invalid",d);var ae=O=J=R=null,be=null,Me=null;for(w in x)if(x.hasOwnProperty(w)){var We=x[w];if(We!=null)switch(w){case"name":R=We;break;case"type":J=We;break;case"checked":be=We;break;case"defaultChecked":Me=We;break;case"value":O=We;break;case"defaultValue":ae=We;break;case"children":case"dangerouslySetInnerHTML":if(We!=null)throw Error(n(137,h));break;default:Lr(d,h,w,We,x,null)}}H8(d,O,ae,be,Me,J,R,!1),bg(d);return;case"select":cr("invalid",d),w=J=O=null;for(R in x)if(x.hasOwnProperty(R)&&(ae=x[R],ae!=null))switch(R){case"value":O=ae;break;case"defaultValue":J=ae;break;case"multiple":w=ae;default:Lr(d,h,R,ae,x,null)}h=O,x=J,d.multiple=!!w,h!=null?Td(d,!!w,h,!1):x!=null&&Td(d,!!w,x,!0);return;case"textarea":cr("invalid",d),O=R=w=null;for(J in x)if(x.hasOwnProperty(J)&&(ae=x[J],ae!=null))switch(J){case"value":w=ae;break;case"defaultValue":R=ae;break;case"children":O=ae;break;case"dangerouslySetInnerHTML":if(ae!=null)throw Error(n(91));break;default:Lr(d,h,J,ae,x,null)}V8(d,w,R,O),bg(d);return;case"option":for(be in x)if(x.hasOwnProperty(be)&&(w=x[be],w!=null))switch(be){case"selected":d.selected=w&&typeof w!="function"&&typeof w!="symbol";break;default:Lr(d,h,be,w,x,null)}return;case"dialog":cr("beforetoggle",d),cr("toggle",d),cr("cancel",d),cr("close",d);break;case"iframe":case"object":cr("load",d);break;case"video":case"audio":for(w=0;w<_h.length;w++)cr(_h[w],d);break;case"image":cr("error",d),cr("load",d);break;case"details":cr("toggle",d);break;case"embed":case"source":case"link":cr("error",d),cr("load",d);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Me in x)if(x.hasOwnProperty(Me)&&(w=x[Me],w!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,h));default:Lr(d,h,Me,w,x,null)}return;default:if(Iy(h)){for(We in x)x.hasOwnProperty(We)&&(w=x[We],w!==void 0&&bw(d,h,We,w,x,void 0));return}}for(ae in x)x.hasOwnProperty(ae)&&(w=x[ae],w!=null&&Lr(d,h,ae,w,x,null))}function B0e(d,h,x,w){switch(h){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var R=null,O=null,J=null,ae=null,be=null,Me=null,We=null;for(je in x){var Xe=x[je];if(x.hasOwnProperty(je)&&Xe!=null)switch(je){case"checked":break;case"value":break;case"defaultValue":be=Xe;default:w.hasOwnProperty(je)||Lr(d,h,je,null,w,Xe)}}for(var Be in w){var je=w[Be];if(Xe=x[Be],w.hasOwnProperty(Be)&&(je!=null||Xe!=null))switch(Be){case"type":O=je;break;case"name":R=je;break;case"checked":Me=je;break;case"defaultChecked":We=je;break;case"value":J=je;break;case"defaultValue":ae=je;break;case"children":case"dangerouslySetInnerHTML":if(je!=null)throw Error(n(137,h));break;default:je!==Xe&&Lr(d,h,Be,je,w,Xe)}}Dy(d,J,ae,be,Me,We,O,R);return;case"select":je=J=ae=Be=null;for(O in x)if(be=x[O],x.hasOwnProperty(O)&&be!=null)switch(O){case"value":break;case"multiple":je=be;default:w.hasOwnProperty(O)||Lr(d,h,O,null,w,be)}for(R in w)if(O=w[R],be=x[R],w.hasOwnProperty(R)&&(O!=null||be!=null))switch(R){case"value":Be=O;break;case"defaultValue":ae=O;break;case"multiple":J=O;default:O!==be&&Lr(d,h,R,O,w,be)}h=ae,x=J,w=je,Be!=null?Td(d,!!x,Be,!1):!!w!=!!x&&(h!=null?Td(d,!!x,h,!0):Td(d,!!x,x?[]:"",!1));return;case"textarea":je=Be=null;for(ae in x)if(R=x[ae],x.hasOwnProperty(ae)&&R!=null&&!w.hasOwnProperty(ae))switch(ae){case"value":break;case"children":break;default:Lr(d,h,ae,null,w,R)}for(J in w)if(R=w[J],O=x[J],w.hasOwnProperty(J)&&(R!=null||O!=null))switch(J){case"value":Be=R;break;case"defaultValue":je=R;break;case"children":break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(n(91));break;default:R!==O&&Lr(d,h,J,R,w,O)}G8(d,Be,je);return;case"option":for(var jt in x)if(Be=x[jt],x.hasOwnProperty(jt)&&Be!=null&&!w.hasOwnProperty(jt))switch(jt){case"selected":d.selected=!1;break;default:Lr(d,h,jt,null,w,Be)}for(be in w)if(Be=w[be],je=x[be],w.hasOwnProperty(be)&&Be!==je&&(Be!=null||je!=null))switch(be){case"selected":d.selected=Be&&typeof Be!="function"&&typeof Be!="symbol";break;default:Lr(d,h,be,Be,w,je)}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 Lt in x)Be=x[Lt],x.hasOwnProperty(Lt)&&Be!=null&&!w.hasOwnProperty(Lt)&&Lr(d,h,Lt,null,w,Be);for(Me in w)if(Be=w[Me],je=x[Me],w.hasOwnProperty(Me)&&Be!==je&&(Be!=null||je!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":if(Be!=null)throw Error(n(137,h));break;default:Lr(d,h,Me,Be,w,je)}return;default:if(Iy(h)){for(var Pr in x)Be=x[Pr],x.hasOwnProperty(Pr)&&Be!==void 0&&!w.hasOwnProperty(Pr)&&bw(d,h,Pr,void 0,w,Be);for(We in w)Be=w[We],je=x[We],!w.hasOwnProperty(We)||Be===je||Be===void 0&&je===void 0||bw(d,h,We,Be,w,je);return}}for(var Se in x)Be=x[Se],x.hasOwnProperty(Se)&&Be!=null&&!w.hasOwnProperty(Se)&&Lr(d,h,Se,null,w,Be);for(Xe in w)Be=w[Xe],je=x[Xe],!w.hasOwnProperty(Xe)||Be===je||Be==null&&je==null||Lr(d,h,Xe,Be,w,je)}var xw=null,yw=null;function hv(d){return d.nodeType===9?d:d.ownerDocument}function WP(d){switch(d){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function KP(d,h){if(d===0)switch(h){case"svg":return 1;case"math":return 2;default:return 0}return d===1&&h==="foreignObject"?0:d}function _w(d,h){return d==="textarea"||d==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.children=="bigint"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var ww=null;function z0e(){var d=window.event;return d&&d.type==="popstate"?d===ww?!1:(ww=d,!0):(ww=null,!1)}var XP=typeof setTimeout=="function"?setTimeout:void 0,j0e=typeof clearTimeout=="function"?clearTimeout:void 0,YP=typeof Promise=="function"?Promise:void 0,q0e=typeof queueMicrotask=="function"?queueMicrotask:typeof YP<"u"?function(d){return YP.resolve(null).then(d).catch(U0e)}:XP;function U0e(d){setTimeout(function(){throw d})}function lc(d){return d==="head"}function ZP(d,h){var x=h,w=0,R=0;do{var O=x.nextSibling;if(d.removeChild(x),O&&O.nodeType===8)if(x=O.data,x==="/$"){if(0<w&&8>w){x=w;var J=d.ownerDocument;if(x&1&&Eh(J.documentElement),x&2&&Eh(J.body),x&4)for(x=J.head,Eh(x),J=x.firstChild;J;){var ae=J.nextSibling,be=J.nodeName;J[le]||be==="SCRIPT"||be==="STYLE"||be==="LINK"&&J.rel.toLowerCase()==="stylesheet"||x.removeChild(J),J=ae}}if(R===0){d.removeChild(O),Mh(h);return}R--}else x==="$"||x==="$?"||x==="$!"?R++:w=x.charCodeAt(0)-48;else w=0;x=O}while(x);Mh(h)}function Ew(d){var h=d.firstChild;for(h&&h.nodeType===10&&(h=h.nextSibling);h;){var x=h;switch(h=h.nextSibling,x.nodeName){case"HTML":case"HEAD":case"BODY":Ew(x),ce(x);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(x.rel.toLowerCase()==="stylesheet")continue}d.removeChild(x)}}function $0e(d,h,x,w){for(;d.nodeType===1;){var R=x;if(d.nodeName.toLowerCase()!==h.toLowerCase()){if(!w&&(d.nodeName!=="INPUT"||d.type!=="hidden"))break}else if(w){if(!d[le])switch(h){case"meta":if(!d.hasAttribute("itemprop"))break;return d;case"link":if(O=d.getAttribute("rel"),O==="stylesheet"&&d.hasAttribute("data-precedence"))break;if(O!==R.rel||d.getAttribute("href")!==(R.href==null||R.href===""?null:R.href)||d.getAttribute("crossorigin")!==(R.crossOrigin==null?null:R.crossOrigin)||d.getAttribute("title")!==(R.title==null?null:R.title))break;return d;case"style":if(d.hasAttribute("data-precedence"))break;return d;case"script":if(O=d.getAttribute("src"),(O!==(R.src==null?null:R.src)||d.getAttribute("type")!==(R.type==null?null:R.type)||d.getAttribute("crossorigin")!==(R.crossOrigin==null?null:R.crossOrigin))&&O&&d.hasAttribute("async")&&!d.hasAttribute("itemprop"))break;return d;default:return d}}else if(h==="input"&&d.type==="hidden"){var O=R.name==null?null:""+R.name;if(R.type==="hidden"&&d.getAttribute("name")===O)return d}else return d;if(d=Ts(d.nextSibling),d===null)break}return null}function H0e(d,h,x){if(h==="")return null;for(;d.nodeType!==3;)if((d.nodeType!==1||d.nodeName!=="INPUT"||d.type!=="hidden")&&!x||(d=Ts(d.nextSibling),d===null))return null;return d}function Sw(d){return d.data==="$!"||d.data==="$?"&&d.ownerDocument.readyState==="complete"}function G0e(d,h){var x=d.ownerDocument;if(d.data!=="$?"||x.readyState==="complete")h();else{var w=function(){h(),x.removeEventListener("DOMContentLoaded",w)};x.addEventListener("DOMContentLoaded",w),d._reactRetry=w}}function Ts(d){for(;d!=null;d=d.nextSibling){var h=d.nodeType;if(h===1||h===3)break;if(h===8){if(h=d.data,h==="$"||h==="$!"||h==="$?"||h==="F!"||h==="F")break;if(h==="/$")return null}}return d}var Cw=null;function QP(d){d=d.previousSibling;for(var h=0;d;){if(d.nodeType===8){var x=d.data;if(x==="$"||x==="$!"||x==="$?"){if(h===0)return d;h--}else x==="/$"&&h++}d=d.previousSibling}return null}function JP(d,h,x){switch(h=hv(x),d){case"html":if(d=h.documentElement,!d)throw Error(n(452));return d;case"head":if(d=h.head,!d)throw Error(n(453));return d;case"body":if(d=h.body,!d)throw Error(n(454));return d;default:throw Error(n(451))}}function Eh(d){for(var h=d.attributes;h.length;)d.removeAttributeNode(h[0]);ce(d)}var Zi=new Map,e9=new Set;function pv(d){return typeof d.getRootNode=="function"?d.getRootNode():d.nodeType===9?d:d.ownerDocument}var nl=U.d;U.d={f:V0e,r:W0e,D:K0e,C:X0e,L:Y0e,m:Z0e,X:J0e,S:Q0e,M:ehe};function V0e(){var d=nl.f(),h=iv();return d||h}function W0e(d){var h=fe(d);h!==null&&h.tag===5&&h.type==="form"?y7(h):nl.r(d)}var rf=typeof document>"u"?null:document;function t9(d,h,x){var w=rf;if(w&&typeof h=="string"&&h){var R=Hi(h);R='link[rel="'+d+'"][href="'+R+'"]',typeof x=="string"&&(R+='[crossorigin="'+x+'"]'),e9.has(R)||(e9.add(R),d={rel:d,crossOrigin:x,href:h},w.querySelector(R)===null&&(h=w.createElement("link"),sa(h,"link",d),Te(h),w.head.appendChild(h)))}}function K0e(d){nl.D(d),t9("dns-prefetch",d,null)}function X0e(d,h){nl.C(d,h),t9("preconnect",d,h)}function Y0e(d,h,x){nl.L(d,h,x);var w=rf;if(w&&d&&h){var R='link[rel="preload"][as="'+Hi(h)+'"]';h==="image"&&x&&x.imageSrcSet?(R+='[imagesrcset="'+Hi(x.imageSrcSet)+'"]',typeof x.imageSizes=="string"&&(R+='[imagesizes="'+Hi(x.imageSizes)+'"]')):R+='[href="'+Hi(d)+'"]';var O=R;switch(h){case"style":O=nf(d);break;case"script":O=af(d)}Zi.has(O)||(d=u({rel:"preload",href:h==="image"&&x&&x.imageSrcSet?void 0:d,as:h},x),Zi.set(O,d),w.querySelector(R)!==null||h==="style"&&w.querySelector(Sh(O))||h==="script"&&w.querySelector(Ch(O))||(h=w.createElement("link"),sa(h,"link",d),Te(h),w.head.appendChild(h)))}}function Z0e(d,h){nl.m(d,h);var x=rf;if(x&&d){var w=h&&typeof h.as=="string"?h.as:"script",R='link[rel="modulepreload"][as="'+Hi(w)+'"][href="'+Hi(d)+'"]',O=R;switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=af(d)}if(!Zi.has(O)&&(d=u({rel:"modulepreload",href:d},h),Zi.set(O,d),x.querySelector(R)===null)){switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(x.querySelector(Ch(O)))return}w=x.createElement("link"),sa(w,"link",d),Te(w),x.head.appendChild(w)}}}function Q0e(d,h,x){nl.S(d,h,x);var w=rf;if(w&&d){var R=Ge(w).hoistableStyles,O=nf(d);h=h||"default";var J=R.get(O);if(!J){var ae={loading:0,preload:null};if(J=w.querySelector(Sh(O)))ae.loading=5;else{d=u({rel:"stylesheet",href:d,"data-precedence":h},x),(x=Zi.get(O))&&Tw(d,x);var be=J=w.createElement("link");Te(be),sa(be,"link",d),be._p=new Promise(function(Me,We){be.onload=Me,be.onerror=We}),be.addEventListener("load",function(){ae.loading|=1}),be.addEventListener("error",function(){ae.loading|=2}),ae.loading|=4,mv(J,h,w)}J={type:"stylesheet",instance:J,count:1,state:ae},R.set(O,J)}}}function J0e(d,h){nl.X(d,h);var x=rf;if(x&&d){var w=Ge(x).hoistableScripts,R=af(d),O=w.get(R);O||(O=x.querySelector(Ch(R)),O||(d=u({src:d,async:!0},h),(h=Zi.get(R))&&Aw(d,h),O=x.createElement("script"),Te(O),sa(O,"link",d),x.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},w.set(R,O))}}function ehe(d,h){nl.M(d,h);var x=rf;if(x&&d){var w=Ge(x).hoistableScripts,R=af(d),O=w.get(R);O||(O=x.querySelector(Ch(R)),O||(d=u({src:d,async:!0,type:"module"},h),(h=Zi.get(R))&&Aw(d,h),O=x.createElement("script"),Te(O),sa(O,"link",d),x.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},w.set(R,O))}}function r9(d,h,x,w){var R=(R=ee.current)?pv(R):null;if(!R)throw Error(n(446));switch(d){case"meta":case"title":return null;case"style":return typeof x.precedence=="string"&&typeof x.href=="string"?(h=nf(x.href),x=Ge(R).hoistableStyles,w=x.get(h),w||(w={type:"style",instance:null,count:0,state:null},x.set(h,w)),w):{type:"void",instance:null,count:0,state:null};case"link":if(x.rel==="stylesheet"&&typeof x.href=="string"&&typeof x.precedence=="string"){d=nf(x.href);var O=Ge(R).hoistableStyles,J=O.get(d);if(J||(R=R.ownerDocument||R,J={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(d,J),(O=R.querySelector(Sh(d)))&&!O._p&&(J.instance=O,J.state.loading=5),Zi.has(d)||(x={rel:"preload",as:"style",href:x.href,crossOrigin:x.crossOrigin,integrity:x.integrity,media:x.media,hrefLang:x.hrefLang,referrerPolicy:x.referrerPolicy},Zi.set(d,x),O||the(R,d,x,J.state))),h&&w===null)throw Error(n(528,""));return J}if(h&&w!==null)throw Error(n(529,""));return null;case"script":return h=x.async,x=x.src,typeof x=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=af(x),x=Ge(R).hoistableScripts,w=x.get(h),w||(w={type:"script",instance:null,count:0,state:null},x.set(h,w)),w):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,d))}}function nf(d){return'href="'+Hi(d)+'"'}function Sh(d){return'link[rel="stylesheet"]['+d+"]"}function n9(d){return u({},d,{"data-precedence":d.precedence,precedence:null})}function the(d,h,x,w){d.querySelector('link[rel="preload"][as="style"]['+h+"]")?w.loading=1:(h=d.createElement("link"),w.preload=h,h.addEventListener("load",function(){return w.loading|=1}),h.addEventListener("error",function(){return w.loading|=2}),sa(h,"link",x),Te(h),d.head.appendChild(h))}function af(d){return'[src="'+Hi(d)+'"]'}function Ch(d){return"script[async]"+d}function a9(d,h,x){if(h.count++,h.instance===null)switch(h.type){case"style":var w=d.querySelector('style[data-href~="'+Hi(x.href)+'"]');if(w)return h.instance=w,Te(w),w;var R=u({},x,{"data-href":x.href,"data-precedence":x.precedence,href:null,precedence:null});return w=(d.ownerDocument||d).createElement("style"),Te(w),sa(w,"style",R),mv(w,x.precedence,d),h.instance=w;case"stylesheet":R=nf(x.href);var O=d.querySelector(Sh(R));if(O)return h.state.loading|=4,h.instance=O,Te(O),O;w=n9(x),(R=Zi.get(R))&&Tw(w,R),O=(d.ownerDocument||d).createElement("link"),Te(O);var J=O;return J._p=new Promise(function(ae,be){J.onload=ae,J.onerror=be}),sa(O,"link",w),h.state.loading|=4,mv(O,x.precedence,d),h.instance=O;case"script":return O=af(x.src),(R=d.querySelector(Ch(O)))?(h.instance=R,Te(R),R):(w=x,(R=Zi.get(O))&&(w=u({},x),Aw(w,R)),d=d.ownerDocument||d,R=d.createElement("script"),Te(R),sa(R,"link",w),d.head.appendChild(R),h.instance=R);case"void":return null;default:throw Error(n(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(w=h.instance,h.state.loading|=4,mv(w,x.precedence,d));return h.instance}function mv(d,h,x){for(var w=x.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=w.length?w[w.length-1]:null,O=R,J=0;J<w.length;J++){var ae=w[J];if(ae.dataset.precedence===h)O=ae;else if(O!==R)break}O?O.parentNode.insertBefore(d,O.nextSibling):(h=x.nodeType===9?x.head:x,h.insertBefore(d,h.firstChild))}function Tw(d,h){d.crossOrigin==null&&(d.crossOrigin=h.crossOrigin),d.referrerPolicy==null&&(d.referrerPolicy=h.referrerPolicy),d.title==null&&(d.title=h.title)}function Aw(d,h){d.crossOrigin==null&&(d.crossOrigin=h.crossOrigin),d.referrerPolicy==null&&(d.referrerPolicy=h.referrerPolicy),d.integrity==null&&(d.integrity=h.integrity)}var gv=null;function i9(d,h,x){if(gv===null){var w=new Map,R=gv=new Map;R.set(x,w)}else R=gv,w=R.get(x),w||(w=new Map,R.set(x,w));if(w.has(d))return w;for(w.set(d,null),x=x.getElementsByTagName(d),R=0;R<x.length;R++){var O=x[R];if(!(O[le]||O[Dr]||d==="link"&&O.getAttribute("rel")==="stylesheet")&&O.namespaceURI!=="http://www.w3.org/2000/svg"){var J=O.getAttribute(h)||"";J=d+J;var ae=w.get(J);ae?ae.push(O):w.set(J,[O])}}return w}function s9(d,h,x){d=d.ownerDocument||d,d.head.insertBefore(x,h==="title"?d.querySelector("head > title"):null)}function rhe(d,h,x){if(x===1||h.itemProp!=null)return!1;switch(d){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return d=h.disabled,typeof h.precedence=="string"&&d==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function o9(d){return!(d.type==="stylesheet"&&(d.state.loading&3)===0)}var Th=null;function nhe(){}function ahe(d,h,x){if(Th===null)throw Error(n(475));var w=Th;if(h.type==="stylesheet"&&(typeof x.media!="string"||matchMedia(x.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var R=nf(x.href),O=d.querySelector(Sh(R));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(w.count++,w=vv.bind(w),d.then(w,w)),h.state.loading|=4,h.instance=O,Te(O);return}O=d.ownerDocument||d,x=n9(x),(R=Zi.get(R))&&Tw(x,R),O=O.createElement("link"),Te(O);var J=O;J._p=new Promise(function(ae,be){J.onload=ae,J.onerror=be}),sa(O,"link",x),h.instance=O}w.stylesheets===null&&(w.stylesheets=new Map),w.stylesheets.set(h,d),(d=h.state.preload)&&(h.state.loading&3)===0&&(w.count++,h=vv.bind(w),d.addEventListener("load",h),d.addEventListener("error",h))}}function ihe(){if(Th===null)throw Error(n(475));var d=Th;return d.stylesheets&&d.count===0&&kw(d,d.stylesheets),0<d.count?function(h){var x=setTimeout(function(){if(d.stylesheets&&kw(d,d.stylesheets),d.unsuspend){var w=d.unsuspend;d.unsuspend=null,w()}},6e4);return d.unsuspend=h,function(){d.unsuspend=null,clearTimeout(x)}}:null}function vv(){if(this.count--,this.count===0){if(this.stylesheets)kw(this,this.stylesheets);else if(this.unsuspend){var d=this.unsuspend;this.unsuspend=null,d()}}}var bv=null;function kw(d,h){d.stylesheets=null,d.unsuspend!==null&&(d.count++,bv=new Map,h.forEach(she,d),bv=null,vv.call(d))}function she(d,h){if(!(h.state.loading&4)){var x=bv.get(d);if(x)var w=x.get(null);else{x=new Map,bv.set(d,x);for(var R=d.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O<R.length;O++){var J=R[O];(J.nodeName==="LINK"||J.getAttribute("media")!=="not all")&&(x.set(J.dataset.precedence,J),w=J)}w&&x.set(null,w)}R=h.instance,J=R.getAttribute("data-precedence"),O=x.get(J)||w,O===w&&x.set(null,R),x.set(J,R),this.count++,w=vv.bind(this),R.addEventListener("load",w),R.addEventListener("error",w),O?O.parentNode.insertBefore(R,O.nextSibling):(d=d.nodeType===9?d.head:d,d.insertBefore(R,d.firstChild)),h.state.loading|=4}}var Ah={$$typeof:C,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function ohe(d,h,x,w,R,O,J,ae){this.tag=1,this.containerInfo=d,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=_s(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_s(0),this.hiddenUpdates=_s(null),this.identifierPrefix=w,this.onUncaughtError=R,this.onCaughtError=O,this.onRecoverableError=J,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ae,this.incompleteTransitions=new Map}function l9(d,h,x,w,R,O,J,ae,be,Me,We,Xe){return d=new ohe(d,h,x,J,ae,be,Me,Xe),h=1,O===!0&&(h|=24),O=pi(3,null,null,h),d.current=O,O.stateNode=d,h=c_(),h.refCount++,d.pooledCache=h,h.refCount++,O.memoizedState={element:w,isDehydrated:x,cache:h},h_(O),d}function c9(d){return d?(d=Ld,d):Ld}function u9(d,h,x,w,R,O){R=c9(R),w.context===null?w.context=R:w.pendingContext=R,w=Xl(h),w.payload={element:x},O=O===void 0?null:O,O!==null&&(w.callback=O),x=Yl(d,w,h),x!==null&&(xi(x,d,h),nh(x,d,h))}function d9(d,h){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var x=d.retryLane;d.retryLane=x!==0&&x<h?x:h}}function Nw(d,h){d9(d,h),(d=d.alternate)&&d9(d,h)}function f9(d){if(d.tag===13){var h=Id(d,67108864);h!==null&&xi(h,d,67108864),Nw(d,67108864)}}var xv=!0;function lhe(d,h,x,w){var R=D.T;D.T=null;var O=U.p;try{U.p=2,Rw(d,h,x,w)}finally{U.p=O,D.T=R}}function che(d,h,x,w){var R=D.T;D.T=null;var O=U.p;try{U.p=8,Rw(d,h,x,w)}finally{U.p=O,D.T=R}}function Rw(d,h,x,w){if(xv){var R=Mw(w);if(R===null)vw(d,h,w,yv,x),p9(d,w);else if(dhe(R,d,h,x,w))w.stopPropagation();else if(p9(d,w),h&4&&-1<uhe.indexOf(d)){for(;R!==null;){var O=fe(R);if(O!==null)switch(O.tag){case 3:if(O=O.stateNode,O.current.memoizedState.isDehydrated){var J=Cr(O.pendingLanes);if(J!==0){var ae=O;for(ae.pendingLanes|=2,ae.entangledLanes|=2;J;){var be=1<<31-rt(J);ae.entanglements[1]|=be,J&=~be}io(O),(Nr&6)===0&&(nv=xe()+500,yh(0))}}break;case 13:ae=Id(O,2),ae!==null&&xi(ae,O,2),iv(),Nw(O,2)}if(O=Mw(w),O===null&&vw(d,h,w,yv,x),O===R)break;R=O}R!==null&&w.stopPropagation()}else vw(d,h,w,null,x)}}function Mw(d){return d=Py(d),Dw(d)}var yv=null;function Dw(d){if(yv=null,d=ue(d),d!==null){var h=i(d);if(h===null)d=null;else{var x=h.tag;if(x===13){if(d=s(h),d!==null)return d;d=null}else if(x===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;d=null}else h!==d&&(d=null)}}return yv=d,null}function h9(d){switch(d){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ve()){case Ne:return 2;case Ue:return 8;case Le:case Ye:return 32;case De:return 268435456;default:return 32}default:return 32}}var Ow=!1,cc=null,uc=null,dc=null,kh=new Map,Nh=new Map,fc=[],uhe="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 p9(d,h){switch(d){case"focusin":case"focusout":cc=null;break;case"dragenter":case"dragleave":uc=null;break;case"mouseover":case"mouseout":dc=null;break;case"pointerover":case"pointerout":kh.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nh.delete(h.pointerId)}}function Rh(d,h,x,w,R,O){return d===null||d.nativeEvent!==O?(d={blockedOn:h,domEventName:x,eventSystemFlags:w,nativeEvent:O,targetContainers:[R]},h!==null&&(h=fe(h),h!==null&&f9(h)),d):(d.eventSystemFlags|=w,h=d.targetContainers,R!==null&&h.indexOf(R)===-1&&h.push(R),d)}function dhe(d,h,x,w,R){switch(h){case"focusin":return cc=Rh(cc,d,h,x,w,R),!0;case"dragenter":return uc=Rh(uc,d,h,x,w,R),!0;case"mouseover":return dc=Rh(dc,d,h,x,w,R),!0;case"pointerover":var O=R.pointerId;return kh.set(O,Rh(kh.get(O)||null,d,h,x,w,R)),!0;case"gotpointercapture":return O=R.pointerId,Nh.set(O,Rh(Nh.get(O)||null,d,h,x,w,R)),!0}return!1}function m9(d){var h=ue(d.target);if(h!==null){var x=i(h);if(x!==null){if(h=x.tag,h===13){if(h=s(x),h!==null){d.blockedOn=h,na(d.priority,function(){if(x.tag===13){var w=bi();w=fr(w);var R=Id(x,w);R!==null&&xi(R,x,w),Nw(x,w)}});return}}else if(h===3&&x.stateNode.current.memoizedState.isDehydrated){d.blockedOn=x.tag===3?x.stateNode.containerInfo:null;return}}}d.blockedOn=null}function _v(d){if(d.blockedOn!==null)return!1;for(var h=d.targetContainers;0<h.length;){var x=Mw(d.nativeEvent);if(x===null){x=d.nativeEvent;var w=new x.constructor(x.type,x);Ly=w,x.target.dispatchEvent(w),Ly=null}else return h=fe(x),h!==null&&f9(h),d.blockedOn=x,!1;h.shift()}return!0}function g9(d,h,x){_v(d)&&x.delete(h)}function fhe(){Ow=!1,cc!==null&&_v(cc)&&(cc=null),uc!==null&&_v(uc)&&(uc=null),dc!==null&&_v(dc)&&(dc=null),kh.forEach(g9),Nh.forEach(g9)}function wv(d,h){d.blockedOn===h&&(d.blockedOn=null,Ow||(Ow=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,fhe)))}var Ev=null;function v9(d){Ev!==d&&(Ev=d,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ev===d&&(Ev=null);for(var h=0;h<d.length;h+=3){var x=d[h],w=d[h+1],R=d[h+2];if(typeof w!="function"){if(Dw(w||x)===null)continue;break}var O=fe(x);O!==null&&(d.splice(h,3),h-=3,D_(O,{pending:!0,data:R,method:x.method,action:w},w,R))}}))}function Mh(d){function h(be){return wv(be,d)}cc!==null&&wv(cc,d),uc!==null&&wv(uc,d),dc!==null&&wv(dc,d),kh.forEach(h),Nh.forEach(h);for(var x=0;x<fc.length;x++){var w=fc[x];w.blockedOn===d&&(w.blockedOn=null)}for(;0<fc.length&&(x=fc[0],x.blockedOn===null);)m9(x),x.blockedOn===null&&fc.shift();if(x=(d.ownerDocument||d).$$reactFormReplay,x!=null)for(w=0;w<x.length;w+=3){var R=x[w],O=x[w+1],J=R[Er]||null;if(typeof O=="function")J||v9(x);else if(J){var ae=null;if(O&&O.hasAttribute("formAction")){if(R=O,J=O[Er]||null)ae=J.formAction;else if(Dw(R)!==null)continue}else ae=J.action;typeof ae=="function"?x[w+1]=ae:(x.splice(w,3),w-=3),v9(x)}}}function Iw(d){this._internalRoot=d}Sv.prototype.render=Iw.prototype.render=function(d){var h=this._internalRoot;if(h===null)throw Error(n(409));var x=h.current,w=bi();u9(x,w,d,h,null,null)},Sv.prototype.unmount=Iw.prototype.unmount=function(){var d=this._internalRoot;if(d!==null){this._internalRoot=null;var h=d.containerInfo;u9(d.current,2,null,d,null,null),iv(),h[Bn]=null}};function Sv(d){this._internalRoot=d}Sv.prototype.unstable_scheduleHydration=function(d){if(d){var h=Wn();d={blockedOn:null,target:d,priority:h};for(var x=0;x<fc.length&&h!==0&&h<fc[x].priority;x++);fc.splice(x,0,d),x===0&&m9(d)}};var b9=t.version;if(b9!=="19.1.1")throw Error(n(527,b9,"19.1.1"));U.findDOMNode=function(d){var h=d._reactInternals;if(h===void 0)throw typeof d.render=="function"?Error(n(188)):(d=Object.keys(d).join(","),Error(n(268,d)));return d=l(h),d=d!==null?c(d):null,d=d===null?null:d.stateNode,d};var hhe={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cv.isDisabled&&Cv.supportsFiber)try{Ee=Cv.inject(hhe),Ae=Cv}catch{}}return Oh.createRoot=function(d,h){if(!a(d))throw Error(n(299));var x=!1,w="",R=I7,O=L7,J=P7,ae=null;return h!=null&&(h.unstable_strictMode===!0&&(x=!0),h.identifierPrefix!==void 0&&(w=h.identifierPrefix),h.onUncaughtError!==void 0&&(R=h.onUncaughtError),h.onCaughtError!==void 0&&(O=h.onCaughtError),h.onRecoverableError!==void 0&&(J=h.onRecoverableError),h.unstable_transitionCallbacks!==void 0&&(ae=h.unstable_transitionCallbacks)),h=l9(d,1,!1,null,null,x,w,R,O,J,ae,null),d[Bn]=h.current,gw(d),new Iw(h)},Oh.hydrateRoot=function(d,h,x){if(!a(d))throw Error(n(299));var w=!1,R="",O=I7,J=L7,ae=P7,be=null,Me=null;return x!=null&&(x.unstable_strictMode===!0&&(w=!0),x.identifierPrefix!==void 0&&(R=x.identifierPrefix),x.onUncaughtError!==void 0&&(O=x.onUncaughtError),x.onCaughtError!==void 0&&(J=x.onCaughtError),x.onRecoverableError!==void 0&&(ae=x.onRecoverableError),x.unstable_transitionCallbacks!==void 0&&(be=x.unstable_transitionCallbacks),x.formState!==void 0&&(Me=x.formState)),h=l9(d,1,!0,h,x??null,w,R,O,J,ae,be,Me),h.context=c9(null),x=h.current,w=bi(),w=fr(w),R=Xl(w),R.callback=null,Yl(x,R,w),x=w,h.current.lanes=x,Ua(h,x),io(h),d[Bn]=h.current,gw(d),new Sv(h)},Oh.version="19.1.1",Oh}var R9;function Ehe(){if(R9)return Bw.exports;R9=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Bw.exports=whe(),Bw.exports}var She=Ehe();/**
 * react-router v7.8.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var M9="popstate";function Che(e={}){function t(n,a){let{pathname:i,search:s,hash:o}=n.location;return d5("",{pathname:i,search:s,hash:o},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Up(a)}return Ahe(t,r,null,e)}function Qr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function us(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function The(){return Math.random().toString(36).substring(2,10)}function D9(e,t){return{usr:e.state,key:e.key,idx:t}}function d5(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?d0(t):t,state:r,key:t&&t.key||n||The()}}function Up({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function d0(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Ahe(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:i=!1}=n,s=a.history,o="POP",l=null,c=u();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function u(){return(s.state||{idx:null}).idx}function f(){o="POP";let y=u(),_=y==null?null:y-c;c=y,l&&l({action:o,location:v.location,delta:_})}function p(y,_){o="PUSH";let S=d5(v.location,y,_);c=u()+1;let C=D9(S,c),T=v.createHref(S);try{s.pushState(C,"",T)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;a.location.assign(T)}i&&l&&l({action:o,location:v.location,delta:1})}function m(y,_){o="REPLACE";let S=d5(v.location,y,_);c=u();let C=D9(S,c),T=v.createHref(S);s.replaceState(C,"",T),i&&l&&l({action:o,location:v.location,delta:0})}function b(y){return khe(y)}let v={get action(){return o},get location(){return e(a,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(M9,f),l=y,()=>{a.removeEventListener(M9,f),l=null}},createHref(y){return t(a,y)},createURL:b,encodeLocation(y){let _=b(y);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:p,replace:m,go(y){return s.go(y)}};return v}function khe(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Qr(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Up(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function nee(e,t,r="/"){return Nhe(e,t,r,!1)}function Nhe(e,t,r,n){let a=typeof t=="string"?d0(t):t,i=Sl(a.pathname||"/",r);if(i==null)return null;let s=aee(e);Rhe(s);let o=null;for(let l=0;o==null&&l<s.length;++l){let c=qhe(i);o=zhe(s[l],c,n)}return o}function aee(e,t=[],r=[],n="",a=!1){let i=(s,o,l=a,c)=>{let u={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(n)&&l)return;Qr(u.relativePath.startsWith(n),`Absolute route path "${u.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(n.length)}let f=bl([n,u.relativePath]),p=r.concat(u);s.children&&s.children.length>0&&(Qr(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),aee(s.children,t,p,f,l)),!(s.path==null&&!s.index)&&t.push({path:f,score:Fhe(f,s.index),routesMeta:p})};return e.forEach((s,o)=>{if(s.path===""||!s.path?.includes("?"))i(s,o);else for(let l of iee(s.path))i(s,o,!0,l)}),t}function iee(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let s=iee(n.join("/")),o=[];return o.push(...s.map(l=>l===""?i:[i,l].join("/"))),a&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function Rhe(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Bhe(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var Mhe=/^:[\w-]+$/,Dhe=3,Ohe=2,Ihe=1,Lhe=10,Phe=-2,O9=e=>e==="*";function Fhe(e,t){let r=e.split("/"),n=r.length;return r.some(O9)&&(n+=Phe),t&&(n+=Ohe),r.filter(a=>!O9(a)).reduce((a,i)=>a+(Mhe.test(i)?Dhe:i===""?Ihe:Lhe),n)}function Bhe(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function zhe(e,t,r=!1){let{routesMeta:n}=e,a={},i="/",s=[];for(let o=0;o<n.length;++o){let l=n[o],c=o===n.length-1,u=i==="/"?t:t.slice(i.length)||"/",f=nb({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),p=l.route;if(!f&&c&&r&&!n[n.length-1].route.index&&(f=nb({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!f)return null;Object.assign(a,f.params),s.push({params:a,pathname:bl([i,f.pathname]),pathnameBase:Ghe(bl([i,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(i=bl([i,f.pathnameBase]))}return s}function nb(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=jhe(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:n.reduce((c,{paramName:u,isOptional:f},p)=>{if(u==="*"){let b=o[p]||"";s=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const m=o[p];return f&&!m?c[u]=void 0:c[u]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}function jhe(e,t=!1,r=!0){us(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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l)=>(n.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function qhe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return us(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Sl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Uhe(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?d0(e):e;return{pathname:r?r.startsWith("/")?r:$he(r,t):t,search:Vhe(n),hash:Whe(a)}}function $he(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Uw(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Hhe(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function dD(e){let t=Hhe(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function fD(e,t,r,n=!1){let a;typeof e=="string"?a=d0(e):(a={...e},Qr(!a.pathname||!a.pathname.includes("?"),Uw("?","pathname","search",a)),Qr(!a.pathname||!a.pathname.includes("#"),Uw("#","pathname","hash",a)),Qr(!a.search||!a.search.includes("#"),Uw("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,o;if(s==null)o=r;else{let f=t.length-1;if(!n&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),f-=1;a.pathname=p.join("/")}o=f>=0?t[f]:"/"}let l=Uhe(a,o),c=s&&s!=="/"&&s.endsWith("/"),u=(i||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var bl=e=>e.join("/").replace(/\/\/+/g,"/"),Ghe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Vhe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Whe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Khe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var see=["POST","PUT","PATCH","DELETE"];new Set(see);var Xhe=["GET",...see];new Set(Xhe);var f0=E.createContext(null);f0.displayName="DataRouter";var Jb=E.createContext(null);Jb.displayName="DataRouterState";E.createContext(!1);var oee=E.createContext({isTransitioning:!1});oee.displayName="ViewTransition";var Yhe=E.createContext(new Map);Yhe.displayName="Fetchers";var Zhe=E.createContext(null);Zhe.displayName="Await";var Vs=E.createContext(null);Vs.displayName="Navigation";var Cm=E.createContext(null);Cm.displayName="Location";var Ws=E.createContext({outlet:null,matches:[],isDataRoute:!1});Ws.displayName="Route";var hD=E.createContext(null);hD.displayName="RouteError";function Qhe(e,{relative:t}={}){Qr(h0(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=E.useContext(Vs),{hash:a,pathname:i,search:s}=Tm(e,{relative:t}),o=i;return r!=="/"&&(o=i==="/"?r:bl([r,i])),n.createHref({pathname:o,search:s,hash:a})}function h0(){return E.useContext(Cm)!=null}function Ks(){return Qr(h0(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Cm).location}var lee="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function cee(e){E.useContext(Vs).static||E.useLayoutEffect(e)}function Oo(){let{isDataRoute:e}=E.useContext(Ws);return e?dpe():Jhe()}function Jhe(){Qr(h0(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(f0),{basename:t,navigator:r}=E.useContext(Vs),{matches:n}=E.useContext(Ws),{pathname:a}=Ks(),i=JSON.stringify(dD(n)),s=E.useRef(!1);return cee(()=>{s.current=!0}),E.useCallback((l,c={})=>{if(us(s.current,lee),!s.current)return;if(typeof l=="number"){r.go(l);return}let u=fD(l,JSON.parse(i),a,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:bl([t,u.pathname])),(c.replace?r.replace:r.push)(u,c.state,c)},[t,r,i,a,e])}E.createContext(null);function gs(){let{matches:e}=E.useContext(Ws),t=e[e.length-1];return t?t.params:{}}function Tm(e,{relative:t}={}){let{matches:r}=E.useContext(Ws),{pathname:n}=Ks(),a=JSON.stringify(dD(r));return E.useMemo(()=>fD(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function epe(e,t){return uee(e,t)}function uee(e,t,r,n){Qr(h0(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=E.useContext(Vs),{matches:i}=E.useContext(Ws),s=i[i.length-1],o=s?s.params:{},l=s?s.pathname:"/",c=s?s.pathnameBase:"/",u=s&&s.route;{let _=u&&u.path||"";dee(l,!u||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let f=Ks(),p;if(t){let _=typeof t=="string"?d0(t):t;Qr(c==="/"||_.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${_.pathname}" was given in the \`location\` prop.`),p=_}else p=f;let m=p.pathname||"/",b=m;if(c!=="/"){let _=c.replace(/^\//,"").split("/");b="/"+m.replace(/^\//,"").split("/").slice(_.length).join("/")}let v=nee(e,{pathname:b});us(u||v!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),us(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=ipe(v&&v.map(_=>Object.assign({},_,{params:Object.assign({},o,_.params),pathname:bl([c,a.encodeLocation?a.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?c:bl([c,a.encodeLocation?a.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),i,r,n);return t&&y?E.createElement(Cm.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},y):y}function tpe(){let e=upe(),t=Khe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:i},"ErrorBoundary")," or"," ",E.createElement("code",{style:i},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),r?E.createElement("pre",{style:a},r):null,s)}var rpe=E.createElement(tpe,null),npe=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?E.createElement(Ws.Provider,{value:this.props.routeContext},E.createElement(hD.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ape({routeContext:e,match:t,children:r}){let n=E.useContext(f0);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Ws.Provider,{value:e},r)}function ipe(e,t=[],r=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r?.errors;if(i!=null){let l=a.findIndex(c=>c.route.id&&i?.[c.route.id]!==void 0);Qr(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,l+1))}let s=!1,o=-1;if(r)for(let l=0;l<a.length;l++){let c=a[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(o=l),c.route.id){let{loaderData:u,errors:f}=r,p=c.route.loader&&!u.hasOwnProperty(c.route.id)&&(!f||f[c.route.id]===void 0);if(c.route.lazy||p){s=!0,o>=0?a=a.slice(0,o+1):a=[a[0]];break}}}return a.reduceRight((l,c,u)=>{let f,p=!1,m=null,b=null;r&&(f=i&&c.route.id?i[c.route.id]:void 0,m=c.route.errorElement||rpe,s&&(o<0&&u===0?(dee("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,b=null):o===u&&(p=!0,b=c.route.hydrateFallbackElement||null)));let v=t.concat(a.slice(0,u+1)),y=()=>{let _;return f?_=m:p?_=b:c.route.Component?_=E.createElement(c.route.Component,null):c.route.element?_=c.route.element:_=l,E.createElement(ape,{match:c,routeContext:{outlet:l,matches:v,isDataRoute:r!=null},children:_})};return r&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?E.createElement(npe,{location:r.location,revalidation:r.revalidation,component:m,error:f,children:y(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):y()},null)}function pD(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function spe(e){let t=E.useContext(f0);return Qr(t,pD(e)),t}function ope(e){let t=E.useContext(Jb);return Qr(t,pD(e)),t}function lpe(e){let t=E.useContext(Ws);return Qr(t,pD(e)),t}function mD(e){let t=lpe(e),r=t.matches[t.matches.length-1];return Qr(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function cpe(){return mD("useRouteId")}function upe(){let e=E.useContext(hD),t=ope("useRouteError"),r=mD("useRouteError");return e!==void 0?e:t.errors?.[r]}function dpe(){let{router:e}=spe("useNavigate"),t=mD("useNavigate"),r=E.useRef(!1);return cee(()=>{r.current=!0}),E.useCallback(async(a,i={})=>{us(r.current,lee),r.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var I9={};function dee(e,t,r){!t&&!I9[e]&&(I9[e]=!0,us(!1,r))}E.memo(fpe);function fpe({routes:e,future:t,state:r}){return uee(e,void 0,r,t)}function hpe({to:e,replace:t,state:r,relative:n}){Qr(h0(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=E.useContext(Vs);us(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=E.useContext(Ws),{pathname:s}=Ks(),o=Oo(),l=fD(e,dD(i),s,n==="path"),c=JSON.stringify(l);return E.useEffect(()=>{o(JSON.parse(c),{replace:t,state:r,relative:n})},[o,c,n,t,r]),null}function Nu(e){Qr(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ppe({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:i=!1}){Qr(!h0(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),o=E.useMemo(()=>({basename:s,navigator:a,static:i,future:{}}),[s,a,i]);typeof r=="string"&&(r=d0(r));let{pathname:l="/",search:c="",hash:u="",state:f=null,key:p="default"}=r,m=E.useMemo(()=>{let b=Sl(l,s);return b==null?null:{location:{pathname:b,search:c,hash:u,state:f,key:p},navigationType:n}},[s,l,c,u,f,p,n]);return us(m!=null,`<Router basename="${s}"> is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:E.createElement(Vs.Provider,{value:o},E.createElement(Cm.Provider,{children:t,value:m}))}function mpe({children:e,location:t}){return epe(f5(e),t)}function f5(e,t=[]){let r=[];return E.Children.forEach(e,(n,a)=>{if(!E.isValidElement(n))return;let i=[...t,a];if(n.type===E.Fragment){r.push.apply(r,f5(n.props.children,i));return}Qr(n.type===Nu,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Qr(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=f5(n.props.children,i)),r.push(s)}),r}var P1="get",F1="application/x-www-form-urlencoded";function ex(e){return e!=null&&typeof e.tagName=="string"}function gpe(e){return ex(e)&&e.tagName.toLowerCase()==="button"}function vpe(e){return ex(e)&&e.tagName.toLowerCase()==="form"}function bpe(e){return ex(e)&&e.tagName.toLowerCase()==="input"}function xpe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ype(e,t){return e.button===0&&(!t||t==="_self")&&!xpe(e)}function h5(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function _pe(e,t){let r=h5(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(i=>{r.append(a,i)})}),r}var Av=null;function wpe(){if(Av===null)try{new FormData(document.createElement("form"),0),Av=!1}catch{Av=!0}return Av}var Epe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $w(e){return e!=null&&!Epe.has(e)?(us(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${F1}"`),null):e}function Spe(e,t){let r,n,a,i,s;if(vpe(e)){let o=e.getAttribute("action");n=o?Sl(o,t):null,r=e.getAttribute("method")||P1,a=$w(e.getAttribute("enctype"))||F1,i=new FormData(e)}else if(gpe(e)||bpe(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||o.getAttribute("action");if(n=l?Sl(l,t):null,r=e.getAttribute("formmethod")||o.getAttribute("method")||P1,a=$w(e.getAttribute("formenctype"))||$w(o.getAttribute("enctype"))||F1,i=new FormData(o,e),!wpe()){let{name:c,type:u,value:f}=e;if(u==="image"){let p=c?`${c}.`:"";i.append(`${p}x`,"0"),i.append(`${p}y`,"0")}else c&&i.append(c,f)}}else{if(ex(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=P1,n=null,a=F1,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gD(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Cpe(e,t,r){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${r}`:t&&Sl(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function Tpe(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ape(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function kpe(e,t,r){let n=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await Tpe(i,r);return s.links?s.links():[]}return[]}));return Dpe(n.flat(1).filter(Ape).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function L9(e,t,r,n,a,i){let s=(l,c)=>r[c]?l.route.id!==r[c].route.id:!0,o=(l,c)=>r[c].pathname!==l.pathname||r[c].route.path?.endsWith("*")&&r[c].params["*"]!==l.params["*"];return i==="assets"?t.filter((l,c)=>s(l,c)||o(l,c)):i==="data"?t.filter((l,c)=>{let u=n.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(s(l,c)||o(l,c))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function Npe(e,t,{includeHydrateFallback:r}={}){return Rpe(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function Rpe(e){return[...new Set(e)]}function Mpe(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Dpe(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let i=JSON.stringify(Mpe(a));return r.has(i)||(r.add(i),n.push({key:i,link:a})),n},[])}function fee(){let e=E.useContext(f0);return gD(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Ope(){let e=E.useContext(Jb);return gD(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var vD=E.createContext(void 0);vD.displayName="FrameworkContext";function hee(){let e=E.useContext(vD);return gD(e,"You must render this element inside a <HydratedRouter> element"),e}function Ipe(e,t){let r=E.useContext(vD),[n,a]=E.useState(!1),[i,s]=E.useState(!1),{onFocus:o,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:f}=t,p=E.useRef(null);E.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let v=_=>{_.forEach(S=>{s(S.isIntersecting)})},y=new IntersectionObserver(v,{threshold:.5});return p.current&&y.observe(p.current),()=>{y.disconnect()}}},[e]),E.useEffect(()=>{if(n){let v=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(v)}}},[n]);let m=()=>{a(!0)},b=()=>{a(!1),s(!1)};return r?e!=="intent"?[i,p,{}]:[i,p,{onFocus:Ih(o,m),onBlur:Ih(l,b),onMouseEnter:Ih(c,m),onMouseLeave:Ih(u,b),onTouchStart:Ih(f,m)}]:[!1,p,{}]}function Ih(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Lpe({page:e,...t}){let{router:r}=fee(),n=E.useMemo(()=>nee(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?E.createElement(Fpe,{page:e,matches:n,...t}):null}function Ppe(e){let{manifest:t,routeModules:r}=hee(),[n,a]=E.useState([]);return E.useEffect(()=>{let i=!1;return kpe(e,t,r).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,r]),n}function Fpe({page:e,matches:t,...r}){let n=Ks(),{manifest:a,routeModules:i}=hee(),{basename:s}=fee(),{loaderData:o,matches:l}=Ope(),c=E.useMemo(()=>L9(e,t,l,a,n,"data"),[e,t,l,a,n]),u=E.useMemo(()=>L9(e,t,l,a,n,"assets"),[e,t,l,a,n]),f=E.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let b=new Set,v=!1;if(t.forEach(_=>{let S=a.routes[_.route.id];!S||!S.hasLoader||(!c.some(C=>C.route.id===_.route.id)&&_.route.id in o&&i[_.route.id]?.shouldRevalidate||S.hasClientLoader?v=!0:b.add(_.route.id))}),b.size===0)return[];let y=Cpe(e,s,"data");return v&&b.size>0&&y.searchParams.set("_routes",t.filter(_=>b.has(_.route.id)).map(_=>_.route.id).join(",")),[y.pathname+y.search]},[s,o,n,a,c,t,e,i]),p=E.useMemo(()=>Npe(u,a),[u,a]),m=Ppe(u);return E.createElement(E.Fragment,null,f.map(b=>E.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),p.map(b=>E.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),m.map(({key:b,link:v})=>E.createElement("link",{key:b,nonce:r.nonce,...v})))}function Bpe(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var pee=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{pee&&(window.__reactRouterVersion="7.8.1")}catch{}function zpe({basename:e,children:t,window:r}){let n=E.useRef();n.current==null&&(n.current=Che({window:r,v5Compat:!0}));let a=n.current,[i,s]=E.useState({action:a.action,location:a.location}),o=E.useCallback(l=>{E.startTransition(()=>s(l))},[s]);return E.useLayoutEffect(()=>a.listen(o),[a,o]),E.createElement(ppe,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:a})}var mee=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gee=E.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:i,replace:s,state:o,target:l,to:c,preventScrollReset:u,viewTransition:f,...p},m){let{basename:b}=E.useContext(Vs),v=typeof c=="string"&&mee.test(c),y,_=!1;if(typeof c=="string"&&v&&(y=c,pee))try{let I=new URL(window.location.href),P=c.startsWith("//")?new URL(I.protocol+c):new URL(c),H=Sl(P.pathname,b);P.origin===I.origin&&H!=null?c=H+P.search+P.hash:_=!0}catch{us(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let S=Qhe(c,{relative:a}),[C,T,A]=Ipe(n,p),k=$pe(c,{replace:s,state:o,target:l,preventScrollReset:u,relative:a,viewTransition:f});function N(I){t&&t(I),I.defaultPrevented||k(I)}let L=E.createElement("a",{...p,...A,href:y||S,onClick:_||i?t:N,ref:Bpe(m,T),target:l,"data-discover":!v&&r==="render"?"true":void 0});return C&&!v?E.createElement(E.Fragment,null,L,E.createElement(Lpe,{page:S})):L});gee.displayName="Link";var jpe=E.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:i,to:s,viewTransition:o,children:l,...c},u){let f=Tm(s,{relative:c.relative}),p=Ks(),m=E.useContext(Jb),{navigator:b,basename:v}=E.useContext(Vs),y=m!=null&&Xpe(f)&&o===!0,_=b.encodeLocation?b.encodeLocation(f).pathname:f.pathname,S=p.pathname,C=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(S=S.toLowerCase(),C=C?C.toLowerCase():null,_=_.toLowerCase()),C&&v&&(C=Sl(C,v)||C);const T=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let A=S===_||!a&&S.startsWith(_)&&S.charAt(T)==="/",k=C!=null&&(C===_||!a&&C.startsWith(_)&&C.charAt(_.length)==="/"),N={isActive:A,isPending:k,isTransitioning:y},L=A?t:void 0,I;typeof n=="function"?I=n(N):I=[n,A?"active":null,k?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let P=typeof i=="function"?i(N):i;return E.createElement(gee,{...c,"aria-current":L,className:I,ref:u,style:P,to:s,viewTransition:o},typeof l=="function"?l(N):l)});jpe.displayName="NavLink";var qpe=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:i,method:s=P1,action:o,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:f,...p},m)=>{let b=Wpe(),v=Kpe(o,{relative:c}),y=s.toLowerCase()==="get"?"get":"post",_=typeof o=="string"&&mee.test(o),S=C=>{if(l&&l(C),C.defaultPrevented)return;C.preventDefault();let T=C.nativeEvent.submitter,A=T?.getAttribute("formmethod")||s;b(T||C.currentTarget,{fetcherKey:t,method:A,navigate:r,replace:a,state:i,relative:c,preventScrollReset:u,viewTransition:f})};return E.createElement("form",{ref:m,method:y,action:v,onSubmit:n?l:S,...p,"data-discover":!_&&e==="render"?"true":void 0})});qpe.displayName="Form";function Upe(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function vee(e){let t=E.useContext(f0);return Qr(t,Upe(e)),t}function $pe(e,{target:t,replace:r,state:n,preventScrollReset:a,relative:i,viewTransition:s}={}){let o=Oo(),l=Ks(),c=Tm(e,{relative:i});return E.useCallback(u=>{if(ype(u,t)){u.preventDefault();let f=r!==void 0?r:Up(l)===Up(c);o(e,{replace:f,state:n,preventScrollReset:a,relative:i,viewTransition:s})}},[l,o,c,r,n,t,e,a,i,s])}function Hpe(e){us(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=E.useRef(h5(e)),r=E.useRef(!1),n=Ks(),a=E.useMemo(()=>_pe(n.search,r.current?null:t.current),[n.search]),i=Oo(),s=E.useCallback((o,l)=>{const c=h5(typeof o=="function"?o(new URLSearchParams(a)):o);r.current=!0,i("?"+c,l)},[i,a]);return[a,s]}var Gpe=0,Vpe=()=>`__${String(++Gpe)}__`;function Wpe(){let{router:e}=vee("useSubmit"),{basename:t}=E.useContext(Vs),r=cpe();return E.useCallback(async(n,a={})=>{let{action:i,method:s,encType:o,formData:l,body:c}=Spe(n,t);if(a.navigate===!1){let u=a.fetcherKey||Vpe();await e.fetch(u,r,a.action||i,{preventScrollReset:a.preventScrollReset,formData:l,body:c,formMethod:a.method||s,formEncType:a.encType||o,flushSync:a.flushSync})}else await e.navigate(a.action||i,{preventScrollReset:a.preventScrollReset,formData:l,body:c,formMethod:a.method||s,formEncType:a.encType||o,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}function Kpe(e,{relative:t}={}){let{basename:r}=E.useContext(Vs),n=E.useContext(Ws);Qr(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),i={...Tm(e||".",{relative:t})},s=Ks();if(e==null){i.search=s.search;let o=new URLSearchParams(i.search),l=o.getAll("index");if(l.some(u=>u==="")){o.delete("index"),l.filter(f=>f).forEach(f=>o.append("index",f));let u=o.toString();i.search=u?`?${u}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:bl([r,i.pathname])),Up(i)}function Xpe(e,{relative:t}={}){let r=E.useContext(oee);Qr(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=vee("useViewTransitionState"),a=Tm(e,{relative:t});if(!r.isTransitioning)return!1;let i=Sl(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=Sl(r.nextLocation.pathname,n)||r.nextLocation.pathname;return nb(a.pathname,s)!=null||nb(a.pathname,i)!=null}var bD=uD();const bee=Fl(bD);var Ype=e=>{switch(e){case"success":return Jpe;case"info":return tme;case"warning":return eme;case"error":return rme;default:return null}},Zpe=Array(12).fill(0),Qpe=({visible:e,className:t})=>ye.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ye.createElement("div",{className:"sonner-spinner"},Zpe.map((r,n)=>ye.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),Jpe=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),eme=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ye.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"})),tme=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),rme=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),nme=ye.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"},ye.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ye.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ame=()=>{let[e,t]=ye.useState(document.hidden);return ye.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},p5=1,ime=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,a=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:p5++,i=this.toasts.find(o=>o.id===a),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(o=>o.id===a?(this.publish({...o,...e,id:a,title:r}),{...o,...e,id:a,dismissible:s,title:r}):o):this.addToast({title:r,...n,dismissible:s,id:a}),a},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),a=r!==void 0,i,s=n.then(async l=>{if(i=["resolve",l],ye.isValidElement(l))a=!1,this.create({id:r,type:"default",message:l});else if(ome(l)&&!l.ok){a=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:c,description:u})}else if(t.success!==void 0){a=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){a=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:c,description:u})}}).finally(()=>{var l;a&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),o=()=>new Promise((l,c)=>s.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:o}:Object.assign(r,{unwrap:o})},this.custom=(e,t)=>{let r=t?.id||p5++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ja=new ime,sme=(e,t)=>{let r=t?.id||p5++;return Ja.addToast({title:e,...t,id:r}),r},ome=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",lme=sme,cme=()=>Ja.toasts,ume=()=>Ja.getActiveToasts(),Fr=Object.assign(lme,{success:Ja.success,info:Ja.info,warning:Ja.warning,error:Ja.error,custom:Ja.custom,message:Ja.message,promise:Ja.promise,dismiss:Ja.dismiss,loading:Ja.loading},{getHistory:cme,getToasts:ume});function dme(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}dme(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;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(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-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-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],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
`);function kv(e){return e.label!==void 0}var fme=3,hme="32px",pme="16px",P9=4e3,mme=356,gme=14,vme=20,bme=200;function As(...e){return e.filter(Boolean).join(" ")}function xme(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var yme=e=>{var t,r,n,a,i,s,o,l,c,u,f;let{invert:p,toast:m,unstyled:b,interacting:v,setHeights:y,visibleToasts:_,heights:S,index:C,toasts:T,expanded:A,removeToast:k,defaultRichColors:N,closeButton:L,style:I,cancelButtonStyle:P,actionButtonStyle:H,className:B="",descriptionClassName:K="",duration:j,position:W,gap:D,loadingIcon:U,expandByDefault:Y,classNames:z,icons:M,closeButtonAriaLabel:Q="Close toast",pauseWhenPageIsHidden:q}=e,[F,V]=ye.useState(null),[Z,ee]=ye.useState(null),[te,oe]=ye.useState(!1),[pe,he]=ye.useState(!1),[ke,se]=ye.useState(!1),[qe,$e]=ye.useState(!1),[Pe,Ce]=ye.useState(!1),[xe,ve]=ye.useState(0),[Ne,Ue]=ye.useState(0),Le=ye.useRef(m.duration||j||P9),Ye=ye.useRef(null),De=ye.useRef(null),Ve=C===0,lt=C+1<=_,Ee=m.type,Ae=m.dismissible!==!1,Ze=m.className||"",rt=m.descriptionClassName||"",at=ye.useMemo(()=>S.findIndex(Pt=>Pt.toastId===m.id)||0,[S,m.id]),bt=ye.useMemo(()=>{var Pt;return(Pt=m.closeButton)!=null?Pt:L},[m.closeButton,L]),et=ye.useMemo(()=>m.duration||j||P9,[m.duration,j]),ft=ye.useRef(0),zt=ye.useRef(0),Cr=ye.useRef(0),Xt=ye.useRef(null),[$r,on]=W.split("-"),qi=ye.useMemo(()=>S.reduce((Pt,fr,wr)=>wr>=at?Pt:Pt+fr.height,0),[S,at]),qa=ame(),_s=m.invert||p,Ua=Ee==="loading";zt.current=ye.useMemo(()=>at*D+qi,[at,qi]),ye.useEffect(()=>{Le.current=et},[et]),ye.useEffect(()=>{oe(!0)},[]),ye.useEffect(()=>{let Pt=De.current;if(Pt){let fr=Pt.getBoundingClientRect().height;return Ue(fr),y(wr=>[{toastId:m.id,height:fr,position:m.position},...wr]),()=>y(wr=>wr.filter(Wn=>Wn.toastId!==m.id))}},[y,m.id]),ye.useLayoutEffect(()=>{if(!te)return;let Pt=De.current,fr=Pt.style.height;Pt.style.height="auto";let wr=Pt.getBoundingClientRect().height;Pt.style.height=fr,Ue(wr),y(Wn=>Wn.find(na=>na.toastId===m.id)?Wn.map(na=>na.toastId===m.id?{...na,height:wr}:na):[{toastId:m.id,height:wr,position:m.position},...Wn])},[te,m.title,m.description,y,m.id]);let tn=ye.useCallback(()=>{he(!0),ve(zt.current),y(Pt=>Pt.filter(fr=>fr.toastId!==m.id)),setTimeout(()=>{k(m)},bme)},[m,k,y,zt]);ye.useEffect(()=>{if(m.promise&&Ee==="loading"||m.duration===1/0||m.type==="loading")return;let Pt;return A||v||q&&qa?(()=>{if(Cr.current<ft.current){let fr=new Date().getTime()-ft.current;Le.current=Le.current-fr}Cr.current=new Date().getTime()})():Le.current!==1/0&&(ft.current=new Date().getTime(),Pt=setTimeout(()=>{var fr;(fr=m.onAutoClose)==null||fr.call(m,m),tn()},Le.current)),()=>clearTimeout(Pt)},[A,v,m,Ee,q,qa,tn]),ye.useEffect(()=>{m.delete&&tn()},[tn,m.delete]);function Gl(){var Pt,fr,wr;return M!=null&&M.loading?ye.createElement("div",{className:As(z?.loader,(Pt=m?.classNames)==null?void 0:Pt.loader,"sonner-loader"),"data-visible":Ee==="loading"},M.loading):U?ye.createElement("div",{className:As(z?.loader,(fr=m?.classNames)==null?void 0:fr.loader,"sonner-loader"),"data-visible":Ee==="loading"},U):ye.createElement(Qpe,{className:As(z?.loader,(wr=m?.classNames)==null?void 0:wr.loader),visible:Ee==="loading"})}return ye.createElement("li",{tabIndex:0,ref:De,className:As(B,Ze,z?.toast,(t=m?.classNames)==null?void 0:t.toast,z?.default,z?.[Ee],(r=m?.classNames)==null?void 0:r[Ee]),"data-sonner-toast":"","data-rich-colors":(n=m.richColors)!=null?n:N,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":te,"data-promise":!!m.promise,"data-swiped":Pe,"data-removed":pe,"data-visible":lt,"data-y-position":$r,"data-x-position":on,"data-index":C,"data-front":Ve,"data-swiping":ke,"data-dismissible":Ae,"data-type":Ee,"data-invert":_s,"data-swipe-out":qe,"data-swipe-direction":Z,"data-expanded":!!(A||Y&&te),style:{"--index":C,"--toasts-before":C,"--z-index":T.length-C,"--offset":`${pe?xe:zt.current}px`,"--initial-height":Y?"auto":`${Ne}px`,...I,...m.style},onDragEnd:()=>{se(!1),V(null),Xt.current=null},onPointerDown:Pt=>{Ua||!Ae||(Ye.current=new Date,ve(zt.current),Pt.target.setPointerCapture(Pt.pointerId),Pt.target.tagName!=="BUTTON"&&(se(!0),Xt.current={x:Pt.clientX,y:Pt.clientY}))},onPointerUp:()=>{var Pt,fr,wr,Wn;if(qe||!Ae)return;Xt.current=null;let na=Number(((Pt=De.current)==null?void 0:Pt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vn=Number(((fr=De.current)==null?void 0:fr.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Dr=new Date().getTime()-((wr=Ye.current)==null?void 0:wr.getTime()),Er=F==="x"?na:vn,Bn=Math.abs(Er)/Dr;if(Math.abs(Er)>=vme||Bn>.11){ve(zt.current),(Wn=m.onDismiss)==null||Wn.call(m,m),ee(F==="x"?na>0?"right":"left":vn>0?"down":"up"),tn(),$e(!0),Ce(!1);return}se(!1),V(null)},onPointerMove:Pt=>{var fr,wr,Wn,na;if(!Xt.current||!Ae||((fr=window.getSelection())==null?void 0:fr.toString().length)>0)return;let vn=Pt.clientY-Xt.current.y,Dr=Pt.clientX-Xt.current.x,Er=(wr=e.swipeDirections)!=null?wr:xme(W);!F&&(Math.abs(Dr)>1||Math.abs(vn)>1)&&V(Math.abs(Dr)>Math.abs(vn)?"x":"y");let Bn={x:0,y:0};F==="y"?(Er.includes("top")||Er.includes("bottom"))&&(Er.includes("top")&&vn<0||Er.includes("bottom")&&vn>0)&&(Bn.y=vn):F==="x"&&(Er.includes("left")||Er.includes("right"))&&(Er.includes("left")&&Dr<0||Er.includes("right")&&Dr>0)&&(Bn.x=Dr),(Math.abs(Bn.x)>0||Math.abs(Bn.y)>0)&&Ce(!0),(Wn=De.current)==null||Wn.style.setProperty("--swipe-amount-x",`${Bn.x}px`),(na=De.current)==null||na.style.setProperty("--swipe-amount-y",`${Bn.y}px`)}},bt&&!m.jsx?ye.createElement("button",{"aria-label":Q,"data-disabled":Ua,"data-close-button":!0,onClick:Ua||!Ae?()=>{}:()=>{var Pt;tn(),(Pt=m.onDismiss)==null||Pt.call(m,m)},className:As(z?.closeButton,(a=m?.classNames)==null?void 0:a.closeButton)},(i=M?.close)!=null?i:nme):null,m.jsx||E.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:ye.createElement(ye.Fragment,null,Ee||m.icon||m.promise?ye.createElement("div",{"data-icon":"",className:As(z?.icon,(s=m?.classNames)==null?void 0:s.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||Gl():null,m.type!=="loading"?m.icon||M?.[Ee]||Ype(Ee):null):null,ye.createElement("div",{"data-content":"",className:As(z?.content,(o=m?.classNames)==null?void 0:o.content)},ye.createElement("div",{"data-title":"",className:As(z?.title,(l=m?.classNames)==null?void 0:l.title)},typeof m.title=="function"?m.title():m.title),m.description?ye.createElement("div",{"data-description":"",className:As(K,rt,z?.description,(c=m?.classNames)==null?void 0:c.description)},typeof m.description=="function"?m.description():m.description):null),E.isValidElement(m.cancel)?m.cancel:m.cancel&&kv(m.cancel)?ye.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||P,onClick:Pt=>{var fr,wr;kv(m.cancel)&&Ae&&((wr=(fr=m.cancel).onClick)==null||wr.call(fr,Pt),tn())},className:As(z?.cancelButton,(u=m?.classNames)==null?void 0:u.cancelButton)},m.cancel.label):null,E.isValidElement(m.action)?m.action:m.action&&kv(m.action)?ye.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||H,onClick:Pt=>{var fr,wr;kv(m.action)&&((wr=(fr=m.action).onClick)==null||wr.call(fr,Pt),!Pt.defaultPrevented&&tn())},className:As(z?.actionButton,(f=m?.classNames)==null?void 0:f.actionButton)},m.action.label):null))};function F9(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function _me(e,t){let r={};return[e,t].forEach((n,a)=>{let i=a===1,s=i?"--mobile-offset":"--offset",o=i?pme:hme;function l(c){["top","right","bottom","left"].forEach(u=>{r[`${s}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${s}-${c}`]=o:r[`${s}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(o)}),r}var wme=E.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:s,className:o,offset:l,mobileOffset:c,theme:u="light",richColors:f,duration:p,style:m,visibleToasts:b=fme,toastOptions:v,dir:y=F9(),gap:_=gme,loadingIcon:S,icons:C,containerAriaLabel:T="Notifications",pauseWhenPageIsHidden:A}=e,[k,N]=ye.useState([]),L=ye.useMemo(()=>Array.from(new Set([n].concat(k.filter(q=>q.position).map(q=>q.position)))),[k,n]),[I,P]=ye.useState([]),[H,B]=ye.useState(!1),[K,j]=ye.useState(!1),[W,D]=ye.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=ye.useRef(null),Y=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=ye.useRef(null),M=ye.useRef(!1),Q=ye.useCallback(q=>{N(F=>{var V;return(V=F.find(Z=>Z.id===q.id))!=null&&V.delete||Ja.dismiss(q.id),F.filter(({id:Z})=>Z!==q.id)})},[]);return ye.useEffect(()=>Ja.subscribe(q=>{if(q.dismiss){N(F=>F.map(V=>V.id===q.id?{...V,delete:!0}:V));return}setTimeout(()=>{bee.flushSync(()=>{N(F=>{let V=F.findIndex(Z=>Z.id===q.id);return V!==-1?[...F.slice(0,V),{...F[V],...q},...F.slice(V+1)]:[q,...F]})})})}),[]),ye.useEffect(()=>{if(u!=="system"){D(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;let q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:F})=>{D(F?"dark":"light")})}catch{q.addListener(({matches:V})=>{try{D(V?"dark":"light")}catch(Z){console.error(Z)}})}},[u]),ye.useEffect(()=>{k.length<=1&&B(!1)},[k]),ye.useEffect(()=>{let q=F=>{var V,Z;a.every(ee=>F[ee]||F.code===ee)&&(B(!0),(V=U.current)==null||V.focus()),F.code==="Escape"&&(document.activeElement===U.current||(Z=U.current)!=null&&Z.contains(document.activeElement))&&B(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[a]),ye.useEffect(()=>{if(U.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,M.current=!1)}},[U.current]),ye.createElement("section",{ref:t,"aria-label":`${T} ${Y}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((q,F)=>{var V;let[Z,ee]=q.split("-");return k.length?ye.createElement("ol",{key:q,dir:y==="auto"?F9():y,tabIndex:-1,ref:U,className:o,"data-sonner-toaster":!0,"data-theme":W,"data-y-position":Z,"data-lifted":H&&k.length>1&&!i,"data-x-position":ee,style:{"--front-toast-height":`${((V=I[0])==null?void 0:V.height)||0}px`,"--width":`${mme}px`,"--gap":`${_}px`,...m,..._me(l,c)},onBlur:te=>{M.current&&!te.currentTarget.contains(te.relatedTarget)&&(M.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||M.current||(M.current=!0,z.current=te.relatedTarget)},onMouseEnter:()=>B(!0),onMouseMove:()=>B(!0),onMouseLeave:()=>{K||B(!1)},onDragEnd:()=>B(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||j(!0)},onPointerUp:()=>j(!1)},k.filter(te=>!te.position&&F===0||te.position===q).map((te,oe)=>{var pe,he;return ye.createElement(yme,{key:te.id,icons:C,index:oe,toast:te,defaultRichColors:f,duration:(pe=v?.duration)!=null?pe:p,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:r,visibleToasts:b,closeButton:(he=v?.closeButton)!=null?he:s,interacting:K,position:q,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,removeToast:Q,toasts:k.filter(ke=>ke.position==te.position),heights:I.filter(ke=>ke.position==te.position),setHeights:P,expandByDefault:i,gap:_,loadingIcon:S,expanded:H,pauseWhenPageIsHidden:A,swipeDirections:e.swipeDirections})})):null}))});function B9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tx(...e){return t=>{let r=!1;const n=e.map(a=>{const i=B9(a,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<n.length;a++){const i=n[a];typeof i=="function"?i():B9(e[a],null)}}}}function pn(...e){return E.useCallback(tx(...e),e)}function Yf(e){const t=Eme(e),r=E.forwardRef((n,a)=>{const{children:i,...s}=n,o=E.Children.toArray(i),l=o.find(Cme);if(l){const c=l.props.children,u=o.map(f=>f===l?E.Children.count(c)>1?E.Children.only(null):E.isValidElement(c)?c.props.children:null:f);return g.jsx(t,{...s,ref:a,children:E.isValidElement(c)?E.cloneElement(c,void 0,u):null})}return g.jsx(t,{...s,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}var xD=Yf("Slot");function Eme(e){const t=E.forwardRef((r,n)=>{const{children:a,...i}=r;if(E.isValidElement(a)){const s=Ame(a),o=Tme(i,a.props);return a.type!==E.Fragment&&(o.ref=n?tx(n,s):s),E.cloneElement(a,o)}return E.Children.count(a)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xee=Symbol("radix.slottable");function Sme(e){const t=({children:r})=>g.jsx(g.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=xee,t}function Cme(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xee}function Tme(e,t){const r={...t};for(const n in t){const a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...o)=>{const l=i(...o);return a(...o),l}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function Ame(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var z9=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xa=e=>!e||typeof e!="object"||Object.keys(e).length===0,kme=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function yee(e,t){e.forEach(function(r){Array.isArray(r)?yee(r,t):t.push(r)})}function _ee(e){let t=[];return yee(e,t),t}var wee=(...e)=>_ee(e).filter(Boolean),Eee=(e,t)=>{let r={},n=Object.keys(e),a=Object.keys(t);for(let i of n)if(a.includes(i)){let s=e[i],o=t[i];Array.isArray(s)||Array.isArray(o)?r[i]=wee(o,s):typeof s=="object"&&typeof o=="object"?r[i]=Eee(s,o):r[i]=o+" "+s}else r[i]=e[i];for(let i of a)n.includes(i)||(r[i]=t[i]);return r},j9=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const yD="-",Nme=e=>{const t=Mme(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const o=s.split(yD);return o[0]===""&&o.length!==1&&o.shift(),See(o,t)||Rme(s)},getConflictingClassGroupIds:(s,o)=>{const l=r[s]||[];return o&&n[s]?[...l,...n[s]]:l}}},See=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?See(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(yD);return t.validators.find(({validator:s})=>s(i))?.classGroupId},q9=/^\[(.+)\]$/,Rme=e=>{if(q9.test(e)){const t=q9.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Mme=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const a in r)m5(r[a],n,a,t);return n},m5=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:U9(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(Dme(a)){m5(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,s])=>{m5(s,U9(t,i),r,n)})})},U9=(e,t)=>{let r=e;return t.split(yD).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Dme=e=>e.isThemeGetter,Ome=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return a(i,s),s},set(i,s){r.has(i)?r.set(i,s):a(i,s)}}},g5="!",v5=":",Ime=v5.length,Lme=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a=>{const i=[];let s=0,o=0,l=0,c;for(let b=0;b<a.length;b++){let v=a[b];if(s===0&&o===0){if(v===v5){i.push(a.slice(l,b)),l=b+Ime;continue}if(v==="/"){c=b;continue}}v==="["?s++:v==="]"?s--:v==="("?o++:v===")"&&o--}const u=i.length===0?a:a.substring(l),f=Pme(u),p=f!==u,m=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:m}};if(t){const a=t+v5,i=n;n=s=>s.startsWith(a)?i(s.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(r){const a=n;n=i=>r({className:i,parseClassName:a})}return n},Pme=e=>e.endsWith(g5)?e.substring(0,e.length-1):e.startsWith(g5)?e.substring(1):e,Fme=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const a=[];let i=[];return n.forEach(s=>{s[0]==="["||t[s]?(a.push(...i.sort(),s),i=[]):i.push(s)}),a.push(...i.sort()),a}},Bme=e=>({cache:Ome(e.cacheSize),parseClassName:Lme(e),sortModifiers:Fme(e),...Nme(e)}),zme=/\s+/,jme=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:i}=t,s=[],o=e.trim().split(zme);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{isExternal:f,modifiers:p,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:v}=r(u);if(f){l=u+(l.length>0?" "+l:l);continue}let y=!!v,_=n(y?b.substring(0,v):b);if(!_){if(!y){l=u+(l.length>0?" "+l:l);continue}if(_=n(b),!_){l=u+(l.length>0?" "+l:l);continue}y=!1}const S=i(p).join(":"),C=m?S+g5:S,T=C+_;if(s.includes(T))continue;s.push(T);const A=a(_,y);for(let k=0;k<A.length;++k){const N=A[k];s.push(C+N)}l=u+(l.length>0?" "+l:l)}return l};function qme(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Cee(t))&&(n&&(n+=" "),n+=r);return n}const Cee=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Cee(e[n]))&&(r&&(r+=" "),r+=t);return r};function b5(e,...t){let r,n,a,i=s;function s(l){const c=t.reduce((u,f)=>f(u),e());return r=Bme(c),n=r.cache.get,a=r.cache.set,i=o,o(l)}function o(l){const c=n(l);if(c)return c;const u=jme(l,r);return a(l,u),u}return function(){return i(qme.apply(null,arguments))}}const Zn=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Tee=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Aee=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ume=/^\d+\/\d+$/,$me=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hme=/\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$/,Gme=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Vme=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Wme=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sf=e=>Ume.test(e),pr=e=>!!e&&!Number.isNaN(Number(e)),vu=e=>!!e&&Number.isInteger(Number(e)),$9=e=>e.endsWith("%")&&pr(e.slice(0,-1)),pc=e=>$me.test(e),Kme=()=>!0,Xme=e=>Hme.test(e)&&!Gme.test(e),_D=()=>!1,Yme=e=>Vme.test(e),Zme=e=>Wme.test(e),Qme=e=>!St(e)&&!Ct(e),Jme=e=>p0(e,Ree,_D),St=e=>Tee.test(e),bu=e=>p0(e,Mee,Xme),Hw=e=>p0(e,uge,pr),ege=e=>p0(e,kee,_D),tge=e=>p0(e,Nee,Zme),rge=e=>p0(e,_D,Yme),Ct=e=>Aee.test(e),Nv=e=>m0(e,Mee),nge=e=>m0(e,dge),age=e=>m0(e,kee),ige=e=>m0(e,Ree),sge=e=>m0(e,Nee),oge=e=>m0(e,fge,!0),p0=(e,t,r)=>{const n=Tee.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},m0=(e,t,r=!1)=>{const n=Aee.exec(e);return n?n[1]?t(n[1]):r:!1},kee=e=>e==="position",lge=new Set(["image","url"]),Nee=e=>lge.has(e),cge=new Set(["length","size","percentage"]),Ree=e=>cge.has(e),Mee=e=>e==="length",uge=e=>e==="number",dge=e=>e==="family-name",fge=e=>e==="shadow",x5=()=>{const e=Zn("color"),t=Zn("font"),r=Zn("text"),n=Zn("font-weight"),a=Zn("tracking"),i=Zn("leading"),s=Zn("breakpoint"),o=Zn("container"),l=Zn("spacing"),c=Zn("radius"),u=Zn("shadow"),f=Zn("inset-shadow"),p=Zn("drop-shadow"),m=Zn("blur"),b=Zn("perspective"),v=Zn("aspect"),y=Zn("ease"),_=Zn("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],k=()=>[Ct,St,l],N=()=>[sf,"full","auto",...k()],L=()=>[vu,"none","subgrid",Ct,St],I=()=>["auto",{span:["full",vu,Ct,St]},Ct,St],P=()=>[vu,"auto",Ct,St],H=()=>["auto","min","max","fr",Ct,St],B=()=>["start","end","center","between","around","evenly","stretch","baseline"],K=()=>["start","end","center","stretch"],j=()=>["auto",...k()],W=()=>[sf,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],D=()=>[e,Ct,St],U=()=>[$9,bu],Y=()=>["","none","full",c,Ct,St],z=()=>["",pr,Nv,bu],M=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>["","none",m,Ct,St],F=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ct,St],V=()=>["none",pr,Ct,St],Z=()=>["none",pr,Ct,St],ee=()=>[pr,Ct,St],te=()=>[sf,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pc],breakpoint:[pc],color:[Kme],container:[pc],"drop-shadow":[pc],ease:["in","out","in-out"],font:[Qme],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pc],shadow:[pc],spacing:["px",pr],text:[pc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sf,St,Ct,v]}],container:["container"],columns:[{columns:[pr,St,Ct,o]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...C(),St,Ct]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[vu,"auto",Ct,St]}],basis:[{basis:[sf,"full","auto",o,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pr,sf,"auto","initial","none",St]}],grow:[{grow:["",pr,Ct,St]}],shrink:[{shrink:["",pr,Ct,St]}],order:[{order:[vu,"first","last","none",Ct,St]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...K(),"baseline"]}],"align-self":[{self:["auto",...K(),"baseline"]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[o,"screen",...W()]}],"min-w":[{"min-w":[o,"screen","none",...W()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...W()]}],h:[{h:["screen",...W()]}],"min-h":[{"min-h":["screen","none",...W()]}],"max-h":[{"max-h":["screen",...W()]}],"font-size":[{text:["base",r,Nv,bu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ct,Hw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$9,St]}],"font-family":[{font:[nge,St,t]}],"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:[a,Ct,St]}],"line-clamp":[{"line-clamp":[pr,"none",Ct,Hw]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Ct,St]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ct,St]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[pr,"from-font","auto",Ct,bu]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[pr,"auto",Ct,St]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ct,St]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ct,St]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...C(),age,ege]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",ige,Jme]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},vu,Ct,St],radial:["",Ct,St],conic:[vu,Ct,St]},sge,tge]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pr,Ct,St]}],"outline-w":[{outline:["",pr,Nv,bu]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",u,oge,rge]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",Ct,St,f]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[pr,bu]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":D()}],opacity:[{opacity:[pr,Ct,St]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none",Ct,St]}],blur:[{blur:q()}],brightness:[{brightness:[pr,Ct,St]}],contrast:[{contrast:[pr,Ct,St]}],"drop-shadow":[{"drop-shadow":["","none",p,Ct,St]}],grayscale:[{grayscale:["",pr,Ct,St]}],"hue-rotate":[{"hue-rotate":[pr,Ct,St]}],invert:[{invert:["",pr,Ct,St]}],saturate:[{saturate:[pr,Ct,St]}],sepia:[{sepia:["",pr,Ct,St]}],"backdrop-filter":[{"backdrop-filter":["","none",Ct,St]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[pr,Ct,St]}],"backdrop-contrast":[{"backdrop-contrast":[pr,Ct,St]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pr,Ct,St]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pr,Ct,St]}],"backdrop-invert":[{"backdrop-invert":["",pr,Ct,St]}],"backdrop-opacity":[{"backdrop-opacity":[pr,Ct,St]}],"backdrop-saturate":[{"backdrop-saturate":[pr,Ct,St]}],"backdrop-sepia":[{"backdrop-sepia":["",pr,Ct,St]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ct,St]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pr,"initial",Ct,St]}],ease:[{ease:["linear","initial",y,Ct,St]}],delay:[{delay:[pr,Ct,St]}],animate:[{animate:["none",_,Ct,St]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,Ct,St]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:V()}],"rotate-x":[{"rotate-x":V()}],"rotate-y":[{"rotate-y":V()}],"rotate-z":[{"rotate-z":V()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:ee()}],"skew-x":[{"skew-x":ee()}],"skew-y":[{"skew-y":ee()}],transform:[{transform:[Ct,St,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ct,St]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ct,St]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[pr,Nv,bu,Hw]}],stroke:[{stroke:["none",...D()]}],"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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-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"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},hge=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:a={},override:i={}})=>(tp(e,"cacheSize",t),tp(e,"prefix",r),tp(e,"experimentalParseClassName",n),Rv(e.theme,i.theme),Rv(e.classGroups,i.classGroups),Rv(e.conflictingClassGroups,i.conflictingClassGroups),Rv(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),tp(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),Mv(e.theme,a.theme),Mv(e.classGroups,a.classGroups),Mv(e.conflictingClassGroups,a.conflictingClassGroups),Mv(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),Dee(e,a,"orderSensitiveModifiers"),e),tp=(e,t,r)=>{r!==void 0&&(e[t]=r)},Rv=(e,t)=>{if(t)for(const r in t)tp(e,r,t[r])},Mv=(e,t)=>{if(t)for(const r in t)Dee(e,t,r)},Dee=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},pge=(e,...t)=>typeof e=="function"?b5(x5,e,...t):b5(()=>hge(x5(),e),...t),mge=b5(x5);var gge={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},Oee=e=>e||void 0,$p=(...e)=>Oee(_ee(e).filter(Boolean).join(" ")),Gw=null,dl={},y5=!1,Lh=(...e)=>t=>t.twMerge?((!Gw||y5)&&(y5=!1,Gw=Xa(dl)?mge:pge({...dl,extend:{theme:dl.theme,classGroups:dl.classGroups,conflictingClassGroupModifiers:dl.conflictingClassGroupModifiers,conflictingClassGroups:dl.conflictingClassGroups,...dl.extend}})),Oee(Gw($p(e)))):$p(e),H9=(e,t)=>{for(let r in t)e.hasOwnProperty(r)?e[r]=$p(e[r],t[r]):e[r]=t[r];return e},rx=(e,t)=>{let{extend:r=null,slots:n={},variants:a={},compoundVariants:i=[],compoundSlots:s=[],defaultVariants:o={}}=e,l={...gge,...t},c=r!=null&&r.base?$p(r.base,e?.base):e?.base,u=r!=null&&r.variants&&!Xa(r.variants)?Eee(a,r.variants):a,f=r!=null&&r.defaultVariants&&!Xa(r.defaultVariants)?{...r.defaultVariants,...o}:o;!Xa(l.twMergeConfig)&&!kme(l.twMergeConfig,dl)&&(y5=!0,dl=l.twMergeConfig);let p=Xa(r?.slots),m=Xa(n)?{}:{base:$p(e?.base,p&&r?.base),...n},b=p?m:H9({...r?.slots},Xa(m)?{base:e?.base}:m),v=Xa(r?.compoundVariants)?i:wee(r?.compoundVariants,i),y=S=>{if(Xa(u)&&Xa(n)&&p)return Lh(c,S?.class,S?.className)(l);if(v&&!Array.isArray(v))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof v}`);if(s&&!Array.isArray(s))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof s}`);let C=(B,K,j=[],W)=>{let D=j;if(typeof K=="string")D=D.concat(j9(K).split(" ").map(U=>`${B}:${U}`));else if(Array.isArray(K))D=D.concat(K.reduce((U,Y)=>U.concat(`${B}:${Y}`),[]));else if(typeof K=="object"&&typeof W=="string"){for(let U in K)if(K.hasOwnProperty(U)&&U===W){let Y=K[U];if(Y&&typeof Y=="string"){let z=j9(Y);D[W]?D[W]=D[W].concat(z.split(" ").map(M=>`${B}:${M}`)):D[W]=z.split(" ").map(M=>`${B}:${M}`)}else Array.isArray(Y)&&Y.length>0&&(D[W]=Y.reduce((z,M)=>z.concat(`${B}:${M}`),[]))}}return D},T=(B,K=u,j=null,W=null)=>{var D;let U=K[B];if(!U||Xa(U))return null;let Y=(D=W?.[B])!=null?D:S?.[B];if(Y===null)return null;let z=z9(Y),M=Array.isArray(l.responsiveVariants)&&l.responsiveVariants.length>0||l.responsiveVariants===!0,Q=f?.[B],q=[];if(typeof z=="object"&&M)for(let[Z,ee]of Object.entries(z)){let te=U[ee];if(Z==="initial"){Q=ee;continue}Array.isArray(l.responsiveVariants)&&!l.responsiveVariants.includes(Z)||(q=C(Z,te,q,j))}let F=z!=null&&typeof z!="object"?z:z9(Q),V=U[F||"false"];return typeof q=="object"&&typeof j=="string"&&q[j]?H9(q,V):q.length>0?(q.push(V),j==="base"?q.join(" "):q):V},A=()=>u?Object.keys(u).map(B=>T(B,u)):null,k=(B,K)=>{if(!u||typeof u!="object")return null;let j=new Array;for(let W in u){let D=T(W,u,B,K),U=B==="base"&&typeof D=="string"?D:D&&D[B];U&&(j[j.length]=U)}return j},N={};for(let B in S)S[B]!==void 0&&(N[B]=S[B]);let L=(B,K)=>{var j;let W=typeof S?.[B]=="object"?{[B]:(j=S[B])==null?void 0:j.initial}:{};return{...f,...N,...W,...K}},I=(B=[],K)=>{let j=[];for(let{class:W,className:D,...U}of B){let Y=!0;for(let[z,M]of Object.entries(U)){let Q=L(z,K)[z];if(Array.isArray(M)){if(!M.includes(Q)){Y=!1;break}}else{let q=F=>F==null||F===!1;if(q(M)&&q(Q))continue;if(Q!==M){Y=!1;break}}}Y&&(W&&j.push(W),D&&j.push(D))}return j},P=B=>{let K=I(v,B);if(!Array.isArray(K))return K;let j={};for(let W of K)if(typeof W=="string"&&(j.base=Lh(j.base,W)(l)),typeof W=="object")for(let[D,U]of Object.entries(W))j[D]=Lh(j[D],U)(l);return j},H=B=>{if(s.length<1)return null;let K={};for(let{slots:j=[],class:W,className:D,...U}of s){if(!Xa(U)){let Y=!0;for(let z of Object.keys(U)){let M=L(z,B)[z];if(M===void 0||(Array.isArray(U[z])?!U[z].includes(M):U[z]!==M)){Y=!1;break}}if(!Y)continue}for(let Y of j)K[Y]=K[Y]||[],K[Y].push([W,D])}return K};if(!Xa(n)||!p){let B={};if(typeof b=="object"&&!Xa(b))for(let K of Object.keys(b))B[K]=j=>{var W,D;return Lh(b[K],k(K,j),((W=P(j))!=null?W:[])[K],((D=H(j))!=null?D:[])[K],j?.class,j?.className)(l)};return B}return Lh(c,A(),I(v),S?.class,S?.className)(l)},_=()=>{if(!(!u||typeof u!="object"))return Object.keys(u)};return y.variantKeys=_(),y.extend=r,y.base=c,y.slots=b,y.variants=u,y.defaultVariants=f,y.compoundSlots=s,y.compoundVariants=v,y};/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var vge={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const rr=(e,t,r,n)=>{const a=E.forwardRef(({color:i="currentColor",size:s=24,stroke:o=2,title:l,className:c,children:u,...f},p)=>E.createElement("svg",{ref:p,...vge[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${t}`,c].join(" "),...e==="filled"?{fill:i}:{strokeWidth:o,stroke:i},...f},[l&&E.createElement("title",{key:"svg-title"},l),...n.map(([m,b])=>E.createElement(m,b)),...Array.isArray(u)?u:[u]]));return a.displayName=`${r}`,a};/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const bge=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]],xge=rr("outline","arrow-left","ArrowLeft",bge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const yge=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],_ge=rr("outline","calendar","Calendar",yge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const wge=[["path",{d:"M4 19l16 0",key:"svg-0"}],["path",{d:"M4 15l4 -6l4 2l4 -5l4 4",key:"svg-1"}]],Ege=rr("outline","chart-line","ChartLine",wge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sge=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],Iee=rr("outline","chevron-down","ChevronDown",Sge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cge=[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]],wD=rr("outline","chevron-left","ChevronLeft",Cge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Tge=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],nx=rr("outline","chevron-right","ChevronRight",Tge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Age=[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]],kge=rr("outline","chevron-up","ChevronUp",Age);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nge=[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]],Rge=rr("outline","chevrons-left","ChevronsLeft",Nge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mge=[["path",{d:"M7 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M13 7l5 5l-5 5",key:"svg-1"}]],Dge=rr("outline","chevrons-right","ChevronsRight",Mge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Oge=[["path",{d:"M6.657 18c-2.572 0 -4.657 -2.007 -4.657 -4.483c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-11.878",key:"svg-0"}]],G9=rr("outline","cloud","Cloud",Oge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ige=[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],Lge=rr("outline","copy","Copy",Ige);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Pge=[["path",{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],Fge=rr("outline","database","Database",Pge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bge=[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],Lee=rr("outline","dots-vertical","DotsVertical",Bge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const zge=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],Pee=rr("outline","download","Download",zge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const jge=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],Fee=rr("outline","edit","Edit",jge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const qge=[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]],Uge=rr("outline","eye-off","EyeOff",qge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const $ge=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]],Bee=rr("outline","eye","Eye",$ge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hge=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M11.5 21h-4.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v5m-5 6h7m-3 -3l3 3l-3 3",key:"svg-1"}]],Gge=rr("outline","file-export","FileExport",Hge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vge=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]],V9=rr("outline","file-text","FileText",Vge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wge=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}]],_5=rr("outline","file","File",Wge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kge=[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]],Xge=rr("outline","filter","Filter",Kge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yge=[["path",{d:"M12 19h-7a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v3.5",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}]],zee=rr("outline","folder-plus","FolderPlus",Yge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zge=[["path",{d:"M19 18v-8l-2 2",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]],Qge=rr("outline","h-1","H1",Zge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jge=[["path",{d:"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]],eve=rr("outline","h-2","H2",Jge);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const tve=[["path",{d:"M19 14a2 2 0 1 0 -2 -2",key:"svg-0"}],["path",{d:"M17 16a2 2 0 1 0 2 -2",key:"svg-1"}],["path",{d:"M4 6v12",key:"svg-2"}],["path",{d:"M12 6v12",key:"svg-3"}],["path",{d:"M11 18h2",key:"svg-4"}],["path",{d:"M3 18h2",key:"svg-5"}],["path",{d:"M4 12h8",key:"svg-6"}],["path",{d:"M3 6h2",key:"svg-7"}],["path",{d:"M11 6h2",key:"svg-8"}]],rve=rr("outline","h-3","H3",tve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const nve=[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M9 4v16",key:"svg-1"}],["path",{d:"M14 10l2 2l-2 2",key:"svg-2"}]],ave=rr("outline","layout-sidebar-left-expand","LayoutSidebarLeftExpand",nve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ive=[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M15 4v16",key:"svg-1"}],["path",{d:"M10 10l-2 2l2 2",key:"svg-2"}]],sve=rr("outline","layout-sidebar-right-expand","LayoutSidebarRightExpand",ive);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ove=[["path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5",key:"svg-0"}],["path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5",key:"svg-1"}],["path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5",key:"svg-2"}],["path",{d:"M11 6l9 0",key:"svg-3"}],["path",{d:"M11 12l9 0",key:"svg-4"}],["path",{d:"M11 18l9 0",key:"svg-5"}]],Vw=rr("outline","list-check","ListCheck",ove);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const lve=[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]],ab=rr("outline","loader-2","Loader2",lve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const cve=[["path",{d:"M12 6l0 -3",key:"svg-0"}],["path",{d:"M16.25 7.75l2.15 -2.15",key:"svg-1"}],["path",{d:"M18 12l3 0",key:"svg-2"}],["path",{d:"M16.25 16.25l2.15 2.15",key:"svg-3"}],["path",{d:"M12 18l0 3",key:"svg-4"}],["path",{d:"M7.75 16.25l-2.15 2.15",key:"svg-5"}],["path",{d:"M6 12l-3 0",key:"svg-6"}],["path",{d:"M7.75 7.75l-2.15 -2.15",key:"svg-7"}]],jc=rr("outline","loader","Loader",cve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const uve=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],B1=rr("outline","refresh","Refresh",uve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const dve=[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],jee=rr("outline","search","Search",dve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const fve=[["path",{d:"M8 9l4 -4l4 4",key:"svg-0"}],["path",{d:"M16 15l-4 4l-4 -4",key:"svg-1"}]],hve=rr("outline","selector","Selector",fve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const pve=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],qee=rr("outline","trash","Trash",pve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const mve=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 9l5 -5l5 5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],gve=rr("outline","upload","Upload",mve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const vve=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M3.6 9h16.8",key:"svg-1"}],["path",{d:"M3.6 15h16.8",key:"svg-2"}],["path",{d:"M11.5 3a17 17 0 0 0 0 18",key:"svg-3"}],["path",{d:"M12.5 3a17 17 0 0 1 0 18",key:"svg-4"}]],bve=rr("outline","world","World",vve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const xve=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],wp=rr("outline","x","X",xve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const yve=[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M7 10l6 0",key:"svg-1"}],["path",{d:"M10 7l0 6",key:"svg-2"}],["path",{d:"M21 21l-6 -6",key:"svg-3"}]],_ve=rr("outline","zoom-in","ZoomIn",yve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const wve=[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M7 10l6 0",key:"svg-1"}],["path",{d:"M21 21l-6 -6",key:"svg-2"}]],Eve=rr("outline","zoom-out","ZoomOut",wve);/**
 * @license @tabler/icons-react v3.34.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sve=[["path",{d:"M12 2l.117 .007a1 1 0 0 1 .876 .876l.007 .117v4l.005 .15a2 2 0 0 0 1.838 1.844l.157 .006h4l.117 .007a1 1 0 0 1 .876 .876l.007 .117v9a3 3 0 0 1 -2.824 2.995l-.176 .005h-10a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-14a3 3 0 0 1 2.824 -2.995l.176 -.005zm-.2 9a.39 .39 0 0 0 -.351 .217l-1.086 2.193l-2.428 .352a.389 .389 0 0 0 -.217 .665l1.757 1.707l-.415 2.411a.392 .392 0 0 0 .568 .41l2.172 -1.138l2.172 1.138a.39 .39 0 0 0 .567 -.411l-.414 -2.41l1.757 -1.707a.39 .39 0 0 0 -.217 -.665l-2.428 -.352l-1.086 -2.193a.39 .39 0 0 0 -.351 -.217",key:"svg-0"}],["path",{d:"M19 7h-4l-.001 -4.001z",key:"svg-1"}]],Cve=rr("filled","file-star-filled","FileStarFilled",Sve),Ww=768;function Tve(){const[e,t]=E.useState(void 0);return E.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Ww-1}px)`),n=()=>{t(window.innerWidth<Ww)};return r.addEventListener("change",n),t(window.innerWidth<Ww),()=>r.removeEventListener("change",n)},[]),!!e}const Uee=E.createContext(null);function g0(){const e=E.useContext(Uee);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function $ee(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=$ee(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function v0(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=$ee(e))&&(n&&(n+=" "),n+=t);return n}const ED="-",Ave=e=>{const t=Nve(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const o=s.split(ED);return o[0]===""&&o.length!==1&&o.shift(),Hee(o,t)||kve(s)},getConflictingClassGroupIds:(s,o)=>{const l=r[s]||[];return o&&n[s]?[...l,...n[s]]:l}}},Hee=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?Hee(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(ED);return t.validators.find(({validator:s})=>s(i))?.classGroupId},W9=/^\[(.+)\]$/,kve=e=>{if(W9.test(e)){const t=W9.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Nve=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const a in r)w5(r[a],n,a,t);return n},w5=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:K9(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(Rve(a)){w5(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,s])=>{w5(s,K9(t,i),r,n)})})},K9=(e,t)=>{let r=e;return t.split(ED).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Rve=e=>e.isThemeGetter,Mve=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return a(i,s),s},set(i,s){r.has(i)?r.set(i,s):a(i,s)}}},E5="!",S5=":",Dve=S5.length,Ove=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a=>{const i=[];let s=0,o=0,l=0,c;for(let b=0;b<a.length;b++){let v=a[b];if(s===0&&o===0){if(v===S5){i.push(a.slice(l,b)),l=b+Dve;continue}if(v==="/"){c=b;continue}}v==="["?s++:v==="]"?s--:v==="("?o++:v===")"&&o--}const u=i.length===0?a:a.substring(l),f=Ive(u),p=f!==u,m=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:m}};if(t){const a=t+S5,i=n;n=s=>s.startsWith(a)?i(s.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(r){const a=n;n=i=>r({className:i,parseClassName:a})}return n},Ive=e=>e.endsWith(E5)?e.substring(0,e.length-1):e.startsWith(E5)?e.substring(1):e,Lve=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const a=[];let i=[];return n.forEach(s=>{s[0]==="["||t[s]?(a.push(...i.sort(),s),i=[]):i.push(s)}),a.push(...i.sort()),a}},Pve=e=>({cache:Mve(e.cacheSize),parseClassName:Ove(e),sortModifiers:Lve(e),...Ave(e)}),Fve=/\s+/,Bve=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:i}=t,s=[],o=e.trim().split(Fve);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{isExternal:f,modifiers:p,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:v}=r(u);if(f){l=u+(l.length>0?" "+l:l);continue}let y=!!v,_=n(y?b.substring(0,v):b);if(!_){if(!y){l=u+(l.length>0?" "+l:l);continue}if(_=n(b),!_){l=u+(l.length>0?" "+l:l);continue}y=!1}const S=i(p).join(":"),C=m?S+E5:S,T=C+_;if(s.includes(T))continue;s.push(T);const A=a(_,y);for(let k=0;k<A.length;++k){const N=A[k];s.push(C+N)}l=u+(l.length>0?" "+l:l)}return l};function zve(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Gee(t))&&(n&&(n+=" "),n+=r);return n}const Gee=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Gee(e[n]))&&(r&&(r+=" "),r+=t);return r};function jve(e,...t){let r,n,a,i=s;function s(l){const c=t.reduce((u,f)=>f(u),e());return r=Pve(c),n=r.cache.get,a=r.cache.set,i=o,o(l)}function o(l){const c=n(l);if(c)return c;const u=Bve(l,r);return a(l,u),u}return function(){return i(zve.apply(null,arguments))}}const qn=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Vee=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Wee=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qve=/^\d+\/\d+$/,Uve=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$ve=/\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$/,Hve=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,of=e=>qve.test(e),ar=e=>!!e&&!Number.isNaN(Number(e)),mc=e=>!!e&&Number.isInteger(Number(e)),Kw=e=>e.endsWith("%")&&ar(e.slice(0,-1)),al=e=>Uve.test(e),Wve=()=>!0,Kve=e=>$ve.test(e)&&!Hve.test(e),Kee=()=>!1,Xve=e=>Gve.test(e),Yve=e=>Vve.test(e),Zve=e=>!wt(e)&&!Et(e),Qve=e=>b0(e,Zee,Kee),wt=e=>Vee.test(e),xu=e=>b0(e,Qee,Kve),Xw=e=>b0(e,n1e,ar),X9=e=>b0(e,Xee,Kee),Jve=e=>b0(e,Yee,Yve),Dv=e=>b0(e,Jee,Xve),Et=e=>Wee.test(e),Ph=e=>x0(e,Qee),e1e=e=>x0(e,a1e),Y9=e=>x0(e,Xee),t1e=e=>x0(e,Zee),r1e=e=>x0(e,Yee),Ov=e=>x0(e,Jee,!0),b0=(e,t,r)=>{const n=Vee.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},x0=(e,t,r=!1)=>{const n=Wee.exec(e);return n?n[1]?t(n[1]):r:!1},Xee=e=>e==="position"||e==="percentage",Yee=e=>e==="image"||e==="url",Zee=e=>e==="length"||e==="size"||e==="bg-size",Qee=e=>e==="length",n1e=e=>e==="number",a1e=e=>e==="family-name",Jee=e=>e==="shadow",i1e=()=>{const e=qn("color"),t=qn("font"),r=qn("text"),n=qn("font-weight"),a=qn("tracking"),i=qn("leading"),s=qn("breakpoint"),o=qn("container"),l=qn("spacing"),c=qn("radius"),u=qn("shadow"),f=qn("inset-shadow"),p=qn("text-shadow"),m=qn("drop-shadow"),b=qn("blur"),v=qn("perspective"),y=qn("aspect"),_=qn("ease"),S=qn("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...T(),Et,wt],k=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],L=()=>[Et,wt,l],I=()=>[of,"full","auto",...L()],P=()=>[mc,"none","subgrid",Et,wt],H=()=>["auto",{span:["full",mc,Et,wt]},mc,Et,wt],B=()=>[mc,"auto",Et,wt],K=()=>["auto","min","max","fr",Et,wt],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...L()],U=()=>[of,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],Y=()=>[e,Et,wt],z=()=>[...T(),Y9,X9,{position:[Et,wt]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",t1e,Qve,{size:[Et,wt]}],q=()=>[Kw,Ph,xu],F=()=>["","none","full",c,Et,wt],V=()=>["",ar,Ph,xu],Z=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[ar,Kw,Y9,X9],oe=()=>["","none",b,Et,wt],pe=()=>["none",ar,Et,wt],he=()=>["none",ar,Et,wt],ke=()=>[ar,Et,wt],se=()=>[of,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[al],breakpoint:[al],color:[Wve],container:[al],"drop-shadow":[al],ease:["in","out","in-out"],font:[Zve],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[al],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[al],shadow:[al],spacing:["px",ar],text:[al],"text-shadow":[al],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",of,wt,Et,y]}],container:["container"],columns:[{columns:[ar,wt,Et,o]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[mc,"auto",Et,wt]}],basis:[{basis:[of,"full","auto",o,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ar,of,"auto","initial","none",wt]}],grow:[{grow:["",ar,Et,wt]}],shrink:[{shrink:["",ar,Et,wt]}],order:[{order:[mc,"first","last","none",Et,wt]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:H()}],"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":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[o,"screen",...U()]}],"min-w":[{"min-w":[o,"screen","none",...U()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",r,Ph,xu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Et,Xw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Kw,wt]}],"font-family":[{font:[e1e,wt,t]}],"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:[a,Et,wt]}],"line-clamp":[{"line-clamp":[ar,"none",Et,Xw]}],leading:[{leading:[i,...L()]}],"list-image":[{"list-image":["none",Et,wt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Et,wt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[ar,"from-font","auto",Et,xu]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[ar,"auto",Et,wt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Et,wt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Et,wt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mc,Et,wt],radial:["",Et,wt],conic:[mc,Et,wt]},r1e,Jve]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":V()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ar,Et,wt]}],"outline-w":[{outline:["",ar,Ph,xu]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",u,Ov,Dv]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",f,Ov,Dv]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[ar,xu]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",p,Ov,Dv]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[ar,Et,wt]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ar]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[Et,wt]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[ar]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Et,wt]}],filter:[{filter:["","none",Et,wt]}],blur:[{blur:oe()}],brightness:[{brightness:[ar,Et,wt]}],contrast:[{contrast:[ar,Et,wt]}],"drop-shadow":[{"drop-shadow":["","none",m,Ov,Dv]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",ar,Et,wt]}],"hue-rotate":[{"hue-rotate":[ar,Et,wt]}],invert:[{invert:["",ar,Et,wt]}],saturate:[{saturate:[ar,Et,wt]}],sepia:[{sepia:["",ar,Et,wt]}],"backdrop-filter":[{"backdrop-filter":["","none",Et,wt]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[ar,Et,wt]}],"backdrop-contrast":[{"backdrop-contrast":[ar,Et,wt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ar,Et,wt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ar,Et,wt]}],"backdrop-invert":[{"backdrop-invert":["",ar,Et,wt]}],"backdrop-opacity":[{"backdrop-opacity":[ar,Et,wt]}],"backdrop-saturate":[{"backdrop-saturate":[ar,Et,wt]}],"backdrop-sepia":[{"backdrop-sepia":["",ar,Et,wt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Et,wt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ar,"initial",Et,wt]}],ease:[{ease:["linear","initial",_,Et,wt]}],delay:[{delay:[ar,Et,wt]}],animate:[{animate:["none",S,Et,wt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Et,wt]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:ke()}],"skew-x":[{"skew-x":ke()}],"skew-y":[{"skew-y":ke()}],transform:[{transform:[Et,wt,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Et,wt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Et,wt]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[ar,Ph,xu,Xw]}],stroke:[{stroke:["none",...Y()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},s1e=jve(i1e);function ut(...e){return s1e(v0(e))}const o1e=rx({base:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",variants:{variant:{default:"bg-brand-600 text-white  focus-visible:ring-brand-200 dark:focus-visible:ring-brand-800 hover:bg-brand-700 hover:shadow-md",destructive:"bg-error-600 text-white  hover:bg-error-700 focus-visible:ring-error-200 dark:focus-visible:ring-error-800 dark:bg-error-600",outline:"border border-gray-200 bg-white text-gray-700  hover:bg-gray-50 hover:border-gray-300 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-300 dark:hover:bg-gray-900/20 dark:hover:border-gray-600",secondary:"bg-brand-50 text-brand-700  hover:bg-brand-100 dark:bg-brand-900/20 dark:text-brand-300 dark:hover:bg-brand-900/40",ghost:"text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-gray-100",link:"text-brand-600 hover:text-brand-700  dark:text-brand-400 dark:hover:text-brand-300",success:"bg-success-600 text-white hover:bg-success-700 focus-visible:ring-success-200 dark:focus-visible:ring-success-800",warning:"bg-warning-600 text-white  hover:bg-warning-700 focus-visible:ring-warning-200 dark:focus-visible:ring-warning-800",tertiary:"bg-gray-100 text-gray-700  hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"lg"}});function mt({className:e,variant:t,size:r,asChild:n=!1,leftSection:a,children:i,...s}){const o=n?xD:"button";return g.jsxs(o,{"data-slot":"button",className:ut(o1e({variant:t,size:r,className:e})),...s,children:[a,i]})}const Ou=E.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...a},i)=>g.jsx(mt,{ref:i,variant:t,size:r,className:e,asChild:n,...a}));Ou.displayName="IconButton";const l1e=rx({base:"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 rounded-md border bg-transparent text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",variants:{size:{default:"h-9 px-3 py-1",sm:"h-8 px-2.5 py-1 text-sm",lg:"h-10 px-4 py-2"}},defaultVariants:{size:"lg"}});function Bl({className:e,type:t,size:r,...n}){return g.jsx("input",{type:t,"data-slot":"input",className:ut(l1e({size:r,className:e})),...n})}var c1e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Mr=c1e.reduce((e,t)=>{const r=Yf(`Primitive.${t}`),n=E.forwardRef((a,i)=>{const{asChild:s,...o}=a,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(l,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ete(e,t){e&&bD.flushSync(()=>e.dispatchEvent(t))}function $t(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),r===!1||!a.defaultPrevented)return t?.(a)}}function u1e(e,t){const r=E.createContext(t),n=i=>{const{children:s,...o}=i,l=E.useMemo(()=>o,Object.values(o));return g.jsx(r.Provider,{value:l,children:s})};n.displayName=e+"Provider";function a(i){const s=E.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,a]}function zl(e,t=[]){let r=[];function n(i,s){const o=E.createContext(s),l=r.length;r=[...r,s];const c=f=>{const{scope:p,children:m,...b}=f,v=p?.[e]?.[l]||o,y=E.useMemo(()=>b,Object.values(b));return g.jsx(v.Provider,{value:y,children:m})};c.displayName=i+"Provider";function u(f,p){const m=p?.[e]?.[l]||o,b=E.useContext(m);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,u]}const a=()=>{const i=r.map(s=>E.createContext(s));return function(o){const l=o?.[e]||i;return E.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return a.scopeName=e,[n,d1e(a,...t)]}function d1e(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const s=n.reduce((o,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...o,...f}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var Cl=globalThis?.document?E.useLayoutEffect:()=>{},f1e=cD[" useId ".trim().toString()]||(()=>{}),h1e=0;function Ic(e){const[t,r]=E.useState(f1e());return Cl(()=>{r(n=>n??String(h1e++))},[e]),t?`radix-${t}`:""}var p1e=cD[" useInsertionEffect ".trim().toString()]||Cl;function y0({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,i,s]=m1e({defaultProp:t,onChange:r}),o=e!==void 0,l=o?e:a;{const u=E.useRef(e!==void 0);E.useEffect(()=>{const f=u.current;f!==o&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=o},[o,n])}const c=E.useCallback(u=>{if(o){const f=g1e(u)?u(e):u;f!==e&&s.current?.(f)}else i(u)},[o,e,i,s]);return[l,c]}function m1e({defaultProp:e,onChange:t}){const[r,n]=E.useState(e),a=E.useRef(r),i=E.useRef(t);return p1e(()=>{i.current=t},[t]),E.useEffect(()=>{a.current!==r&&(i.current?.(r),a.current=r)},[r,a]),[r,n,i]}function g1e(e){return typeof e=="function"}function Tl(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...r)=>t.current?.(...r),[])}function v1e(e,t=globalThis?.document){const r=Tl(e);E.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var b1e="DismissableLayer",C5="dismissableLayer.update",x1e="dismissableLayer.pointerDownOutside",y1e="dismissableLayer.focusOutside",Z9,tte=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ax=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:o,...l}=e,c=E.useContext(tte),[u,f]=E.useState(null),p=u?.ownerDocument??globalThis?.document,[,m]=E.useState({}),b=pn(t,N=>f(N)),v=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),_=v.indexOf(y),S=u?v.indexOf(u):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,T=S>=_,A=E1e(N=>{const L=N.target,I=[...c.branches].some(P=>P.contains(L));!T||I||(a?.(N),s?.(N),N.defaultPrevented||o?.())},p),k=S1e(N=>{const L=N.target;[...c.branches].some(P=>P.contains(L))||(i?.(N),s?.(N),N.defaultPrevented||o?.())},p);return v1e(N=>{S===c.layers.size-1&&(n?.(N),!N.defaultPrevented&&o&&(N.preventDefault(),o()))},p),E.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Z9=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Q9(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Z9)}},[u,p,r,c]),E.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Q9())},[u,c]),E.useEffect(()=>{const N=()=>m({});return document.addEventListener(C5,N),()=>document.removeEventListener(C5,N)},[]),g.jsx(Mr.div,{...l,ref:b,style:{pointerEvents:C?T?"auto":"none":void 0,...e.style},onFocusCapture:$t(e.onFocusCapture,k.onFocusCapture),onBlurCapture:$t(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:$t(e.onPointerDownCapture,A.onPointerDownCapture)})});ax.displayName=b1e;var _1e="DismissableLayerBranch",w1e=E.forwardRef((e,t)=>{const r=E.useContext(tte),n=E.useRef(null),a=pn(t,n);return E.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),g.jsx(Mr.div,{...e,ref:a})});w1e.displayName=_1e;function E1e(e,t=globalThis?.document){const r=Tl(e),n=E.useRef(!1),a=E.useRef(()=>{});return E.useEffect(()=>{const i=o=>{if(o.target&&!n.current){let l=function(){rte(x1e,r,c,{discrete:!0})};const c={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=l,t.addEventListener("click",a.current,{once:!0})):l()}else t.removeEventListener("click",a.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function S1e(e,t=globalThis?.document){const r=Tl(e),n=E.useRef(!1);return E.useEffect(()=>{const a=i=>{i.target&&!n.current&&rte(y1e,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Q9(){const e=new CustomEvent(C5);document.dispatchEvent(e)}function rte(e,t,r,{discrete:n}){const a=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?ete(a,i):a.dispatchEvent(i)}var Yw="focusScope.autoFocusOnMount",Zw="focusScope.autoFocusOnUnmount",J9={bubbles:!1,cancelable:!0},C1e="FocusScope",SD=E.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=e,[o,l]=E.useState(null),c=Tl(a),u=Tl(i),f=E.useRef(null),p=pn(t,v=>l(v)),m=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(n){let v=function(C){if(m.paused||!o)return;const T=C.target;o.contains(T)?f.current=T:wc(f.current,{select:!0})},y=function(C){if(m.paused||!o)return;const T=C.relatedTarget;T!==null&&(o.contains(T)||wc(f.current,{select:!0}))},_=function(C){if(document.activeElement===document.body)for(const A of C)A.removedNodes.length>0&&wc(o)};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const S=new MutationObserver(_);return o&&S.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),S.disconnect()}}},[n,o,m.paused]),E.useEffect(()=>{if(o){tF.add(m);const v=document.activeElement;if(!o.contains(v)){const _=new CustomEvent(Yw,J9);o.addEventListener(Yw,c),o.dispatchEvent(_),_.defaultPrevented||(T1e(M1e(nte(o)),{select:!0}),document.activeElement===v&&wc(o))}return()=>{o.removeEventListener(Yw,c),setTimeout(()=>{const _=new CustomEvent(Zw,J9);o.addEventListener(Zw,u),o.dispatchEvent(_),_.defaultPrevented||wc(v??document.body,{select:!0}),o.removeEventListener(Zw,u),tF.remove(m)},0)}}},[o,c,u,m]);const b=E.useCallback(v=>{if(!r&&!n||m.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,_=document.activeElement;if(y&&_){const S=v.currentTarget,[C,T]=A1e(S);C&&T?!v.shiftKey&&_===T?(v.preventDefault(),r&&wc(C,{select:!0})):v.shiftKey&&_===C&&(v.preventDefault(),r&&wc(T,{select:!0})):_===S&&v.preventDefault()}},[r,n,m.paused]);return g.jsx(Mr.div,{tabIndex:-1,...s,ref:p,onKeyDown:b})});SD.displayName=C1e;function T1e(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(wc(n,{select:t}),document.activeElement!==r)return}function A1e(e){const t=nte(e),r=eF(t,e),n=eF(t.reverse(),e);return[r,n]}function nte(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function eF(e,t){for(const r of e)if(!k1e(r,{upTo:t}))return r}function k1e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function N1e(e){return e instanceof HTMLInputElement&&"select"in e}function wc(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&N1e(e)&&t&&e.select()}}var tF=R1e();function R1e(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=rF(e,t),e.unshift(t)},remove(t){e=rF(e,t),e[0]?.resume()}}}function rF(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function M1e(e){return e.filter(t=>t.tagName!=="A")}var D1e="Portal",ix=E.forwardRef((e,t)=>{const{container:r,...n}=e,[a,i]=E.useState(!1);Cl(()=>i(!0),[]);const s=r||a&&globalThis?.document?.body;return s?bee.createPortal(g.jsx(Mr.div,{...n,ref:t}),s):null});ix.displayName=D1e;function O1e(e,t){return E.useReducer((r,n)=>t[r][n]??r,e)}var vs=e=>{const{present:t,children:r}=e,n=I1e(t),a=typeof r=="function"?r({present:n.isPresent}):E.Children.only(r),i=pn(n.ref,L1e(a));return typeof r=="function"||n.isPresent?E.cloneElement(a,{ref:i}):null};vs.displayName="Presence";function I1e(e){const[t,r]=E.useState(),n=E.useRef(null),a=E.useRef(e),i=E.useRef("none"),s=e?"mounted":"unmounted",[o,l]=O1e(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=Iv(n.current);i.current=o==="mounted"?c:"none"},[o]),Cl(()=>{const c=n.current,u=a.current;if(u!==e){const p=i.current,m=Iv(c);e?l("MOUNT"):m==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&p!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),Cl(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=m=>{const v=Iv(n.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!a.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=m=>{m.target===t&&(i.current=Iv(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:E.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Iv(e){return e?.animationName||"none"}function L1e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Qw=0;function ate(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nF()),document.body.insertAdjacentElement("beforeend",e[1]??nF()),Qw++,()=>{Qw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Qw--}},[])}function nF(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var yo=function(){return yo=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},yo.apply(this,arguments)};function ite(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function P1e(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var z1="right-scroll-bar-position",j1="width-before-scroll-bar",F1e="with-scroll-bars-hidden",B1e="--removed-body-scroll-bar-size";function Jw(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function z1e(e,t){var r=E.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var j1e=typeof window<"u"?E.useLayoutEffect:E.useEffect,aF=new WeakMap;function q1e(e,t){var r=z1e(null,function(n){return e.forEach(function(a){return Jw(a,n)})});return j1e(function(){var n=aF.get(r);if(n){var a=new Set(n),i=new Set(e),s=r.current;a.forEach(function(o){i.has(o)||Jw(o,null)}),i.forEach(function(o){a.has(o)||Jw(o,s)})}aF.set(r,e)},[e]),r}function U1e(e){return e}function $1e(e,t){t===void 0&&(t=U1e);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(o){return o!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(o){return i(o)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var o=r;r=[],o.forEach(i),s=r}var l=function(){var u=s;s=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){s.push(u),c()},filter:function(u){return s=s.filter(u),r}}}};return a}function H1e(e){e===void 0&&(e={});var t=$1e(null);return t.options=yo({async:!0,ssr:!1},e),t}var ste=function(e){var t=e.sideCar,r=ite(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return E.createElement(n,yo({},r))};ste.isSideCarExport=!0;function G1e(e,t){return e.useMedium(t),ste}var ote=H1e(),e2=function(){},sx=E.forwardRef(function(e,t){var r=E.useRef(null),n=E.useState({onScrollCapture:e2,onWheelCapture:e2,onTouchMoveCapture:e2}),a=n[0],i=n[1],s=e.forwardProps,o=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,b=e.noIsolation,v=e.inert,y=e.allowPinchZoom,_=e.as,S=_===void 0?"div":_,C=e.gapMode,T=ite(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=p,k=q1e([r,t]),N=yo(yo({},T),a);return E.createElement(E.Fragment,null,u&&E.createElement(A,{sideCar:ote,removeScrollBar:c,shards:f,noRelative:m,noIsolation:b,inert:v,setCallbacks:i,allowPinchZoom:!!y,lockRef:r,gapMode:C}),s?E.cloneElement(E.Children.only(o),yo(yo({},N),{ref:k})):E.createElement(S,yo({},N,{className:l,ref:k}),o))});sx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};sx.classNames={fullWidth:j1,zeroRight:z1};var V1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function W1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=V1e();return t&&e.setAttribute("nonce",t),e}function K1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function X1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Y1e=function(){var e=0,t=null;return{add:function(r){e==0&&(t=W1e())&&(K1e(t,r),X1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Z1e=function(){var e=Y1e();return function(t,r){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},lte=function(){var e=Z1e(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},Q1e={left:0,top:0,right:0,gap:0},t2=function(e){return parseInt(e||"",10)||0},J1e=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[t2(r),t2(n),t2(a)]},ebe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Q1e;var t=J1e(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},tbe=lte(),If="data-scroll-locked",rbe=function(e,t,r,n){var a=e.left,i=e.top,s=e.right,o=e.gap;return r===void 0&&(r="margin"),`
  .`.concat(F1e,` {
   overflow: hidden `).concat(n,`;
   padding-right: `).concat(o,"px ").concat(n,`;
  }
  body[`).concat(If,`] {
    overflow: hidden `).concat(n,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
    padding-left: `.concat(a,`px;
    padding-top: `).concat(i,`px;
    padding-right: `).concat(s,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(o,"px ").concat(n,`;
    `),r==="padding"&&"padding-right: ".concat(o,"px ").concat(n,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(z1,` {
    right: `).concat(o,"px ").concat(n,`;
  }
  
  .`).concat(j1,` {
    margin-right: `).concat(o,"px ").concat(n,`;
  }
  
  .`).concat(z1," .").concat(z1,` {
    right: 0 `).concat(n,`;
  }
  
  .`).concat(j1," .").concat(j1,` {
    margin-right: 0 `).concat(n,`;
  }
  
  body[`).concat(If,`] {
    `).concat(B1e,": ").concat(o,`px;
  }
`)},iF=function(){var e=parseInt(document.body.getAttribute(If)||"0",10);return isFinite(e)?e:0},nbe=function(){E.useEffect(function(){return document.body.setAttribute(If,(iF()+1).toString()),function(){var e=iF()-1;e<=0?document.body.removeAttribute(If):document.body.setAttribute(If,e.toString())}},[])},abe=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;nbe();var i=E.useMemo(function(){return ebe(a)},[a]);return E.createElement(tbe,{styles:rbe(i,!t,a,r?"":"!important")})},T5=!1;if(typeof window<"u")try{var Lv=Object.defineProperty({},"passive",{get:function(){return T5=!0,!0}});window.addEventListener("test",Lv,Lv),window.removeEventListener("test",Lv,Lv)}catch{T5=!1}var lf=T5?{passive:!1}:!1,ibe=function(e){return e.tagName==="TEXTAREA"},cte=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!ibe(e)&&r[t]==="visible")},sbe=function(e){return cte(e,"overflowY")},obe=function(e){return cte(e,"overflowX")},sF=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=ute(e,n);if(a){var i=dte(e,n),s=i[1],o=i[2];if(s>o)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},lbe=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},cbe=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},ute=function(e,t){return e==="v"?sbe(t):obe(t)},dte=function(e,t){return e==="v"?lbe(t):cbe(t)},ube=function(e,t){return e==="h"&&t==="rtl"?-1:1},dbe=function(e,t,r,n,a){var i=ube(e,window.getComputedStyle(t).direction),s=i*n,o=r.target,l=t.contains(o),c=!1,u=s>0,f=0,p=0;do{if(!o)break;var m=dte(e,o),b=m[0],v=m[1],y=m[2],_=v-y-i*b;(b||_)&&ute(e,o)&&(f+=_,p+=b);var S=o.parentNode;o=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(u&&Math.abs(f)<1||!u&&Math.abs(p)<1)&&(c=!0),c},Pv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oF=function(e){return[e.deltaX,e.deltaY]},lF=function(e){return e&&"current"in e?e.current:e},fbe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hbe=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},pbe=0,cf=[];function mbe(e){var t=E.useRef([]),r=E.useRef([0,0]),n=E.useRef(),a=E.useState(pbe++)[0],i=E.useState(lte)[0],s=E.useRef(e);E.useEffect(function(){s.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var v=P1e([e.lockRef.current],(e.shards||[]).map(lF),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var o=E.useCallback(function(v,y){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var _=Pv(v),S=r.current,C="deltaX"in v?v.deltaX:S[0]-_[0],T="deltaY"in v?v.deltaY:S[1]-_[1],A,k=v.target,N=Math.abs(C)>Math.abs(T)?"h":"v";if("touches"in v&&N==="h"&&k.type==="range")return!1;var L=sF(N,k);if(!L)return!0;if(L?A=N:(A=N==="v"?"h":"v",L=sF(N,k)),!L)return!1;if(!n.current&&"changedTouches"in v&&(C||T)&&(n.current=A),!A)return!0;var I=n.current||A;return dbe(I,y,v,I==="h"?C:T)},[]),l=E.useCallback(function(v){var y=v;if(!(!cf.length||cf[cf.length-1]!==i)){var _="deltaY"in y?oF(y):Pv(y),S=t.current.filter(function(A){return A.name===y.type&&(A.target===y.target||y.target===A.shadowParent)&&fbe(A.delta,_)})[0];if(S&&S.should){y.cancelable&&y.preventDefault();return}if(!S){var C=(s.current.shards||[]).map(lF).filter(Boolean).filter(function(A){return A.contains(y.target)}),T=C.length>0?o(y,C[0]):!s.current.noIsolation;T&&y.cancelable&&y.preventDefault()}}},[]),c=E.useCallback(function(v,y,_,S){var C={name:v,delta:y,target:_,should:S,shadowParent:gbe(_)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(T){return T!==C})},1)},[]),u=E.useCallback(function(v){r.current=Pv(v),n.current=void 0},[]),f=E.useCallback(function(v){c(v.type,oF(v),v.target,o(v,e.lockRef.current))},[]),p=E.useCallback(function(v){c(v.type,Pv(v),v.target,o(v,e.lockRef.current))},[]);E.useEffect(function(){return cf.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,lf),document.addEventListener("touchmove",l,lf),document.addEventListener("touchstart",u,lf),function(){cf=cf.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,lf),document.removeEventListener("touchmove",l,lf),document.removeEventListener("touchstart",u,lf)}},[]);var m=e.removeScrollBar,b=e.inert;return E.createElement(E.Fragment,null,b?E.createElement(i,{styles:hbe(a)}):null,m?E.createElement(abe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function gbe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const vbe=G1e(ote,mbe);var CD=E.forwardRef(function(e,t){return E.createElement(sx,yo({},e,{ref:t,sideCar:vbe}))});CD.classNames=sx.classNames;var bbe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},uf=new WeakMap,Fv=new WeakMap,Bv={},r2=0,fte=function(e){return e&&(e.host||fte(e.parentNode))},xbe=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=fte(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},ybe=function(e,t,r,n){var a=xbe(t,Array.isArray(e)?e:[e]);Bv[r]||(Bv[r]=new WeakMap);var i=Bv[r],s=[],o=new Set,l=new Set(a),c=function(f){!f||o.has(f)||(o.add(f),c(f.parentNode))};a.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(o.has(p))u(p);else try{var m=p.getAttribute(n),b=m!==null&&m!=="false",v=(uf.get(p)||0)+1,y=(i.get(p)||0)+1;uf.set(p,v),i.set(p,y),s.push(p),v===1&&b&&Fv.set(p,!0),y===1&&p.setAttribute(r,"true"),b||p.setAttribute(n,"true")}catch(_){console.error("aria-hidden: cannot operate on ",p,_)}})};return u(t),o.clear(),r2++,function(){s.forEach(function(f){var p=uf.get(f)-1,m=i.get(f)-1;uf.set(f,p),i.set(f,m),p||(Fv.has(f)||f.removeAttribute(n),Fv.delete(f)),m||f.removeAttribute(r)}),r2--,r2||(uf=new WeakMap,uf=new WeakMap,Fv=new WeakMap,Bv={})}},hte=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=bbe(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),ybe(n,a,r,"aria-hidden")):function(){return null}},ox="Dialog",[pte,cst]=zl(ox),[_be,Xs]=pte(ox),mte=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,o=E.useRef(null),l=E.useRef(null),[c,u]=y0({prop:n,defaultProp:a??!1,onChange:i,caller:ox});return g.jsx(_be,{scope:t,triggerRef:o,contentRef:l,contentId:Ic(),titleId:Ic(),descriptionId:Ic(),open:c,onOpenChange:u,onOpenToggle:E.useCallback(()=>u(f=>!f),[u]),modal:s,children:r})};mte.displayName=ox;var gte="DialogTrigger",wbe=E.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Xs(gte,r),i=pn(t,a.triggerRef);return g.jsx(Mr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":kD(a.open),...n,ref:i,onClick:$t(e.onClick,a.onOpenToggle)})});wbe.displayName=gte;var TD="DialogPortal",[Ebe,vte]=pte(TD,{forceMount:void 0}),bte=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,i=Xs(TD,t);return g.jsx(Ebe,{scope:t,forceMount:r,children:E.Children.map(n,s=>g.jsx(vs,{present:r||i.open,children:g.jsx(ix,{asChild:!0,container:a,children:s})}))})};bte.displayName=TD;var ib="DialogOverlay",xte=E.forwardRef((e,t)=>{const r=vte(ib,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Xs(ib,e.__scopeDialog);return i.modal?g.jsx(vs,{present:n||i.open,children:g.jsx(Cbe,{...a,ref:t})}):null});xte.displayName=ib;var Sbe=Yf("DialogOverlay.RemoveScroll"),Cbe=E.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Xs(ib,r);return g.jsx(CD,{as:Sbe,allowPinchZoom:!0,shards:[a.contentRef],children:g.jsx(Mr.div,{"data-state":kD(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Wu="DialogContent",yte=E.forwardRef((e,t)=>{const r=vte(Wu,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Xs(Wu,e.__scopeDialog);return g.jsx(vs,{present:n||i.open,children:i.modal?g.jsx(Tbe,{...a,ref:t}):g.jsx(Abe,{...a,ref:t})})});yte.displayName=Wu;var Tbe=E.forwardRef((e,t)=>{const r=Xs(Wu,e.__scopeDialog),n=E.useRef(null),a=pn(t,r.contentRef,n);return E.useEffect(()=>{const i=n.current;if(i)return hte(i)},[]),g.jsx(_te,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$t(e.onCloseAutoFocus,i=>{i.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:$t(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,o=s.button===0&&s.ctrlKey===!0;(s.button===2||o)&&i.preventDefault()}),onFocusOutside:$t(e.onFocusOutside,i=>i.preventDefault())})}),Abe=E.forwardRef((e,t)=>{const r=Xs(Wu,e.__scopeDialog),n=E.useRef(!1),a=E.useRef(!1);return g.jsx(_te,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(n.current||r.triggerRef.current?.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const s=i.target;r.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),_te=E.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=e,o=Xs(Wu,r),l=E.useRef(null),c=pn(t,l);return ate(),g.jsxs(g.Fragment,{children:[g.jsx(SD,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:g.jsx(ax,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":kD(o.open),...s,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(kbe,{titleId:o.titleId}),g.jsx(Rbe,{contentRef:l,descriptionId:o.descriptionId})]})]})}),AD="DialogTitle",wte=E.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Xs(AD,r);return g.jsx(Mr.h2,{id:a.titleId,...n,ref:t})});wte.displayName=AD;var Ete="DialogDescription",Ste=E.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Xs(Ete,r);return g.jsx(Mr.p,{id:a.descriptionId,...n,ref:t})});Ste.displayName=Ete;var Cte="DialogClose",Tte=E.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Xs(Cte,r);return g.jsx(Mr.button,{type:"button",...n,ref:t,onClick:$t(e.onClick,()=>a.onOpenChange(!1))})});Tte.displayName=Cte;function kD(e){return e?"open":"closed"}var Ate="DialogTitleWarning",[ust,kte]=u1e(Ate,{contentName:Wu,titleName:AD,docsSlug:"dialog"}),kbe=({titleId:e})=>{const t=kte(Ate),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Nbe="DialogDescriptionWarning",Rbe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${kte(Nbe).contentName}}.`;return E.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Nte=mte,Rte=bte,Mte=xte,Dte=yte,Ote=wte,Ite=Ste,ND=Tte;function Mbe({...e}){return g.jsx(Nte,{"data-slot":"sheet",...e})}function Dbe({...e}){return g.jsx(Rte,{"data-slot":"sheet-portal",...e})}function Obe({className:e,...t}){return g.jsx(Mte,{"data-slot":"sheet-overlay",className:ut("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Ibe({className:e,children:t,side:r="right",...n}){return g.jsxs(Dbe,{children:[g.jsx(Obe,{}),g.jsxs(Dte,{"data-slot":"sheet-content",className:ut("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...n,children:[t,g.jsxs(ND,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[g.jsx(wp,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Lbe({className:e,...t}){return g.jsx("div",{"data-slot":"sheet-header",className:ut("flex flex-col gap-1.5 p-4",e),...t})}function Pbe({className:e,...t}){return g.jsx(Ote,{"data-slot":"sheet-title",className:ut("text-foreground font-semibold",e),...t})}function Fbe({className:e,...t}){return g.jsx(Ite,{"data-slot":"sheet-description",className:ut("text-muted-foreground text-sm",e),...t})}function n2({className:e,...t}){return g.jsx("div",{"data-slot":"skeleton",className:ut("bg-accent animate-pulse rounded-md",e),...t})}const Bbe=["top","right","bottom","left"],qc=Math.min,Ni=Math.max,sb=Math.round,zv=Math.floor,Co=e=>({x:e,y:e}),zbe={left:"right",right:"left",bottom:"top",top:"bottom"},jbe={start:"end",end:"start"};function A5(e,t,r){return Ni(e,qc(t,r))}function Al(e,t){return typeof e=="function"?e(t):e}function kl(e){return e.split("-")[0]}function _0(e){return e.split("-")[1]}function RD(e){return e==="x"?"y":"x"}function MD(e){return e==="y"?"height":"width"}const qbe=new Set(["top","bottom"]);function wo(e){return qbe.has(kl(e))?"y":"x"}function DD(e){return RD(wo(e))}function Ube(e,t,r){r===void 0&&(r=!1);const n=_0(e),a=DD(e),i=MD(a);let s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ob(s)),[s,ob(s)]}function $be(e){const t=ob(e);return[k5(e),t,k5(t)]}function k5(e){return e.replace(/start|end/g,t=>jbe[t])}const cF=["left","right"],uF=["right","left"],Hbe=["top","bottom"],Gbe=["bottom","top"];function Vbe(e,t,r){switch(e){case"top":case"bottom":return r?t?uF:cF:t?cF:uF;case"left":case"right":return t?Hbe:Gbe;default:return[]}}function Wbe(e,t,r,n){const a=_0(e);let i=Vbe(kl(e),r==="start",n);return a&&(i=i.map(s=>s+"-"+a),t&&(i=i.concat(i.map(k5)))),i}function ob(e){return e.replace(/left|right|bottom|top/g,t=>zbe[t])}function Kbe(e){return{top:0,right:0,bottom:0,left:0,...e}}function Lte(e){return typeof e!="number"?Kbe(e):{top:e,right:e,bottom:e,left:e}}function lb(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function dF(e,t,r){let{reference:n,floating:a}=e;const i=wo(t),s=DD(t),o=MD(s),l=kl(t),c=i==="y",u=n.x+n.width/2-a.width/2,f=n.y+n.height/2-a.height/2,p=n[o]/2-a[o]/2;let m;switch(l){case"top":m={x:u,y:n.y-a.height};break;case"bottom":m={x:u,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-a.width,y:f};break;default:m={x:n.x,y:n.y}}switch(_0(t)){case"start":m[s]-=p*(r&&c?-1:1);break;case"end":m[s]+=p*(r&&c?-1:1);break}return m}const Xbe=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,o=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:f}=dF(c,n,l),p=n,m={},b=0;for(let v=0;v<o.length;v++){const{name:y,fn:_}=o[v],{x:S,y:C,data:T,reset:A}=await _({x:u,y:f,initialPlacement:n,placement:p,strategy:a,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});u=S??u,f=C??f,m={...m,[y]:{...m[y],...T}},A&&b<=50&&(b++,typeof A=="object"&&(A.placement&&(p=A.placement),A.rects&&(c=A.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):A.rects),{x:u,y:f}=dF(c,p,l)),v=-1)}return{x:u,y:f,placement:p,strategy:a,middlewareData:m}};async function Hp(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:i,rects:s,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=Al(t,e),b=Lte(m),y=o[p?f==="floating"?"reference":"floating":f],_=lb(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),S=f==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),T=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},A=lb(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:S,offsetParent:C,strategy:l}):S);return{top:(_.top-A.top+b.top)/T.y,bottom:(A.bottom-_.bottom+b.bottom)/T.y,left:(_.left-A.left+b.left)/T.x,right:(A.right-_.right+b.right)/T.x}}const Ybe=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:i,platform:s,elements:o,middlewareData:l}=t,{element:c,padding:u=0}=Al(e,t)||{};if(c==null)return{};const f=Lte(u),p={x:r,y:n},m=DD(a),b=MD(m),v=await s.getDimensions(c),y=m==="y",_=y?"top":"left",S=y?"bottom":"right",C=y?"clientHeight":"clientWidth",T=i.reference[b]+i.reference[m]-p[m]-i.floating[b],A=p[m]-i.reference[m],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let N=k?k[C]:0;(!N||!await(s.isElement==null?void 0:s.isElement(k)))&&(N=o.floating[C]||i.floating[b]);const L=T/2-A/2,I=N/2-v[b]/2-1,P=qc(f[_],I),H=qc(f[S],I),B=P,K=N-v[b]-H,j=N/2-v[b]/2+L,W=A5(B,j,K),D=!l.arrow&&_0(a)!=null&&j!==W&&i.reference[b]/2-(j<B?P:H)-v[b]/2<0,U=D?j<B?j-B:j-K:0;return{[m]:p[m]+U,data:{[m]:W,centerOffset:j-W-U,...D&&{alignmentOffset:U}},reset:D}}}),Zbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:i,rects:s,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...y}=Al(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const _=kl(a),S=wo(o),C=kl(o)===o,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),A=p||(C||!v?[ob(o)]:$be(o)),k=b!=="none";!p&&k&&A.push(...Wbe(o,v,b,T));const N=[o,...A],L=await Hp(t,y),I=[];let P=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&I.push(L[_]),f){const j=Ube(a,s,T);I.push(L[j[0]],L[j[1]])}if(P=[...P,{placement:a,overflows:I}],!I.every(j=>j<=0)){var H,B;const j=(((H=i.flip)==null?void 0:H.index)||0)+1,W=N[j];if(W&&(!(f==="alignment"?S!==wo(W):!1)||P.every(Y=>wo(Y.placement)===S?Y.overflows[0]>0:!0)))return{data:{index:j,overflows:P},reset:{placement:W}};let D=(B=P.filter(U=>U.overflows[0]<=0).sort((U,Y)=>U.overflows[1]-Y.overflows[1])[0])==null?void 0:B.placement;if(!D)switch(m){case"bestFit":{var K;const U=(K=P.filter(Y=>{if(k){const z=wo(Y.placement);return z===S||z==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(z=>z>0).reduce((z,M)=>z+M,0)]).sort((Y,z)=>Y[1]-z[1])[0])==null?void 0:K[0];U&&(D=U);break}case"initialPlacement":D=o;break}if(a!==D)return{reset:{placement:D}}}return{}}}};function fF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hF(e){return Bbe.some(t=>e[t]>=0)}const Qbe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=Al(e,t);switch(n){case"referenceHidden":{const i=await Hp(t,{...a,elementContext:"reference"}),s=fF(i,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:hF(s)}}}case"escaped":{const i=await Hp(t,{...a,altBoundary:!0}),s=fF(i,r.floating);return{data:{escapedOffsets:s,escaped:hF(s)}}}default:return{}}}}},Pte=new Set(["left","top"]);async function Jbe(e,t){const{placement:r,platform:n,elements:a}=e,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),s=kl(r),o=_0(r),l=wo(r)==="y",c=Pte.has(s)?-1:1,u=i&&l?-1:1,f=Al(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return o&&typeof b=="number"&&(m=o==="end"?b*-1:b),l?{x:m*u,y:p*c}:{x:p*c,y:m*u}}const exe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:i,placement:s,middlewareData:o}=t,l=await Jbe(t,e);return s===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:a+l.x,y:i+l.y,data:{...l,placement:s}}}}},txe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:o={fn:y=>{let{x:_,y:S}=y;return{x:_,y:S}}},...l}=Al(e,t),c={x:r,y:n},u=await Hp(t,l),f=wo(kl(a)),p=RD(f);let m=c[p],b=c[f];if(i){const y=p==="y"?"top":"left",_=p==="y"?"bottom":"right",S=m+u[y],C=m-u[_];m=A5(S,m,C)}if(s){const y=f==="y"?"top":"left",_=f==="y"?"bottom":"right",S=b+u[y],C=b-u[_];b=A5(S,b,C)}const v=o.fn({...t,[p]:m,[f]:b});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[p]:i,[f]:s}}}}}},rxe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:i,middlewareData:s}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=Al(e,t),u={x:r,y:n},f=wo(a),p=RD(f);let m=u[p],b=u[f];const v=Al(o,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const C=p==="y"?"height":"width",T=i.reference[p]-i.floating[C]+y.mainAxis,A=i.reference[p]+i.reference[C]-y.mainAxis;m<T?m=T:m>A&&(m=A)}if(c){var _,S;const C=p==="y"?"width":"height",T=Pte.has(kl(a)),A=i.reference[f]-i.floating[C]+(T&&((_=s.offset)==null?void 0:_[f])||0)+(T?0:y.crossAxis),k=i.reference[f]+i.reference[C]+(T?0:((S=s.offset)==null?void 0:S[f])||0)-(T?y.crossAxis:0);b<A?b=A:b>k&&(b=k)}return{[p]:m,[f]:b}}}},nxe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:i,platform:s,elements:o}=t,{apply:l=()=>{},...c}=Al(e,t),u=await Hp(t,c),f=kl(a),p=_0(a),m=wo(a)==="y",{width:b,height:v}=i.floating;let y,_;f==="top"||f==="bottom"?(y=f,_=p===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(_=f,y=p==="end"?"top":"bottom");const S=v-u.top-u.bottom,C=b-u.left-u.right,T=qc(v-u[y],S),A=qc(b-u[_],C),k=!t.middlewareData.shift;let N=T,L=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=S),k&&!p){const P=Ni(u.left,0),H=Ni(u.right,0),B=Ni(u.top,0),K=Ni(u.bottom,0);m?L=b-2*(P!==0||H!==0?P+H:Ni(u.left,u.right)):N=v-2*(B!==0||K!==0?B+K:Ni(u.top,u.bottom))}await l({...t,availableWidth:L,availableHeight:N});const I=await s.getDimensions(o.floating);return b!==I.width||v!==I.height?{reset:{rects:!0}}:{}}}};function lx(){return typeof window<"u"}function w0(e){return Fte(e)?(e.nodeName||"").toLowerCase():"#document"}function Oi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Io(e){var t;return(t=(Fte(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fte(e){return lx()?e instanceof Node||e instanceof Oi(e).Node:!1}function qs(e){return lx()?e instanceof Element||e instanceof Oi(e).Element:!1}function Ro(e){return lx()?e instanceof HTMLElement||e instanceof Oi(e).HTMLElement:!1}function pF(e){return!lx()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oi(e).ShadowRoot}const axe=new Set(["inline","contents"]);function Am(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=Us(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!axe.has(a)}const ixe=new Set(["table","td","th"]);function sxe(e){return ixe.has(w0(e))}const oxe=[":popover-open",":modal"];function cx(e){return oxe.some(t=>{try{return e.matches(t)}catch{return!1}})}const lxe=["transform","translate","scale","rotate","perspective"],cxe=["transform","translate","scale","rotate","perspective","filter"],uxe=["paint","layout","strict","content"];function OD(e){const t=ID(),r=qs(e)?Us(e):e;return lxe.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||cxe.some(n=>(r.willChange||"").includes(n))||uxe.some(n=>(r.contain||"").includes(n))}function dxe(e){let t=Uc(e);for(;Ro(t)&&!Zf(t);){if(OD(t))return t;if(cx(t))return null;t=Uc(t)}return null}function ID(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fxe=new Set(["html","body","#document"]);function Zf(e){return fxe.has(w0(e))}function Us(e){return Oi(e).getComputedStyle(e)}function ux(e){return qs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Uc(e){if(w0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pF(e)&&e.host||Io(e);return pF(t)?t.host:t}function Bte(e){const t=Uc(e);return Zf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ro(t)&&Am(t)?t:Bte(t)}function Gp(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=Bte(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=Oi(a);if(i){const o=N5(s);return t.concat(s,s.visualViewport||[],Am(a)?a:[],o&&r?Gp(o):[])}return t.concat(a,Gp(a,[],r))}function N5(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zte(e){const t=Us(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Ro(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,o=sb(r)!==i||sb(n)!==s;return o&&(r=i,n=s),{width:r,height:n,$:o}}function LD(e){return qs(e)?e:e.contextElement}function Lf(e){const t=LD(e);if(!Ro(t))return Co(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:i}=zte(t);let s=(i?sb(r.width):r.width)/n,o=(i?sb(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}const hxe=Co(0);function jte(e){const t=Oi(e);return!ID()||!t.visualViewport?hxe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pxe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Oi(e)?!1:t}function Ku(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),i=LD(e);let s=Co(1);t&&(n?qs(n)&&(s=Lf(n)):s=Lf(e));const o=pxe(i,r,n)?jte(i):Co(0);let l=(a.left+o.x)/s.x,c=(a.top+o.y)/s.y,u=a.width/s.x,f=a.height/s.y;if(i){const p=Oi(i),m=n&&qs(n)?Oi(n):n;let b=p,v=N5(b);for(;v&&n&&m!==b;){const y=Lf(v),_=v.getBoundingClientRect(),S=Us(v),C=_.left+(v.clientLeft+parseFloat(S.paddingLeft))*y.x,T=_.top+(v.clientTop+parseFloat(S.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=C,c+=T,b=Oi(v),v=N5(b)}}return lb({width:u,height:f,x:l,y:c})}function dx(e,t){const r=ux(e).scrollLeft;return t?t.left+r:Ku(Io(e)).left+r}function qte(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-dx(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function mxe(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const i=a==="fixed",s=Io(n),o=t?cx(t.floating):!1;if(n===s||o&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Co(1);const u=Co(0),f=Ro(n);if((f||!f&&!i)&&((w0(n)!=="body"||Am(s))&&(l=ux(n)),Ro(n))){const m=Ku(n);c=Lf(n),u.x=m.x+n.clientLeft,u.y=m.y+n.clientTop}const p=s&&!f&&!i?qte(s,l):Co(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function gxe(e){return Array.from(e.getClientRects())}function vxe(e){const t=Io(e),r=ux(e),n=e.ownerDocument.body,a=Ni(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ni(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+dx(e);const o=-r.scrollTop;return Us(n).direction==="rtl"&&(s+=Ni(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:o}}const mF=25;function bxe(e,t){const r=Oi(e),n=Io(e),a=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,o=0,l=0;if(a){i=a.width,s=a.height;const u=ID();(!u||u&&t==="fixed")&&(o=a.offsetLeft,l=a.offsetTop)}const c=dx(n);if(c<=0){const u=n.ownerDocument,f=u.body,p=getComputedStyle(f),m=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(n.clientWidth-f.clientWidth-m);b<=mF&&(i-=b)}else c<=mF&&(i+=c);return{width:i,height:s,x:o,y:l}}const xxe=new Set(["absolute","fixed"]);function yxe(e,t){const r=Ku(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=Ro(e)?Lf(e):Co(1),s=e.clientWidth*i.x,o=e.clientHeight*i.y,l=a*i.x,c=n*i.y;return{width:s,height:o,x:l,y:c}}function gF(e,t,r){let n;if(t==="viewport")n=bxe(e,r);else if(t==="document")n=vxe(Io(e));else if(qs(t))n=yxe(t,r);else{const a=jte(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return lb(n)}function Ute(e,t){const r=Uc(e);return r===t||!qs(r)||Zf(r)?!1:Us(r).position==="fixed"||Ute(r,t)}function _xe(e,t){const r=t.get(e);if(r)return r;let n=Gp(e,[],!1).filter(o=>qs(o)&&w0(o)!=="body"),a=null;const i=Us(e).position==="fixed";let s=i?Uc(e):e;for(;qs(s)&&!Zf(s);){const o=Us(s),l=OD(s);!l&&o.position==="fixed"&&(a=null),(i?!l&&!a:!l&&o.position==="static"&&!!a&&xxe.has(a.position)||Am(s)&&!l&&Ute(e,s))?n=n.filter(u=>u!==s):a=o,s=Uc(s)}return t.set(e,n),n}function wxe(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const s=[...r==="clippingAncestors"?cx(t)?[]:_xe(t,this._c):[].concat(r),n],o=s[0],l=s.reduce((c,u)=>{const f=gF(t,u,a);return c.top=Ni(f.top,c.top),c.right=qc(f.right,c.right),c.bottom=qc(f.bottom,c.bottom),c.left=Ni(f.left,c.left),c},gF(t,o,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Exe(e){const{width:t,height:r}=zte(e);return{width:t,height:r}}function Sxe(e,t,r){const n=Ro(t),a=Io(t),i=r==="fixed",s=Ku(e,!0,i,t);let o={scrollLeft:0,scrollTop:0};const l=Co(0);function c(){l.x=dx(a)}if(n||!n&&!i)if((w0(t)!=="body"||Am(a))&&(o=ux(t)),n){const m=Ku(t,!0,i,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else a&&c();i&&!n&&a&&c();const u=a&&!n&&!i?qte(a,o):Co(0),f=s.left+o.scrollLeft-l.x-u.x,p=s.top+o.scrollTop-l.y-u.y;return{x:f,y:p,width:s.width,height:s.height}}function a2(e){return Us(e).position==="static"}function vF(e,t){if(!Ro(e)||Us(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Io(e)===r&&(r=r.ownerDocument.body),r}function $te(e,t){const r=Oi(e);if(cx(e))return r;if(!Ro(e)){let a=Uc(e);for(;a&&!Zf(a);){if(qs(a)&&!a2(a))return a;a=Uc(a)}return r}let n=vF(e,t);for(;n&&sxe(n)&&a2(n);)n=vF(n,t);return n&&Zf(n)&&a2(n)&&!OD(n)?r:n||dxe(e)||r}const Cxe=async function(e){const t=this.getOffsetParent||$te,r=this.getDimensions,n=await r(e.floating);return{reference:Sxe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Txe(e){return Us(e).direction==="rtl"}const Axe={convertOffsetParentRelativeRectToViewportRelativeRect:mxe,getDocumentElement:Io,getClippingRect:wxe,getOffsetParent:$te,getElementRects:Cxe,getClientRects:gxe,getDimensions:Exe,getScale:Lf,isElement:qs,isRTL:Txe};function Hte(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kxe(e,t){let r=null,n;const a=Io(e);function i(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function s(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:m}=c;if(o||t(),!p||!m)return;const b=zv(f),v=zv(a.clientWidth-(u+p)),y=zv(a.clientHeight-(f+m)),_=zv(u),C={rootMargin:-b+"px "+-v+"px "+-y+"px "+-_+"px",threshold:Ni(0,qc(1,l))||1};let T=!0;function A(k){const N=k[0].intersectionRatio;if(N!==l){if(!T)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!Hte(c,e.getBoundingClientRect())&&s(),T=!1}try{r=new IntersectionObserver(A,{...C,root:a.ownerDocument})}catch{r=new IntersectionObserver(A,C)}r.observe(e)}return s(!0),i}function Nxe(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=LD(e),u=a||i?[...c?Gp(c):[],...Gp(t)]:[];u.forEach(_=>{a&&_.addEventListener("scroll",r,{passive:!0}),i&&_.addEventListener("resize",r)});const f=c&&o?kxe(c,r):null;let p=-1,m=null;s&&(m=new ResizeObserver(_=>{let[S]=_;S&&S.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),r()}),c&&!l&&m.observe(c),m.observe(t));let b,v=l?Ku(e):null;l&&y();function y(){const _=Ku(e);v&&!Hte(v,_)&&r(),v=_,b=requestAnimationFrame(y)}return r(),()=>{var _;u.forEach(S=>{a&&S.removeEventListener("scroll",r),i&&S.removeEventListener("resize",r)}),f?.(),(_=m)==null||_.disconnect(),m=null,l&&cancelAnimationFrame(b)}}const Rxe=exe,Mxe=txe,Dxe=Zbe,Oxe=nxe,Ixe=Qbe,bF=Ybe,Lxe=rxe,Pxe=(e,t,r)=>{const n=new Map,a={platform:Axe,...r},i={...a.platform,_c:n};return Xbe(e,t,{...a,platform:i})};var Fxe=typeof document<"u",Bxe=function(){},q1=Fxe?E.useLayoutEffect:Bxe;function cb(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!cb(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const i=a[n];if(!(i==="_owner"&&e.$$typeof)&&!cb(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Gte(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xF(e,t){const r=Gte(e);return Math.round(t*r)/r}function i2(e){const t=E.useRef(e);return q1(()=>{t.current=e}),t}function zxe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:s}={},transform:o=!0,whileElementsMounted:l,open:c}=e,[u,f]=E.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=E.useState(n);cb(p,n)||m(n);const[b,v]=E.useState(null),[y,_]=E.useState(null),S=E.useCallback(Y=>{Y!==k.current&&(k.current=Y,v(Y))},[]),C=E.useCallback(Y=>{Y!==N.current&&(N.current=Y,_(Y))},[]),T=i||b,A=s||y,k=E.useRef(null),N=E.useRef(null),L=E.useRef(u),I=l!=null,P=i2(l),H=i2(a),B=i2(c),K=E.useCallback(()=>{if(!k.current||!N.current)return;const Y={placement:t,strategy:r,middleware:p};H.current&&(Y.platform=H.current),Pxe(k.current,N.current,Y).then(z=>{const M={...z,isPositioned:B.current!==!1};j.current&&!cb(L.current,M)&&(L.current=M,bD.flushSync(()=>{f(M)}))})},[p,t,r,H,B]);q1(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(Y=>({...Y,isPositioned:!1})))},[c]);const j=E.useRef(!1);q1(()=>(j.current=!0,()=>{j.current=!1}),[]),q1(()=>{if(T&&(k.current=T),A&&(N.current=A),T&&A){if(P.current)return P.current(T,A,K);K()}},[T,A,K,P,I]);const W=E.useMemo(()=>({reference:k,floating:N,setReference:S,setFloating:C}),[S,C]),D=E.useMemo(()=>({reference:T,floating:A}),[T,A]),U=E.useMemo(()=>{const Y={position:r,left:0,top:0};if(!D.floating)return Y;const z=xF(D.floating,u.x),M=xF(D.floating,u.y);return o?{...Y,transform:"translate("+z+"px, "+M+"px)",...Gte(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:z,top:M}},[r,o,D.floating,u.x,u.y]);return E.useMemo(()=>({...u,update:K,refs:W,elements:D,floatingStyles:U}),[u,K,W,D,U])}const jxe=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?bF({element:n.current,padding:a}).fn(r):{}:n?bF({element:n,padding:a}).fn(r):{}}}},qxe=(e,t)=>({...Rxe(e),options:[e,t]}),Uxe=(e,t)=>({...Mxe(e),options:[e,t]}),$xe=(e,t)=>({...Lxe(e),options:[e,t]}),Hxe=(e,t)=>({...Dxe(e),options:[e,t]}),Gxe=(e,t)=>({...Oxe(e),options:[e,t]}),Vxe=(e,t)=>({...Ixe(e),options:[e,t]}),Wxe=(e,t)=>({...jxe(e),options:[e,t]});var Kxe="Arrow",Vte=E.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...i}=e;return g.jsx(Mr.svg,{...i,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Vte.displayName=Kxe;var Xxe=Vte;function Wte(e){const[t,r]=E.useState(void 0);return Cl(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let s,o;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,o=c.blockSize}else s=e.offsetWidth,o=e.offsetHeight;r({width:s,height:o})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var PD="Popper",[Kte,fx]=zl(PD),[Yxe,Xte]=Kte(PD),Yte=e=>{const{__scopePopper:t,children:r}=e,[n,a]=E.useState(null);return g.jsx(Yxe,{scope:t,anchor:n,onAnchorChange:a,children:r})};Yte.displayName=PD;var Zte="PopperAnchor",Qte=E.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,i=Xte(Zte,r),s=E.useRef(null),o=pn(t,s),l=E.useRef(null);return E.useEffect(()=>{const c=l.current;l.current=n?.current||s.current,c!==l.current&&i.onAnchorChange(l.current)}),n?null:g.jsx(Mr.div,{...a,ref:o})});Qte.displayName=Zte;var FD="PopperContent",[Zxe,Qxe]=Kte(FD),Jte=E.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:i="center",alignOffset:s=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:b,...v}=e,y=Xte(FD,r),[_,S]=E.useState(null),C=pn(t,te=>S(te)),[T,A]=E.useState(null),k=Wte(T),N=k?.width??0,L=k?.height??0,I=n+(i!=="center"?"-"+i:""),P=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},H=Array.isArray(c)?c:[c],B=H.length>0,K={padding:P,boundary:H.filter(eye),altBoundary:B},{refs:j,floatingStyles:W,placement:D,isPositioned:U,middlewareData:Y}=zxe({strategy:"fixed",placement:I,whileElementsMounted:(...te)=>Nxe(...te,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[qxe({mainAxis:a+L,alignmentAxis:s}),l&&Uxe({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?$xe():void 0,...K}),l&&Hxe({...K}),Gxe({...K,apply:({elements:te,rects:oe,availableWidth:pe,availableHeight:he})=>{const{width:ke,height:se}=oe.reference,qe=te.floating.style;qe.setProperty("--radix-popper-available-width",`${pe}px`),qe.setProperty("--radix-popper-available-height",`${he}px`),qe.setProperty("--radix-popper-anchor-width",`${ke}px`),qe.setProperty("--radix-popper-anchor-height",`${se}px`)}}),T&&Wxe({element:T,padding:o}),tye({arrowWidth:N,arrowHeight:L}),p&&Vxe({strategy:"referenceHidden",...K})]}),[z,M]=rre(D),Q=Tl(b);Cl(()=>{U&&Q?.()},[U,Q]);const q=Y.arrow?.x,F=Y.arrow?.y,V=Y.arrow?.centerOffset!==0,[Z,ee]=E.useState();return Cl(()=>{_&&ee(window.getComputedStyle(_).zIndex)},[_]),g.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:U?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Z,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(Zxe,{scope:r,placedSide:z,onArrowChange:A,arrowX:q,arrowY:F,shouldHideArrow:V,children:g.jsx(Mr.div,{"data-side":z,"data-align":M,...v,ref:C,style:{...v.style,animation:U?void 0:"none"}})})})});Jte.displayName=FD;var ere="PopperArrow",Jxe={top:"bottom",right:"left",bottom:"top",left:"right"},tre=E.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,i=Qxe(ere,n),s=Jxe[i.placedSide];return g.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:g.jsx(Xxe,{...a,ref:r,style:{...a.style,display:"block"}})})});tre.displayName=ere;function eye(e){return e!==null}var tye=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:a}=t,s=a.arrow?.centerOffset!==0,o=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,u]=rre(r),f={start:"0%",center:"50%",end:"100%"}[u],p=(a.arrow?.x??0)+o/2,m=(a.arrow?.y??0)+l/2;let b="",v="";return c==="bottom"?(b=s?f:`${p}px`,v=`${-l}px`):c==="top"?(b=s?f:`${p}px`,v=`${n.floating.height+l}px`):c==="right"?(b=`${-l}px`,v=s?f:`${m}px`):c==="left"&&(b=`${n.floating.width+l}px`,v=s?f:`${m}px`),{data:{x:b,y:v}}}});function rre(e){const[t,r="center"]=e.split("-");return[t,r]}var nre=Yte,are=Qte,ire=Jte,sre=tre,rye=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"}),nye="VisuallyHidden",ore=E.forwardRef((e,t)=>g.jsx(Mr.span,{...e,ref:t,style:{...rye,...e.style}}));ore.displayName=nye;var aye=ore,[hx,dst]=zl("Tooltip",[fx]),px=fx(),lre="TooltipProvider",iye=700,R5="tooltip.open",[sye,BD]=hx(lre),cre=e=>{const{__scopeTooltip:t,delayDuration:r=iye,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:i}=e,s=E.useRef(!0),o=E.useRef(!1),l=E.useRef(0);return E.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),g.jsx(sye,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:E.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:E.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:o,onPointerInTransitChange:E.useCallback(c=>{o.current=c},[]),disableHoverableContent:a,children:i})};cre.displayName=lre;var Vp="Tooltip",[oye,km]=hx(Vp),ure=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a,onOpenChange:i,disableHoverableContent:s,delayDuration:o}=e,l=BD(Vp,e.__scopeTooltip),c=px(t),[u,f]=E.useState(null),p=Ic(),m=E.useRef(0),b=s??l.disableHoverableContent,v=o??l.delayDuration,y=E.useRef(!1),[_,S]=y0({prop:n,defaultProp:a??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(R5))):l.onClose(),i?.(N)},caller:Vp}),C=E.useMemo(()=>_?y.current?"delayed-open":"instant-open":"closed",[_]),T=E.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,S(!0)},[S]),A=E.useCallback(()=>{window.clearTimeout(m.current),m.current=0,S(!1)},[S]),k=E.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,S(!0),m.current=0},v)},[v,S]);return E.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),g.jsx(nre,{...c,children:g.jsx(oye,{scope:t,contentId:p,open:_,stateAttribute:C,trigger:u,onTriggerChange:f,onTriggerEnter:E.useCallback(()=>{l.isOpenDelayedRef.current?k():T()},[l.isOpenDelayedRef,k,T]),onTriggerLeave:E.useCallback(()=>{b?A():(window.clearTimeout(m.current),m.current=0)},[A,b]),onOpen:T,onClose:A,disableHoverableContent:b,children:r})})};ure.displayName=Vp;var M5="TooltipTrigger",dre=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=km(M5,r),i=BD(M5,r),s=px(r),o=E.useRef(null),l=pn(t,o,a.onTriggerChange),c=E.useRef(!1),u=E.useRef(!1),f=E.useCallback(()=>c.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),g.jsx(are,{asChild:!0,...s,children:g.jsx(Mr.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:l,onPointerMove:$t(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:$t(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:$t(e.onPointerDown,()=>{a.open&&a.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:$t(e.onFocus,()=>{c.current||a.onOpen()}),onBlur:$t(e.onBlur,a.onClose),onClick:$t(e.onClick,a.onClose)})})});dre.displayName=M5;var zD="TooltipPortal",[lye,cye]=hx(zD,{forceMount:void 0}),jD=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:a}=e,i=km(zD,t);return g.jsx(lye,{scope:t,forceMount:r,children:g.jsx(vs,{present:r||i.open,children:g.jsx(ix,{asChild:!0,container:a,children:n})})})};jD.displayName=zD;var Qf="TooltipContent",fre=E.forwardRef((e,t)=>{const r=cye(Qf,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...i}=e,s=km(Qf,e.__scopeTooltip);return g.jsx(vs,{present:n||s.open,children:s.disableHoverableContent?g.jsx(hre,{side:a,...i,ref:t}):g.jsx(uye,{side:a,...i,ref:t})})}),uye=E.forwardRef((e,t)=>{const r=km(Qf,e.__scopeTooltip),n=BD(Qf,e.__scopeTooltip),a=E.useRef(null),i=pn(t,a),[s,o]=E.useState(null),{trigger:l,onClose:c}=r,u=a.current,{onPointerInTransitChange:f}=n,p=E.useCallback(()=>{o(null),f(!1)},[f]),m=E.useCallback((b,v)=>{const y=b.currentTarget,_={x:b.clientX,y:b.clientY},S=pye(_,y.getBoundingClientRect()),C=mye(_,S),T=gye(v.getBoundingClientRect()),A=bye([...C,...T]);o(A),f(!0)},[f]);return E.useEffect(()=>()=>p(),[p]),E.useEffect(()=>{if(l&&u){const b=y=>m(y,u),v=y=>m(y,l);return l.addEventListener("pointerleave",b),u.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",b),u.removeEventListener("pointerleave",v)}}},[l,u,m,p]),E.useEffect(()=>{if(s){const b=v=>{const y=v.target,_={x:v.clientX,y:v.clientY},S=l?.contains(y)||u?.contains(y),C=!vye(_,s);S?p():C&&(p(),c())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,u,s,c,p]),g.jsx(hre,{...e,ref:i})}),[dye,fye]=hx(Vp,{isInside:!1}),hye=Sme("TooltipContent"),hre=E.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:s,...o}=e,l=km(Qf,r),c=px(r),{onClose:u}=l;return E.useEffect(()=>(document.addEventListener(R5,u),()=>document.removeEventListener(R5,u)),[u]),E.useEffect(()=>{if(l.trigger){const f=p=>{p.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,u]),g.jsx(ax,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:g.jsxs(ire,{"data-state":l.stateAttribute,...c,...o,ref:t,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(hye,{children:n}),g.jsx(dye,{scope:r,isInside:!0,children:g.jsx(aye,{id:l.contentId,role:"tooltip",children:a||n})})]})})});fre.displayName=Qf;var pre="TooltipArrow",mre=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=px(r);return fye(pre,r).isInside?null:g.jsx(sre,{...a,...n,ref:t})});mre.displayName=pre;function pye(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,a,i)){case i:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function mye(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function gye(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function vye(e,t){const{x:r,y:n}=e;let a=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const o=t[i],l=t[s],c=o.x,u=o.y,f=l.x,p=l.y;u>n!=p>n&&r<(f-c)*(n-u)/(p-u)+c&&(a=!a)}return a}function bye(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),xye(t)}function xye(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const a=e[n];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))r.pop();else break}r.push(a)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var yye=cre,_ye=ure,wye=dre,Eye=jD,Sye=fre,Cye=mre;function gre({delayDuration:e=0,...t}){return g.jsx(yye,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function To({...e}){return g.jsx(gre,{children:g.jsx(_ye,{"data-slot":"tooltip",...e})})}function Ao({...e}){return g.jsx(wye,{"data-slot":"tooltip-trigger",...e})}function ko({className:e,sideOffset:t=0,children:r,...n}){return g.jsx(Eye,{children:g.jsxs(Sye,{"data-slot":"tooltip-content",sideOffset:t,className:ut("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,g.jsx(Cye,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Tye="sidebar_state",Aye=3600*24*7,kye="16rem",Nye="18rem",Rye="3.5rem",Mye="b";function Dye({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:a,children:i,...s}){const o=Tve(),[l,c]=E.useState(!1),[u,f]=E.useState(e),p=t??u,m=E.useCallback(_=>{const S=typeof _=="function"?_(p):_;r?r(S):f(S),typeof document<"u"&&(document.cookie=`${Tye}=${S}; path=/; max-age=${Aye}`)},[r,p]),b=E.useCallback(()=>o?c(_=>!_):m(_=>!_),[o,m,c]);E.useEffect(()=>{const _=S=>{S.key===Mye&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),b())};if(typeof window<"u")return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[b]);const v=p?"expanded":"collapsed",y=E.useMemo(()=>({state:v,open:p,setOpen:m,isMobile:o,openMobile:l,setOpenMobile:c,toggleSidebar:b}),[v,p,m,o,l,c,b]);return g.jsx(Uee.Provider,{value:y,children:g.jsx(gre,{delayDuration:0,children:g.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":kye,"--sidebar-width-icon":Rye,...a},className:ut("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",n),...s,children:i})})})}function Oye({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:a,...i}){const{isMobile:s,state:o,openMobile:l,setOpenMobile:c}=g0();return r==="none"?g.jsx("div",{"data-slot":"sidebar",className:ut("flex flex-col h-full bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)]",n),...i,children:a}):s?g.jsx(Mbe,{open:l,onOpenChange:c,...i,children:g.jsxs(Ibe,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden",style:{"--sidebar-width":Nye},side:e,children:[g.jsxs(Lbe,{className:"sr-only",children:[g.jsx(Pbe,{children:"Sidebar"}),g.jsx(Fbe,{children:"Displays the mobile sidebar."})]}),g.jsx("div",{className:"flex flex-col w-full h-full",children:a})]})}):g.jsxs("div",{className:"hidden group peer text-sidebar-foreground md:block","data-state":o,"data-collapsible":o==="collapsed"?r:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[g.jsx("div",{"data-slot":"sidebar-gap",className:ut("relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(theme(spacing.4)))]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")}),g.jsx("div",{"data-slot":"sidebar-container",className:ut("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(theme(spacing.4))+2px)]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...i,children:g.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:a})})]})}function Iye({className:e,onClick:t,...r}){const{toggleSidebar:n,state:a}=g0();if(a!=="expanded")return g.jsxs(mt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:ut("cursor-pointer size-8",e),onClick:i=>{t?.(i),n()},...r,children:[g.jsx(ave,{className:"text-gray-500 size-6",strokeWidth:1.5}),g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Lye({className:e,...t}){const{toggleSidebar:r}=g0();return g.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:ut("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","group-data-[side=left]:cursor-w-resize group-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function Pye({className:e,...t}){return g.jsx("main",{"data-slot":"sidebar-inset",className:ut("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function Fye({className:e,...t}){return g.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:ut("flex flex-col gap-2 justify-center items-center p-2 h-16 border-b",e),...t})}function Bye({className:e,...t}){return g.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:ut("flex flex-col gap-2 p-2",e),...t})}function zye({className:e,...t}){return g.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:ut("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function jye({className:e,...t}){return g.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:ut("flex relative flex-col p-2 w-full min-w-0",e),...t})}function vre({className:e,...t}){return g.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:ut("flex flex-col gap-2 w-full min-w-0",e),...t})}function D5({className:e,...t}){return g.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ut("relative group/menu-item",e),...t})}const qye=rx({base:"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-gray-100 data-[active=true]:font-medium data-[active=true]:text-gray-700 data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-10 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-5 [&>svg]:shrink-0 cursor-pointer",variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}});function O5({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:a,className:i,...s}){const o=e?xD:"button",{isMobile:l,state:c}=g0(),u=g.jsx(o,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":n,"data-active":t,className:ut(qye({variant:r,size:n}),"gap-2",i),...s});return a?(typeof a=="string"&&(a={children:a}),g.jsxs(To,{children:[g.jsx(Ao,{asChild:!0,children:u}),g.jsx(ko,{side:"right",align:"center",hidden:c!=="collapsed"||l,...a})]})):u}function Uye({className:e,...t}){return g.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:ut("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function $ye({className:e,...t}){return g.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:ut("relative group/menu-sub-item",e),...t})}function Hye({asChild:e=!1,size:t="md",isActive:r=!1,className:n,...a}){const i=e?xD:"a";return g.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:ut("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-gray-700 [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-5 [&>svg]:shrink-0 cursor-pointer","data-[active=true]:bg-sidebar-accent data-[active=true]:text-gray-700",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...a})}const Vt=ye.createContext({});var Gye=Object.defineProperty,yF=Object.getOwnPropertySymbols,Vye=Object.prototype.hasOwnProperty,Wye=Object.prototype.propertyIsEnumerable,_F=(e,t,r)=>t in e?Gye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s2=(e,t)=>{for(var r in t||(t={}))Vye.call(t,r)&&_F(e,r,t[r]);if(yF)for(var r of yF(t))Wye.call(t,r)&&_F(e,r,t[r]);return e};const Kye=(e,t)=>{const r=E.useContext(Vt),n=s2(s2({},r),e);return E.createElement("svg",s2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M21 12L3 12M3 12L11.5 3.5M3 12L11.5 20.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Xye=E.forwardRef(Kye);var mx=Xye,Yye=Object.defineProperty,wF=Object.getOwnPropertySymbols,Zye=Object.prototype.hasOwnProperty,Qye=Object.prototype.propertyIsEnumerable,EF=(e,t,r)=>t in e?Yye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o2=(e,t)=>{for(var r in t||(t={}))Zye.call(t,r)&&EF(e,r,t[r]);if(wF)for(var r of wF(t))Qye.call(t,r)&&EF(e,r,t[r]);return e};const Jye=(e,t)=>{const r=E.useContext(Vt),n=o2(o2({},r),e);return E.createElement("svg",o2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M3 12L21 12M21 12L12.5 3.5M21 12L12.5 20.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},e_e=E.forwardRef(Jye);var bre=e_e,t_e=Object.defineProperty,SF=Object.getOwnPropertySymbols,r_e=Object.prototype.hasOwnProperty,n_e=Object.prototype.propertyIsEnumerable,CF=(e,t,r)=>t in e?t_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l2=(e,t)=>{for(var r in t||(t={}))r_e.call(t,r)&&CF(e,r,t[r]);if(SF)for(var r of SF(t))n_e.call(t,r)&&CF(e,r,t[r]);return e};const a_e=(e,t)=>{const r=E.useContext(Vt),n=l2(l2({},r),e);return E.createElement("svg",l2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M12 21L12 3M12 3L20.5 11.5M12 3L3.5 11.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},i_e=E.forwardRef(a_e);var qD=i_e,s_e=Object.defineProperty,TF=Object.getOwnPropertySymbols,o_e=Object.prototype.hasOwnProperty,l_e=Object.prototype.propertyIsEnumerable,AF=(e,t,r)=>t in e?s_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c2=(e,t)=>{for(var r in t||(t={}))o_e.call(t,r)&&AF(e,r,t[r]);if(TF)for(var r of TF(t))l_e.call(t,r)&&AF(e,r,t[r]);return e};const c_e=(e,t)=>{const r=E.useContext(Vt),n=c2(c2({},r),e);return E.createElement("svg",c2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M21.4383 11.6622L12.2483 20.8522C11.1225 21.9781 9.59552 22.6106 8.00334 22.6106C6.41115 22.6106 4.88418 21.9781 3.75834 20.8522C2.63249 19.7264 2 18.1994 2 16.6072C2 15.015 2.63249 13.4881 3.75834 12.3622L12.9483 3.17222C13.6989 2.42166 14.7169 2 15.7783 2C16.8398 2 17.8578 2.42166 18.6083 3.17222C19.3589 3.92279 19.7806 4.94077 19.7806 6.00222C19.7806 7.06368 19.3589 8.08166 18.6083 8.83222L9.40834 18.0222C9.03306 18.3975 8.52406 18.6083 7.99334 18.6083C7.46261 18.6083 6.95362 18.3975 6.57834 18.0222C6.20306 17.6469 5.99222 17.138 5.99222 16.6072C5.99222 16.0765 6.20306 15.5675 6.57834 15.1922L15.0683 6.71222",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},u_e=E.forwardRef(c_e);var d_e=u_e,f_e=Object.defineProperty,kF=Object.getOwnPropertySymbols,h_e=Object.prototype.hasOwnProperty,p_e=Object.prototype.propertyIsEnumerable,NF=(e,t,r)=>t in e?f_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u2=(e,t)=>{for(var r in t||(t={}))h_e.call(t,r)&&NF(e,r,t[r]);if(kF)for(var r of kF(t))p_e.call(t,r)&&NF(e,r,t[r]);return e};const m_e=(e,t)=>{const r=E.useContext(Vt),n=u2(u2({},r),e);return E.createElement("svg",u2({width:"1.5em",strokeWidth:1.5,height:"1.5em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M4 19V5C4 3.89543 4.89543 3 6 3H19.4C19.7314 3 20 3.26863 20 3.6V16.7143",stroke:"currentColor",strokeLinecap:"round"}),E.createElement("path",{d:"M6 17L20 17",stroke:"currentColor",strokeLinecap:"round"}),E.createElement("path",{d:"M6 21L20 21",stroke:"currentColor",strokeLinecap:"round"}),E.createElement("path",{d:"M6 21C4.89543 21 4 20.1046 4 19C4 17.8954 4.89543 17 6 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M9 7L15 7",stroke:"currentColor",strokeLinecap:"round"}))},g_e=E.forwardRef(m_e);var xre=g_e,v_e=Object.defineProperty,RF=Object.getOwnPropertySymbols,b_e=Object.prototype.hasOwnProperty,x_e=Object.prototype.propertyIsEnumerable,MF=(e,t,r)=>t in e?v_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d2=(e,t)=>{for(var r in t||(t={}))b_e.call(t,r)&&MF(e,r,t[r]);if(RF)for(var r of RF(t))x_e.call(t,r)&&MF(e,r,t[r]);return e};const y_e=(e,t)=>{const r=E.useContext(Vt),n=d2(d2({},r),e);return E.createElement("svg",d2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M12 17C12.5523 17 13 16.5523 13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M21 7.35304L21 16.647C21 16.8649 20.8819 17.0656 20.6914 17.1715L12.2914 21.8381C12.1102 21.9388 11.8898 21.9388 11.7086 21.8381L3.30861 17.1715C3.11814 17.0656 3 16.8649 3 16.647L2.99998 7.35304C2.99998 7.13514 3.11812 6.93437 3.3086 6.82855L11.7086 2.16188C11.8898 2.06121 12.1102 2.06121 12.2914 2.16188L20.6914 6.82855C20.8818 6.93437 21 7.13514 21 7.35304Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M20.5 16.7222L12.2914 12.1618C12.1102 12.0612 11.8898 12.0612 11.7086 12.1618L3.5 16.7222",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M3.52844 7.29363L11.7086 11.8382C11.8898 11.9388 12.1102 11.9388 12.2914 11.8382L20.5 7.27783",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 3L12 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 19.5V22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},w_e=E.forwardRef(y_e);var E_e=w_e,S_e=Object.defineProperty,DF=Object.getOwnPropertySymbols,C_e=Object.prototype.hasOwnProperty,T_e=Object.prototype.propertyIsEnumerable,OF=(e,t,r)=>t in e?S_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f2=(e,t)=>{for(var r in t||(t={}))C_e.call(t,r)&&OF(e,r,t[r]);if(DF)for(var r of DF(t))T_e.call(t,r)&&OF(e,r,t[r]);return e};const A_e=(e,t)=>{const r=E.useContext(Vt),n=f2(f2({},r),e);return E.createElement("svg",f2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M7 14C5.34315 14 4 15.3431 4 17C4 18.6569 5.34315 20 7 20C7.35064 20 7.68722 19.9398 8 19.8293",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M4.26392 15.6046C2.9243 14.9582 2.00004 13.587 2.00004 12C2.00004 10.7883 2.53877 9.70251 3.38978 8.96898",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M3.42053 8.8882C3.1549 8.49109 3 8.01363 3 7.5C3 6.11929 4.11929 5 5.5 5C6.06291 5 6.58237 5.18604 7.00024 5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M7.23769 5.56533C7.08524 5.24215 7 4.88103 7 4.5C7 3.11929 8.11929 2 9.5 2C10.8807 2 12 3.11929 12 4.5V20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M8 20C8 21.1046 8.89543 22 10 22C11.1046 22 12 21.1046 12 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 7C12 8.65685 13.3431 10 15 10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M17 14C18.6569 14 20 15.3431 20 17C20 18.6569 18.6569 20 17 20C16.6494 20 16.3128 19.9398 16 19.8293",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M19.7361 15.6046C21.0757 14.9582 22 13.587 22 12C22 10.7883 21.4612 9.70251 20.6102 8.96898",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M20.5795 8.8882C20.8451 8.49109 21 8.01363 21 7.5C21 6.11929 19.8807 5 18.5 5C17.9371 5 17.4176 5.18604 16.9998 5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 4.5C12 3.11929 13.1193 2 14.5 2C15.8807 2 17 3.11929 17 4.5C17 4.88103 16.9148 5.24215 16.7623 5.56533",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M16 20C16 21.1046 15.1046 22 14 22C12.8954 22 12 21.1046 12 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},k_e=E.forwardRef(A_e);var N_e=k_e,R_e=Object.defineProperty,IF=Object.getOwnPropertySymbols,M_e=Object.prototype.hasOwnProperty,D_e=Object.prototype.propertyIsEnumerable,LF=(e,t,r)=>t in e?R_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h2=(e,t)=>{for(var r in t||(t={}))M_e.call(t,r)&&LF(e,r,t[r]);if(IF)for(var r of IF(t))D_e.call(t,r)&&LF(e,r,t[r]);return e};const O_e=(e,t)=>{const r=E.useContext(Vt),n=h2(h2({},r),e);return E.createElement("svg",h2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 13.8214 2.48697 15.5291 3.33782 17L2.5 21.5L7 20.6622C8.47087 21.513 10.1786 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},I_e=E.forwardRef(O_e);var L_e=I_e,P_e=Object.defineProperty,PF=Object.getOwnPropertySymbols,F_e=Object.prototype.hasOwnProperty,B_e=Object.prototype.propertyIsEnumerable,FF=(e,t,r)=>t in e?P_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p2=(e,t)=>{for(var r in t||(t={}))F_e.call(t,r)&&FF(e,r,t[r]);if(PF)for(var r of PF(t))B_e.call(t,r)&&FF(e,r,t[r]);return e};const z_e=(e,t)=>{const r=E.useContext(Vt),n=p2(p2({},r),e);return E.createElement("svg",p2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M9 12H12M15 12H12M12 12V9M12 12V15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 13.8214 2.48697 15.5291 3.33782 17L2.5 21.5L7 20.6622C8.47087 21.513 10.1786 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},j_e=E.forwardRef(z_e);var yre=j_e,q_e=Object.defineProperty,BF=Object.getOwnPropertySymbols,U_e=Object.prototype.hasOwnProperty,$_e=Object.prototype.propertyIsEnumerable,zF=(e,t,r)=>t in e?q_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m2=(e,t)=>{for(var r in t||(t={}))U_e.call(t,r)&&zF(e,r,t[r]);if(BF)for(var r of BF(t))$_e.call(t,r)&&zF(e,r,t[r]);return e};const H_e=(e,t)=>{const r=E.useContext(Vt),n=m2(m2({},r),e);return E.createElement("svg",m2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M5 13L9 17L19 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},G_e=E.forwardRef(H_e);var I5=G_e,V_e=Object.defineProperty,jF=Object.getOwnPropertySymbols,W_e=Object.prototype.hasOwnProperty,K_e=Object.prototype.propertyIsEnumerable,qF=(e,t,r)=>t in e?V_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g2=(e,t)=>{for(var r in t||(t={}))W_e.call(t,r)&&qF(e,r,t[r]);if(jF)for(var r of jF(t))K_e.call(t,r)&&qF(e,r,t[r]);return e};const X_e=(e,t)=>{const r=E.useContext(Vt),n=g2(g2({},r),e);return E.createElement("svg",g2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M20 20L15 15M15 15V19M15 15H19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M4 20L9 15M9 15V19M9 15H5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M20 4L15 9M15 9V5M15 9H19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M4 4L9 9M9 9V5M9 9H5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Y_e=E.forwardRef(X_e);var _re=Y_e,Z_e=Object.defineProperty,UF=Object.getOwnPropertySymbols,Q_e=Object.prototype.hasOwnProperty,J_e=Object.prototype.propertyIsEnumerable,$F=(e,t,r)=>t in e?Z_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v2=(e,t)=>{for(var r in t||(t={}))Q_e.call(t,r)&&$F(e,r,t[r]);if(UF)for(var r of UF(t))J_e.call(t,r)&&$F(e,r,t[r]);return e};const ewe=(e,t)=>{const r=E.useContext(Vt),n=v2(v2({},r),e);return E.createElement("svg",v2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M14 19L17 22L22 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M4 6V12C4 12 4 15 11 15C18 15 18 12 18 12V6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M11 3C18 3 18 6 18 6C18 6 18 9 11 9C4 9 4 6 4 6C4 6 4 3 11 3Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M11 21C4 21 4 18 4 18V12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},twe=E.forwardRef(ewe);var rwe=twe,nwe=Object.defineProperty,HF=Object.getOwnPropertySymbols,awe=Object.prototype.hasOwnProperty,iwe=Object.prototype.propertyIsEnumerable,GF=(e,t,r)=>t in e?nwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b2=(e,t)=>{for(var r in t||(t={}))awe.call(t,r)&&GF(e,r,t[r]);if(HF)for(var r of HF(t))iwe.call(t,r)&&GF(e,r,t[r]);return e};const swe=(e,t)=>{const r=E.useContext(Vt),n=b2(b2({},r),e);return E.createElement("svg",b2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M22 14V8.5M6 13V6C6 4.34315 7.34315 3 9 3H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M16.9922 4H19.9922M22.9922 4L19.9922 4M19.9922 4V1M19.9922 4V7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 21H6C3.79086 21 2 19.2091 2 17C2 14.7909 3.79086 13 6 13H17H18C15.7909 13 14 14.7909 14 17C14 19.2091 15.7909 21 18 21C20.2091 21 22 19.2091 22 17V14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},owe=E.forwardRef(swe);var VF=owe,lwe=Object.defineProperty,WF=Object.getOwnPropertySymbols,cwe=Object.prototype.hasOwnProperty,uwe=Object.prototype.propertyIsEnumerable,KF=(e,t,r)=>t in e?lwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x2=(e,t)=>{for(var r in t||(t={}))cwe.call(t,r)&&KF(e,r,t[r]);if(WF)for(var r of WF(t))uwe.call(t,r)&&KF(e,r,t[r]);return e};const dwe=(e,t)=>{const r=E.useContext(Vt),n=x2(x2({},r),e);return E.createElement("svg",x2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M20.5 20.5L22 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M15 18C15 19.6569 16.3431 21 18 21C18.8299 21 19.581 20.663 20.1241 20.1185C20.6654 19.5758 21 18.827 21 18C21 16.3431 19.6569 15 18 15C16.3431 15 15 16.3431 15 18Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M20 12V5.74853C20 5.5894 19.9368 5.43679 19.8243 5.32426L16.6757 2.17574C16.5632 2.06321 16.4106 2 16.2515 2H4.6C4.26863 2 4 2.26863 4 2.6V21.4C4 21.7314 4.26863 22 4.6 22H11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M16 2V5.4C16 5.73137 16.2686 6 16.6 6H20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},fwe=E.forwardRef(dwe);var hwe=fwe,pwe=Object.defineProperty,XF=Object.getOwnPropertySymbols,mwe=Object.prototype.hasOwnProperty,gwe=Object.prototype.propertyIsEnumerable,YF=(e,t,r)=>t in e?pwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y2=(e,t)=>{for(var r in t||(t={}))mwe.call(t,r)&&YF(e,r,t[r]);if(XF)for(var r of XF(t))gwe.call(t,r)&&YF(e,r,t[r]);return e};const vwe=(e,t)=>{const r=E.useContext(Vt),n=y2(y2({},r),e);return E.createElement("svg",y2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M6 20L18 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 4V16M12 16L15.5 12.5M12 16L8.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},bwe=E.forwardRef(vwe);var wre=bwe,xwe=Object.defineProperty,ZF=Object.getOwnPropertySymbols,ywe=Object.prototype.hasOwnProperty,_we=Object.prototype.propertyIsEnumerable,QF=(e,t,r)=>t in e?xwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_2=(e,t)=>{for(var r in t||(t={}))ywe.call(t,r)&&QF(e,r,t[r]);if(ZF)for(var r of ZF(t))_we.call(t,r)&&QF(e,r,t[r]);return e};const wwe=(e,t)=>{const r=E.useContext(Vt),n=_2(_2({},r),e);return E.createElement("svg",_2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M14.3632 5.65156L15.8431 4.17157C16.6242 3.39052 17.8905 3.39052 18.6716 4.17157L20.0858 5.58579C20.8668 6.36683 20.8668 7.63316 20.0858 8.41421L18.6058 9.8942M14.3632 5.65156L4.74749 15.2672C4.41542 15.5993 4.21079 16.0376 4.16947 16.5054L3.92738 19.2459C3.87261 19.8659 4.39148 20.3848 5.0115 20.33L7.75191 20.0879C8.21972 20.0466 8.65806 19.8419 8.99013 19.5099L18.6058 9.8942M14.3632 5.65156L18.6058 9.8942",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Ewe=E.forwardRef(wwe);var w2=Ewe,Swe=Object.defineProperty,JF=Object.getOwnPropertySymbols,Cwe=Object.prototype.hasOwnProperty,Twe=Object.prototype.propertyIsEnumerable,eB=(e,t,r)=>t in e?Swe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E2=(e,t)=>{for(var r in t||(t={}))Cwe.call(t,r)&&eB(e,r,t[r]);if(JF)for(var r of JF(t))Twe.call(t,r)&&eB(e,r,t[r]);return e};const Awe=(e,t)=>{const r=E.useContext(Vt),n=E2(E2({},r),e);return E.createElement("svg",E2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M3 21L12 21H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12.2218 5.82839L15.0503 2.99996L20 7.94971L17.1716 10.7781M12.2218 5.82839L6.61522 11.435C6.42769 11.6225 6.32233 11.8769 6.32233 12.1421L6.32233 16.6776L10.8579 16.6776C11.1231 16.6776 11.3774 16.5723 11.565 16.3847L17.1716 10.7781M12.2218 5.82839L17.1716 10.7781",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},kwe=E.forwardRef(Awe);var Nwe=kwe,Rwe=Object.defineProperty,tB=Object.getOwnPropertySymbols,Mwe=Object.prototype.hasOwnProperty,Dwe=Object.prototype.propertyIsEnumerable,rB=(e,t,r)=>t in e?Rwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S2=(e,t)=>{for(var r in t||(t={}))Mwe.call(t,r)&&rB(e,r,t[r]);if(tB)for(var r of tB(t))Dwe.call(t,r)&&rB(e,r,t[r]);return e};const Owe=(e,t)=>{const r=E.useContext(Vt),n=S2(S2({},r),e);return E.createElement("svg",S2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M4 21.4V2.6C4 2.26863 4.26863 2 4.6 2H16.2515C16.4106 2 16.5632 2.06321 16.6757 2.17574L19.8243 5.32426C19.9368 5.43679 20 5.5894 20 5.74853V21.4C20 21.7314 19.7314 22 19.4 22H4.6C4.26863 22 4 21.7314 4 21.4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M16 2V5.4C16 5.73137 16.2686 6 16.6 6H20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Iwe=E.forwardRef(Owe);var Lwe=Iwe,Pwe=Object.defineProperty,nB=Object.getOwnPropertySymbols,Fwe=Object.prototype.hasOwnProperty,Bwe=Object.prototype.propertyIsEnumerable,aB=(e,t,r)=>t in e?Pwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C2=(e,t)=>{for(var r in t||(t={}))Fwe.call(t,r)&&aB(e,r,t[r]);if(nB)for(var r of nB(t))Bwe.call(t,r)&&aB(e,r,t[r]);return e};const zwe=(e,t)=>{const r=E.useContext(Vt),n=C2(C2({},r),e);return E.createElement("svg",C2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M9 9L4 4M4 4V8M4 4H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M15 9L20 4M20 4V8M20 4H16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M9 15L4 20M4 20V16M4 20H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M15 15L20 20M20 20V16M20 20H16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},jwe=E.forwardRef(zwe);var Ere=jwe,qwe=Object.defineProperty,iB=Object.getOwnPropertySymbols,Uwe=Object.prototype.hasOwnProperty,$we=Object.prototype.propertyIsEnumerable,sB=(e,t,r)=>t in e?qwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T2=(e,t)=>{for(var r in t||(t={}))Uwe.call(t,r)&&sB(e,r,t[r]);if(iB)for(var r of iB(t))$we.call(t,r)&&sB(e,r,t[r]);return e};const Hwe=(e,t)=>{const r=E.useContext(Vt),n=T2(T2({},r),e);return E.createElement("svg",T2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M9 9C9 5.49997 14.5 5.5 14.5 9C14.5 11.5 12 10.9999 12 13.9999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 18.01L12.01 17.9989",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Gwe=E.forwardRef(Hwe);var Vwe=Gwe,Wwe=Object.defineProperty,oB=Object.getOwnPropertySymbols,Kwe=Object.prototype.hasOwnProperty,Xwe=Object.prototype.propertyIsEnumerable,lB=(e,t,r)=>t in e?Wwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A2=(e,t)=>{for(var r in t||(t={}))Kwe.call(t,r)&&lB(e,r,t[r]);if(oB)for(var r of oB(t))Xwe.call(t,r)&&lB(e,r,t[r]);return e};const Ywe=(e,t)=>{const r=E.useContext(Vt),n=A2(A2({},r),e);return E.createElement("svg",A2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M12 12C15.866 12 19 8.86599 19 5H5C5 8.86599 8.13401 12 12 12ZM12 12C15.866 12 19 15.134 19 19H5C5 15.134 8.13401 12 12 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M5 2L12 2L19 2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M5 22H12L19 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Zwe=E.forwardRef(Ywe);var Qwe=Zwe,Jwe=Object.defineProperty,cB=Object.getOwnPropertySymbols,e2e=Object.prototype.hasOwnProperty,t2e=Object.prototype.propertyIsEnumerable,uB=(e,t,r)=>t in e?Jwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k2=(e,t)=>{for(var r in t||(t={}))e2e.call(t,r)&&uB(e,r,t[r]);if(cB)for(var r of cB(t))t2e.call(t,r)&&uB(e,r,t[r]);return e};const r2e=(e,t)=>{const r=E.useContext(Vt),n=k2(k2({},r),e);return E.createElement("svg",k2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M3 5H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M3 12H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M3 19H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},n2e=E.forwardRef(r2e);var Sre=n2e,a2e=Object.defineProperty,dB=Object.getOwnPropertySymbols,i2e=Object.prototype.hasOwnProperty,s2e=Object.prototype.propertyIsEnumerable,fB=(e,t,r)=>t in e?a2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N2=(e,t)=>{for(var r in t||(t={}))i2e.call(t,r)&&fB(e,r,t[r]);if(dB)for(var r of dB(t))s2e.call(t,r)&&fB(e,r,t[r]);return e};const o2e=(e,t)=>{const r=E.useContext(Vt),n=N2(N2({},r),e);return E.createElement("svg",N2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 20.5C12.2761 20.5 12.5 20.2761 12.5 20C12.5 19.7239 12.2761 19.5 12 19.5C11.7239 19.5 11.5 19.7239 11.5 20C11.5 20.2761 11.7239 20.5 12 20.5Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 4.5C12.2761 4.5 12.5 4.27614 12.5 4C12.5 3.72386 12.2761 3.5 12 3.5C11.7239 3.5 11.5 3.72386 11.5 4C11.5 4.27614 11.7239 4.5 12 4.5Z",fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},l2e=E.forwardRef(o2e);var c2e=l2e,u2e=Object.defineProperty,hB=Object.getOwnPropertySymbols,d2e=Object.prototype.hasOwnProperty,f2e=Object.prototype.propertyIsEnumerable,pB=(e,t,r)=>t in e?u2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R2=(e,t)=>{for(var r in t||(t={}))d2e.call(t,r)&&pB(e,r,t[r]);if(hB)for(var r of hB(t))f2e.call(t,r)&&pB(e,r,t[r]);return e};const h2e=(e,t)=>{const r=E.useContext(Vt),n=R2(R2({},r),e);return E.createElement("svg",R2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M7 2L16.5 2L21 6.5V19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M3 20.5V6.5C3 5.67157 3.67157 5 4.5 5H14.2515C14.4106 5 14.5632 5.06321 14.6757 5.17574L17.8243 8.32426C17.9368 8.43679 18 8.5894 18 8.74853V20.5C18 21.3284 17.3284 22 16.5 22H4.5C3.67157 22 3 21.3284 3 20.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M14 5V8.4C14 8.73137 14.2686 9 14.6 9H18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},p2e=E.forwardRef(h2e);var m2e=p2e,g2e=Object.defineProperty,mB=Object.getOwnPropertySymbols,v2e=Object.prototype.hasOwnProperty,b2e=Object.prototype.propertyIsEnumerable,gB=(e,t,r)=>t in e?g2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M2=(e,t)=>{for(var r in t||(t={}))v2e.call(t,r)&&gB(e,r,t[r]);if(mB)for(var r of mB(t))b2e.call(t,r)&&gB(e,r,t[r]);return e};const x2e=(e,t)=>{const r=E.useContext(Vt),n=M2(M2({},r),e);return E.createElement("svg",M2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M1.99219 19H4.99219M7.99219 19H4.99219M4.99219 19V16M4.99219 19V22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M7 2L16.5 2L21 6.5V19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M11 22H16.5C17.3284 22 18 21.3284 18 20.5V8.74853C18 8.5894 17.9368 8.43679 17.8243 8.32426L14.6757 5.17574C14.5632 5.06321 14.4106 5 14.2515 5H4.5C3.67157 5 3 5.67157 3 6.5V13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M14 5V8.4C14 8.73137 14.2686 9 14.6 9H18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},y2e=E.forwardRef(x2e);var _2e=y2e,w2e=Object.defineProperty,vB=Object.getOwnPropertySymbols,E2e=Object.prototype.hasOwnProperty,S2e=Object.prototype.propertyIsEnumerable,bB=(e,t,r)=>t in e?w2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D2=(e,t)=>{for(var r in t||(t={}))E2e.call(t,r)&&bB(e,r,t[r]);if(vB)for(var r of vB(t))S2e.call(t,r)&&bB(e,r,t[r]);return e};const C2e=(e,t)=>{const r=E.useContext(Vt),n=D2(D2({},r),e);return E.createElement("svg",D2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},T2e=E.forwardRef(C2e);var A2e=T2e,k2e=Object.defineProperty,xB=Object.getOwnPropertySymbols,N2e=Object.prototype.hasOwnProperty,R2e=Object.prototype.propertyIsEnumerable,yB=(e,t,r)=>t in e?k2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O2=(e,t)=>{for(var r in t||(t={}))N2e.call(t,r)&&yB(e,r,t[r]);if(xB)for(var r of xB(t))R2e.call(t,r)&&yB(e,r,t[r]);return e};const M2e=(e,t)=>{const r=E.useContext(Vt),n=O2(O2({},r),e);return E.createElement("svg",O2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M9 6L15 12L9 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},D2e=E.forwardRef(M2e);var O2e=D2e,I2e=Object.defineProperty,_B=Object.getOwnPropertySymbols,L2e=Object.prototype.hasOwnProperty,P2e=Object.prototype.propertyIsEnumerable,wB=(e,t,r)=>t in e?I2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I2=(e,t)=>{for(var r in t||(t={}))L2e.call(t,r)&&wB(e,r,t[r]);if(_B)for(var r of _B(t))P2e.call(t,r)&&wB(e,r,t[r]);return e};const F2e=(e,t)=>{const r=E.useContext(Vt),n=I2(I2({},r),e);return E.createElement("svg",I2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M6 15L12 9L18 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},B2e=E.forwardRef(F2e);var z2e=B2e,j2e=Object.defineProperty,EB=Object.getOwnPropertySymbols,q2e=Object.prototype.hasOwnProperty,U2e=Object.prototype.propertyIsEnumerable,SB=(e,t,r)=>t in e?j2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L2=(e,t)=>{for(var r in t||(t={}))q2e.call(t,r)&&SB(e,r,t[r]);if(EB)for(var r of EB(t))U2e.call(t,r)&&SB(e,r,t[r]);return e};const $2e=(e,t)=>{const r=E.useContext(Vt),n=L2(L2({},r),e);return E.createElement("svg",L2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("rect",{width:7,height:5,rx:.6,transform:"matrix(1 0 0 -1 3 22)",stroke:"currentColor",strokeWidth:1.5}),E.createElement("rect",{width:7,height:5,rx:.6,transform:"matrix(1 0 0 -1 8.5 7)",stroke:"currentColor",strokeWidth:1.5}),E.createElement("rect",{width:7,height:5,rx:.6,transform:"matrix(1 0 0 -1 14 22)",stroke:"currentColor",strokeWidth:1.5}),E.createElement("path",{d:"M6.5 17V13.5C6.5 12.3954 7.39543 11.5 8.5 11.5H15.5C16.6046 11.5 17.5 12.3954 17.5 13.5V17",stroke:"currentColor"}),E.createElement("path",{d:"M12 11.5V7",stroke:"currentColor"}))},H2e=E.forwardRef($2e);var G2e=H2e,V2e=Object.defineProperty,CB=Object.getOwnPropertySymbols,W2e=Object.prototype.hasOwnProperty,K2e=Object.prototype.propertyIsEnumerable,TB=(e,t,r)=>t in e?V2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P2=(e,t)=>{for(var r in t||(t={}))W2e.call(t,r)&&TB(e,r,t[r]);if(CB)for(var r of CB(t))K2e.call(t,r)&&TB(e,r,t[r]);return e};const X2e=(e,t)=>{const r=E.useContext(Vt),n=P2(P2({},r),e);return E.createElement("svg",P2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M12 21V7C12 5.89543 12.8954 5 14 5H21.4C21.7314 5 22 5.26863 22 5.6V18.7143",stroke:"currentColor",strokeLinecap:"round"}),E.createElement("path",{d:"M12 21V7C12 5.89543 11.1046 5 10 5H2.6C2.26863 5 2 5.26863 2 5.6V18.7143",stroke:"currentColor",strokeLinecap:"round"}),E.createElement("path",{d:"M14 19L22 19",stroke:"currentColor",strokeLinecap:"round"}),E.createElement("path",{d:"M10 19L2 19",stroke:"currentColor",strokeLinecap:"round"}),E.createElement("path",{d:"M12 21C12 19.8954 12.8954 19 14 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 21C12 19.8954 11.1046 19 10 19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},Y2e=E.forwardRef(X2e);var Z2e=Y2e,Q2e=Object.defineProperty,AB=Object.getOwnPropertySymbols,J2e=Object.prototype.hasOwnProperty,eEe=Object.prototype.propertyIsEnumerable,kB=(e,t,r)=>t in e?Q2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,F2=(e,t)=>{for(var r in t||(t={}))J2e.call(t,r)&&kB(e,r,t[r]);if(AB)for(var r of AB(t))eEe.call(t,r)&&kB(e,r,t[r]);return e};const tEe=(e,t)=>{const r=E.useContext(Vt),n=F2(F2({},r),e);return E.createElement("svg",F2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M4 21.4V2.6C4 2.26863 4.26863 2 4.6 2H16.2515C16.4106 2 16.5632 2.06321 16.6757 2.17574L19.8243 5.32426C19.9368 5.43679 20 5.5894 20 5.74853V21.4C20 21.7314 19.7314 22 19.4 22H4.6C4.26863 22 4 21.7314 4 21.4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M8 10L16 10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M8 18L16 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M8 14L12 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M16 2V5.4C16 5.73137 16.2686 6 16.6 6H20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},rEe=E.forwardRef(tEe);var nEe=rEe,aEe=Object.defineProperty,NB=Object.getOwnPropertySymbols,iEe=Object.prototype.hasOwnProperty,sEe=Object.prototype.propertyIsEnumerable,RB=(e,t,r)=>t in e?aEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B2=(e,t)=>{for(var r in t||(t={}))iEe.call(t,r)&&RB(e,r,t[r]);if(NB)for(var r of NB(t))sEe.call(t,r)&&RB(e,r,t[r]);return e};const oEe=(e,t)=>{const r=E.useContext(Vt),n=B2(B2({},r),e);return E.createElement("svg",B2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M6.90588 4.53682C6.50592 4.2998 6 4.58808 6 5.05299V18.947C6 19.4119 6.50592 19.7002 6.90588 19.4632L18.629 12.5162C19.0211 12.2838 19.0211 11.7162 18.629 11.4838L6.90588 4.53682Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},lEe=E.forwardRef(oEe);var Cre=lEe,cEe=Object.defineProperty,MB=Object.getOwnPropertySymbols,uEe=Object.prototype.hasOwnProperty,dEe=Object.prototype.propertyIsEnumerable,DB=(e,t,r)=>t in e?cEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z2=(e,t)=>{for(var r in t||(t={}))uEe.call(t,r)&&DB(e,r,t[r]);if(MB)for(var r of MB(t))dEe.call(t,r)&&DB(e,r,t[r]);return e};const fEe=(e,t)=>{const r=E.useContext(Vt),n=z2(z2({},r),e);return E.createElement("svg",z2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M6 12H12M18 12H12M12 12V6M12 12V18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},hEe=E.forwardRef(fEe);var Tre=hEe,pEe=Object.defineProperty,OB=Object.getOwnPropertySymbols,mEe=Object.prototype.hasOwnProperty,gEe=Object.prototype.propertyIsEnumerable,IB=(e,t,r)=>t in e?pEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j2=(e,t)=>{for(var r in t||(t={}))mEe.call(t,r)&&IB(e,r,t[r]);if(OB)for(var r of OB(t))gEe.call(t,r)&&IB(e,r,t[r]);return e};const vEe=(e,t)=>{const r=E.useContext(Vt),n=j2(j2({},r),e);return E.createElement("svg",j2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M17 17L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},bEe=E.forwardRef(vEe);var ub=bEe,xEe=Object.defineProperty,LB=Object.getOwnPropertySymbols,yEe=Object.prototype.hasOwnProperty,_Ee=Object.prototype.propertyIsEnumerable,PB=(e,t,r)=>t in e?xEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q2=(e,t)=>{for(var r in t||(t={}))yEe.call(t,r)&&PB(e,r,t[r]);if(LB)for(var r of LB(t))_Ee.call(t,r)&&PB(e,r,t[r]);return e};const wEe=(e,t)=>{const r=E.useContext(Vt),n=q2(q2({},r),e);return E.createElement("svg",q2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M19.6224 10.3954L18.5247 7.7448L20 6L18 4L16.2647 5.48295L13.5578 4.36974L12.9353 2H10.981L10.3491 4.40113L7.70441 5.51596L6 4L4 6L5.45337 7.78885L4.3725 10.4463L2 11V13L4.40111 13.6555L5.51575 16.2997L4 18L6 20L7.79116 18.5403L10.397 19.6123L11 22H13L13.6045 19.6132L16.2551 18.5155C16.6969 18.8313 18 20 18 20L20 18L18.5159 16.2494L19.6139 13.598L21.9999 12.9772L22 11L19.6224 10.3954Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},EEe=E.forwardRef(wEe);var Nm=EEe,SEe=Object.defineProperty,FB=Object.getOwnPropertySymbols,CEe=Object.prototype.hasOwnProperty,TEe=Object.prototype.propertyIsEnumerable,BB=(e,t,r)=>t in e?SEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,U2=(e,t)=>{for(var r in t||(t={}))CEe.call(t,r)&&BB(e,r,t[r]);if(FB)for(var r of FB(t))TEe.call(t,r)&&BB(e,r,t[r]);return e};const AEe=(e,t)=>{const r=E.useContext(Vt),n=U2(U2({},r),e);return E.createElement("svg",U2({width:"1.5em",strokeWidth:1.5,height:"1.5em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M19 21L5 21C3.89543 21 3 20.1046 3 19L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 19C21 20.1046 20.1046 21 19 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M9.5 21V3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M5.5 10L7.25 12L5.5 14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},kEe=E.forwardRef(AEe);var NEe=kEe,REe=Object.defineProperty,zB=Object.getOwnPropertySymbols,MEe=Object.prototype.hasOwnProperty,DEe=Object.prototype.propertyIsEnumerable,jB=(e,t,r)=>t in e?REe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$2=(e,t)=>{for(var r in t||(t={}))MEe.call(t,r)&&jB(e,r,t[r]);if(zB)for(var r of zB(t))DEe.call(t,r)&&jB(e,r,t[r]);return e};const OEe=(e,t)=>{const r=E.useContext(Vt),n=$2($2({},r),e);return E.createElement("svg",$2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M12 2V6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 18V22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M22 12H18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M6 12H2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M4.92896 4.92896L7.75738 7.75738",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M16.2427 16.2427L19.0711 19.0711",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M19.071 4.92896L16.2426 7.75738",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M7.75732 16.2427L4.9289 19.0711",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},IEe=E.forwardRef(OEe);var Jf=IEe,LEe=Object.defineProperty,qB=Object.getOwnPropertySymbols,PEe=Object.prototype.hasOwnProperty,FEe=Object.prototype.propertyIsEnumerable,UB=(e,t,r)=>t in e?LEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H2=(e,t)=>{for(var r in t||(t={}))PEe.call(t,r)&&UB(e,r,t[r]);if(qB)for(var r of qB(t))FEe.call(t,r)&&UB(e,r,t[r]);return e};const BEe=(e,t)=>{const r=E.useContext(Vt),n=H2(H2({},r),e);return E.createElement("svg",H2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M3 20.4V3.6C3 3.26863 3.26863 3 3.6 3H20.4C20.7314 3 21 3.26863 21 3.6V20.4C21 20.7314 20.7314 21 20.4 21H3.6C3.26863 21 3 20.7314 3 20.4Z",stroke:"currentColor"}),E.createElement("path",{d:"M3 16.5H21",stroke:"currentColor"}),E.createElement("path",{d:"M3 12H21",stroke:"currentColor"}),E.createElement("path",{d:"M21 7.5H3",stroke:"currentColor"}),E.createElement("path",{d:"M12 21V3",stroke:"currentColor"}))},zEe=E.forwardRef(BEe);var jEe=zEe,qEe=Object.defineProperty,$B=Object.getOwnPropertySymbols,UEe=Object.prototype.hasOwnProperty,$Ee=Object.prototype.propertyIsEnumerable,HB=(e,t,r)=>t in e?qEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G2=(e,t)=>{for(var r in t||(t={}))UEe.call(t,r)&&HB(e,r,t[r]);if($B)for(var r of $B(t))$Ee.call(t,r)&&HB(e,r,t[r]);return e};const HEe=(e,t)=>{const r=E.useContext(Vt),n=G2(G2({},r),e);return E.createElement("svg",G2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M21 3V21H3V3H21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M3 16.5H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M3 12H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M3 7.5H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M16.5 3V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 3V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M7.5 3V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},GEe=E.forwardRef(HEe);var VEe=GEe,WEe=Object.defineProperty,GB=Object.getOwnPropertySymbols,KEe=Object.prototype.hasOwnProperty,XEe=Object.prototype.propertyIsEnumerable,VB=(e,t,r)=>t in e?WEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,V2=(e,t)=>{for(var r in t||(t={}))KEe.call(t,r)&&VB(e,r,t[r]);if(GB)for(var r of GB(t))XEe.call(t,r)&&VB(e,r,t[r]);return e};const YEe=(e,t)=>{const r=E.useContext(Vt),n=V2(V2({},r),e);return E.createElement("svg",V2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M10.0503 10.6066L2.97923 17.6777C2.19818 18.4587 2.19818 19.7251 2.97923 20.5061V20.5061C3.76027 21.2872 5.0266 21.2872 5.80765 20.5061L12.8787 13.4351",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M17.1927 13.7994L21.071 17.6777C21.8521 18.4587 21.8521 19.7251 21.071 20.5061V20.5061C20.29 21.2872 19.0236 21.2872 18.2426 20.5061L12.0341 14.2977",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M6.73267 5.90381L4.61135 6.61092L2.49003 3.07539L3.90424 1.66117L7.43978 3.78249L6.73267 5.90381ZM6.73267 5.90381L9.5629 8.73404",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M10.0503 10.6066C9.2065 8.45359 9.37147 5.62861 11.111 3.8891C12.8505 2.14958 16.0607 1.76778 17.8285 2.82844L14.7878 5.86911L14.5052 8.98015L17.6162 8.69754L20.6569 5.65686C21.7176 7.42463 21.3358 10.6349 19.5963 12.3744C17.8567 14.1139 15.0318 14.2789 12.8788 13.435",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},ZEe=E.forwardRef(YEe);var Are=ZEe,QEe=Object.defineProperty,WB=Object.getOwnPropertySymbols,JEe=Object.prototype.hasOwnProperty,eSe=Object.prototype.propertyIsEnumerable,KB=(e,t,r)=>t in e?QEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,W2=(e,t)=>{for(var r in t||(t={}))JEe.call(t,r)&&KB(e,r,t[r]);if(WB)for(var r of WB(t))eSe.call(t,r)&&KB(e,r,t[r]);return e};const tSe=(e,t)=>{const r=E.useContext(Vt),n=W2(W2({},r),e);return E.createElement("svg",W2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",strokeWidth:1.5,fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M20 9L18.005 20.3463C17.8369 21.3026 17.0062 22 16.0353 22H7.96474C6.99379 22 6.1631 21.3026 5.99496 20.3463L4 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M21 6L15.375 6M3 6L8.625 6M8.625 6V4C8.625 2.89543 9.52043 2 10.625 2H13.375C14.4796 2 15.375 2.89543 15.375 4V6M8.625 6L15.375 6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},rSe=E.forwardRef(tSe);var kre=rSe,nSe=Object.defineProperty,XB=Object.getOwnPropertySymbols,aSe=Object.prototype.hasOwnProperty,iSe=Object.prototype.propertyIsEnumerable,YB=(e,t,r)=>t in e?nSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,K2=(e,t)=>{for(var r in t||(t={}))aSe.call(t,r)&&YB(e,r,t[r]);if(XB)for(var r of XB(t))iSe.call(t,r)&&YB(e,r,t[r]);return e};const sSe=(e,t)=>{const r=E.useContext(Vt),n=K2(K2({},r),e);return E.createElement("svg",K2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M6 20L18 20",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),E.createElement("path",{d:"M12 16V4M12 4L15.5 7.5M12 4L8.5 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},oSe=E.forwardRef(sSe);var lSe=oSe,cSe=Object.defineProperty,ZB=Object.getOwnPropertySymbols,uSe=Object.prototype.hasOwnProperty,dSe=Object.prototype.propertyIsEnumerable,QB=(e,t,r)=>t in e?cSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X2=(e,t)=>{for(var r in t||(t={}))uSe.call(t,r)&&QB(e,r,t[r]);if(ZB)for(var r of ZB(t))dSe.call(t,r)&&QB(e,r,t[r]);return e};const fSe=(e,t)=>{const r=E.useContext(Vt),n=X2(X2({},r),e);return E.createElement("svg",X2({width:"1.5em",height:"1.5em",strokeWidth:1.5,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{d:"M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},hSe=E.forwardRef(fSe);var db=hSe,pSe=Object.defineProperty,JB=Object.getOwnPropertySymbols,mSe=Object.prototype.hasOwnProperty,gSe=Object.prototype.propertyIsEnumerable,ez=(e,t,r)=>t in e?pSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Y2=(e,t)=>{for(var r in t||(t={}))mSe.call(t,r)&&ez(e,r,t[r]);if(JB)for(var r of JB(t))gSe.call(t,r)&&ez(e,r,t[r]);return e};const vSe=(e,t)=>{const r=E.useContext(Vt),n=Y2(Y2({},r),e);return E.createElement("svg",Y2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.937 1.25 22.75 6.06293 22.75 12C22.75 17.937 17.937 22.75 12 22.75C10.1437 22.75 8.39536 22.2788 6.87016 21.4493L2.63727 22.2373C2.39422 22.2826 2.14448 22.2051 1.96967 22.0303C1.79485 21.8555 1.71742 21.6058 1.76267 21.3627L2.55076 17.1298C1.72113 15.6046 1.25 13.8563 1.25 12ZM7.25 10C7.25 9.58579 7.58579 9.25 8 9.25H12H16C16.4142 9.25 16.75 9.58579 16.75 10C16.75 10.4142 16.4142 10.75 16 10.75H12H8C7.58579 10.75 7.25 10.4142 7.25 10ZM8 13.25C7.58579 13.25 7.25 13.5858 7.25 14C7.25 14.4142 7.58579 14.75 8 14.75H10H12C12.4142 14.75 12.75 14.4142 12.75 14C12.75 13.5858 12.4142 13.25 12 13.25H10H8Z",fill:"currentColor"}))},bSe=E.forwardRef(vSe);var xSe=bSe,ySe=Object.defineProperty,tz=Object.getOwnPropertySymbols,_Se=Object.prototype.hasOwnProperty,wSe=Object.prototype.propertyIsEnumerable,rz=(e,t,r)=>t in e?ySe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Z2=(e,t)=>{for(var r in t||(t={}))_Se.call(t,r)&&rz(e,r,t[r]);if(tz)for(var r of tz(t))wSe.call(t,r)&&rz(e,r,t[r]);return e};const ESe=(e,t)=>{const r=E.useContext(Vt),n=Z2(Z2({},r),e);return E.createElement("svg",Z2({width:"1.5em",height:"1.5em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",ref:t},n),E.createElement("rect",{width:7,height:5,rx:.6,transform:"matrix(0 -1 -1 0 22 21)",fill:"currentColor",stroke:"currentColor",strokeWidth:1.5}),E.createElement("rect",{width:7,height:5,rx:.6,transform:"matrix(0 -1 -1 0 7 15.5)",fill:"currentColor",stroke:"currentColor",strokeWidth:1.5}),E.createElement("rect",{width:7,height:5,rx:.6,transform:"matrix(0 -1 -1 0 22 10)",fill:"currentColor",stroke:"currentColor",strokeWidth:1.5}),E.createElement("path",{d:"M17 17.5H13.5C12.3954 17.5 11.5 16.6046 11.5 15.5V8.5C11.5 7.39543 12.3954 6.5 13.5 6.5H17",stroke:"currentColor"}),E.createElement("path",{d:"M11.5 12H7",stroke:"currentColor"}))},SSe=E.forwardRef(ESe);var CSe=SSe,gx="Collapsible",[TSe,fst]=zl(gx),[ASe,UD]=TSe(gx),Nre=E.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:a,disabled:i,onOpenChange:s,...o}=e,[l,c]=y0({prop:n,defaultProp:a??!1,onChange:s,caller:gx});return g.jsx(ASe,{scope:r,disabled:i,contentId:Ic(),open:l,onOpenToggle:E.useCallback(()=>c(u=>!u),[c]),children:g.jsx(Mr.div,{"data-state":HD(l),"data-disabled":i?"":void 0,...o,ref:t})})});Nre.displayName=gx;var Rre="CollapsibleTrigger",Mre=E.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,a=UD(Rre,r);return g.jsx(Mr.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":HD(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...n,ref:t,onClick:$t(e.onClick,a.onOpenToggle)})});Mre.displayName=Rre;var $D="CollapsibleContent",Dre=E.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=UD($D,e.__scopeCollapsible);return g.jsx(vs,{present:r||a.open,children:({present:i})=>g.jsx(kSe,{...n,ref:t,present:i})})});Dre.displayName=$D;var kSe=E.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:a,...i}=e,s=UD($D,r),[o,l]=E.useState(n),c=E.useRef(null),u=pn(t,c),f=E.useRef(0),p=f.current,m=E.useRef(0),b=m.current,v=s.open||o,y=E.useRef(v),_=E.useRef(void 0);return E.useEffect(()=>{const S=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(S)},[]),Cl(()=>{const S=c.current;if(S){_.current=_.current||{transitionDuration:S.style.transitionDuration,animationName:S.style.animationName},S.style.transitionDuration="0s",S.style.animationName="none";const C=S.getBoundingClientRect();f.current=C.height,m.current=C.width,y.current||(S.style.transitionDuration=_.current.transitionDuration,S.style.animationName=_.current.animationName),l(n)}},[s.open,n]),g.jsx(Mr.div,{"data-state":HD(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v,...i,ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&a})});function HD(e){return e?"open":"closed"}var NSe=Nre;function RSe({...e}){return g.jsx(NSe,{"data-slot":"collapsible",...e})}function MSe({...e}){return g.jsx(Mre,{"data-slot":"collapsible-trigger",...e})}function DSe({...e}){return g.jsx(Dre,{"data-slot":"collapsible-content",...e})}function OSe({items:e}){const t=Oo();return g.jsx(jye,{children:g.jsx(vre,{children:e.map(r=>g.jsx(E.Fragment,{children:r.items?g.jsx(RSe,{asChild:!0,defaultOpen:r.isActive,className:"group/collapsible",children:g.jsxs(D5,{children:[g.jsx(MSe,{asChild:!0,children:g.jsxs(O5,{tooltip:r.title,isActive:r.isActive,className:"h-12 [&[data-active=true]]:!bg-gray-100 [&[data-active=true]]:!text-gray-700 hover:!bg-gray-100 hover:!text-gray-600 text-gray-600",children:[r.icon&&g.jsx(r.icon,{className:"!size-5"}),g.jsx("span",{className:"text-sm font-medium",children:r.title}),g.jsx(nx,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),g.jsx(DSe,{children:g.jsx(Uye,{children:r.items?.map(n=>g.jsx($ye,{children:g.jsx(Hye,{asChild:!0,children:g.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),t(n.url)},children:g.jsx("span",{className:"text-sm font-medium text-gray-900",children:n.title})})})},n.title))})})]})}):g.jsx(D5,{children:g.jsx(O5,{asChild:!0,tooltip:r.title,isActive:r.isActive,className:"h-12 [&[data-active=true]]:!bg-gray-100 [&[data-active=true]]:!text-gray-700 hover:!bg-gray-100 hover:!text-gray-600 text-gray-600 [&>span:last-child]:truncate",children:g.jsxs("a",{href:"#",onClick:n=>{n.preventDefault(),t(r.url)},children:[r.icon&&g.jsx(r.icon,{className:"!size-5"}),g.jsx("span",{className:"text-sm font-medium",children:r.title})]})})})},r.title))})})}function ISe({teams:e}){const[t]=E.useState(e[0]),{toggleSidebar:r,state:n}=g0();return t?g.jsx(vre,{children:g.jsx(D5,{children:g.jsxs(O5,{size:"lg",className:"hover:bg-transparent hover:cursor-default hover:text-inherit active:bg-transparent active:text-gray-900",children:[g.jsx(t.logo,{className:"rounded-md size-8"}),g.jsxs("div",{className:"grid flex-1 text-sm leading-tight text-left",children:[g.jsx("span",{className:"font-medium truncate",children:t.name}),g.jsx("span",{className:"text-sm truncate",children:t.plan})]}),g.jsxs(mt,{variant:"ghost",size:"icon",className:ut("ml-auto cursor-pointer size-6"),onClick:a=>{a.stopPropagation(),r()},children:[n==="expanded"&&g.jsx(sve,{className:"text-gray-500 size-6",strokeWidth:1.5}),g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})]})})}):null}const LSe="/static/logo.svg",PSe="0.3.5",Q2={version:PSe},nz={teams:[{name:"Aitomatic",logo:()=>g.jsx("img",{src:LSe,alt:"Aitomatic",className:"rounded-md size-8"}),plan:"Dana Agent Studio"}],navMain:[{title:"Dana Expert Agents",url:"/agents",icon:E_e},{title:"Library",url:"/library",icon:xre}]};function FSe({...e}){const t=Ks(),{state:r}=g0(),n=E.useMemo(()=>nz.navMain.map(a=>({...a,isActive:t.pathname===a.url})),[t.pathname]);return g.jsxs(Oye,{collapsible:"icon",...e,children:[g.jsx(Fye,{children:g.jsx(ISe,{teams:nz.teams})}),g.jsx(zye,{className:"flex-1",children:g.jsx(OSe,{items:n})}),g.jsx(Bye,{className:"flex p-4 border-t",children:g.jsxs(To,{children:[g.jsx(Ao,{asChild:!0,children:g.jsx("span",{className:"text-sm text-muted-foreground",children:r==="collapsed"?`${Q2.version}`:`Version-${Q2.version}`})}),g.jsxs(ko,{side:"right",children:["Version ",Q2.version]})]})}),g.jsx(Lye,{})]})}const az=e=>{let t;const r=new Set,n=(c,u)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const p=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),r.forEach(m=>m(t,p))}},a=()=>t,o={setState:n,getState:a,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c))},l=t=e(n,a,o);return o},BSe=(e=>e?az(e):az),zSe=e=>e;function jSe(e,t=zSe){const r=ye.useSyncExternalStore(e.subscribe,ye.useCallback(()=>t(e.getState()),[e,t]),ye.useCallback(()=>t(e.getInitialState()),[e,t]));return ye.useDebugValue(r),r}const iz=e=>{const t=BSe(e),r=n=>jSe(t,n);return Object.assign(r,t),r},Ys=(e=>e?iz(e):iz);function Ore(e,t){return function(){return e.apply(t,arguments)}}const{toString:qSe}=Object.prototype,{getPrototypeOf:GD}=Object,{iterator:vx,toStringTag:Ire}=Symbol,bx=(e=>t=>{const r=qSe.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Zs=e=>(e=e.toLowerCase(),t=>bx(t)===e),xx=e=>t=>typeof t===e,{isArray:E0}=Array,Wp=xx("undefined");function Rm(e){return e!==null&&!Wp(e)&&e.constructor!==null&&!Wp(e.constructor)&&ni(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Lre=Zs("ArrayBuffer");function USe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Lre(e.buffer),t}const $Se=xx("string"),ni=xx("function"),Pre=xx("number"),Mm=e=>e!==null&&typeof e=="object",HSe=e=>e===!0||e===!1,U1=e=>{if(bx(e)!=="object")return!1;const t=GD(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ire in e)&&!(vx in e)},GSe=e=>{if(!Mm(e)||Rm(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},VSe=Zs("Date"),WSe=Zs("File"),KSe=Zs("Blob"),XSe=Zs("FileList"),YSe=e=>Mm(e)&&ni(e.pipe),ZSe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ni(e.append)&&((t=bx(e))==="formdata"||t==="object"&&ni(e.toString)&&e.toString()==="[object FormData]"))},QSe=Zs("URLSearchParams"),[JSe,eCe,tCe,rCe]=["ReadableStream","Request","Response","Headers"].map(Zs),nCe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Dm(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),E0(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{if(Rm(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let o;for(n=0;n<s;n++)o=i[n],t.call(null,e[o],o,e)}}function Fre(e,t){if(Rm(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const Iu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bre=e=>!Wp(e)&&e!==Iu;function L5(){const{caseless:e}=Bre(this)&&this||{},t={},r=(n,a)=>{const i=e&&Fre(t,a)||a;U1(t[i])&&U1(n)?t[i]=L5(t[i],n):U1(n)?t[i]=L5({},n):E0(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&Dm(arguments[n],r);return t}const aCe=(e,t,r,{allOwnKeys:n}={})=>(Dm(t,(a,i)=>{r&&ni(a)?e[i]=Ore(a,r):e[i]=a},{allOwnKeys:n}),e),iCe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),sCe=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},oCe=(e,t,r,n)=>{let a,i,s;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!n||n(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=r!==!1&&GD(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},lCe=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},cCe=e=>{if(!e)return null;if(E0(e))return e;let t=e.length;if(!Pre(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},uCe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&GD(Uint8Array)),dCe=(e,t)=>{const n=(e&&e[vx]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},fCe=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},hCe=Zs("HTMLFormElement"),pCe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),sz=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),mCe=Zs("RegExp"),zre=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Dm(r,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(n[i]=s||a)}),Object.defineProperties(e,n)},gCe=e=>{zre(e,(t,r)=>{if(ni(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ni(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},vCe=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return E0(e)?n(e):n(String(e).split(t)),r},bCe=()=>{},xCe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yCe(e){return!!(e&&ni(e.append)&&e[Ire]==="FormData"&&e[vx])}const _Ce=e=>{const t=new Array(10),r=(n,a)=>{if(Mm(n)){if(t.indexOf(n)>=0)return;if(Rm(n))return n;if(!("toJSON"in n)){t[a]=n;const i=E0(n)?[]:{};return Dm(n,(s,o)=>{const l=r(s,a+1);!Wp(l)&&(i[o]=l)}),t[a]=void 0,i}}return n};return r(e,0)},wCe=Zs("AsyncFunction"),ECe=e=>e&&(Mm(e)||ni(e))&&ni(e.then)&&ni(e.catch),jre=((e,t)=>e?setImmediate:t?((r,n)=>(Iu.addEventListener("message",({source:a,data:i})=>{a===Iu&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),Iu.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ni(Iu.postMessage)),SCe=typeof queueMicrotask<"u"?queueMicrotask.bind(Iu):typeof process<"u"&&process.nextTick||jre,CCe=e=>e!=null&&ni(e[vx]),He={isArray:E0,isArrayBuffer:Lre,isBuffer:Rm,isFormData:ZSe,isArrayBufferView:USe,isString:$Se,isNumber:Pre,isBoolean:HSe,isObject:Mm,isPlainObject:U1,isEmptyObject:GSe,isReadableStream:JSe,isRequest:eCe,isResponse:tCe,isHeaders:rCe,isUndefined:Wp,isDate:VSe,isFile:WSe,isBlob:KSe,isRegExp:mCe,isFunction:ni,isStream:YSe,isURLSearchParams:QSe,isTypedArray:uCe,isFileList:XSe,forEach:Dm,merge:L5,extend:aCe,trim:nCe,stripBOM:iCe,inherits:sCe,toFlatObject:oCe,kindOf:bx,kindOfTest:Zs,endsWith:lCe,toArray:cCe,forEachEntry:dCe,matchAll:fCe,isHTMLForm:hCe,hasOwnProperty:sz,hasOwnProp:sz,reduceDescriptors:zre,freezeMethods:gCe,toObjectSet:vCe,toCamelCase:pCe,noop:bCe,toFiniteNumber:xCe,findKey:Fre,global:Iu,isContextDefined:Bre,isSpecCompliantForm:yCe,toJSONObject:_Ce,isAsyncFn:wCe,isThenable:ECe,setImmediate:jre,asap:SCe,isIterable:CCe};function Zt(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}He.inherits(Zt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:He.toJSONObject(this.config),code:this.code,status:this.status}}});const qre=Zt.prototype,Ure={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ure[e]={value:e}});Object.defineProperties(Zt,Ure);Object.defineProperty(qre,"isAxiosError",{value:!0});Zt.from=(e,t,r,n,a,i)=>{const s=Object.create(qre);return He.toFlatObject(e,s,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),Zt.call(s,e.message,t,r,n,a),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const TCe=null;function P5(e){return He.isPlainObject(e)||He.isArray(e)}function $re(e){return He.endsWith(e,"[]")?e.slice(0,-2):e}function oz(e,t,r){return e?e.concat(t).map(function(a,i){return a=$re(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function ACe(e){return He.isArray(e)&&!e.some(P5)}const kCe=He.toFlatObject(He,{},null,function(t){return/^is[A-Z]/.test(t)});function yx(e,t,r){if(!He.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=He.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!He.isUndefined(y[v])});const n=r.metaTokens,a=r.visitor||u,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&He.isSpecCompliantForm(t);if(!He.isFunction(a))throw new TypeError("visitor must be a function");function c(b){if(b===null)return"";if(He.isDate(b))return b.toISOString();if(He.isBoolean(b))return b.toString();if(!l&&He.isBlob(b))throw new Zt("Blob is not supported. Use a Buffer instead.");return He.isArrayBuffer(b)||He.isTypedArray(b)?l&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function u(b,v,y){let _=b;if(b&&!y&&typeof b=="object"){if(He.endsWith(v,"{}"))v=n?v:v.slice(0,-2),b=JSON.stringify(b);else if(He.isArray(b)&&ACe(b)||(He.isFileList(b)||He.endsWith(v,"[]"))&&(_=He.toArray(b)))return v=$re(v),_.forEach(function(C,T){!(He.isUndefined(C)||C===null)&&t.append(s===!0?oz([v],T,i):s===null?v:v+"[]",c(C))}),!1}return P5(b)?!0:(t.append(oz(y,v,i),c(b)),!1)}const f=[],p=Object.assign(kCe,{defaultVisitor:u,convertValue:c,isVisitable:P5});function m(b,v){if(!He.isUndefined(b)){if(f.indexOf(b)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(b),He.forEach(b,function(_,S){(!(He.isUndefined(_)||_===null)&&a.call(t,_,He.isString(S)?S.trim():S,v,p))===!0&&m(_,v?v.concat(S):[S])}),f.pop()}}if(!He.isObject(e))throw new TypeError("data must be an object");return m(e),t}function lz(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function VD(e,t){this._pairs=[],e&&yx(e,this,t)}const Hre=VD.prototype;Hre.append=function(t,r){this._pairs.push([t,r])};Hre.toString=function(t){const r=t?function(n){return t.call(this,n,lz)}:lz;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function NCe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Gre(e,t,r){if(!t)return e;const n=r&&r.encode||NCe;He.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let i;if(a?i=a(t,r):i=He.isURLSearchParams(t)?t.toString():new VD(t,r).toString(n),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class cz{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){He.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Vre={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},RCe=typeof URLSearchParams<"u"?URLSearchParams:VD,MCe=typeof FormData<"u"?FormData:null,DCe=typeof Blob<"u"?Blob:null,OCe={isBrowser:!0,classes:{URLSearchParams:RCe,FormData:MCe,Blob:DCe},protocols:["http","https","file","blob","url","data"]},WD=typeof window<"u"&&typeof document<"u",F5=typeof navigator=="object"&&navigator||void 0,ICe=WD&&(!F5||["ReactNative","NativeScript","NS"].indexOf(F5.product)<0),LCe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",PCe=WD&&window.location.href||"http://localhost",FCe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:WD,hasStandardBrowserEnv:ICe,hasStandardBrowserWebWorkerEnv:LCe,navigator:F5,origin:PCe},Symbol.toStringTag,{value:"Module"})),xa={...FCe,...OCe};function BCe(e,t){return yx(e,new xa.classes.URLSearchParams,{visitor:function(r,n,a,i){return xa.isNode&&He.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function zCe(e){return He.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function jCe(e){const t={},r=Object.keys(e);let n;const a=r.length;let i;for(n=0;n<a;n++)i=r[n],t[i]=e[i];return t}function Wre(e){function t(r,n,a,i){let s=r[i++];if(s==="__proto__")return!0;const o=Number.isFinite(+s),l=i>=r.length;return s=!s&&He.isArray(a)?a.length:s,l?(He.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!o):((!a[s]||!He.isObject(a[s]))&&(a[s]=[]),t(r,n,a[s],i)&&He.isArray(a[s])&&(a[s]=jCe(a[s])),!o)}if(He.isFormData(e)&&He.isFunction(e.entries)){const r={};return He.forEachEntry(e,(n,a)=>{t(zCe(n),a,r,0)}),r}return null}function qCe(e,t,r){if(He.isString(e))try{return(t||JSON.parse)(e),He.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Om={transitional:Vre,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=He.isObject(t);if(i&&He.isHTMLForm(t)&&(t=new FormData(t)),He.isFormData(t))return a?JSON.stringify(Wre(t)):t;if(He.isArrayBuffer(t)||He.isBuffer(t)||He.isStream(t)||He.isFile(t)||He.isBlob(t)||He.isReadableStream(t))return t;if(He.isArrayBufferView(t))return t.buffer;if(He.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return BCe(t,this.formSerializer).toString();if((o=He.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return yx(o?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),qCe(t)):t}],transformResponse:[function(t){const r=this.transitional||Om.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(He.isResponse(t)||He.isReadableStream(t))return t;if(t&&He.isString(t)&&(n&&!this.responseType||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(o){if(s)throw o.name==="SyntaxError"?Zt.from(o,Zt.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xa.classes.FormData,Blob:xa.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};He.forEach(["delete","get","head","post","put","patch"],e=>{Om.headers[e]={}});const UCe=He.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"]),$Ce=e=>{const t={};let r,n,a;return e&&e.split(`
`).forEach(function(s){a=s.indexOf(":"),r=s.substring(0,a).trim().toLowerCase(),n=s.substring(a+1).trim(),!(!r||t[r]&&UCe[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},uz=Symbol("internals");function Fh(e){return e&&String(e).trim().toLowerCase()}function $1(e){return e===!1||e==null?e:He.isArray(e)?e.map($1):String(e)}function HCe(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const GCe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function J2(e,t,r,n,a){if(He.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!He.isString(t)){if(He.isString(n))return t.indexOf(n)!==-1;if(He.isRegExp(n))return n.test(t)}}function VCe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function WCe(e,t){const r=He.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,s){return this[n].call(this,t,a,i,s)},configurable:!0})})}let ai=class{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(o,l,c){const u=Fh(l);if(!u)throw new Error("header name must be a non-empty string");const f=He.findKey(a,u);(!f||a[f]===void 0||c===!0||c===void 0&&a[f]!==!1)&&(a[f||l]=$1(o))}const s=(o,l)=>He.forEach(o,(c,u)=>i(c,u,l));if(He.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(He.isString(t)&&(t=t.trim())&&!GCe(t))s($Ce(t),r);else if(He.isObject(t)&&He.isIterable(t)){let o={},l,c;for(const u of t){if(!He.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[c=u[0]]=(l=o[c])?He.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}s(o,r)}else t!=null&&i(r,t,n);return this}get(t,r){if(t=Fh(t),t){const n=He.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return HCe(a);if(He.isFunction(r))return r.call(this,a,n);if(He.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Fh(t),t){const n=He.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||J2(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(s){if(s=Fh(s),s){const o=He.findKey(n,s);o&&(!r||J2(n,n[o],o,r))&&(delete n[o],a=!0)}}return He.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||J2(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return He.forEach(this,(a,i)=>{const s=He.findKey(n,i);if(s){r[s]=$1(a),delete r[i];return}const o=t?VCe(i):String(i).trim();o!==i&&delete r[i],r[o]=$1(a),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return He.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&He.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[uz]=this[uz]={accessors:{}}).accessors,a=this.prototype;function i(s){const o=Fh(s);n[o]||(WCe(a,s),n[o]=!0)}return He.isArray(t)?t.forEach(i):i(t),this}};ai.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);He.reduceDescriptors(ai.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});He.freezeMethods(ai);function eE(e,t){const r=this||Om,n=t||r,a=ai.from(n.headers);let i=n.data;return He.forEach(e,function(o){i=o.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function Kre(e){return!!(e&&e.__CANCEL__)}function S0(e,t,r){Zt.call(this,e??"canceled",Zt.ERR_CANCELED,t,r),this.name="CanceledError"}He.inherits(S0,Zt,{__CANCEL__:!0});function Xre(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Zt("Request failed with status code "+r.status,[Zt.ERR_BAD_REQUEST,Zt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function KCe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function XCe(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[i];s||(s=c),r[a]=l,n[a]=c;let f=i,p=0;for(;f!==a;)p+=r[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-s<t)return;const m=u&&c-u;return m?Math.round(p*1e3/m):void 0}}function YCe(e,t){let r=0,n=1e3/t,a,i;const s=(c,u=Date.now())=>{r=u,a=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const u=Date.now(),f=u-r;f>=n?s(c,u):(a=c,i||(i=setTimeout(()=>{i=null,s(a)},n-f)))},()=>a&&s(a)]}const fb=(e,t,r=3)=>{let n=0;const a=XCe(50,250);return YCe(i=>{const s=i.loaded,o=i.lengthComputable?i.total:void 0,l=s-n,c=a(l),u=s<=o;n=s;const f={loaded:s,total:o,progress:o?s/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&u?(o-s)/c:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(f)},r)},dz=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},fz=e=>(...t)=>He.asap(()=>e(...t)),ZCe=xa.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,xa.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(xa.origin),xa.navigator&&/(msie|trident)/i.test(xa.navigator.userAgent)):()=>!0,QCe=xa.hasStandardBrowserEnv?{write(e,t,r,n,a,i){const s=[e+"="+encodeURIComponent(t)];He.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),He.isString(n)&&s.push("path="+n),He.isString(a)&&s.push("domain="+a),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function JCe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function eTe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Yre(e,t,r){let n=!JCe(t);return e&&(n||r==!1)?eTe(e,t):t}const hz=e=>e instanceof ai?{...e}:e;function Xu(e,t){t=t||{};const r={};function n(c,u,f,p){return He.isPlainObject(c)&&He.isPlainObject(u)?He.merge.call({caseless:p},c,u):He.isPlainObject(u)?He.merge({},u):He.isArray(u)?u.slice():u}function a(c,u,f,p){if(He.isUndefined(u)){if(!He.isUndefined(c))return n(void 0,c,f,p)}else return n(c,u,f,p)}function i(c,u){if(!He.isUndefined(u))return n(void 0,u)}function s(c,u){if(He.isUndefined(u)){if(!He.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function o(c,u,f){if(f in t)return n(c,u);if(f in e)return n(void 0,c)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(c,u,f)=>a(hz(c),hz(u),f,!0)};return He.forEach(Object.keys({...e,...t}),function(u){const f=l[u]||a,p=f(e[u],t[u],u);He.isUndefined(p)&&f!==o||(r[u]=p)}),r}const Zre=e=>{const t=Xu({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:s,auth:o}=t;t.headers=s=ai.from(s),t.url=Gre(Yre(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(He.isFormData(r)){if(xa.hasStandardBrowserEnv||xa.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(xa.hasStandardBrowserEnv&&(n&&He.isFunction(n)&&(n=n(t)),n||n!==!1&&ZCe(t.url))){const c=a&&i&&QCe.read(i);c&&s.set(a,c)}return t},tTe=typeof XMLHttpRequest<"u",rTe=tTe&&function(e){return new Promise(function(r,n){const a=Zre(e);let i=a.data;const s=ai.from(a.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=a,u,f,p,m,b;function v(){m&&m(),b&&b(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function _(){if(!y)return;const C=ai.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),A={data:!o||o==="text"||o==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:C,config:e,request:y};Xre(function(N){r(N),v()},function(N){n(N),v()},A),y=null}"onloadend"in y?y.onloadend=_:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(_)},y.onabort=function(){y&&(n(new Zt("Request aborted",Zt.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new Zt("Network Error",Zt.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let T=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const A=a.transitional||Vre;a.timeoutErrorMessage&&(T=a.timeoutErrorMessage),n(new Zt(T,A.clarifyTimeoutError?Zt.ETIMEDOUT:Zt.ECONNABORTED,e,y)),y=null},i===void 0&&s.setContentType(null),"setRequestHeader"in y&&He.forEach(s.toJSON(),function(T,A){y.setRequestHeader(A,T)}),He.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),o&&o!=="json"&&(y.responseType=a.responseType),c&&([p,b]=fb(c,!0),y.addEventListener("progress",p)),l&&y.upload&&([f,m]=fb(l),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",m)),(a.cancelToken||a.signal)&&(u=C=>{y&&(n(!C||C.type?new S0(null,e,y):C),y.abort(),y=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const S=KCe(a.url);if(S&&xa.protocols.indexOf(S)===-1){n(new Zt("Unsupported protocol "+S+":",Zt.ERR_BAD_REQUEST,e));return}y.send(i||null)})},nTe=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const i=function(c){if(!a){a=!0,o();const u=c instanceof Error?c:this.reason;n.abort(u instanceof Zt?u:new S0(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,i(new Zt(`timeout ${t} of ms exceeded`,Zt.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=n;return l.unsubscribe=()=>He.asap(o),l}},aTe=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},iTe=async function*(e,t){for await(const r of sTe(e))yield*aTe(r,t)},sTe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},pz=(e,t,r,n)=>{const a=iTe(e,t);let i=0,s,o=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await a.next();if(c){o(),l.close();return}let f=u.byteLength;if(r){let p=i+=f;r(p)}l.enqueue(new Uint8Array(u))}catch(c){throw o(c),c}},cancel(l){return o(l),a.return()}},{highWaterMark:2})},_x=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Qre=_x&&typeof ReadableStream=="function",oTe=_x&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Jre=(e,...t)=>{try{return!!e(...t)}catch{return!1}},lTe=Qre&&Jre(()=>{let e=!1;const t=new Request(xa.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),mz=64*1024,B5=Qre&&Jre(()=>He.isReadableStream(new Response("").body)),hb={stream:B5&&(e=>e.body)};_x&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!hb[t]&&(hb[t]=He.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new Zt(`Response type '${t}' is not supported`,Zt.ERR_NOT_SUPPORT,n)})})})(new Response);const cTe=async e=>{if(e==null)return 0;if(He.isBlob(e))return e.size;if(He.isSpecCompliantForm(e))return(await new Request(xa.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(He.isArrayBufferView(e)||He.isArrayBuffer(e))return e.byteLength;if(He.isURLSearchParams(e)&&(e=e+""),He.isString(e))return(await oTe(e)).byteLength},uTe=async(e,t)=>{const r=He.toFiniteNumber(e.getContentLength());return r??cTe(t)},dTe=_x&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:i,timeout:s,onDownloadProgress:o,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:p}=Zre(e);c=c?(c+"").toLowerCase():"text";let m=nTe([a,i&&i.toAbortSignal()],s),b;const v=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(l&&lTe&&r!=="get"&&r!=="head"&&(y=await uTe(u,n))!==0){let A=new Request(t,{method:"POST",body:n,duplex:"half"}),k;if(He.isFormData(n)&&(k=A.headers.get("content-type"))&&u.setContentType(k),A.body){const[N,L]=dz(y,fb(fz(l)));n=pz(A.body,mz,N,L)}}He.isString(f)||(f=f?"include":"omit");const _="credentials"in Request.prototype;b=new Request(t,{...p,signal:m,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:_?f:void 0});let S=await fetch(b,p);const C=B5&&(c==="stream"||c==="response");if(B5&&(o||C&&v)){const A={};["status","statusText","headers"].forEach(I=>{A[I]=S[I]});const k=He.toFiniteNumber(S.headers.get("content-length")),[N,L]=o&&dz(k,fb(fz(o),!0))||[];S=new Response(pz(S.body,mz,N,()=>{L&&L(),v&&v()}),A)}c=c||"text";let T=await hb[He.findKey(hb,c)||"text"](S,e);return!C&&v&&v(),await new Promise((A,k)=>{Xre(A,k,{data:T,headers:ai.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:b})})}catch(_){throw v&&v(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new Zt("Network Error",Zt.ERR_NETWORK,e,b),{cause:_.cause||_}):Zt.from(_,_&&_.code,e,b)}}),z5={http:TCe,xhr:rTe,fetch:dTe};He.forEach(z5,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const gz=e=>`- ${e}`,fTe=e=>He.isFunction(e)||e===null||e===!1,ene={getAdapter:e=>{e=He.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!fTe(r)&&(n=z5[(s=String(r)).toLowerCase()],n===void 0))throw new Zt(`Unknown adapter '${s}'`);if(n)break;a[s||"#"+i]=n}if(!n){const i=Object.entries(a).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
`+i.map(gz).join(`
`):" "+gz(i[0]):"as no adapter specified";throw new Zt("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:z5};function tE(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new S0(null,e)}function vz(e){return tE(e),e.headers=ai.from(e.headers),e.data=eE.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ene.getAdapter(e.adapter||Om.adapter)(e).then(function(n){return tE(e),n.data=eE.call(e,e.transformResponse,n),n.headers=ai.from(n.headers),n},function(n){return Kre(n)||(tE(e),n&&n.response&&(n.response.data=eE.call(e,e.transformResponse,n.response),n.response.headers=ai.from(n.response.headers))),Promise.reject(n)})}const tne="1.11.0",wx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wx[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const bz={};wx.transitional=function(t,r,n){function a(i,s){return"[Axios v"+tne+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,o)=>{if(t===!1)throw new Zt(a(s," has been removed"+(r?" in "+r:"")),Zt.ERR_DEPRECATED);return r&&!bz[s]&&(bz[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,o):!0}};wx.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function hTe(e,t,r){if(typeof e!="object")throw new Zt("options must be an object",Zt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],s=t[i];if(s){const o=e[i],l=o===void 0||s(o,i,e);if(l!==!0)throw new Zt("option "+i+" must be "+l,Zt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Zt("Unknown option "+i,Zt.ERR_BAD_OPTION)}}const H1={assertOptions:hTe,validators:wx},lo=H1.validators;let Uu=class{constructor(t){this.defaults=t||{},this.interceptors={request:new cz,response:new cz}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Xu(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&H1.assertOptions(n,{silentJSONParsing:lo.transitional(lo.boolean),forcedJSONParsing:lo.transitional(lo.boolean),clarifyTimeoutError:lo.transitional(lo.boolean)},!1),a!=null&&(He.isFunction(a)?r.paramsSerializer={serialize:a}:H1.assertOptions(a,{encode:lo.function,serialize:lo.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),H1.assertOptions(r,{baseUrl:lo.spelling("baseURL"),withXsrfToken:lo.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&He.merge(i.common,i[r.method]);i&&He.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),r.headers=ai.concat(s,i);const o=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(l=l&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,f=0,p;if(!l){const b=[vz.bind(this),void 0];for(b.unshift(...o),b.push(...c),p=b.length,u=Promise.resolve(r);f<p;)u=u.then(b[f++],b[f++]);return u}p=o.length;let m=r;for(f=0;f<p;){const b=o[f++],v=o[f++];try{m=b(m)}catch(y){v.call(this,y);break}}try{u=vz.call(this,m)}catch(b){return Promise.reject(b)}for(f=0,p=c.length;f<p;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=Xu(this.defaults,t);const r=Yre(t.baseURL,t.url,t.allowAbsoluteUrls);return Gre(r,t.params,t.paramsSerializer)}};He.forEach(["delete","get","head","options"],function(t){Uu.prototype[t]=function(r,n){return this.request(Xu(n||{},{method:t,url:r,data:(n||{}).data}))}});He.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,o){return this.request(Xu(o||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Uu.prototype[t]=r(),Uu.prototype[t+"Form"]=r(!0)});let pTe=class rne{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(o=>{n.subscribe(o),i=o}).then(a);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,o){n.reason||(n.reason=new S0(i,s,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new rne(function(a){t=a}),cancel:t}}};function mTe(e){return function(r){return e.apply(null,r)}}function gTe(e){return He.isObject(e)&&e.isAxiosError===!0}const j5={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,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(j5).forEach(([e,t])=>{j5[t]=e});function nne(e){const t=new Uu(e),r=Ore(Uu.prototype.request,t);return He.extend(r,Uu.prototype,t,{allOwnKeys:!0}),He.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return nne(Xu(e,a))},r}const Cn=nne(Om);Cn.Axios=Uu;Cn.CanceledError=S0;Cn.CancelToken=pTe;Cn.isCancel=Kre;Cn.VERSION=tne;Cn.toFormData=yx;Cn.AxiosError=Zt;Cn.Cancel=Cn.CanceledError;Cn.all=function(t){return Promise.all(t)};Cn.spread=mTe;Cn.isAxiosError=gTe;Cn.mergeConfig=Xu;Cn.AxiosHeaders=ai;Cn.formToJSON=e=>Wre(He.isHTMLForm(e)?new FormData(e):e);Cn.getAdapter=ene.getAdapter;Cn.HttpStatusCode=j5;Cn.default=Cn;const{Axios:mst,AxiosError:gst,CanceledError:vst,isCancel:bst,CancelToken:xst,VERSION:yst,all:_st,Cancel:wst,isAxiosError:Est,spread:Sst,toFormData:Cst,AxiosHeaders:Tst,HttpStatusCode:Ast,formToJSON:kst,getAdapter:Nst,mergeConfig:Rst}=Cn,vTe="http://localhost:8080/api",xz=3e6;class bTe{client;constructor(){this.client=Cn.create({baseURL:vTe,timeout:xz,headers:{"Content-Type":"application/json"}}),this.client.interceptors.request.use(t=>(console.log(`🚀 API Request: ${t.method?.toUpperCase()} ${t.url}`),t),t=>(console.error("❌ API Request Error:",t),Promise.reject(t))),this.client.interceptors.response.use(t=>(console.log(`✅ API Response: ${t.status} ${t.config.url}`),t),t=>{console.error("❌ API Response Error:",t);const r={message:t.response?.data?.detail||t.message||"Unknown error occurred",status:t.response?.status,details:t.response?.data};return Promise.reject(r)})}async checkHealth(){return(await this.client.get("/health")).data}async getRootInfo(){return(await this.client.get("/")).data}async configurePoet(t){return(await this.client.post("/poet/configure",t)).data}async getPoetDomains(){return(await this.client.get("/poet/domains")).data}async getTopics(t){const r=new URLSearchParams;return t?.skip&&r.append("skip",t.skip.toString()),t?.limit&&r.append("limit",t.limit.toString()),(await this.client.get(`/topics/?${r.toString()}`)).data}async getTopic(t){return(await this.client.get(`/topics/${t}`)).data}async createTopic(t){return(await this.client.post("/topics/",t)).data}async updateTopic(t,r){return(await this.client.put(`/topics/${t}`,r)).data}async deleteTopic(t,r=!1){const n=r?"?force=true":"";return(await this.client.delete(`/topics/${t}${n}`)).data}async getDocuments(t){console.log("🌐 API: getDocuments called with filters:",t);const r=new URLSearchParams;t?.skip&&r.append("skip",t.skip.toString()),t?.limit&&r.append("limit",t.limit.toString()),t?.topic_id&&r.append("topic_id",t.topic_id.toString()),t?.agent_id&&r.append("agent_id",t.agent_id.toString());const n=`/documents/?${r.toString()}`;console.log("🌐 API: Requesting URL:",n);try{const a=await this.client.get(n);return console.log("📥 API: getDocuments response:",{status:a.status,count:a.data?.length||0,data:a.data?.map(i=>({id:i.id,name:i.original_filename,agent_id:i.agent_id}))}),a.data}catch(a){throw console.error("❌ API: getDocuments error:",a),a}}async getDocument(t){return(await this.client.get(`/documents/${t}`)).data}async uploadDocument(t){const r=new FormData;return r.append("file",t.file),r.append("title",t.title),t.description&&r.append("description",t.description),t.topic_id&&r.append("topic_id",t.topic_id.toString()),(await this.client.post("/documents/",r,{headers:{"Content-Type":"multipart/form-data"}})).data}async uploadDocumentRaw(t,r){const n=new FormData;return n.append("file",t),r?.topic_id!==void 0&&n.append("topic_id",String(r.topic_id)),r?.agent_id!==void 0&&n.append("agent_id",String(r.agent_id)),r?.build_index!==void 0&&n.append("build_index",String(r.build_index)),(await this.client.post("/documents/upload",n,{headers:{"Content-Type":"multipart/form-data"}})).data}async deepExtract(t){return(await this.client.post("/extract-documents/extract",t)).data}async updateDocument(t,r){return(await this.client.put(`/documents/${t}`,r)).data}async deleteDocument(t){return(await this.client.delete(`/documents/${t}`)).data}async saveExtractionData(t){return(await this.client.post("/documents/save-extraction",t)).data}async downloadDocument(t){return(await this.client.get(`/documents/${t}/download`,{responseType:"blob"})).data}async getAgents(t){const r=new URLSearchParams;return t?.skip&&r.append("skip",t.skip.toString()),t?.limit&&r.append("limit",t.limit.toString()),(await this.client.get(`/agents/?${r.toString()}`)).data}async getAgent(t){return(await this.client.get(`/agents/${t}`)).data}async createAgent(t){return(await this.client.post("/agents/",t)).data}async openFileLocation(t){const r=encodeURIComponent(t);return(await this.client.get(`/agents/open-file/${r}`)).data}async uploadKnowledgeFile(t){return(await this.client.post("/agents/upload-knowledge",t,{headers:{"Content-Type":"multipart/form-data"}})).data}async updateAgent(t,r){return(await this.client.put(`/agents/${t}`,r)).data}async deleteAgent(t){return(await this.client.delete(`/agents/${t}`)).data}async generateAgent(t){return(await this.client.post("/agents/generate",t,{timeout:xz})).data}async generateAgentCode(t,r){return(await this.client.post(`/agents/${t}/generate-code`,r,{timeout:3e6})).data}async processAgentDocuments(t){return(await this.client.post("/agents/process-agent-documents",t,{timeout:6e5})).data}async generateAgentFromPrompt(t){return(await this.client.post("/agents/generate-from-prompt",t)).data}async chatWithAgent(t){return(await this.client.post("/chat/",t)).data}async testAgent(t){return(await this.client.post("/agent-test/",t,{timeout:3e6})).data}async bulkEvaluateAgent(t){return(await this.client.post("/agent-test/bulk",t,{timeout:3e6})).data}async getConversations(t){const r=new URLSearchParams;t&&r.append("agent_id",t.toString()),console.log("Fetching conversations for agent:",t);const n=await this.client.get(`/conversations/?${r.toString()}`);return console.log("Conversations response:",n.data),n.data}async getConversation(t){console.log("Fetching conversation:",t);const r=await this.client.get(`/conversations/${t}`);return console.log("Conversation response:",r.data),r.data}async startWorkflowExecution(t){try{return(await this.client.post("/workflow-execution/start",t)).data}catch(r){throw console.error("❌ API: startWorkflowExecution error:",r),r}}async getWorkflowExecutionStatus(t){try{return(await this.client.get(`/workflow-execution/status/${t}`)).data}catch(r){throw console.error("❌ API: getWorkflowExecutionStatus error:",r),r}}async controlWorkflowExecution(t){try{return(await this.client.post("/workflow-execution/control",t)).data}catch(r){throw console.error("❌ API: controlWorkflowExecution error:",r),r}}async streamWorkflowExecutionUpdates(t){const r=`${this.client.defaults.baseURL}/workflow-execution/stream/${t}`;return new EventSource(r)}async createConversation(t){return(await this.client.post("/conversations/",t)).data}async updateConversation(t,r){return(await this.client.put(`/conversations/${t}`,r)).data}async deleteConversation(t){return(await this.client.delete(`/conversations/${t}`)).data}async validateCode(t){return(await this.client.post("/agents/validate",t)).data}async fixCode(t){return(await this.client.post("/agents/fix",t)).data}async isApiAvailable(){try{return await this.checkHealth(),!0}catch(t){return console.warn("API not available:",t),!1}}async uploadAgentDocument(t,r,n){const a=new FormData;return a.append("file",r),n&&a.append("topic_id",n.toString()),(await this.client.post(`/agents/${t}/documents`,a,{headers:{"Content-Type":"multipart/form-data"}})).data}async associateDocumentsWithAgent(t,r){console.log("🌐 API call to associate documents:",{agentId:t,documentIds:r});try{const n=await this.client.post(`/agents/${t}/documents/associate`,{document_ids:r});return console.log("✅ API response:",n.data),n.data}catch(n){throw console.error("❌ API error:",{message:n.message,status:n.response?.status,data:n.response?.data,config:n.config}),n}}async disassociateDocumentFromAgent(t,r){console.log("🌐 API call to disassociate document:",{agentId:t,documentId:r});try{const n=await this.client.delete(`/agents/${t}/documents/${r}/disassociate`);return console.log("✅ API response:",n.data),n.data}catch(n){throw console.error("❌ API error:",{message:n.message,status:n.response?.status,data:n.response?.data,config:n.config}),n}}async smartChat(t,r,n){return(await this.client.post(`/agents/${t}/smart-chat`,{message:r,conversation_id:n})).data}async getSmartChatHistory(t){return(await this.client.get(`/agents/${t}/chat-history?type=smart_chat`)).data}async getTestChatHistory(t){return(await this.client.get(`/agents/${t}/chat-history?type=test_chat`)).data}async getAllChatHistory(t){return(await this.client.get(`/agents/${t}/chat-history?type=all`)).data}async getDomainKnowledge(t){return(await this.client.get(`/agents/${t}/domain-knowledge`)).data}async getAgentFiles(t){return(await this.client.get(`/agents/${t}/files`)).data}async getAgentFileContent(t,r){const n=encodeURIComponent(r);return(await this.client.get(`/agents/${t}/files/${n}`)).data}async updateAgentFileContent(t,r,n,a="utf-8"){const i=encodeURIComponent(r);return(await this.client.put(`/agents/${t}/files/${i}`,{content:n,encoding:a})).data}async generateKnowledge(t){return(await this.client.post(`/agents/${t}/generate-knowledge`)).data}async getKnowledgeStatus(t){return(await this.client.get(`/agents/${t}/knowledge-status`)).data}async getTopicKnowledgeContent(t,r){const n=encodeURIComponent(r);return(await this.client.get(`/agents/${t}/knowledge-content/${n}`)).data}async testAgentById(t,r,n,a){return(await this.client.post(`/agents/${t}/test`,{message:r,context:n||{user_id:"test_user",session_id:"chat_session"},websocket_id:a})).data}async getPrebuiltAgents(){return(await this.client.get("/agents/prebuilt")).data}async cloneAgentFromPrebuilt(t){return(await this.client.post("/agents/from-prebuilt",{prebuilt_key:t})).data}}const gt=new bTe,Ii=Ys(e=>({agents:[],selectedAgent:null,isLoading:!1,isCreating:!1,isUpdating:!1,isDeleting:!1,error:null,total:0,skip:0,limit:10,isCreateAgentDialogOpen:!1,isEditAgentDialogOpen:!1,isDeleteAgentDialogOpen:!1,fetchAgents:async t=>{e({isLoading:!0,error:null});try{const r=await gt.getAgents(t);e({agents:r,isLoading:!1,total:r.length,skip:t?.skip||0,limit:t?.limit||10})}catch(r){const n=r instanceof Error?r.message:"Failed to fetch agents";e({isLoading:!1,error:n})}},fetchAgent:async t=>{e({isLoading:!0,error:null});try{const r=await gt.getAgent(t);return e({selectedAgent:r,isLoading:!1}),r}catch(r){const n=r instanceof Error?r.message:"Failed to fetch agent";throw e({isLoading:!1,error:n}),r}},createAgent:async t=>{e({isCreating:!0,error:null});try{const r=await gt.createAgent(t);return e(n=>({agents:[...n.agents,r],isCreating:!1})),r}catch(r){const n=r instanceof Error?r.message:"Failed to create agent";throw e({isCreating:!1,error:n}),r}},updateAgent:async(t,r)=>{e({isUpdating:!0,error:null});try{const n=await gt.updateAgent(t,r);return e(a=>({agents:a.agents.map(i=>i.id===t?n:i),selectedAgent:a.selectedAgent?.id===t?n:a.selectedAgent,isUpdating:!1})),n}catch(n){const a=n instanceof Error?n.message:"Failed to update agent";throw e({isUpdating:!1,error:a}),n}},deleteAgent:async t=>{e({isDeleting:!0,error:null});try{await gt.deleteAgent(t),e(r=>({agents:r.agents.filter(n=>n.id!==t),selectedAgent:r.selectedAgent?.id===t?null:r.selectedAgent,isDeleting:!1}))}catch(r){const n=r instanceof Error?r.message:"Failed to delete agent";throw e({isDeleting:!1,error:n}),r}},setSelectedAgent:t=>{e({selectedAgent:t})},setError:t=>{e({error:t})},clearError:()=>{e({error:null})},openCreateAgentDialog:()=>e({isCreateAgentDialogOpen:!0}),closeCreateAgentDialog:()=>e({isCreateAgentDialogOpen:!1}),openEditAgentDialog:t=>e({isEditAgentDialogOpen:!0,selectedAgent:t}),closeEditAgentDialog:()=>e({isEditAgentDialogOpen:!1,selectedAgent:null}),openDeleteAgentDialog:t=>e({isDeleteAgentDialogOpen:!0,selectedAgent:t}),closeDeleteAgentDialog:()=>e({isDeleteAgentDialogOpen:!1,selectedAgent:null}),reset:()=>{e({agents:[],selectedAgent:null,isLoading:!1,isCreating:!1,isUpdating:!1,isDeleting:!1,error:null,total:0,skip:0,limit:10})}}));function df({children:e,hideLayout:t=!1}){const r=Ks(),{agent_id:n}=gs(),a=Oo(),{fetchAgent:i,selectedAgent:s}=Ii(),[o,l]=E.useState(null);E.useEffect(()=>{n&&r.pathname.includes("/chat")&&(isNaN(Number(n))?(console.log("Prebuilt agent in chat:",n),(async()=>{try{const m=(await gt.getPrebuiltAgents()).find(b=>b.id===n||b.key===n);m&&l(m)}catch(p){console.error("Error fetching prebuilt agent:",p)}})()):i(parseInt(n)).catch(console.error))},[n,r.pathname,i]);const c=E.useCallback(()=>{switch(r.pathname){case"/":return"Home";case"/agents":return"Dana Expert Agents";case"/library":return"Library";default:return r.pathname.startsWith("/agents/")&&r.pathname.includes("/chat")?n&&isNaN(Number(n))?o?.name||"Chat with agent":s?.id===parseInt(n||"0")?s?.name:"Chat with agent":r.pathname.startsWith("/agents/")?"Agent Details":"Agent workspace"}},[r.pathname,s?.name,n,o?.name]),u=r.pathname.includes("/chat");return t?g.jsx(g.Fragment,{children:e}):g.jsxs(Dye,{children:[g.jsx(FSe,{}),g.jsxs(Pye,{children:[g.jsxs("header",{className:"flex gap-2 items-center px-4 h-16 border-b shrink-0",children:[g.jsx(Iye,{className:"-ml-1 text-gray-500 size-6"}),g.jsxs("div",{className:"flex gap-2 justify-between items-center w-full",children:[g.jsxs("div",{className:"flex gap-2 items-center",children:[u&&g.jsx("button",{onClick:()=>a(-1),className:"flex justify-center items-center w-8 h-8 rounded-lg transition-colors cursor-pointer hover:bg-gray-100","aria-label":"Back to agents",children:g.jsx(mx,{width:18,height:18,className:"text-gray-500"})}),g.jsx("span",{className:"font-semibold text-md",children:c()})]}),u&&n&&isNaN(Number(n))&&o&&g.jsx("div",{children:g.jsxs(mt,{onClick:async()=>{try{const f=await gt.cloneAgentFromPrebuilt(o.key);f&&f.id&&a(`/agents/${f.id}`)}catch(f){console.error(f)}},className:"font-semibold",variant:"outline",children:[g.jsx(Nm,{style:{width:"16",height:"16"}}),"Customize"]})})]})]}),g.jsx("main",{className:"overflow-auto flex-1",children:e})]})]})}function ane(e){const t=e+"CollectionProvider",[r,n]=zl(t),[a,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:y,children:_}=v,S=ye.useRef(null),C=ye.useRef(new Map).current;return g.jsx(a,{scope:y,itemMap:C,collectionRef:S,children:_})};s.displayName=t;const o=e+"CollectionSlot",l=Yf(o),c=ye.forwardRef((v,y)=>{const{scope:_,children:S}=v,C=i(o,_),T=pn(y,C.collectionRef);return g.jsx(l,{ref:T,children:S})});c.displayName=o;const u=e+"CollectionItemSlot",f="data-radix-collection-item",p=Yf(u),m=ye.forwardRef((v,y)=>{const{scope:_,children:S,...C}=v,T=ye.useRef(null),A=pn(y,T),k=i(u,_);return ye.useEffect(()=>(k.itemMap.set(T,{ref:T,...C}),()=>void k.itemMap.delete(T))),g.jsx(p,{[f]:"",ref:A,children:S})});m.displayName=u;function b(v){const y=i(e+"CollectionConsumer",v);return ye.useCallback(()=>{const S=y.collectionRef.current;if(!S)return[];const C=Array.from(S.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((k,N)=>C.indexOf(k.ref.current)-C.indexOf(N.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:s,Slot:c,ItemSlot:m},b,n]}var xTe=E.createContext(void 0);function ine(e){const t=E.useContext(xTe);return e||t||"ltr"}var rE="rovingFocusGroup.onEntryFocus",yTe={bubbles:!1,cancelable:!0},Im="RovingFocusGroup",[q5,sne,_Te]=ane(Im),[wTe,one]=zl(Im,[_Te]),[ETe,STe]=wTe(Im),lne=E.forwardRef((e,t)=>g.jsx(q5.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(q5.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(CTe,{...e,ref:t})})}));lne.displayName=Im;var CTe=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=e,p=E.useRef(null),m=pn(t,p),b=ine(i),[v,y]=y0({prop:s,defaultProp:o??null,onChange:l,caller:Im}),[_,S]=E.useState(!1),C=Tl(c),T=sne(r),A=E.useRef(!1),[k,N]=E.useState(0);return E.useEffect(()=>{const L=p.current;if(L)return L.addEventListener(rE,C),()=>L.removeEventListener(rE,C)},[C]),g.jsx(ETe,{scope:r,orientation:n,dir:b,loop:a,currentTabStopId:v,onItemFocus:E.useCallback(L=>y(L),[y]),onItemShiftTab:E.useCallback(()=>S(!0),[]),onFocusableItemAdd:E.useCallback(()=>N(L=>L+1),[]),onFocusableItemRemove:E.useCallback(()=>N(L=>L-1),[]),children:g.jsx(Mr.div,{tabIndex:_||k===0?-1:0,"data-orientation":n,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:$t(e.onMouseDown,()=>{A.current=!0}),onFocus:$t(e.onFocus,L=>{const I=!A.current;if(L.target===L.currentTarget&&I&&!_){const P=new CustomEvent(rE,yTe);if(L.currentTarget.dispatchEvent(P),!P.defaultPrevented){const H=T().filter(D=>D.focusable),B=H.find(D=>D.active),K=H.find(D=>D.id===v),W=[B,K,...H].filter(Boolean).map(D=>D.ref.current);dne(W,u)}}A.current=!1}),onBlur:$t(e.onBlur,()=>S(!1))})})}),cne="RovingFocusGroupItem",une=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,children:s,...o}=e,l=Ic(),c=i||l,u=STe(cne,r),f=u.currentTabStopId===c,p=sne(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=u;return E.useEffect(()=>{if(n)return m(),()=>b()},[n,m,b]),g.jsx(q5.ItemSlot,{scope:r,id:c,focusable:n,active:a,children:g.jsx(Mr.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:$t(e.onMouseDown,y=>{n?u.onItemFocus(c):y.preventDefault()}),onFocus:$t(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:$t(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const _=kTe(y,u.orientation,u.dir);if(_!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let C=p().filter(T=>T.focusable).map(T=>T.ref.current);if(_==="last")C.reverse();else if(_==="prev"||_==="next"){_==="prev"&&C.reverse();const T=C.indexOf(y.currentTarget);C=u.loop?NTe(C,T+1):C.slice(T+1)}setTimeout(()=>dne(C))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:v!=null}):s})})});une.displayName=cne;var TTe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ATe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kTe(e,t,r){const n=ATe(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return TTe[n]}function dne(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function NTe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var RTe=lne,MTe=une,U5=["Enter"," "],DTe=["ArrowDown","PageUp","Home"],fne=["ArrowUp","PageDown","End"],OTe=[...DTe,...fne],ITe={ltr:[...U5,"ArrowRight"],rtl:[...U5,"ArrowLeft"]},LTe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Lm="Menu",[Kp,PTe,FTe]=ane(Lm),[ld,hne]=zl(Lm,[FTe,fx,one]),Ex=fx(),pne=one(),[BTe,cd]=ld(Lm),[zTe,Pm]=ld(Lm),mne=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:i,modal:s=!0}=e,o=Ex(t),[l,c]=E.useState(null),u=E.useRef(!1),f=Tl(i),p=ine(a);return E.useEffect(()=>{const m=()=>{u.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>u.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),g.jsx(nre,{...o,children:g.jsx(BTe,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:c,children:g.jsx(zTe,{scope:t,onClose:E.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:p,modal:s,children:n})})})};mne.displayName=Lm;var jTe="MenuAnchor",KD=E.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Ex(r);return g.jsx(are,{...a,...n,ref:t})});KD.displayName=jTe;var XD="MenuPortal",[qTe,gne]=ld(XD,{forceMount:void 0}),vne=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:a}=e,i=cd(XD,t);return g.jsx(qTe,{scope:t,forceMount:r,children:g.jsx(vs,{present:r||i.open,children:g.jsx(ix,{asChild:!0,container:a,children:n})})})};vne.displayName=XD;var ls="MenuContent",[UTe,YD]=ld(ls),bne=E.forwardRef((e,t)=>{const r=gne(ls,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=cd(ls,e.__scopeMenu),s=Pm(ls,e.__scopeMenu);return g.jsx(Kp.Provider,{scope:e.__scopeMenu,children:g.jsx(vs,{present:n||i.open,children:g.jsx(Kp.Slot,{scope:e.__scopeMenu,children:s.modal?g.jsx($Te,{...a,ref:t}):g.jsx(HTe,{...a,ref:t})})})})}),$Te=E.forwardRef((e,t)=>{const r=cd(ls,e.__scopeMenu),n=E.useRef(null),a=pn(t,n);return E.useEffect(()=>{const i=n.current;if(i)return hte(i)},[]),g.jsx(ZD,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:$t(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),HTe=E.forwardRef((e,t)=>{const r=cd(ls,e.__scopeMenu);return g.jsx(ZD,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),GTe=Yf("MenuContent.ScrollLock"),ZD=E.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:b,...v}=e,y=cd(ls,r),_=Pm(ls,r),S=Ex(r),C=pne(r),T=PTe(r),[A,k]=E.useState(null),N=E.useRef(null),L=pn(t,N,y.onContentChange),I=E.useRef(0),P=E.useRef(""),H=E.useRef(0),B=E.useRef(null),K=E.useRef("right"),j=E.useRef(0),W=b?CD:E.Fragment,D=b?{as:GTe,allowPinchZoom:!0}:void 0,U=z=>{const M=P.current+z,Q=T().filter(te=>!te.disabled),q=document.activeElement,F=Q.find(te=>te.ref.current===q)?.textValue,V=Q.map(te=>te.textValue),Z=n4e(V,M,F),ee=Q.find(te=>te.textValue===Z)?.ref.current;(function te(oe){P.current=oe,window.clearTimeout(I.current),oe!==""&&(I.current=window.setTimeout(()=>te(""),1e3))})(M),ee&&setTimeout(()=>ee.focus())};E.useEffect(()=>()=>window.clearTimeout(I.current),[]),ate();const Y=E.useCallback(z=>K.current===B.current?.side&&i4e(z,B.current?.area),[]);return g.jsx(UTe,{scope:r,searchRef:P,onItemEnter:E.useCallback(z=>{Y(z)&&z.preventDefault()},[Y]),onItemLeave:E.useCallback(z=>{Y(z)||(N.current?.focus(),k(null))},[Y]),onTriggerLeave:E.useCallback(z=>{Y(z)&&z.preventDefault()},[Y]),pointerGraceTimerRef:H,onPointerGraceIntentChange:E.useCallback(z=>{B.current=z},[]),children:g.jsx(W,{...D,children:g.jsx(SD,{asChild:!0,trapped:a,onMountAutoFocus:$t(i,z=>{z.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:g.jsx(ax,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:g.jsx(RTe,{asChild:!0,...C,dir:_.dir,orientation:"vertical",loop:n,currentTabStopId:A,onCurrentTabStopIdChange:k,onEntryFocus:$t(l,z=>{_.isUsingKeyboardRef.current||z.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(ire,{role:"menu","aria-orientation":"vertical","data-state":Ine(y.open),"data-radix-menu-content":"",dir:_.dir,...S,...v,ref:L,style:{outline:"none",...v.style},onKeyDown:$t(v.onKeyDown,z=>{const Q=z.target.closest("[data-radix-menu-content]")===z.currentTarget,q=z.ctrlKey||z.altKey||z.metaKey,F=z.key.length===1;Q&&(z.key==="Tab"&&z.preventDefault(),!q&&F&&U(z.key));const V=N.current;if(z.target!==V||!OTe.includes(z.key))return;z.preventDefault();const ee=T().filter(te=>!te.disabled).map(te=>te.ref.current);fne.includes(z.key)&&ee.reverse(),t4e(ee)}),onBlur:$t(e.onBlur,z=>{z.currentTarget.contains(z.target)||(window.clearTimeout(I.current),P.current="")}),onPointerMove:$t(e.onPointerMove,Xp(z=>{const M=z.target,Q=j.current!==z.clientX;if(z.currentTarget.contains(M)&&Q){const q=z.clientX>j.current?"right":"left";K.current=q,j.current=z.clientX}}))})})})})})})});bne.displayName=ls;var VTe="MenuGroup",QD=E.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return g.jsx(Mr.div,{role:"group",...n,ref:t})});QD.displayName=VTe;var WTe="MenuLabel",xne=E.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return g.jsx(Mr.div,{...n,ref:t})});xne.displayName=WTe;var pb="MenuItem",yz="menu.itemSelect",Sx=E.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...a}=e,i=E.useRef(null),s=Pm(pb,e.__scopeMenu),o=YD(pb,e.__scopeMenu),l=pn(t,i),c=E.useRef(!1),u=()=>{const f=i.current;if(!r&&f){const p=new CustomEvent(yz,{bubbles:!0,cancelable:!0});f.addEventListener(yz,m=>n?.(m),{once:!0}),ete(f,p),p.defaultPrevented?c.current=!1:s.onClose()}};return g.jsx(yne,{...a,ref:l,disabled:r,onClick:$t(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),c.current=!0},onPointerUp:$t(e.onPointerUp,f=>{c.current||f.currentTarget?.click()}),onKeyDown:$t(e.onKeyDown,f=>{const p=o.searchRef.current!=="";r||p&&f.key===" "||U5.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Sx.displayName=pb;var yne=E.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:a,...i}=e,s=YD(pb,r),o=pne(r),l=E.useRef(null),c=pn(t,l),[u,f]=E.useState(!1),[p,m]=E.useState("");return E.useEffect(()=>{const b=l.current;b&&m((b.textContent??"").trim())},[i.children]),g.jsx(Kp.ItemSlot,{scope:r,disabled:n,textValue:a??p,children:g.jsx(MTe,{asChild:!0,...o,focusable:!n,children:g.jsx(Mr.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:c,onPointerMove:$t(e.onPointerMove,Xp(b=>{n?s.onItemLeave(b):(s.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$t(e.onPointerLeave,Xp(b=>s.onItemLeave(b))),onFocus:$t(e.onFocus,()=>f(!0)),onBlur:$t(e.onBlur,()=>f(!1))})})})}),KTe="MenuCheckboxItem",_ne=E.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...a}=e;return g.jsx(Tne,{scope:e.__scopeMenu,checked:r,children:g.jsx(Sx,{role:"menuitemcheckbox","aria-checked":mb(r)?"mixed":r,...a,ref:t,"data-state":eO(r),onSelect:$t(a.onSelect,()=>n?.(mb(r)?!0:!r),{checkForDefaultPrevented:!1})})})});_ne.displayName=KTe;var wne="MenuRadioGroup",[XTe,YTe]=ld(wne,{value:void 0,onValueChange:()=>{}}),Ene=E.forwardRef((e,t)=>{const{value:r,onValueChange:n,...a}=e,i=Tl(n);return g.jsx(XTe,{scope:e.__scopeMenu,value:r,onValueChange:i,children:g.jsx(QD,{...a,ref:t})})});Ene.displayName=wne;var Sne="MenuRadioItem",Cne=E.forwardRef((e,t)=>{const{value:r,...n}=e,a=YTe(Sne,e.__scopeMenu),i=r===a.value;return g.jsx(Tne,{scope:e.__scopeMenu,checked:i,children:g.jsx(Sx,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":eO(i),onSelect:$t(n.onSelect,()=>a.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Cne.displayName=Sne;var JD="MenuItemIndicator",[Tne,ZTe]=ld(JD,{checked:!1}),Ane=E.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...a}=e,i=ZTe(JD,r);return g.jsx(vs,{present:n||mb(i.checked)||i.checked===!0,children:g.jsx(Mr.span,{...a,ref:t,"data-state":eO(i.checked)})})});Ane.displayName=JD;var QTe="MenuSeparator",kne=E.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return g.jsx(Mr.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});kne.displayName=QTe;var JTe="MenuArrow",Nne=E.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Ex(r);return g.jsx(sre,{...a,...n,ref:t})});Nne.displayName=JTe;var e4e="MenuSub",[Mst,Rne]=ld(e4e),rp="MenuSubTrigger",Mne=E.forwardRef((e,t)=>{const r=cd(rp,e.__scopeMenu),n=Pm(rp,e.__scopeMenu),a=Rne(rp,e.__scopeMenu),i=YD(rp,e.__scopeMenu),s=E.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},u=E.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return E.useEffect(()=>u,[u]),E.useEffect(()=>{const f=o.current;return()=>{window.clearTimeout(f),l(null)}},[o,l]),g.jsx(KD,{asChild:!0,...c,children:g.jsx(yne,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":Ine(r.open),...e,ref:tx(t,a.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:$t(e.onPointerMove,Xp(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:$t(e.onPointerLeave,Xp(f=>{u();const p=r.content?.getBoundingClientRect();if(p){const m=r.content?.dataset.side,b=m==="right",v=b?-5:5,y=p[b?"left":"right"],_=p[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:y,y:p.top},{x:_,y:p.top},{x:_,y:p.bottom},{x:y,y:p.bottom}],side:m}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:$t(e.onKeyDown,f=>{const p=i.searchRef.current!=="";e.disabled||p&&f.key===" "||ITe[n.dir].includes(f.key)&&(r.onOpenChange(!0),r.content?.focus(),f.preventDefault())})})})});Mne.displayName=rp;var Dne="MenuSubContent",One=E.forwardRef((e,t)=>{const r=gne(ls,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=cd(ls,e.__scopeMenu),s=Pm(ls,e.__scopeMenu),o=Rne(Dne,e.__scopeMenu),l=E.useRef(null),c=pn(t,l);return g.jsx(Kp.Provider,{scope:e.__scopeMenu,children:g.jsx(vs,{present:n||i.open,children:g.jsx(Kp.Slot,{scope:e.__scopeMenu,children:g.jsx(ZD,{id:o.contentId,"aria-labelledby":o.triggerId,...a,ref:c,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{s.isUsingKeyboardRef.current&&l.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:$t(e.onFocusOutside,u=>{u.target!==o.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:$t(e.onEscapeKeyDown,u=>{s.onClose(),u.preventDefault()}),onKeyDown:$t(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),p=LTe[s.dir].includes(u.key);f&&p&&(i.onOpenChange(!1),o.trigger?.focus(),u.preventDefault())})})})})})});One.displayName=Dne;function Ine(e){return e?"open":"closed"}function mb(e){return e==="indeterminate"}function eO(e){return mb(e)?"indeterminate":e?"checked":"unchecked"}function t4e(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function r4e(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function n4e(e,t,r){const a=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let s=r4e(e,Math.max(i,0));a.length===1&&(s=s.filter(c=>c!==r));const l=s.find(c=>c.toLowerCase().startsWith(a.toLowerCase()));return l!==r?l:void 0}function a4e(e,t){const{x:r,y:n}=e;let a=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const o=t[i],l=t[s],c=o.x,u=o.y,f=l.x,p=l.y;u>n!=p>n&&r<(f-c)*(n-u)/(p-u)+c&&(a=!a)}return a}function i4e(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return a4e(r,t)}function Xp(e){return t=>t.pointerType==="mouse"?e(t):void 0}var s4e=mne,o4e=KD,l4e=vne,c4e=bne,u4e=QD,d4e=xne,f4e=Sx,h4e=_ne,p4e=Ene,m4e=Cne,g4e=Ane,v4e=kne,b4e=Nne,x4e=Mne,y4e=One,Cx="DropdownMenu",[_4e,Dst]=zl(Cx,[hne]),za=hne(),[w4e,Lne]=_4e(Cx),Pne=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:i,onOpenChange:s,modal:o=!0}=e,l=za(t),c=E.useRef(null),[u,f]=y0({prop:a,defaultProp:i??!1,onChange:s,caller:Cx});return g.jsx(w4e,{scope:t,triggerId:Ic(),triggerRef:c,contentId:Ic(),open:u,onOpenChange:f,onOpenToggle:E.useCallback(()=>f(p=>!p),[f]),modal:o,children:g.jsx(s4e,{...l,open:u,onOpenChange:f,dir:n,modal:o,children:r})})};Pne.displayName=Cx;var Fne="DropdownMenuTrigger",Bne=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,i=Lne(Fne,r),s=za(r);return g.jsx(o4e,{asChild:!0,...s,children:g.jsx(Mr.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:tx(t,i.triggerRef),onPointerDown:$t(e.onPointerDown,o=>{!n&&o.button===0&&o.ctrlKey===!1&&(i.onOpenToggle(),i.open||o.preventDefault())}),onKeyDown:$t(e.onKeyDown,o=>{n||(["Enter"," "].includes(o.key)&&i.onOpenToggle(),o.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});Bne.displayName=Fne;var E4e="DropdownMenuPortal",zne=e=>{const{__scopeDropdownMenu:t,...r}=e,n=za(t);return g.jsx(l4e,{...n,...r})};zne.displayName=E4e;var jne="DropdownMenuContent",qne=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Lne(jne,r),i=za(r),s=E.useRef(!1);return g.jsx(c4e,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...n,ref:t,onCloseAutoFocus:$t(e.onCloseAutoFocus,o=>{s.current||a.triggerRef.current?.focus(),s.current=!1,o.preventDefault()}),onInteractOutside:$t(e.onInteractOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!a.modal||u)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qne.displayName=jne;var S4e="DropdownMenuGroup",C4e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=za(r);return g.jsx(u4e,{...a,...n,ref:t})});C4e.displayName=S4e;var T4e="DropdownMenuLabel",A4e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=za(r);return g.jsx(d4e,{...a,...n,ref:t})});A4e.displayName=T4e;var k4e="DropdownMenuItem",Une=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=za(r);return g.jsx(f4e,{...a,...n,ref:t})});Une.displayName=k4e;var N4e="DropdownMenuCheckboxItem",R4e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=za(r);return g.jsx(h4e,{...a,...n,ref:t})});R4e.displayName=N4e;var M4e="DropdownMenuRadioGroup",D4e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=za(r);return g.jsx(p4e,{...a,...n,ref:t})});D4e.displayName=M4e;var O4e="DropdownMenuRadioItem",I4e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=za(r);return g.jsx(m4e,{...a,...n,ref:t})});I4e.displayName=O4e;var L4e="DropdownMenuItemIndicator",P4e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=za(r);return g.jsx(g4e,{...a,...n,ref:t})});P4e.displayName=L4e;var F4e="DropdownMenuSeparator",B4e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=za(r);return g.jsx(v4e,{...a,...n,ref:t})});B4e.displayName=F4e;var z4e="DropdownMenuArrow",j4e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=za(r);return g.jsx(b4e,{...a,...n,ref:t})});j4e.displayName=z4e;var q4e="DropdownMenuSubTrigger",U4e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=za(r);return g.jsx(x4e,{...a,...n,ref:t})});U4e.displayName=q4e;var $4e="DropdownMenuSubContent",H4e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=za(r);return g.jsx(y4e,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});H4e.displayName=$4e;var G4e=Pne,V4e=Bne,W4e=zne,K4e=qne,X4e=Une;function Fm({...e}){return g.jsx(G4e,{"data-slot":"dropdown-menu",...e})}function Bm({...e}){return g.jsx(V4e,{"data-slot":"dropdown-menu-trigger",...e})}function zm({className:e,sideOffset:t=4,...r}){return g.jsx(W4e,{children:g.jsx(K4e,{"data-slot":"dropdown-menu-content",sideOffset:t,className:ut("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function is({className:e,inset:t,variant:r="default",...n}){return g.jsx(X4e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:ut("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}const $s=e=>{const t="/static";if(typeof e=="string"){const a=e.split("").reduce((s,o)=>(s=(s<<5)-s+o.charCodeAt(0),s&s),0),i=Math.abs(a)%31;return`${t}/agent-avatar/agent-avatar-${i}.svg`}const n=Number(e)%31;return n>=0&&n<=30?`${t}/agent-avatar/agent-avatar-${n}.svg`:`${t}/agent-avatar/agent-avatar-0.svg`};/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y4e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$ne=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var Z4e={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"};/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q4e=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:s,...o},l)=>E.createElement("svg",{ref:l,...Z4e,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:$ne("lucide",a),...o},[...s.map(([c,u])=>E.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const An=(e,t)=>{const r=E.forwardRef(({className:n,...a},i)=>E.createElement(Q4e,{ref:i,iconNode:t,className:$ne(`lucide-${Y4e(e)}`,n),...a}));return r.displayName=`${e}`,r};/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J4e=An("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"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eAe=An("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"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tAe=An("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"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rAe=An("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nAe=An("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aAe=An("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iAe=An("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"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nE=An("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bh=An("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"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _z=An("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sAe=An("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wz=An("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"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oAe=An("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ez=An("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"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lAe=An("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"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aE=An("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cAe=An("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"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const uAe=An("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"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dAe=An("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sz=An("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jm=An("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function si({...e}){return g.jsx(Nte,{"data-slot":"dialog",...e})}function fAe({...e}){return g.jsx(Rte,{"data-slot":"dialog-portal",...e})}function hAe({...e}){return g.jsx(ND,{"data-slot":"dialog-close",...e})}function pAe({className:e,...t}){return g.jsx(Mte,{"data-slot":"dialog-overlay",className:ut("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function oi({className:e,children:t,showCloseButton:r=!0,...n}){return g.jsxs(fAe,{"data-slot":"dialog-portal",children:[g.jsx(pAe,{}),g.jsxs(Dte,{"data-slot":"dialog-content",className:ut("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,r&&g.jsxs(ND,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[g.jsx(jm,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Pi({className:e,...t}){return g.jsx("div",{"data-slot":"dialog-header",className:ut("flex flex-col gap-2 text-center sm:text-left",e),...t})}function C0({className:e,...t}){return g.jsx("div",{"data-slot":"dialog-footer",className:ut("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function ds({className:e,...t}){return g.jsx(Ote,{"data-slot":"dialog-title",className:ut("text-lg font-semibold leading-none",e),...t})}function e0({className:e,...t}){return g.jsx(Ite,{"data-slot":"dialog-description",className:ut("text-sm text-muted-foreground",e),...t})}function Hne({isOpen:e,onClose:t,onConfirm:r,onSuccess:n,isDeleting:a=!1,agentName:i}){const s=async()=>{try{await r(),n&&n()}catch(o){console.error("Delete operation failed:",o)}};return g.jsx(si,{open:e,onOpenChange:t,children:g.jsxs(oi,{children:[g.jsx(Pi,{children:g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("div",{className:"flex justify-center items-center rounded-full size-12 bg-warning-50",children:g.jsx(Vwe,{className:"text-warning-600 size-6",strokeWidth:2})}),g.jsx("span",{className:"text-lg font-semibold text-gray-900",children:"Delete Agent?"}),g.jsx("span",{className:"text-sm text-gray-600",children:i?`This action will permanently delete "${i}" and all of its associated data. Are you sure you want to continue?`:"This action will permanently delete the agent and all of its associated data. Are you sure you want to continue?"})]})}),g.jsxs(C0,{children:[g.jsx(mt,{variant:"outline",onClick:t,className:"w-1/2",children:"Cancel"}),g.jsx(mt,{onClick:s,className:"w-1/2",disabled:a,children:a?"Deleting...":"Delete"})]})]})})}const mAe=e=>{const t=["from-blue-400 to-blue-600","from-green-400 to-green-600","from-purple-400 to-purple-600","from-pink-400 to-pink-600","from-indigo-400 to-indigo-600","from-red-400 to-red-600","from-yellow-400 to-yellow-600","from-teal-400 to-teal-600","from-orange-400 to-orange-600","from-cyan-400 to-cyan-600","from-emerald-400 to-emerald-600","from-violet-400 to-violet-600"],r=String(e).split("").reduce((n,a)=>(n=(n<<5)-n+a.charCodeAt(0),n&n),0);return t[Math.abs(r)%t.length]},gAe=({agents:e,navigate:t,handleCreateAgent:r,creating:n})=>{const{deleteAgent:a,isDeleting:i}=Ii(),[s,o]=E.useState(!1),[l,c]=E.useState(null),u=(b,v)=>{b.stopPropagation(),c(v),o(!0)},f=async()=>{if(l)try{await a(l.id),o(!1),c(null)}catch(b){console.error("Error deleting agent:",b)}},p=()=>{Fr.success(g.jsxs("div",{children:[g.jsx("span",{style:{fontWeight:"bold"},children:l?.name})," has been deleted successfully"]}),{style:{background:"#f0fdf4",color:"#166534",border:"1px solid #bbf7d0",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1)",fontSize:"14px",fontWeight:"500"}}),t("/agents?tab=my")},m=()=>{o(!1),c(null)};return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"grid grid-cols-1 gap-8 md:grid-cols-2 lg:grid-cols-3",children:e&&e.length>0?e.sort((b,v)=>{const y=new Date(b.created_at||0).getTime();return new Date(v.created_at||0).getTime()-y}).map(b=>g.jsxs("div",{className:"flex flex-col gap-4 p-6 bg-white rounded-2xl border border-gray-200 transition-shadow hover:shadow-md",children:[g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex gap-2 justify-between",children:[g.jsx("div",{className:"flex overflow-hidden justify-center items-center w-12 h-12 rounded-full",children:g.jsx("img",{src:$s(b.id),alt:`${b.name} avatar`,className:"object-cover w-full h-full",onError:v=>{const y=v.target;y.style.display="none";const _=y.parentElement;_&&(_.className=`flex justify-center items-center w-12 h-12 text-lg font-bold text-white bg-gradient-to-br ${mAe(b.id)} rounded-full`,_.innerHTML=`<span className="text-white">${b.name[0]}</span>`)}})}),g.jsx("div",{className:"flex gap-2",children:g.jsxs(Fm,{children:[g.jsx(Bm,{asChild:!0,children:g.jsx(mt,{variant:"ghost",size:"sm",className:"p-0 transform translate-x-4 -translate-y-2",onClick:v=>v.stopPropagation(),children:g.jsx(c2e,{className:"text-gray-700 size-4",strokeWidth:2})})}),g.jsx(zm,{align:"start",children:g.jsxs(is,{onClick:v=>{v.stopPropagation(),u(v,b)},children:[g.jsx(kre,{className:"text-gray-700 size-4",strokeWidth:2}),g.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Delete Agent"})]})})]})})]}),g.jsxs("div",{className:"flex flex-col flex-1",children:[g.jsx("div",{className:"flex gap-2 items-center",children:g.jsx("span",{className:"text-lg font-semibold text-gray-900 line-clamp-1",style:{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:b.name})}),g.jsx("span",{className:"mt-1 text-sm text-medium text-gray-600 line-clamp-2 max-h-[20px]",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:b.description||"Domain expertise is not yet defined"})]})]}),g.jsxs("div",{className:"flex gap-2 justify-between items-center",children:[g.jsxs(mt,{onClick:v=>{v.stopPropagation(),t(`/agents/${b.id}`)},variant:"outline",className:"w-1/2 text-sm font-semibold text-gray-700",children:[g.jsx(Nm,{style:{width:"20",height:"20"}}),"Train"]}),g.jsxs(mt,{onClick:v=>{v.stopPropagation(),t(`/agents/${b.id}/chat`)},variant:"outline",className:"w-1/2 text-sm font-semibold text-gray-700",children:[g.jsx(Cre,{style:{width:"20",height:"20"}}),"Use agent"]})]})]},b.id)):g.jsx("div",{className:"col-span-3",children:g.jsxs("div",{className:"flex flex-col gap-2 justify-center items-center p-12 rounded-lg",children:[g.jsx("img",{src:"/images/empty-agent.svg",alt:"No agents",className:"mb-4 w-24 h-24"}),g.jsx("div",{className:"text-lg font-semibold text-center text-gray-900",children:"You haven't created any agents yet."}),g.jsxs("div",{className:"text-sm text-gray-700",children:["Train your own agent with support from ",g.jsx("b",{children:"Dana"}),", our training expert."]}),g.jsxs(mt,{variant:"default",className:"w-[200px] px-4 py-1 mt-2 font-semibold",onClick:r,disabled:n,children:[g.jsx(Tre,{style:{width:"20",height:"20"}}),"Train Your Own Agent"]})]})})}),g.jsx(Hne,{isOpen:s,onClose:m,onConfirm:f,onSuccess:p,isDeleting:i,agentName:l?.name})]})},ud=Ys((e,t)=>({isCreateAgentDialogOpen:!1,isSettingsDialogOpen:!1,isHelpDialogOpen:!1,currentPage:"dashboard",sidebarCollapsed:!1,isChatSidebarOpen:!1,agentDetailActiveTab:"Overview",knowledgeBaseActiveSubTab:"Domain Knowledge",theme:"system",sidebarWidth:280,notifications:[],openCreateAgentDialog:()=>e({isCreateAgentDialogOpen:!0}),closeCreateAgentDialog:()=>e({isCreateAgentDialogOpen:!1}),openSettingsDialog:()=>e({isSettingsDialogOpen:!0}),closeSettingsDialog:()=>e({isSettingsDialogOpen:!1}),openHelpDialog:()=>e({isHelpDialogOpen:!0}),closeHelpDialog:()=>e({isHelpDialogOpen:!1}),setCurrentPage:r=>e({currentPage:r}),toggleSidebar:()=>e(r=>({sidebarCollapsed:!r.sidebarCollapsed})),setSidebarCollapsed:r=>e({sidebarCollapsed:r}),openChatSidebar:()=>e({isChatSidebarOpen:!0}),closeChatSidebar:()=>e({isChatSidebarOpen:!1}),toggleChatSidebar:()=>e(r=>({isChatSidebarOpen:!r.isChatSidebarOpen})),setAgentDetailActiveTab:r=>e({agentDetailActiveTab:r}),setKnowledgeBaseActiveSubTab:r=>e({knowledgeBaseActiveSubTab:r}),setTheme:r=>e({theme:r}),setSidebarWidth:r=>e({sidebarWidth:r}),addNotification:r=>{const n=Math.random().toString(36).substr(2,9),a={...r,id:n};e(s=>({notifications:[...s.notifications,a]}));const i=r.duration===void 0?5e3:r.duration;i>0&&setTimeout(()=>{t().removeNotification(n)},i)},removeNotification:r=>{e(n=>({notifications:n.notifications.filter(a=>a.id!==r)}))},clearNotifications:()=>e({notifications:[]}),reset:()=>{e({isCreateAgentDialogOpen:!1,isSettingsDialogOpen:!1,isHelpDialogOpen:!1,currentPage:"dashboard",sidebarCollapsed:!1,isChatSidebarOpen:!1,agentDetailActiveTab:"Overview",knowledgeBaseActiveSubTab:"Domain Knowledge",theme:"system",sidebarWidth:280,notifications:[]})}})),vAe=({filteredAgents:e,selectedDomain:t,setSelectedDomain:r,navigate:n,DOMAINS:a,handleCreateAgent:i,creating:s})=>{const[o,l]=E.useState(null),[c,u]=E.useState(!1),{setAgentDetailActiveTab:f}=ud(),p=v=>{l(v),u(!0)},m=async()=>{if(o){try{if(o.is_prebuilt){const v=await gt.cloneAgentFromPrebuilt(o.key);v&&v.id&&(f("Overview"),n(`/agents/${v.id}`))}else f("Overview"),n(`/agents/${o.id}/chat`)}catch(v){console.error(v)}u(!1)}},b=async()=>{if(o){try{if(o.is_prebuilt){const v=await gt.cloneAgentFromPrebuilt(o.key);v&&v.id&&(f("Overview"),n(`/agents/${v.id}/chat`))}else f("Overview"),n(`/agents/${o.id}/chat`)}catch(v){console.error(v)}u(!1)}};return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex justify-between items-center mb-4 text-gray-600",children:g.jsx("p",{children:"Pre-trained agents with built-in domain expertise by Aitomatic"})}),g.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:a.map(v=>g.jsx(mt,{variant:t===v?"secondary":"outline",className:`rounded-full px-5 py-1 text-base font-medium ${t===v?"border-transparent border":"bg-white"}`,onClick:()=>r(v),children:v},v))}),g.jsx("div",{className:"grid grid-cols-1 gap-8 md:grid-cols-2 lg:grid-cols-3",children:e.map(v=>g.jsxs("div",{onClick:()=>p(v),className:"flex flex-col gap-4 p-6 bg-white rounded-2xl border border-gray-200 transition-shadow cursor-pointer hover:shadow-md",children:[g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex gap-2 justify-between items-center",children:[g.jsx("div",{className:"flex overflow-hidden justify-center items-center w-12 h-12 rounded-full",children:g.jsx("img",{src:$s(v.id),alt:`${v.name} avatar`,className:"object-cover w-full h-full",onError:y=>{const _=y.target;_.style.display="none";const S=_.parentElement;S&&(S.className="flex justify-center items-center w-12 h-12 text-lg font-bold text-white bg-gradient-to-br from-pink-400 to-purple-400 rounded-full",S.innerHTML=`<span className="text-white">${v.name[0]}</span>`)}})}),v.config?.domain&&g.jsx("span",{className:"px-3 py-1 ml-2 text-sm font-medium text-gray-600 rounded-full border border-gray-200",children:v.config.domain})]}),g.jsxs("div",{className:"flex flex-col flex-1",children:[g.jsx("div",{className:"flex gap-2 items-center",children:g.jsx("span",{className:"text-lg font-semibold text-gray-900 line-clamp-1",style:{display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:v.name})}),g.jsx("span",{className:"mt-1 text-sm font-medium text-gray-600 line-clamp-2 max-h-[20px]",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:v.description})]})]}),g.jsx("div",{className:"text-gray-500 text-sm h-[40px] max-h-[40px] overflow-hidden",children:v.details||""})]},v.id))}),g.jsxs("div",{className:"flex flex-col gap-2 justify-center p-8 mt-8 bg-gray-50 rounded-lg",children:[g.jsx("div",{className:"text-lg font-semibold text-gray-900",children:"Can't find a pre-trained agent for your domain?"}),g.jsxs("div",{className:"text-sm text-gray-700",children:["Train your own agent with support from ",g.jsx("b",{children:"Dana"}),", our training expert."]}),g.jsxs(mt,{variant:"default",className:"w-[200px] px-4 py-1 mt-2 font-semibold",onClick:i,disabled:s,children:[g.jsx(Tre,{style:{width:"20",height:"20"}}),"Train Your Own Agent"]})]}),g.jsx(si,{open:c,onOpenChange:u,children:g.jsxs(oi,{className:"max-w-md",children:[g.jsxs(Pi,{children:[g.jsxs("div",{className:"flex flex-col gap-3 mb-2",children:[g.jsx("div",{className:"flex overflow-hidden justify-center items-center w-12 h-12 rounded-full",children:o&&g.jsx("img",{src:$s(o.id),alt:`${o.name} avatar`,className:"object-cover w-full h-full",onError:v=>{const y=v.target;y.style.display="none";const _=y.parentElement;_&&(_.className="flex justify-center items-center w-12 h-12 text-lg font-bold text-white bg-gradient-to-br from-pink-400 to-purple-400 rounded-full",_.innerHTML=`<span className="text-white">${o.name[0]}</span>`)}})}),g.jsx("div",{children:g.jsx(ds,{className:"text-xl font-semibold text-gray-900",children:o?.name})})]}),g.jsxs("div",{className:"mb-4 space-y-4",children:[g.jsxs("div",{children:[g.jsx("h4",{className:"mb-1 text-sm font-medium text-gray-800",children:"Role"}),g.jsx("p",{className:"text-sm text-gray-600",children:o?.description||"No description available"})]}),o?.config?.domain&&g.jsxs("div",{children:[g.jsx("h4",{className:"mb-1 text-sm font-medium text-gray-800",children:"Domain"}),g.jsx("p",{className:"text-sm text-gray-600",children:o.config.domain})]}),(()=>{const v=o?.config?.specialties||[],y=o?.config?.topics||[],_=[...v,...y],S=Array.from(new Set(_));return S.length>0&&g.jsxs("div",{children:[g.jsx("h4",{className:"mb-1 text-sm font-medium text-gray-800",children:"Topics"}),g.jsx("div",{className:"flex flex-wrap gap-1",children:S.map((C,T)=>g.jsx("span",{className:"px-2 py-1 text-xs text-blue-800 capitalize bg-blue-100 rounded-full",children:C},T))})]})})(),(()=>{const v=o?.config?.skills||[],y=o?.config?.tasks||[],_=[...v,...y],S=Array.from(new Set(_));return S.length>0&&g.jsxs("div",{children:[g.jsx("h4",{className:"mb-1 text-sm font-medium text-gray-800",children:"Tasks"}),g.jsx("div",{className:"flex flex-wrap gap-1",children:S.map((C,T)=>g.jsx("span",{className:"px-2 py-1 text-xs text-green-800 capitalize bg-green-100 rounded-full",children:C},T))})]})})(),(o?.config?.expertise_level||o?.config?.personality)&&g.jsx("div",{className:"flex gap-4"})]})]}),g.jsxs(C0,{className:"flex-col gap-2 sm:flex-row",children:[g.jsxs(mt,{onClick:m,variant:"outline",className:"w-full text-sm font-semibold text-gray-700 sm:w-1/2",children:[g.jsx(Nm,{style:{width:"16",height:"16"}}),"Train from this agent"]}),g.jsxs(mt,{onClick:b,variant:"default",className:"w-full text-sm font-semibold sm:w-1/2",children:[g.jsx(wre,{style:{width:"16",height:"16"}}),"Save to My Agent and Use"]})]})]})})]})},bAe=["All domains","Finance","Semiconductor","Sales","Engineering","Research"],xAe={explore:"Explore",my:"My Agent"};function yAe(){const e=Oo(),[t,r]=Hpe(),{agents:n,fetchAgents:a}=Ii(),[i,s]=E.useState(""),[o,l]=E.useState(""),[c,u]=E.useState("All domains"),[f,p]=E.useState(!1),[m,b]=E.useState(!1),[v,y]=E.useState([]),_=t.get("tab")||"explore",S=xAe[_],C=N=>{const L=new URLSearchParams(t);L.set("tab",N),r(L)},T=async()=>{try{const N=await gt.getPrebuiltAgents();y(N)}catch(N){console.error("Error fetching prebuilt agents:",N),y([])}};E.useEffect(()=>{n&&n.length===0&&!t.get("tab")&&C("explore")},[n,t]),E.useEffect(()=>{a(),T()},[]),E.useEffect(()=>{const N=()=>{window.scrollY>100&&b(!0)},L=()=>{b(!0)};window.addEventListener("scroll",N);const I=document.querySelectorAll('input[type="text"]');return I.forEach(P=>{P.addEventListener("focus",L)}),()=>{window.removeEventListener("scroll",N),I.forEach(P=>{P.removeEventListener("focus",L)})}},[]);const A=v.filter(N=>{const L=N.config?.domain||"Other",I=c==="All domains"||L===c,P=N.name.toLowerCase().includes(o.toLowerCase())||(N.description||"").toLowerCase().includes(o.toLowerCase())||(N.details||"").toLowerCase().includes(o.toLowerCase());return I&&P}),k=async()=>{p(!0);try{const N=await gt.createAgent({name:"Untitled Agent",description:"",config:{}});N&&N.id&&e(`/agents/${N.id}`)}catch(N){console.error("Error creating agent:",N)}finally{p(!1)}};return g.jsxs("div",{className:"flex overflow-hidden flex-col w-full h-full",children:[g.jsxs("div",{className:`hidden relative overflow-hidden transition-all duration-700 ease-out ${m?"bg-gradient-to-r to-purple-900 min-h-[200px] from-slate-900":"py-16 bg-gradient-to-br via-purple-900 min-h-[600px] from-slate-900 to-slate-900"}`,children:[!m&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"absolute inset-0",children:[g.jsx("div",{className:"absolute top-0 left-0 w-72 h-72 bg-purple-500 rounded-full opacity-20 mix-blend-multiply filter blur-xl animate-blob"}),g.jsx("div",{className:"absolute top-0 right-0 w-72 h-72 bg-yellow-500 rounded-full opacity-20 mix-blend-multiply filter blur-xl animate-blob animation-delay-2000"}),g.jsx("div",{className:"absolute -bottom-8 left-20 w-72 h-72 bg-pink-500 rounded-full opacity-20 mix-blend-multiply filter blur-xl animate-blob animation-delay-4000"})]}),g.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml,%3Csvg%20width%3D%2260%22%20height%3D%2260%22%20viewBox%3D%220%200%2060%2060%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cg%20fill%3D%22%23ffffff%22%20fill-opacity%3D%220.05%22%3E%3Ccircle%20cx%3D%2230%22%20cy%3D%2230%22%20r%3D%221%22/%3E%3C/g%3E%3C/g%3E%3C/svg%3E')] opacity-30"})]}),g.jsxs("div",{className:`relative z-10 flex flex-col items-center justify-center text-center transition-all duration-700 ease-out ${m?"overflow-hidden h-0":"px-6 min-h-[600px]"}`,children:[g.jsxs("div",{className:`transition-all duration-700 ease-out ${m?"mb-0 opacity-0 scale-75":"mb-8 opacity-100 scale-100"}`,children:[g.jsx("h1",{className:"mb-2 text-7xl font-black tracking-tight leading-none text-white md:text-8xl",children:g.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-purple-400 via-pink-400 to-yellow-400",children:"Dana"})}),g.jsx("h2",{className:"mb-2 text-5xl font-black tracking-tight text-white md:text-6xl",children:"Agent Studio"})]}),g.jsxs("p",{className:`text-xl md:text-2xl text-gray-200 max-w-4xl leading-relaxed font-light transition-all duration-700 ease-out ${m?"mb-0 opacity-0 scale-75":"mb-12 opacity-100 scale-100"}`,children:["The complete platform for"," ",g.jsx("span",{className:"font-semibold text-purple-300",children:"building, training, and deploying"})," ","Dana Expert Agents"]}),g.jsxs("div",{className:`grid grid-cols-1 md:grid-cols-3 gap-8 max-w-5xl transition-all duration-700 ease-out ${m?"mb-0 opacity-0 scale-75":"mb-16 opacity-100 scale-100"}`,children:[g.jsxs("div",{className:"p-8 rounded-2xl border backdrop-blur-sm transition-all duration-500 group bg-white/10 border-white/20 hover:bg-white/20 hover:scale-105 hover:shadow-2xl hover:shadow-purple-500/20",children:[g.jsx("div",{className:"flex justify-center items-center mx-auto mb-6 w-16 h-16 bg-gradient-to-r from-purple-400 to-pink-400 rounded-2xl shadow-lg",children:g.jsx("svg",{className:"w-8 h-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),g.jsx("h3",{className:"mb-3 text-xl font-bold text-white",children:"Agent Maker"}),g.jsx("p",{className:"text-sm leading-relaxed text-gray-300",children:"Create Dana Expert Agents with domain expertise and learning capabilities"})]}),g.jsxs("div",{className:"relative p-8 rounded-2xl border backdrop-blur-sm transition-all duration-500 group bg-white/5 border-white/10 hover:scale-105",children:[g.jsx("div",{className:"absolute top-4 right-4",children:g.jsx("span",{className:"px-2 py-1 text-xs font-semibold text-yellow-300 rounded-full border bg-yellow-500/20 border-yellow-400/40",children:"Coming Soon"})}),g.jsx("div",{className:"flex justify-center items-center mx-auto mb-6 w-16 h-16 bg-gradient-to-r from-pink-400 to-yellow-400 rounded-2xl shadow-lg opacity-60",children:g.jsx("svg",{className:"w-8 h-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})})}),g.jsx("h3",{className:"mb-3 text-xl font-bold text-white opacity-60",children:"Experience Learner"}),g.jsx("p",{className:"text-sm leading-relaxed text-gray-400 opacity-60",children:"Dana Expert Agents that evolve and improve through continuous learning and feedback"})]}),g.jsxs("div",{className:"relative p-8 rounded-2xl border backdrop-blur-sm transition-all duration-500 group bg-white/5 border-white/10 hover:scale-105",children:[g.jsx("div",{className:"absolute top-4 right-4",children:g.jsx("span",{className:"px-2 py-1 text-xs font-semibold text-yellow-300 rounded-full border bg-yellow-500/20 border-yellow-400/40",children:"Coming Soon"})}),g.jsx("div",{className:"flex justify-center items-center mx-auto mb-6 w-16 h-16 bg-gradient-to-r from-yellow-400 to-purple-400 rounded-2xl shadow-lg opacity-60",children:g.jsx("svg",{className:"w-6 h-6 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),g.jsx("h3",{className:"mb-3 text-xl font-bold text-white opacity-60",children:"App Generators"}),g.jsx("p",{className:"text-sm leading-relaxed text-gray-400 opacity-60",children:"Deploy Dana Expert Agents to web, iOS, and Android with built-in app generation"})]})]}),g.jsx("div",{className:`flex flex-col items-center gap-4 transition-all duration-700 ease-out ${m?"opacity-0 scale-75":"opacity-100 scale-100"}`,children:g.jsxs("button",{onClick:()=>{document.getElementById("pre-trained-agents")?.scrollIntoView({behavior:"smooth"})},className:"flex gap-3 items-center text-lg text-gray-300 transition-colors duration-300 cursor-pointer hover:text-white group",children:[g.jsx("svg",{className:"w-6 h-6 animate-bounce group-hover:animate-pulse",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})}),g.jsx("span",{className:"font-medium",children:"Explore agents below"})]})})]}),!m&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"absolute top-20 right-20 w-4 h-4 bg-yellow-400 rounded-full animate-ping"}),g.jsx("div",{className:"absolute bottom-20 left-20 w-3 h-3 bg-purple-400 rounded-full animate-pulse"}),g.jsx("div",{className:"absolute top-40 left-40 w-2 h-2 bg-pink-400 rounded-full animate-bounce"})]}),g.jsx("div",{className:`absolute inset-0 flex items-center justify-center transition-all duration-700 ease-out ${m?"opacity-100 scale-100":"opacity-0 scale-75 pointer-events-none"}`,children:g.jsxs("div",{className:"flex flex-col gap-4 items-center",children:[g.jsx("h1",{className:"text-3xl font-bold text-white",children:g.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-pink-400",children:"Dana Agent Studio"})}),g.jsx("div",{className:"flex gap-3 items-center",children:g.jsx("span",{className:"px-3 py-1.5 text-sm font-semibold bg-green-500/20 text-green-300 border border-green-400/40 rounded-full shadow-lg",children:"🚀 Agent Maker"})}),g.jsx("p",{className:"max-w-md text-sm text-center text-gray-300",children:"The complete platform for building, training, and deploying Dana Expert Agents"})]})})]}),g.jsxs("div",{className:"flex-1 p-8 bg-white",children:[g.jsx("div",{className:"flex flex-col gap-4 mb-8 md:flex-row md:items-center md:justify-between",children:g.jsx("div",{className:"flex flex-col gap-4 justify-between items-center w-full md:flex-row",children:g.jsxs("div",{className:"relative w-full md:w-72",children:[g.jsx("svg",{className:"absolute left-3 top-1/2 w-5 h-5 text-gray-400 transform -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),g.jsx("input",{type:"text",placeholder:"Search agents...",value:S==="My Agent"?i:o,onChange:N=>S==="My Agent"?s(N.target.value):l(N.target.value),className:"py-3 pr-4 pl-10 w-full text-base text-gray-900 rounded-sm border border-gray-200 transition-all duration-300 focus:outline-none focus:bg-white focus:shadow-md"})]})})}),g.jsxs("div",{className:"flex gap-4 mb-8 border-b border-gray-200",children:[g.jsx("button",{className:`py-3  cursor-pointer font-semibold border-b-2 transition-all duration-300 rounded-t-lg ${S==="Explore"?"border-brand-500 text-brand-600":"border-transparent text-gray-500 hover:text-brand-600"}`,onClick:()=>C("explore"),children:g.jsx("span",{className:"flex gap-2 items-center",children:"Pre-trained Agents"})}),g.jsx("button",{className:`py-3 cursor-pointer font-semibold border-b-2 transition-all duration-300 rounded-t-lg ${S==="My Agent"?"border-brand-500 text-brand-600":"border-transparent text-gray-500 hover:text-brand-600"}`,onClick:()=>C("my"),children:g.jsx("span",{className:"flex gap-2 items-center",children:"My Agents"})})]}),S==="My Agent"&&g.jsx(gAe,{agents:n.filter(N=>N.name.toLowerCase().includes(i.toLowerCase())||(N.description||"").toLowerCase().includes(i.toLowerCase())),navigate:e,handleCreateAgent:k,creating:f}),S==="Explore"&&g.jsx("div",{id:"pre-trained-agents",children:g.jsx(vAe,{filteredAgents:A,selectedDomain:c,setSelectedDomain:u,navigate:e,DOMAINS:bAe,handleCreateAgent:k,creating:f})})]})]})}function _Ae(e,t){let r;try{r=e()}catch{return}return{getItem:a=>{var i;const s=l=>l===null?null:JSON.parse(l,void 0),o=(i=r.getItem(a))!=null?i:null;return o instanceof Promise?o.then(s):s(o)},setItem:(a,i)=>r.setItem(a,JSON.stringify(i,void 0)),removeItem:a=>r.removeItem(a)}}const $5=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return $5(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return $5(n)(r)}}}},wAe=(e,t)=>(r,n,a)=>{let i={storage:_Ae(()=>localStorage),partialize:v=>v,version:0,merge:(v,y)=>({...y,...v}),...t},s=!1;const o=new Set,l=new Set;let c=i.storage;if(!c)return e((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...v)},n,a);const u=()=>{const v=i.partialize({...n()});return c.setItem(i.name,{state:v,version:i.version})},f=a.setState;a.setState=(v,y)=>(f(v,y),u());const p=e((...v)=>(r(...v),u()),n,a);a.getInitialState=()=>p;let m;const b=()=>{var v,y;if(!c)return;s=!1,o.forEach(S=>{var C;return S((C=n())!=null?C:p)});const _=((y=i.onRehydrateStorage)==null?void 0:y.call(i,(v=n())!=null?v:p))||void 0;return $5(c.getItem.bind(c))(i.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==i.version){if(i.migrate){const C=i.migrate(S.state,S.version);return C instanceof Promise?C.then(T=>[!0,T]):[!0,C]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var C;const[T,A]=S;if(m=i.merge(A,(C=n())!=null?C:p),r(m,!0),T)return u()}).then(()=>{_?.(m,void 0),m=n(),s=!0,l.forEach(S=>S(m))}).catch(S=>{_?.(void 0,S)})};return a.persist={setOptions:v=>{i={...i,...v},v.storage&&(c=v.storage)},clearStorage:()=>{c?.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>b(),hasHydrated:()=>s,onHydrate:v=>(o.add(v),()=>{o.delete(v)}),onFinishHydration:v=>(l.add(v),()=>{l.delete(v)})},i.skipHydration||b(),m||p},Gne=wAe,Vne=e=>Ys()(Gne((t,r)=>({messages:[],addMessage:n=>t(a=>{const i={...n,id:n.id||`${Date.now()}-${Math.random()}`,timestamp:n.timestamp||Date.now()};return{messages:[...a.messages,i]}}),removeMessage:n=>t(a=>({messages:a.messages.filter((i,s)=>s!==n)})),removeMessageById:n=>t(a=>({messages:a.messages.filter(i=>i.id!==n)})),clearMessages:()=>t({messages:[]}),setMessages:n=>t({messages:n.map(a=>({...a,id:a.id||`${Date.now()}-${Math.random()}`,timestamp:a.timestamp||Date.now()}))}),updateMessage:(n,a)=>t(i=>({messages:i.messages.map((s,o)=>o===n?{...s,...a}:s)})),getMessageCount:()=>r().messages.length}),{name:`smart-chat-storage-${e}`,partialize:t=>({messages:t.messages})}));Ys()(Gne((e,t)=>({messages:[],addMessage:r=>e(n=>{const a={...r,id:r.id||`${Date.now()}-${Math.random()}`,timestamp:r.timestamp||Date.now()};return{messages:[...n.messages,a]}}),removeMessage:r=>e(n=>({messages:n.messages.filter((a,i)=>i!==r)})),removeMessageById:r=>e(n=>({messages:n.messages.filter(a=>a.id!==r)})),clearMessages:()=>e({messages:[]}),setMessages:r=>e({messages:r.map(n=>({...n,id:n.id||`${Date.now()}-${Math.random()}`,timestamp:n.timestamp||Date.now()}))}),updateMessage:(r,n)=>e(a=>({messages:a.messages.map((i,s)=>s===r?{...i,...n}:i)})),getMessageCount:()=>t().messages.length}),{name:"smart-chat-storage",partialize:e=>({messages:e.messages})}));const H5=e=>{try{const t=`smart-chat-storage-${e}`;return localStorage.removeItem(t),Vne(e).getState().clearMessages(),console.log(`[Storage Utility] Cleared smart-chat-storage for agent ${e}`),!0}catch(t){return console.warn(`[Storage Utility] Failed to clear storage for agent ${e}:`,t),!1}},EAe=["During ballast operations near Japan's coastline, what legal precautions must be followed to avoid violating environmental laws?","A minor collision occurs in Tokyo Bay with no visible damage or injuries. What are the reporting requirements under maritime law?","Design a 4-step emergency plan for a Japanese cargo vessel with lithium-ion battery cargo that catches fire near a populated harbor.","Design a 4-step emergency plan for a Japanese cargo vessel with lithium-ion battery cargo that catches fire near a populated harbor."],SAe=[["Speed","2.3s","45s"],["Accuracy","98.7%","73%"],["Financial Compliance",g.jsx("div",{className:"flex gap-2 items-center text-gray-500",children:"✅ SOX"}),g.jsx("div",{className:"text-red-500",children:g.jsx(wp,{})})],["Company Context",g.jsx("div",{className:"flex gap-2 items-center",children:"✅ Full"}),g.jsx("div",{className:"text-red-500",children:g.jsx(wp,{})})],["Professional Format",g.jsx("div",{className:"flex gap-2 items-center",children:"✅ Board"}),g.jsx("div",{className:"text-red-500",children:g.jsx(wp,{})})]],CAe=g.jsxs(g.Fragment,{children:["Immediately notify the Japan Coast Guard about the collision, providing details such as the location, time, and vessels involved.",g.jsxs("ul",{className:"mt-2 ml-5 text-sm list-disc text-gray-700",children:[g.jsx("li",{children:"Exchange contact and vessel information with the other party involved in the collision. This includes the vessel's name, registration number, and the owner's contact information."}),g.jsx("li",{children:"Document the incident thoroughly by taking clear photographs of the scene, noting the time and location, and recording any relevant details about the circumstances and potential contributing factors."}),g.jsx("li",{children:"Submit a written report to the local maritime authority within 24 hours, detailing the incident and any actions taken."}),g.jsx("li",{children:"Retain all documentation and communication related to the incident for future reference or legal requirements. This includes correspondence with authorities, insurance companies, and other involved parties."})]})]}),TAe=g.jsx(g.Fragment,{children:"In the event of a minor collision in Tokyo Bay with no visible damage or injuries, Japanese maritime law requires that you still report the incident. It is important to implement a structured reporting process, such as using an Incident Management System (IMS) to ensure traceability and compliance. A comprehensive incident report should be logged within 24 hours, even if the collision appears minor. This helps in understanding the root cause and preventing future occurrences. Additionally, maintaining detailed records and ensuring communication with relevant authorities, such as the Japan Coast Guard, is crucial for compliance and safety management."}),AAe=({open:e,onClose:t})=>e?g.jsx("div",{className:"flex fixed inset-0 z-50 justify-center items-center bg-black bg-opacity-30",children:g.jsxs("div",{className:"bg-white rounded-2xl shadow-xl w-full max-w-5xl max-h-[90vh] flex flex-col p-8 relative overflow-y-auto",children:[g.jsxs("div",{className:"flex justify-between items-center mb-6",children:[g.jsx("div",{className:"text-xl font-semibold",children:"Performance Comparison"}),g.jsx("button",{onClick:t,className:"p-2 rounded hover:bg-gray-100",children:g.jsx(jm,{className:"w-6 h-6 text-gray-500"})})]}),g.jsxs("div",{className:"flex flex-row gap-8 h-full",children:[g.jsxs("div",{className:"flex flex-col flex-shrink-0 gap-6 w-64",children:[g.jsxs(mt,{variant:"outline",className:"flex gap-2 items-center w-full",children:[g.jsx(L_e,{className:"w-4 h-4"}),"Evaluate with your task"]}),g.jsxs("div",{children:[g.jsx("div",{className:"mb-2 text-sm font-semibold text-gray-700",children:"Example Tasks"}),g.jsx("div",{className:"flex flex-col gap-2",children:EAe.map((r,n)=>g.jsx("div",{className:"p-3 text-xs text-gray-700 bg-gray-50 rounded-lg border border-gray-100",children:r},n))})]})]}),g.jsxs("div",{className:"flex flex-col flex-1 gap-8",children:[g.jsxs("div",{children:[g.jsx("div",{className:"mb-2 font-semibold text-gray-700",children:"Response Quality"}),g.jsxs("table",{className:"overflow-hidden w-full text-sm rounded-lg border",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"bg-gray-50",children:[g.jsx("th",{className:"p-2 text-left",children:"No"}),g.jsx("th",{className:"p-2 text-left",children:"Response Quality"}),g.jsx("th",{className:"p-2 text-left",children:"Georgia"}),g.jsx("th",{className:"p-2 text-left",children:"Generic AI"})]})}),g.jsx("tbody",{children:SAe.map((r,n)=>g.jsxs("tr",{className:"border-t",children:[g.jsx("td",{className:"p-2",children:n+1}),g.jsx("td",{className:"p-2",children:r[0]}),g.jsx("td",{className:"p-2",children:r[1]}),g.jsx("td",{className:"p-2",children:r[2]})]},n))})]})]}),g.jsxs("div",{children:[g.jsx("div",{className:"mb-2 font-semibold text-gray-700",children:"Comparison Results"}),g.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[g.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg",children:[g.jsxs("div",{className:"flex gap-2 items-center mb-2",children:[g.jsx("div",{className:"flex justify-center items-center w-6 h-6 text-base font-bold text-white bg-gradient-to-br from-pink-400 to-purple-400 rounded-full",children:"G"}),g.jsx("span",{className:"font-semibold text-gray-900",children:"Georgia"})]}),g.jsx("div",{className:"text-xs leading-relaxed text-gray-700",children:CAe})]}),g.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg",children:[g.jsx("div",{className:"mb-2 font-semibold text-gray-900",children:"Generic AI Model"}),g.jsx("div",{className:"text-xs leading-relaxed text-gray-700",children:TAe})]})]})]})]})]})]})}):null,kAe=({title:e,onDeploy:t,onCancel:r})=>g.jsxs("div",{className:"flex justify-between items-center px-6 py-4 bg-white border-b h-[64px]",children:[g.jsx("div",{className:"font-semibold text-gray-700",children:e}),g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsx(mt,{variant:"ghost",className:"px-4 py-1 text-sm font-medium text-gray-500 cursor-pointer",onClick:r,children:"Close"}),g.jsxs(mt,{variant:"default",className:"px-4 py-1 font-semibold",onClick:t,children:[g.jsx(Cre,{className:"w-4 h-4",strokeWidth:1.5})," Use Mode"]})]})]}),NAe="/static/agent-avatar/javis-avatar.svg",RAe=500,tO=Ys((e,t)=>({domainKnowledge:null,knowledgeStatus:null,isLoading:!1,error:null,currentAgentId:null,websocket:null,lastFetchTime:0,fetchKnowledgeData:async(r,n=!1)=>{const a=t(),i=Date.now();if(!n&&a.currentAgentId===r&&a.domainKnowledge&&a.knowledgeStatus&&i-a.lastFetchTime<RAe){console.log("[KnowledgeStore] Skipping fetch due to debouncing");return}e({isLoading:!0,error:null,lastFetchTime:i});try{console.log("[KnowledgeStore] Fetching knowledge data for agent:",r);const[s,o]=await Promise.all([gt.getDomainKnowledge(r),gt.getKnowledgeStatus(r).catch(()=>({topics:[]}))]);e({domainKnowledge:s,knowledgeStatus:o,currentAgentId:r,isLoading:!1,error:null}),console.log("[KnowledgeStore] Successfully fetched knowledge data")}catch(s){console.error("[KnowledgeStore] Error fetching knowledge data:",s),e({isLoading:!1,error:s instanceof Error?s.message:"Failed to fetch knowledge data"})}},clearKnowledgeData:()=>{console.log("[KnowledgeStore] Clearing knowledge data"),e({domainKnowledge:null,knowledgeStatus:null,currentAgentId:null,error:null,lastFetchTime:0})},setCurrentAgent:r=>{t().currentAgentId!==r&&(console.log("[KnowledgeStore] Setting current agent:",r),r===null?(t().clearKnowledgeData(),t().disconnectWebSocket()):(e({currentAgentId:r}),t().fetchKnowledgeData(r),t().connectWebSocket(r)))},connectWebSocket:r=>{const n=t();n.websocket&&n.websocket.close(),console.log("[KnowledgeStore] Connecting WebSocket for agent:",r);try{const a=new WebSocket("ws://localhost:8080/ws/knowledge-status");a.onopen=()=>{console.log("[KnowledgeStore] WebSocket connected")},a.onmessage=i=>{try{JSON.parse(i.data).type==="knowledge_status_update"&&(console.log("[KnowledgeStore] Received knowledge status update, refreshing data"),setTimeout(()=>{t().currentAgentId===r&&t().fetchKnowledgeData(r,!0)},100))}catch(s){console.warn("[KnowledgeStore] Failed to parse WebSocket message:",s)}},a.onclose=i=>{console.log("[KnowledgeStore] WebSocket closed:",i.code,i.reason),i.code!==1e3&&t().currentAgentId===r&&setTimeout(()=>{t().currentAgentId===r&&(console.log("[KnowledgeStore] Attempting to reconnect WebSocket"),t().connectWebSocket(r))},3e3)},a.onerror=i=>{console.error("[KnowledgeStore] WebSocket error:",i)},e({websocket:a})}catch(a){console.error("[KnowledgeStore] Failed to create WebSocket:",a)}},disconnectWebSocket:()=>{const r=t();r.websocket&&(console.log("[KnowledgeStore] Disconnecting WebSocket"),r.websocket.close(1e3,"Intentional disconnect"),e({websocket:null}))}})),MAe="modulepreload",DAe=function(e){return"/static/"+e},Cz={},Wne=function(t,r,n){let a=Promise.resolve();if(r&&r.length>0){let l=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=s?.nonce||s?.getAttribute("nonce");a=l(r.map(c=>{if(c=DAe(c),c in Cz)return;Cz[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const p=document.createElement("link");if(p.rel=u?"stylesheet":MAe,u||(p.as="script"),p.crossOrigin="",p.href=c,o&&p.setAttribute("nonce",o),document.head.appendChild(p),u)return new Promise((m,b)=>{p.addEventListener("load",m),p.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return a.then(s=>{for(const o of s||[])o.status==="rejected"&&i(o.reason);return t().catch(i)})};function Tz(e){const t=[],r=String(e||"");let n=r.indexOf(","),a=0,i=!1;for(;!i;){n===-1&&(n=r.length,i=!0);const s=r.slice(a,n).trim();(s||!i)&&t.push(s),a=n+1,n=r.indexOf(",",a)}return t}function OAe(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const IAe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LAe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,PAe={};function Az(e,t){return(PAe.jsx?LAe:IAe).test(e)}const FAe=/[ \t\n\f\r]/g;function BAe(e){return typeof e=="object"?e.type==="text"?kz(e.value):!1:kz(e)}function kz(e){return e.replace(FAe,"")===""}class qm{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}qm.prototype.normal={};qm.prototype.property={};qm.prototype.space=void 0;function Kne(e,t){const r={},n={};for(const a of e)Object.assign(r,a.property),Object.assign(n,a.normal);return new qm(r,n,t)}function Yp(e){return e.toLowerCase()}class ci{constructor(t,r){this.attribute=r,this.property=t}}ci.prototype.attribute="";ci.prototype.booleanish=!1;ci.prototype.boolean=!1;ci.prototype.commaOrSpaceSeparated=!1;ci.prototype.commaSeparated=!1;ci.prototype.defined=!1;ci.prototype.mustUseProperty=!1;ci.prototype.number=!1;ci.prototype.overloadedBoolean=!1;ci.prototype.property="";ci.prototype.spaceSeparated=!1;ci.prototype.space=void 0;let zAe=0;const Jt=dd(),Dn=dd(),G5=dd(),st=dd(),Gr=dd(),Pf=dd(),_i=dd();function dd(){return 2**++zAe}const V5=Object.freeze(Object.defineProperty({__proto__:null,boolean:Jt,booleanish:Dn,commaOrSpaceSeparated:_i,commaSeparated:Pf,number:st,overloadedBoolean:G5,spaceSeparated:Gr},Symbol.toStringTag,{value:"Module"})),iE=Object.keys(V5);class rO extends ci{constructor(t,r,n,a){let i=-1;if(super(t,r),Nz(this,"space",a),typeof n=="number")for(;++i<iE.length;){const s=iE[i];Nz(this,iE[i],(n&V5[s])===V5[s])}}}rO.prototype.defined=!0;function Nz(e,t,r){r&&(e[t]=r)}function T0(e){const t={},r={};for(const[n,a]of Object.entries(e.properties)){const i=new rO(n,e.transform(e.attributes||{},n),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[Yp(n)]=n,r[Yp(i.attribute)]=n}return new qm(t,r,e.space)}const Xne=T0({properties:{ariaActiveDescendant:null,ariaAtomic:Dn,ariaAutoComplete:null,ariaBusy:Dn,ariaChecked:Dn,ariaColCount:st,ariaColIndex:st,ariaColSpan:st,ariaControls:Gr,ariaCurrent:null,ariaDescribedBy:Gr,ariaDetails:null,ariaDisabled:Dn,ariaDropEffect:Gr,ariaErrorMessage:null,ariaExpanded:Dn,ariaFlowTo:Gr,ariaGrabbed:Dn,ariaHasPopup:null,ariaHidden:Dn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Gr,ariaLevel:st,ariaLive:null,ariaModal:Dn,ariaMultiLine:Dn,ariaMultiSelectable:Dn,ariaOrientation:null,ariaOwns:Gr,ariaPlaceholder:null,ariaPosInSet:st,ariaPressed:Dn,ariaReadOnly:Dn,ariaRelevant:null,ariaRequired:Dn,ariaRoleDescription:Gr,ariaRowCount:st,ariaRowIndex:st,ariaRowSpan:st,ariaSelected:Dn,ariaSetSize:st,ariaSort:null,ariaValueMax:st,ariaValueMin:st,ariaValueNow:st,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Yne(e,t){return t in e?e[t]:t}function Zne(e,t){return Yne(e,t.toLowerCase())}const jAe=T0({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pf,acceptCharset:Gr,accessKey:Gr,action:null,allow:null,allowFullScreen:Jt,allowPaymentRequest:Jt,allowUserMedia:Jt,alt:null,as:null,async:Jt,autoCapitalize:null,autoComplete:Gr,autoFocus:Jt,autoPlay:Jt,blocking:Gr,capture:null,charSet:null,checked:Jt,cite:null,className:Gr,cols:st,colSpan:null,content:null,contentEditable:Dn,controls:Jt,controlsList:Gr,coords:st|Pf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Jt,defer:Jt,dir:null,dirName:null,disabled:Jt,download:G5,draggable:Dn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Jt,formTarget:null,headers:Gr,height:st,hidden:G5,high:st,href:null,hrefLang:null,htmlFor:Gr,httpEquiv:Gr,id:null,imageSizes:null,imageSrcSet:null,inert:Jt,inputMode:null,integrity:null,is:null,isMap:Jt,itemId:null,itemProp:Gr,itemRef:Gr,itemScope:Jt,itemType:Gr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Jt,low:st,manifest:null,max:null,maxLength:st,media:null,method:null,min:null,minLength:st,multiple:Jt,muted:Jt,name:null,nonce:null,noModule:Jt,noValidate:Jt,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:Jt,optimum:st,pattern:null,ping:Gr,placeholder:null,playsInline:Jt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Jt,referrerPolicy:null,rel:Gr,required:Jt,reversed:Jt,rows:st,rowSpan:st,sandbox:Gr,scope:null,scoped:Jt,seamless:Jt,selected:Jt,shadowRootClonable:Jt,shadowRootDelegatesFocus:Jt,shadowRootMode:null,shape:null,size:st,sizes:null,slot:null,span:st,spellCheck:Dn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:st,step:null,style:null,tabIndex:st,target:null,title:null,translate:null,type:null,typeMustMatch:Jt,useMap:null,value:Dn,width:st,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Gr,axis:null,background:null,bgColor:null,border:st,borderColor:null,bottomMargin:st,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Jt,declare:Jt,event:null,face:null,frame:null,frameBorder:null,hSpace:st,leftMargin:st,link:null,longDesc:null,lowSrc:null,marginHeight:st,marginWidth:st,noResize:Jt,noHref:Jt,noShade:Jt,noWrap:Jt,object:null,profile:null,prompt:null,rev:null,rightMargin:st,rules:null,scheme:null,scrolling:Dn,standby:null,summary:null,text:null,topMargin:st,valueType:null,version:null,vAlign:null,vLink:null,vSpace:st,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Jt,disableRemotePlayback:Jt,prefix:null,property:null,results:st,security:null,unselectable:null},space:"html",transform:Zne}),qAe=T0({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-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:_i,accentHeight:st,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:st,amplitude:st,arabicForm:null,ascent:st,attributeName:null,attributeType:null,azimuth:st,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:st,by:null,calcMode:null,capHeight:st,className:Gr,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:st,diffuseConstant:st,direction:null,display:null,dur:null,divisor:st,dominantBaseline:null,download:Jt,dx:null,dy:null,edgeMode:null,editable:null,elevation:st,enableBackground:null,end:null,event:null,exponent:st,externalResourcesRequired:null,fill:null,fillOpacity:st,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:Pf,g2:Pf,glyphName:Pf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:st,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:st,horizOriginX:st,horizOriginY:st,id:null,ideographic:st,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:st,k:st,k1:st,k2:st,k3:st,k4:st,kernelMatrix:_i,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:st,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:st,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,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:st,overlineThickness:st,paintOrder:null,panose1:null,path:null,pathLength:st,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Gr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:st,pointsAtY:st,pointsAtZ:st,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_i,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_i,rev:_i,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_i,requiredFeatures:_i,requiredFonts:_i,requiredFormats:_i,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:st,specularExponent:st,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:st,strikethroughThickness:st,string:null,stroke:null,strokeDashArray:_i,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:st,strokeOpacity:st,strokeWidth:null,style:null,surfaceScale:st,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_i,tabIndex:st,tableValues:null,target:null,targetX:st,targetY:st,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_i,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:st,underlineThickness:st,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:st,values:null,vAlphabetic:st,vMathematical:st,vectorEffect:null,vHanging:st,vIdeographic:st,version:null,vertAdvY:st,vertOriginX:st,vertOriginY:st,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:st,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Yne}),Qne=T0({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()}}),Jne=T0({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zne}),eae=T0({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),UAe={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"},$Ae=/[A-Z]/g,Rz=/-[a-z]/g,HAe=/^data[-\w.:]+$/i;function tae(e,t){const r=Yp(t);let n=t,a=ci;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&HAe.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Rz,VAe);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Rz.test(i)){let s=i.replace($Ae,GAe);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=rO}return new a(n,t)}function GAe(e){return"-"+e.toLowerCase()}function VAe(e){return e.charAt(1).toUpperCase()}const rae=Kne([Xne,jAe,Qne,Jne,eae],"html"),Tx=Kne([Xne,qAe,Qne,Jne,eae],"svg");function Mz(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function WAe(e){return e.join(" ").trim()}var ff={},sE,Dz;function KAe(){if(Dz)return sE;Dz=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
`,c="/",u="*",f="",p="comment",m="declaration";sE=function(v,y){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];y=y||{};var _=1,S=1;function C(K){var j=K.match(t);j&&(_+=j.length);var W=K.lastIndexOf(l);S=~W?K.length-W:S+K.length}function T(){var K={line:_,column:S};return function(j){return j.position=new A(K),L(),j}}function A(K){this.start=K,this.end={line:_,column:S},this.source=y.source}A.prototype.content=v;function k(K){var j=new Error(y.source+":"+_+":"+S+": "+K);if(j.reason=K,j.filename=y.source,j.line=_,j.column=S,j.source=v,!y.silent)throw j}function N(K){var j=K.exec(v);if(j){var W=j[0];return C(W),v=v.slice(W.length),j}}function L(){N(r)}function I(K){var j;for(K=K||[];j=P();)j!==!1&&K.push(j);return K}function P(){var K=T();if(!(c!=v.charAt(0)||u!=v.charAt(1))){for(var j=2;f!=v.charAt(j)&&(u!=v.charAt(j)||c!=v.charAt(j+1));)++j;if(j+=2,f===v.charAt(j-1))return k("End of comment missing");var W=v.slice(2,j-2);return S+=2,C(W),v=v.slice(j),S+=2,K({type:p,comment:W})}}function H(){var K=T(),j=N(n);if(j){if(P(),!N(a))return k("property missing ':'");var W=N(i),D=K({type:m,property:b(j[0].replace(e,f)),value:W?b(W[0].replace(e,f)):f});return N(s),D}}function B(){var K=[];I(K);for(var j;j=H();)j!==!1&&(K.push(j),I(K));return K}return L(),B()};function b(v){return v?v.replace(o,f):f}return sE}var Oz;function XAe(){if(Oz)return ff;Oz=1;var e=ff&&ff.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ff,"__esModule",{value:!0}),ff.default=r;var t=e(KAe());function r(n,a){var i=null;if(!n||typeof n!="string")return i;var s=(0,t.default)(n),o=typeof a=="function";return s.forEach(function(l){if(l.type==="declaration"){var c=l.property,u=l.value;o?a(c,u,l):u&&(i=i||{},i[c]=u)}}),i}return ff}var zh={},Iz;function YAe(){if(Iz)return zh;Iz=1,Object.defineProperty(zh,"__esModule",{value:!0}),zh.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(c){return!c||r.test(c)||e.test(c)},s=function(c,u){return u.toUpperCase()},o=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),i(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(a,o):c=c.replace(n,o),c.replace(t,s))};return zh.camelCase=l,zh}var jh,Lz;function ZAe(){if(Lz)return jh;Lz=1;var e=jh&&jh.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(XAe()),r=YAe();function n(a,i){var s={};return!a||typeof a!="string"||(0,t.default)(a,function(o,l){o&&l&&(s[(0,r.camelCase)(o,i)]=l)}),s}return n.default=n,jh=n,jh}var QAe=ZAe();const JAe=Fl(QAe),nae=aae("end"),nO=aae("start");function aae(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function eke(e){const t=nO(e),r=nae(e);if(t&&r)return{start:t,end:r}}function Ep(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Pz(e.position):"start"in e||"end"in e?Pz(e):"line"in e||"column"in e?W5(e):""}function W5(e){return Fz(e&&e.line)+":"+Fz(e&&e.column)}function Pz(e){return W5(e&&e.start)+"-"+W5(e&&e.end)}function Fz(e){return e&&typeof e=="number"?e:1}class Ta extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let a="",i={},s=!1;if(r&&("line"in r&&"column"in r?i={place:r}:"start"in r&&"end"in r?i={place:r}:"type"in r?i={ancestors:[r],place:r.position}:i={...r}),typeof t=="string"?a=t:!i.cause&&t&&(s=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?i.ruleId=n:(i.source=n.slice(0,l),i.ruleId=n.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=o?o.line:void 0,this.name=Ep(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ta.prototype.file="";Ta.prototype.name="";Ta.prototype.reason="";Ta.prototype.message="";Ta.prototype.stack="";Ta.prototype.column=void 0;Ta.prototype.line=void 0;Ta.prototype.ancestors=void 0;Ta.prototype.cause=void 0;Ta.prototype.fatal=void 0;Ta.prototype.place=void 0;Ta.prototype.ruleId=void 0;Ta.prototype.source=void 0;const aO={}.hasOwnProperty,tke=new Map,rke=/[A-Z]/g,nke=new Set(["table","tbody","thead","tfoot","tr"]),ake=new Set(["td","th"]),iae="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ike(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=hke(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=fke(r,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Tx:rae,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=sae(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function sae(e,t,r){if(t.type==="element")return ske(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return oke(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return cke(e,t,r);if(t.type==="mdxjsEsm")return lke(e,t);if(t.type==="root")return uke(e,t,r);if(t.type==="text")return dke(e,t)}function ske(e,t,r){const n=e.schema;let a=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(a=Tx,e.schema=a),e.ancestors.push(t);const i=lae(e,t.tagName,!1),s=pke(e,t);let o=sO(e,t);return nke.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!BAe(l):!0})),oae(e,s,i,t),iO(s,o),e.ancestors.pop(),e.schema=n,e.create(t,i,s,r)}function oke(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Zp(e,t.position)}function lke(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Zp(e,t.position)}function cke(e,t,r){const n=e.schema;let a=n;t.name==="svg"&&n.space==="html"&&(a=Tx,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:lae(e,t.name,!0),s=mke(e,t),o=sO(e,t);return oae(e,s,i,t),iO(s,o),e.ancestors.pop(),e.schema=n,e.create(t,i,s,r)}function uke(e,t,r){const n={};return iO(n,sO(e,t)),e.create(t,e.Fragment,n,r)}function dke(e,t){return t.value}function oae(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function iO(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function fke(e,t,r){return n;function n(a,i,s,o){const c=Array.isArray(s.children)?r:t;return o?c(i,s,o):c(i,s)}}function hke(e,t){return r;function r(n,a,i,s){const o=Array.isArray(i.children),l=nO(n);return t(a,i,s,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function pke(e,t){const r={};let n,a;for(a in t.properties)if(a!=="children"&&aO.call(t.properties,a)){const i=gke(e,a,t.properties[a]);if(i){const[s,o]=i;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&ake.has(t.tagName)?n=o:r[s]=o}}if(n){const i=r.style||(r.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function mke(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];i.type;const s=i.expression;s.type;const o=s.properties[0];o.type,Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else Zp(e,t.position);else{const a=n.name;let i;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const o=n.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else Zp(e,t.position);else i=n.value===null?!0:n.value;r[a]=i}return r}function sO(e,t){const r=[];let n=-1;const a=e.passKeys?new Map:tke;for(;++n<t.children.length;){const i=t.children[n];let s;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=a.get(l)||0;s=l+"-"+c,a.set(l,c+1)}}const o=sae(e,i,s);o!==void 0&&r.push(o)}return r}function gke(e,t,r){const n=tae(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?OAe(r):WAe(r)),n.property==="style"){let a=typeof r=="object"?r:vke(e,String(r));return e.stylePropertyNameCase==="css"&&(a=bke(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&n.space?UAe[n.property]||n.property:n.attribute,r]}}function vke(e,t){try{return JAe(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,a=new Ta("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=iae+"#cannot-parse-style-attribute",a}}function lae(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,s;for(;++i<a.length;){const o=Az(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(i&&o.type==="Literal"),optional:!1}:o}n=s}else n=Az(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const a=n.value;return aO.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(n);Zp(e)}function Zp(e,t){const r=new Ta("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=iae+"#cannot-handle-mdx-estrees-without-createevaluater",r}function bke(e){const t={};let r;for(r in e)aO.call(e,r)&&(t[xke(r)]=e[r]);return t}function xke(e){let t=e.replace(rke,yke);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function yke(e){return"-"+e.toLowerCase()}const oE={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"]},_ke={};function oO(e,t){const r=_ke,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,a=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return cae(e,n,a)}function cae(e,t,r){if(wke(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Bz(e.children,t,r)}return Array.isArray(e)?Bz(e,t,r):""}function Bz(e,t,r){const n=[];let a=-1;for(;++a<e.length;)n[a]=cae(e[a],t,r);return n.join("")}function wke(e){return!!(e&&typeof e=="object")}const zz=document.createElement("i");function lO(e){const t="&"+e+";";zz.innerHTML=t;const r=zz.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Li(e,t,r,n){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(t,r),e.splice(...s);else for(r&&e.splice(t,r);i<n.length;)s=n.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function ns(e,t){return e.length>0?(Li(e,e.length,0,t),e):t}const jz={}.hasOwnProperty;function uae(e){const t={};let r=-1;for(;++r<e.length;)Eke(t,e[r]);return t}function Eke(e,t){let r;for(r in t){const a=(jz.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let s;if(i)for(s in i){jz.call(a,s)||(a[s]=[]);const o=i[s];Ske(a[s],Array.isArray(o)?o:o?[o]:[])}}}function Ske(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Li(e,0,0,n)}function dae(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Fs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Oa=Yc(/[A-Za-z]/),wa=Yc(/[\dA-Za-z]/),Cke=Yc(/[#-'*+\--9=?A-Z^-~]/);function gb(e){return e!==null&&(e<32||e===127)}const K5=Yc(/\d/),Tke=Yc(/[\dA-Fa-f]/),Ake=Yc(/[!-/:-@[-`{-~]/);function Tt(e){return e!==null&&e<-2}function qr(e){return e!==null&&(e<0||e===32)}function ur(e){return e===-2||e===-1||e===32}const Ax=Yc(new RegExp("\\p{P}|\\p{S}","u")),Yu=Yc(/\s/);function Yc(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function A0(e){const t=[];let r=-1,n=0,a=0;for(;++r<e.length;){const i=e.charCodeAt(r);let s="";if(i===37&&wa(e.charCodeAt(r+1))&&wa(e.charCodeAt(r+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const o=e.charCodeAt(r+1);i<56320&&o>56319&&o<57344?(s=String.fromCharCode(i,o),a=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(n,r),encodeURIComponent(s)),n=r+a+1,s=""),a&&(r+=a,a=0)}return t.join("")+e.slice(n)}function or(e,t,r,n){const a=n?n-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(l){return ur(l)?(e.enter(r),o(l)):t(l)}function o(l){return ur(l)&&i++<a?(e.consume(l),o):(e.exit(r),t(l))}}const kke={tokenize:Nke};function Nke(e){const t=e.attempt(this.parser.constructs.contentInitial,n,a);let r;return t;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),or(e,t,"linePrefix")}function a(o){return e.enter("paragraph"),i(o)}function i(o){const l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Tt(o)?(e.consume(o),e.exit("chunkText"),i):(e.consume(o),s)}}const Rke={tokenize:Mke},qz={tokenize:Dke};function Mke(e){const t=this,r=[];let n=0,a,i,s;return o;function o(C){if(n<r.length){const T=r[n];return t.containerState=T[1],e.attempt(T[0].continuation,l,c)(C)}return c(C)}function l(C){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&S();const T=t.events.length;let A=T,k;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){k=t.events[A][1].end;break}_(n);let N=T;for(;N<t.events.length;)t.events[N][1].end={...k},N++;return Li(t.events,A+1,0,t.events.slice(T)),t.events.length=N,c(C)}return o(C)}function c(C){if(n===r.length){if(!a)return p(C);if(a.currentConstruct&&a.currentConstruct.concrete)return b(C);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qz,u,f)(C)}function u(C){return a&&S(),_(n),p(C)}function f(C){return t.parser.lazy[t.now().line]=n!==r.length,s=t.now().offset,b(C)}function p(C){return t.containerState={},e.attempt(qz,m,b)(C)}function m(C){return n++,r.push([t.currentConstruct,t.containerState]),p(C)}function b(C){if(C===null){a&&S(),_(0),e.consume(C);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),v(C)}function v(C){if(C===null){y(e.exit("chunkFlow"),!0),_(0),e.consume(C);return}return Tt(C)?(e.consume(C),y(e.exit("chunkFlow")),n=0,t.interrupt=void 0,o):(e.consume(C),v)}function y(C,T){const A=t.sliceStream(C);if(T&&A.push(null),C.previous=i,i&&(i.next=C),i=C,a.defineSkip(C.start),a.write(A),t.parser.lazy[C.start.line]){let k=a.events.length;for(;k--;)if(a.events[k][1].start.offset<s&&(!a.events[k][1].end||a.events[k][1].end.offset>s))return;const N=t.events.length;let L=N,I,P;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(I){P=t.events[L][1].end;break}I=!0}for(_(n),k=N;k<t.events.length;)t.events[k][1].end={...P},k++;Li(t.events,L+1,0,t.events.slice(N)),t.events.length=k}}function _(C){let T=r.length;for(;T-- >C;){const A=r[T];t.containerState=A[1],A[0].exit.call(t,e)}r.length=C}function S(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Dke(e,t,r){return or(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function t0(e){if(e===null||qr(e)||Yu(e))return 1;if(Ax(e))return 2}function kx(e,t,r){const n=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!n.includes(i)&&(t=i(t,r),n.push(i))}return t}const X5={name:"attention",resolveAll:Oke,tokenize:Ike};function Oke(e,t){let r=-1,n,a,i,s,o,l,c,u;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const f={...e[n][1].end},p={...e[r][1].start};Uz(f,-l),Uz(p,l),s={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:p},i={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},a={type:l>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[n][1].end={...s.start},e[r][1].start={...o.end},c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=ns(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=ns(c,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),c=ns(c,kx(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),c=ns(c,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",a,t]]),e[r][1].end.offset-e[r][1].start.offset?(u=2,c=ns(c,[["enter",e[r][1],t],["exit",e[r][1],t]])):u=0,Li(e,n-1,r-n+3,c),r=n+c.length-u-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function Ike(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,a=t0(n);let i;return s;function s(l){return i=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===i)return e.consume(l),o;const c=e.exit("attentionSequence"),u=t0(l),f=!u||u===2&&a||r.includes(l),p=!a||a===2&&u||r.includes(n);return c._open=!!(i===42?f:f&&(a||!p)),c._close=!!(i===42?p:p&&(u||!f)),t(l)}}function Uz(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Lke={name:"autolink",tokenize:Pke};function Pke(e,t,r){let n=0;return a;function a(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(m){return Oa(m)?(e.consume(m),s):m===64?r(m):c(m)}function s(m){return m===43||m===45||m===46||wa(m)?(n=1,o(m)):c(m)}function o(m){return m===58?(e.consume(m),n=0,l):(m===43||m===45||m===46||wa(m))&&n++<32?(e.consume(m),o):(n=0,c(m))}function l(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||gb(m)?r(m):(e.consume(m),l)}function c(m){return m===64?(e.consume(m),u):Cke(m)?(e.consume(m),c):r(m)}function u(m){return wa(m)?f(m):r(m)}function f(m){return m===46?(e.consume(m),n=0,u):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||wa(m))&&n++<63){const b=m===45?p:f;return e.consume(m),b}return r(m)}}const Um={partial:!0,tokenize:Fke};function Fke(e,t,r){return n;function n(i){return ur(i)?or(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||Tt(i)?t(i):r(i)}}const fae={continuation:{tokenize:zke},exit:jke,name:"blockQuote",tokenize:Bke};function Bke(e,t,r){const n=this;return a;function a(s){if(s===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return r(s)}function i(s){return ur(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function zke(e,t,r){const n=this;return a;function a(s){return ur(s)?or(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(fae,t,r)(s)}}function jke(e){e.exit("blockQuote")}const hae={name:"characterEscape",tokenize:qke};function qke(e,t,r){return n;function n(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return Ake(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(i)}}const pae={name:"characterReference",tokenize:Uke};function Uke(e,t,r){const n=this;let a=0,i,s;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,s=wa,u(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=Tke,u):(e.enter("characterReferenceValue"),i=7,s=K5,u(f))}function u(f){if(f===59&&a){const p=e.exit("characterReferenceValue");return s===wa&&!lO(n.sliceSerialize(p))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&a++<i?(e.consume(f),u):r(f)}}const $z={partial:!0,tokenize:Hke},Hz={concrete:!0,name:"codeFenced",tokenize:$ke};function $ke(e,t,r){const n=this,a={partial:!0,tokenize:A};let i=0,s=0,o;return l;function l(k){return c(k)}function c(k){const N=n.events[n.events.length-1];return i=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,o=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(k)}function u(k){return k===o?(s++,e.consume(k),u):s<3?r(k):(e.exit("codeFencedFenceSequence"),ur(k)?or(e,f,"whitespace")(k):f(k))}function f(k){return k===null||Tt(k)?(e.exit("codeFencedFence"),n.interrupt?t(k):e.check($z,v,T)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||Tt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(k)):ur(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),or(e,m,"whitespace")(k)):k===96&&k===o?r(k):(e.consume(k),p)}function m(k){return k===null||Tt(k)?f(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===null||Tt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(k)):k===96&&k===o?r(k):(e.consume(k),b)}function v(k){return e.attempt(a,T,y)(k)}function y(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),_}function _(k){return i>0&&ur(k)?or(e,S,"linePrefix",i+1)(k):S(k)}function S(k){return k===null||Tt(k)?e.check($z,v,T)(k):(e.enter("codeFlowValue"),C(k))}function C(k){return k===null||Tt(k)?(e.exit("codeFlowValue"),S(k)):(e.consume(k),C)}function T(k){return e.exit("codeFenced"),t(k)}function A(k,N,L){let I=0;return P;function P(W){return k.enter("lineEnding"),k.consume(W),k.exit("lineEnding"),H}function H(W){return k.enter("codeFencedFence"),ur(W)?or(k,B,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):B(W)}function B(W){return W===o?(k.enter("codeFencedFenceSequence"),K(W)):L(W)}function K(W){return W===o?(I++,k.consume(W),K):I>=s?(k.exit("codeFencedFenceSequence"),ur(W)?or(k,j,"whitespace")(W):j(W)):L(W)}function j(W){return W===null||Tt(W)?(k.exit("codeFencedFence"),N(W)):L(W)}}}function Hke(e,t,r){const n=this;return a;function a(s){return s===null?r(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}const lE={name:"codeIndented",tokenize:Vke},Gke={partial:!0,tokenize:Wke};function Vke(e,t,r){const n=this;return a;function a(c){return e.enter("codeIndented"),or(e,i,"linePrefix",5)(c)}function i(c){const u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):r(c)}function s(c){return c===null?l(c):Tt(c)?e.attempt(Gke,s,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||Tt(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function Wke(e,t,r){const n=this;return a;function a(s){return n.parser.lazy[n.now().line]?r(s):Tt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):or(e,i,"linePrefix",5)(s)}function i(s){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):Tt(s)?a(s):r(s)}}const Kke={name:"codeText",previous:Yke,resolve:Xke,tokenize:Zke};function Xke(e){let t=e.length-4,r=3,n,a;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)a===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(a=n):(n===t||e[n][1].type==="lineEnding")&&(e[a][1].type="codeTextData",n!==a+2&&(e[a][1].end=e[n-1][1].end,e.splice(a+2,n-a-2),t-=n-a-2,n=a+2),a=void 0);return e}function Yke(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Zke(e,t,r){let n=0,a,i;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),n++,o):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(i=e.enter("codeTextSequence"),a=0,u(f)):Tt(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||Tt(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),a++,u):a===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}class Qke{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,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const a=r||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return n&&qh(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),qh(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),qh(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 r=this.left.splice(t,Number.POSITIVE_INFINITY);qh(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);qh(this.left,r.reverse())}}}function qh(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function mae(e){const t={};let r=-1,n,a,i,s,o,l,c;const u=new Qke(e);for(;++r<u.length;){for(;r in t;)r=t[r];if(n=u.get(r),r&&n[1].type==="chunkFlow"&&u.get(r-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,Jke(u,r)),r=t[r],c=!0);else if(n[1]._container){for(i=r,a=void 0;i--;)if(s=u.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(u.get(a)[1].type="lineEndingBlank"),s[1].type="lineEnding",a=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;a&&(n[1].end={...u.get(a)[1].start},o=u.slice(a,r),o.unshift(n),u.splice(a,r-a+1,o))}}return Li(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Jke(e,t){const r=e.get(t)[1],n=e.get(t)[2];let a=t-1;const i=[];let s=r._tokenizer;s||(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,l=[],c={};let u,f,p=-1,m=r,b=0,v=0;const y=[v];for(;m;){for(;e.get(++a)[1]!==m;);i.push(a),m._tokenizer||(u=n.sliceStream(m),m.next||u.push(null),f&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=r;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(v=p+1,y.push(v),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):y.pop(),p=y.length;p--;){const _=o.slice(y[p],y[p+1]),S=i.pop();l.push([S,S+_.length-1]),e.splice(S,2,_)}for(l.reverse(),p=-1;++p<l.length;)c[b+l[p][0]]=b+l[p][1],b+=l[p][1]-l[p][0]-1;return c}const eNe={resolve:rNe,tokenize:nNe},tNe={partial:!0,tokenize:aNe};function rNe(e){return mae(e),e}function nNe(e,t){let r;return n;function n(o){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),a(o)}function a(o){return o===null?i(o):Tt(o)?e.check(tNe,s,i)(o):(e.consume(o),a)}function i(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,a}}function aNe(e,t,r){const n=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),or(e,i,"linePrefix")}function i(s){if(s===null||Tt(s))return r(s);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(n.parser.constructs.flow,r,t)(s)}}function gae(e,t,r,n,a,i,s,o,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(_){return _===60?(e.enter(n),e.enter(a),e.enter(i),e.consume(_),e.exit(i),p):_===null||_===32||_===41||gb(_)?r(_):(e.enter(n),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),v(_))}function p(_){return _===62?(e.enter(i),e.consume(_),e.exit(i),e.exit(a),e.exit(n),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(_))}function m(_){return _===62?(e.exit("chunkString"),e.exit(o),p(_)):_===null||_===60||Tt(_)?r(_):(e.consume(_),_===92?b:m)}function b(_){return _===60||_===62||_===92?(e.consume(_),m):m(_)}function v(_){return!u&&(_===null||_===41||qr(_))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(n),t(_)):u<c&&_===40?(e.consume(_),u++,v):_===41?(e.consume(_),u--,v):_===null||_===32||_===40||gb(_)?r(_):(e.consume(_),_===92?y:v)}function y(_){return _===40||_===41||_===92?(e.consume(_),v):v(_)}}function vae(e,t,r,n,a,i){const s=this;let o=0,l;return c;function c(m){return e.enter(n),e.enter(a),e.consume(m),e.exit(a),e.enter(i),u}function u(m){return o>999||m===null||m===91||m===93&&!l||m===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?r(m):m===93?(e.exit(i),e.enter(a),e.consume(m),e.exit(a),e.exit(n),t):Tt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||Tt(m)||o++>999?(e.exit("chunkString"),u(m)):(e.consume(m),l||(l=!ur(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,f):f(m)}}function bae(e,t,r,n,a,i){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(n),e.enter(a),e.consume(p),e.exit(a),s=p===40?41:p,l):r(p)}function l(p){return p===s?(e.enter(a),e.consume(p),e.exit(a),e.exit(n),t):(e.enter(i),c(p))}function c(p){return p===s?(e.exit(i),l(s)):p===null?r(p):Tt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),or(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===s||p===null||Tt(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?f:u)}function f(p){return p===s||p===92?(e.consume(p),u):u(p)}}function Sp(e,t){let r;return n;function n(a){return Tt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),r=!0,n):ur(a)?or(e,n,r?"linePrefix":"lineSuffix")(a):t(a)}}const iNe={name:"definition",tokenize:oNe},sNe={partial:!0,tokenize:lNe};function oNe(e,t,r){const n=this;let a;return i;function i(m){return e.enter("definition"),s(m)}function s(m){return vae.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return a=Fs(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):r(m)}function l(m){return qr(m)?Sp(e,c)(m):c(m)}function c(m){return gae(e,u,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function u(m){return e.attempt(sNe,f,f)(m)}function f(m){return ur(m)?or(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Tt(m)?(e.exit("definition"),n.parser.defined.push(a),t(m)):r(m)}}function lNe(e,t,r){return n;function n(o){return qr(o)?Sp(e,a)(o):r(o)}function a(o){return bae(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return ur(o)?or(e,s,"whitespace")(o):s(o)}function s(o){return o===null||Tt(o)?t(o):r(o)}}const cNe={name:"hardBreakEscape",tokenize:uNe};function uNe(e,t,r){return n;function n(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return Tt(i)?(e.exit("hardBreakEscape"),t(i)):r(i)}}const dNe={name:"headingAtx",resolve:fNe,tokenize:hNe};function fNe(e,t){let r=e.length-2,n=3,a,i;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(a={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},i={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Li(e,n,r-n+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function hNe(e,t,r){let n=0;return a;function a(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&n++<6?(e.consume(u),s):u===null||qr(u)?(e.exit("atxHeadingSequence"),o(u)):r(u)}function o(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Tt(u)?(e.exit("atxHeading"),t(u)):ur(u)?or(e,o,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),o(u))}function c(u){return u===null||u===35||qr(u)?(e.exit("atxHeadingText"),o(u)):(e.consume(u),c)}}const pNe=["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"],Gz=["pre","script","style","textarea"],mNe={concrete:!0,name:"htmlFlow",resolveTo:bNe,tokenize:xNe},gNe={partial:!0,tokenize:_Ne},vNe={partial:!0,tokenize:yNe};function bNe(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 xNe(e,t,r){const n=this;let a,i,s,o,l;return c;function c(F){return u(F)}function u(F){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(F),f}function f(F){return F===33?(e.consume(F),p):F===47?(e.consume(F),i=!0,v):F===63?(e.consume(F),a=3,n.interrupt?t:M):Oa(F)?(e.consume(F),s=String.fromCharCode(F),y):r(F)}function p(F){return F===45?(e.consume(F),a=2,m):F===91?(e.consume(F),a=5,o=0,b):Oa(F)?(e.consume(F),a=4,n.interrupt?t:M):r(F)}function m(F){return F===45?(e.consume(F),n.interrupt?t:M):r(F)}function b(F){const V="CDATA[";return F===V.charCodeAt(o++)?(e.consume(F),o===V.length?n.interrupt?t:B:b):r(F)}function v(F){return Oa(F)?(e.consume(F),s=String.fromCharCode(F),y):r(F)}function y(F){if(F===null||F===47||F===62||qr(F)){const V=F===47,Z=s.toLowerCase();return!V&&!i&&Gz.includes(Z)?(a=1,n.interrupt?t(F):B(F)):pNe.includes(s.toLowerCase())?(a=6,V?(e.consume(F),_):n.interrupt?t(F):B(F)):(a=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(F):i?S(F):C(F))}return F===45||wa(F)?(e.consume(F),s+=String.fromCharCode(F),y):r(F)}function _(F){return F===62?(e.consume(F),n.interrupt?t:B):r(F)}function S(F){return ur(F)?(e.consume(F),S):P(F)}function C(F){return F===47?(e.consume(F),P):F===58||F===95||Oa(F)?(e.consume(F),T):ur(F)?(e.consume(F),C):P(F)}function T(F){return F===45||F===46||F===58||F===95||wa(F)?(e.consume(F),T):A(F)}function A(F){return F===61?(e.consume(F),k):ur(F)?(e.consume(F),A):C(F)}function k(F){return F===null||F===60||F===61||F===62||F===96?r(F):F===34||F===39?(e.consume(F),l=F,N):ur(F)?(e.consume(F),k):L(F)}function N(F){return F===l?(e.consume(F),l=null,I):F===null||Tt(F)?r(F):(e.consume(F),N)}function L(F){return F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||qr(F)?A(F):(e.consume(F),L)}function I(F){return F===47||F===62||ur(F)?C(F):r(F)}function P(F){return F===62?(e.consume(F),H):r(F)}function H(F){return F===null||Tt(F)?B(F):ur(F)?(e.consume(F),H):r(F)}function B(F){return F===45&&a===2?(e.consume(F),D):F===60&&a===1?(e.consume(F),U):F===62&&a===4?(e.consume(F),Q):F===63&&a===3?(e.consume(F),M):F===93&&a===5?(e.consume(F),z):Tt(F)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(gNe,q,K)(F)):F===null||Tt(F)?(e.exit("htmlFlowData"),K(F)):(e.consume(F),B)}function K(F){return e.check(vNe,j,q)(F)}function j(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),W}function W(F){return F===null||Tt(F)?K(F):(e.enter("htmlFlowData"),B(F))}function D(F){return F===45?(e.consume(F),M):B(F)}function U(F){return F===47?(e.consume(F),s="",Y):B(F)}function Y(F){if(F===62){const V=s.toLowerCase();return Gz.includes(V)?(e.consume(F),Q):B(F)}return Oa(F)&&s.length<8?(e.consume(F),s+=String.fromCharCode(F),Y):B(F)}function z(F){return F===93?(e.consume(F),M):B(F)}function M(F){return F===62?(e.consume(F),Q):F===45&&a===2?(e.consume(F),M):B(F)}function Q(F){return F===null||Tt(F)?(e.exit("htmlFlowData"),q(F)):(e.consume(F),Q)}function q(F){return e.exit("htmlFlow"),t(F)}}function yNe(e,t,r){const n=this;return a;function a(s){return Tt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):r(s)}function i(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function _Ne(e,t,r){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Um,t,r)}}const wNe={name:"htmlText",tokenize:ENe};function ENe(e,t,r){const n=this;let a,i,s;return o;function o(M){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(M),l}function l(M){return M===33?(e.consume(M),c):M===47?(e.consume(M),A):M===63?(e.consume(M),C):Oa(M)?(e.consume(M),L):r(M)}function c(M){return M===45?(e.consume(M),u):M===91?(e.consume(M),i=0,b):Oa(M)?(e.consume(M),S):r(M)}function u(M){return M===45?(e.consume(M),m):r(M)}function f(M){return M===null?r(M):M===45?(e.consume(M),p):Tt(M)?(s=f,U(M)):(e.consume(M),f)}function p(M){return M===45?(e.consume(M),m):f(M)}function m(M){return M===62?D(M):M===45?p(M):f(M)}function b(M){const Q="CDATA[";return M===Q.charCodeAt(i++)?(e.consume(M),i===Q.length?v:b):r(M)}function v(M){return M===null?r(M):M===93?(e.consume(M),y):Tt(M)?(s=v,U(M)):(e.consume(M),v)}function y(M){return M===93?(e.consume(M),_):v(M)}function _(M){return M===62?D(M):M===93?(e.consume(M),_):v(M)}function S(M){return M===null||M===62?D(M):Tt(M)?(s=S,U(M)):(e.consume(M),S)}function C(M){return M===null?r(M):M===63?(e.consume(M),T):Tt(M)?(s=C,U(M)):(e.consume(M),C)}function T(M){return M===62?D(M):C(M)}function A(M){return Oa(M)?(e.consume(M),k):r(M)}function k(M){return M===45||wa(M)?(e.consume(M),k):N(M)}function N(M){return Tt(M)?(s=N,U(M)):ur(M)?(e.consume(M),N):D(M)}function L(M){return M===45||wa(M)?(e.consume(M),L):M===47||M===62||qr(M)?I(M):r(M)}function I(M){return M===47?(e.consume(M),D):M===58||M===95||Oa(M)?(e.consume(M),P):Tt(M)?(s=I,U(M)):ur(M)?(e.consume(M),I):D(M)}function P(M){return M===45||M===46||M===58||M===95||wa(M)?(e.consume(M),P):H(M)}function H(M){return M===61?(e.consume(M),B):Tt(M)?(s=H,U(M)):ur(M)?(e.consume(M),H):I(M)}function B(M){return M===null||M===60||M===61||M===62||M===96?r(M):M===34||M===39?(e.consume(M),a=M,K):Tt(M)?(s=B,U(M)):ur(M)?(e.consume(M),B):(e.consume(M),j)}function K(M){return M===a?(e.consume(M),a=void 0,W):M===null?r(M):Tt(M)?(s=K,U(M)):(e.consume(M),K)}function j(M){return M===null||M===34||M===39||M===60||M===61||M===96?r(M):M===47||M===62||qr(M)?I(M):(e.consume(M),j)}function W(M){return M===47||M===62||qr(M)?I(M):r(M)}function D(M){return M===62?(e.consume(M),e.exit("htmlTextData"),e.exit("htmlText"),t):r(M)}function U(M){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),Y}function Y(M){return ur(M)?or(e,z,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):z(M)}function z(M){return e.enter("htmlTextData"),s(M)}}const cO={name:"labelEnd",resolveAll:ANe,resolveTo:kNe,tokenize:NNe},SNe={tokenize:RNe},CNe={tokenize:MNe},TNe={tokenize:DNe};function ANe(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const a=n.type==="labelImage"?4:2;n.type="data",t+=a}}return e.length!==r.length&&Li(e,0,e.length,r),e}function kNe(e,t){let r=e.length,n=0,a,i,s,o;for(;r--;)if(a=e[r][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[r][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(s){if(e[r][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=r,a.type!=="labelLink")){n=2;break}}else a.type==="labelEnd"&&(s=r);const l={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+n+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=ns(o,e.slice(i+1,i+n+3)),o=ns(o,[["enter",u,t]]),o=ns(o,kx(t.parser.constructs.insideSpan.null,e.slice(i+n+4,s-3),t)),o=ns(o,[["exit",u,t],e[s-2],e[s-1],["exit",c,t]]),o=ns(o,e.slice(s+1)),o=ns(o,[["exit",l,t]]),Li(e,i,e.length,o),e}function NNe(e,t,r){const n=this;let a=n.events.length,i,s;for(;a--;)if((n.events[a][1].type==="labelImage"||n.events[a][1].type==="labelLink")&&!n.events[a][1]._balanced){i=n.events[a][1];break}return o;function o(p){return i?i._inactive?f(p):(s=n.parser.defined.includes(Fs(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):r(p)}function l(p){return p===40?e.attempt(SNe,u,s?u:f)(p):p===91?e.attempt(CNe,u,s?c:f)(p):s?u(p):f(p)}function c(p){return e.attempt(TNe,u,f)(p)}function u(p){return t(p)}function f(p){return i._balanced=!0,r(p)}}function RNe(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),a}function a(f){return qr(f)?Sp(e,i)(f):i(f)}function i(f){return f===41?u(f):gae(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return qr(f)?Sp(e,l)(f):u(f)}function o(f){return r(f)}function l(f){return f===34||f===39||f===40?bae(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return qr(f)?Sp(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function MNe(e,t,r){const n=this;return a;function a(o){return vae.call(n,e,i,s,"reference","referenceMarker","referenceString")(o)}function i(o){return n.parser.defined.includes(Fs(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(o):r(o)}function s(o){return r(o)}}function DNe(e,t,r){return n;function n(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):r(i)}}const ONe={name:"labelStartImage",resolveAll:cO.resolveAll,tokenize:INe};function INe(e,t,r){const n=this;return a;function a(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),i}function i(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):r(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):t(o)}}const LNe={name:"labelStartLink",resolveAll:cO.resolveAll,tokenize:PNe};function PNe(e,t,r){const n=this;return a;function a(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const cE={name:"lineEnding",tokenize:FNe};function FNe(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),or(e,t,"linePrefix")}}const G1={name:"thematicBreak",tokenize:BNe};function BNe(e,t,r){let n=0,a;return i;function i(c){return e.enter("thematicBreak"),s(c)}function s(c){return a=c,o(c)}function o(c){return c===a?(e.enter("thematicBreakSequence"),l(c)):n>=3&&(c===null||Tt(c))?(e.exit("thematicBreak"),t(c)):r(c)}function l(c){return c===a?(e.consume(c),n++,l):(e.exit("thematicBreakSequence"),ur(c)?or(e,o,"whitespace")(c):o(c))}}const Ya={continuation:{tokenize:UNe},exit:HNe,name:"list",tokenize:qNe},zNe={partial:!0,tokenize:GNe},jNe={partial:!0,tokenize:$Ne};function qNe(e,t,r){const n=this,a=n.events[n.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return o;function o(m){const b=n.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!n.containerState.marker||m===n.containerState.marker:K5(m)){if(n.containerState.type||(n.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(G1,r,c)(m):c(m);if(!n.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return r(m)}function l(m){return K5(m)&&++s<10?(e.consume(m),l):(!n.interrupt||s<2)&&(n.containerState.marker?m===n.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):r(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||m,e.check(Um,n.interrupt?r:u,e.attempt(zNe,p,f))}function u(m){return n.containerState.initialBlankLine=!0,i++,p(m)}function f(m){return ur(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):r(m)}function p(m){return n.containerState.size=i+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function UNe(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Um,a,i);function a(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,or(e,t,"listItemIndent",n.containerState.size+1)(o)}function i(o){return n.containerState.furtherBlankLines||!ur(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(jNe,t,s)(o))}function s(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,or(e,e.attempt(Ya,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function $Ne(e,t,r){const n=this;return or(e,a,"listItemIndent",n.containerState.size+1);function a(i){const s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?t(i):r(i)}}function HNe(e){e.exit(this.containerState.type)}function GNe(e,t,r){const n=this;return or(e,a,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const s=n.events[n.events.length-1];return!ur(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):r(i)}}const Vz={name:"setextUnderline",resolveTo:VNe,tokenize:WNe};function VNe(e,t){let r=e.length,n,a,i;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(a=r)}else e[r][1].type==="content"&&e.splice(r,1),!i&&e[r][1].type==="definition"&&(i=r);const s={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=s,e.push(["exit",s,t]),e}function WNe(e,t,r){const n=this;let a;return i;function i(c){let u=n.events.length,f;for(;u--;)if(n.events[u][1].type!=="lineEnding"&&n.events[u][1].type!=="linePrefix"&&n.events[u][1].type!=="content"){f=n.events[u][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(e.enter("setextHeadingLine"),a=c,s(c)):r(c)}function s(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===a?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),ur(c)?or(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Tt(c)?(e.exit("setextHeadingLine"),t(c)):r(c)}}const KNe={tokenize:XNe};function XNe(e){const t=this,r=e.attempt(Um,n,e.attempt(this.parser.constructs.flowInitial,a,or(e,e.attempt(this.parser.constructs.flow,a,e.attempt(eNe,a)),"linePrefix")));return r;function n(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const YNe={resolveAll:yae()},ZNe=xae("string"),QNe=xae("text");function xae(e){return{resolveAll:yae(e==="text"?JNe:void 0),tokenize:t};function t(r){const n=this,a=this.parser.constructs[e],i=r.attempt(a,s,o);return s;function s(u){return c(u)?i(u):o(u)}function o(u){if(u===null){r.consume(u);return}return r.enter("data"),r.consume(u),l}function l(u){return c(u)?(r.exit("data"),i(u)):(r.consume(u),l)}function c(u){if(u===null)return!0;const f=a[u];let p=-1;if(f)for(;++p<f.length;){const m=f[p];if(!m.previous||m.previous.call(n,n.previous))return!0}return!1}}}function yae(e){return t;function t(r,n){let a=-1,i;for(;++a<=r.length;)i===void 0?r[a]&&r[a][1].type==="data"&&(i=a,a++):(!r[a]||r[a][1].type!=="data")&&(a!==i+2&&(r[i][1].end=r[a-1][1].end,r.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(r,n):r}}function JNe(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],a=t.sliceStream(n);let i=a.length,s=-1,o=0,l;for(;i--;){const c=a[i];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(c===-2)l=!0,o++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(o=0),o){const c={type:r===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:n.start._bufferIndex+s,_index:n.start._index+i,line:n.end.line,column:n.end.column-o,offset:n.end.offset-o},end:{...n.end}};n.end={...c.start},n.start.offset===n.end.offset?Object.assign(n,c):(e.splice(r,0,["enter",c,t],["exit",c,t]),r+=2)}r++}return e}const e3e={42:Ya,43:Ya,45:Ya,48:Ya,49:Ya,50:Ya,51:Ya,52:Ya,53:Ya,54:Ya,55:Ya,56:Ya,57:Ya,62:fae},t3e={91:iNe},r3e={[-2]:lE,[-1]:lE,32:lE},n3e={35:dNe,42:G1,45:[Vz,G1],60:mNe,61:Vz,95:G1,96:Hz,126:Hz},a3e={38:pae,92:hae},i3e={[-5]:cE,[-4]:cE,[-3]:cE,33:ONe,38:pae,42:X5,60:[Lke,wNe],91:LNe,92:[cNe,hae],93:cO,95:X5,96:Kke},s3e={null:[X5,YNe]},o3e={null:[42,95]},l3e={null:[]},c3e=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:o3e,contentInitial:t3e,disable:l3e,document:e3e,flow:n3e,flowInitial:r3e,insideSpan:s3e,string:a3e,text:i3e},Symbol.toStringTag,{value:"Module"}));function u3e(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const a={},i=[];let s=[],o=[];const l={attempt:N(A),check:N(k),consume:S,enter:C,exit:T,interrupt:N(k,{interrupt:!0})},c={code:null,containerState:{},defineSkip:v,events:[],now:b,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:f};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function f(H){return s=ns(s,H),y(),s[s.length-1]!==null?[]:(L(t,0),c.events=kx(i,c.events,c),c.events)}function p(H,B){return f3e(m(H),B)}function m(H){return d3e(s,H)}function b(){const{_bufferIndex:H,_index:B,line:K,column:j,offset:W}=n;return{_bufferIndex:H,_index:B,line:K,column:j,offset:W}}function v(H){a[H.line]=H.column,P()}function y(){let H;for(;n._index<s.length;){const B=s[n._index];if(typeof B=="string")for(H=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===H&&n._bufferIndex<B.length;)_(B.charCodeAt(n._bufferIndex));else _(B)}}function _(H){u=u(H)}function S(H){Tt(H)?(n.line++,n.column=1,n.offset+=H===-3?2:1,P()):H!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=H}function C(H,B){const K=B||{};return K.type=H,K.start=b(),c.events.push(["enter",K,c]),o.push(K),K}function T(H){const B=o.pop();return B.end=b(),c.events.push(["exit",B,c]),B}function A(H,B){L(H,B.from)}function k(H,B){B.restore()}function N(H,B){return K;function K(j,W,D){let U,Y,z,M;return Array.isArray(j)?q(j):"tokenize"in j?q([j]):Q(j);function Q(ee){return te;function te(oe){const pe=oe!==null&&ee[oe],he=oe!==null&&ee.null,ke=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(he)?he:he?[he]:[]];return q(ke)(oe)}}function q(ee){return U=ee,Y=0,ee.length===0?D:F(ee[Y])}function F(ee){return te;function te(oe){return M=I(),z=ee,ee.partial||(c.currentConstruct=ee),ee.name&&c.parser.constructs.disable.null.includes(ee.name)?Z():ee.tokenize.call(B?Object.assign(Object.create(c),B):c,l,V,Z)(oe)}}function V(ee){return H(z,M),W}function Z(ee){return M.restore(),++Y<U.length?F(U[Y]):D}}}function L(H,B){H.resolveAll&&!i.includes(H)&&i.push(H),H.resolve&&Li(c.events,B,c.events.length-B,H.resolve(c.events.slice(B),c)),H.resolveTo&&(c.events=H.resolveTo(c.events,c))}function I(){const H=b(),B=c.previous,K=c.currentConstruct,j=c.events.length,W=Array.from(o);return{from:j,restore:D};function D(){n=H,c.previous=B,c.currentConstruct=K,c.events.length=j,o=W,P()}}function P(){n.line in a&&n.column<2&&(n.column=a[n.line],n.offset+=a[n.line]-1)}}function d3e(e,t){const r=t.start._index,n=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let s;if(r===a)s=[e[r].slice(n,i)];else{if(s=e.slice(r,a),n>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(n):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function f3e(e,t){let r=-1;const n=[];let a;for(;++r<e.length;){const i=e[r];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
`;break}case-3:{s=`\r
`;break}case-2:{s=t?" ":"	";break}case-1:{if(!t&&a)continue;s=" ";break}default:s=String.fromCharCode(i)}a=i===-2,n.push(s)}return n.join("")}function h3e(e){const n={constructs:uae([c3e,...(e||{}).extensions||[]]),content:a(kke),defined:[],document:a(Rke),flow:a(KNe),lazy:{},string:a(ZNe),text:a(QNe)};return n;function a(i){return s;function s(o){return u3e(n,i,o)}}}function p3e(e){for(;!mae(e););return e}const Wz=/[\0\t\n\r]/g;function m3e(){let e=1,t="",r=!0,n;return a;function a(i,s,o){const l=[];let c,u,f,p,m;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),f=0,t="",r&&(i.charCodeAt(0)===65279&&f++,r=void 0);f<i.length;){if(Wz.lastIndex=f,c=Wz.exec(i),p=c&&c.index!==void 0?c.index:i.length,m=i.charCodeAt(p),!c){t=i.slice(f);break}if(m===10&&f===p&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),f<p&&(l.push(i.slice(f,p)),e+=p-f),m){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}f=p+1}return o&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}const g3e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function v3e(e){return e.replace(g3e,b3e)}function b3e(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const a=r.charCodeAt(1),i=a===120||a===88;return dae(r.slice(i?2:1),i?16:10)}return lO(r)||e}const _ae={}.hasOwnProperty;function x3e(e,t,r){return typeof t!="string"&&(r=t,t=void 0),y3e(r)(p3e(h3e(r).document().write(m3e()(e,t,!0))))}function y3e(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Ne),autolinkProtocol:I,autolinkEmail:I,atxHeading:i(Pe),blockQuote:i(he),characterEscape:I,characterReference:I,codeFenced:i(ke),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(ke,s),codeText:i(se,s),codeTextData:I,data:I,codeFlowValue:I,definition:i(qe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i($e),hardBreakEscape:i(Ce),hardBreakTrailing:i(Ce),htmlFlow:i(xe,s),htmlFlowData:I,htmlText:i(xe,s),htmlTextData:I,image:i(ve),label:s,link:i(Ne),listItem:i(Le),listItemValue:p,listOrdered:i(Ue,f),listUnordered:i(Ue),paragraph:i(Ye),reference:F,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(Pe),strong:i(De),thematicBreak:i(lt)},exit:{atxHeading:l(),atxHeadingSequence:A,autolink:l(),autolinkEmail:pe,autolinkProtocol:oe,blockQuote:l(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:ee,characterReference:te,codeFenced:l(y),codeFencedFence:v,codeFencedFenceInfo:m,codeFencedFenceMeta:b,codeFlowValue:P,codeIndented:l(_),codeText:l(W),codeTextData:P,data:P,definition:l(),definitionDestinationString:T,definitionLabelString:S,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(B),hardBreakTrailing:l(B),htmlFlow:l(K),htmlFlowData:P,htmlText:l(j),htmlTextData:P,image:l(U),label:z,labelText:Y,lineEnding:H,link:l(D),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:V,resourceDestinationString:M,resourceTitleString:Q,resource:q,setextHeading:l(L),setextHeadingLineSequence:N,setextHeadingText:k,strong:l(),thematicBreak:l()}};wae(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(Ee){let Ae={type:"root",children:[]};const Ze={stack:[Ae],tokenStack:[],config:t,enter:o,exit:c,buffer:s,resume:u,data:r},rt=[];let at=-1;for(;++at<Ee.length;)if(Ee[at][1].type==="listOrdered"||Ee[at][1].type==="listUnordered")if(Ee[at][0]==="enter")rt.push(at);else{const bt=rt.pop();at=a(Ee,bt,at)}for(at=-1;++at<Ee.length;){const bt=t[Ee[at][0]];_ae.call(bt,Ee[at][1].type)&&bt[Ee[at][1].type].call(Object.assign({sliceSerialize:Ee[at][2].sliceSerialize},Ze),Ee[at][1])}if(Ze.tokenStack.length>0){const bt=Ze.tokenStack[Ze.tokenStack.length-1];(bt[1]||Kz).call(Ze,void 0,bt[0])}for(Ae.position={start:gc(Ee.length>0?Ee[0][1].start:{line:1,column:1,offset:0}),end:gc(Ee.length>0?Ee[Ee.length-2][1].end:{line:1,column:1,offset:0})},at=-1;++at<t.transforms.length;)Ae=t.transforms[at](Ae)||Ae;return Ae}function a(Ee,Ae,Ze){let rt=Ae-1,at=-1,bt=!1,et,ft,zt,Cr;for(;++rt<=Ze;){const Xt=Ee[rt];switch(Xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xt[0]==="enter"?at++:at--,Cr=void 0;break}case"lineEndingBlank":{Xt[0]==="enter"&&(et&&!Cr&&!at&&!zt&&(zt=rt),Cr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Cr=void 0}if(!at&&Xt[0]==="enter"&&Xt[1].type==="listItemPrefix"||at===-1&&Xt[0]==="exit"&&(Xt[1].type==="listUnordered"||Xt[1].type==="listOrdered")){if(et){let $r=rt;for(ft=void 0;$r--;){const on=Ee[$r];if(on[1].type==="lineEnding"||on[1].type==="lineEndingBlank"){if(on[0]==="exit")continue;ft&&(Ee[ft][1].type="lineEndingBlank",bt=!0),on[1].type="lineEnding",ft=$r}else if(!(on[1].type==="linePrefix"||on[1].type==="blockQuotePrefix"||on[1].type==="blockQuotePrefixWhitespace"||on[1].type==="blockQuoteMarker"||on[1].type==="listItemIndent"))break}zt&&(!ft||zt<ft)&&(et._spread=!0),et.end=Object.assign({},ft?Ee[ft][1].start:Xt[1].end),Ee.splice(ft||rt,0,["exit",et,Xt[2]]),rt++,Ze++}if(Xt[1].type==="listItemPrefix"){const $r={type:"listItem",_spread:!1,start:Object.assign({},Xt[1].start),end:void 0};et=$r,Ee.splice(rt,0,["enter",$r,Xt[2]]),rt++,Ze++,zt=void 0,Cr=!0}}}return Ee[Ae][1]._spread=bt,Ze}function i(Ee,Ae){return Ze;function Ze(rt){o.call(this,Ee(rt),rt),Ae&&Ae.call(this,rt)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(Ee,Ae,Ze){this.stack[this.stack.length-1].children.push(Ee),this.stack.push(Ee),this.tokenStack.push([Ae,Ze||void 0]),Ee.position={start:gc(Ae.start),end:void 0}}function l(Ee){return Ae;function Ae(Ze){Ee&&Ee.call(this,Ze),c.call(this,Ze)}}function c(Ee,Ae){const Ze=this.stack.pop(),rt=this.tokenStack.pop();if(rt)rt[0].type!==Ee.type&&(Ae?Ae.call(this,Ee,rt[0]):(rt[1]||Kz).call(this,Ee,rt[0]));else throw new Error("Cannot close `"+Ee.type+"` ("+Ep({start:Ee.start,end:Ee.end})+"): it’s not open");Ze.position.end=gc(Ee.end)}function u(){return oO(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(Ee){if(this.data.expectingFirstListItemValue){const Ae=this.stack[this.stack.length-2];Ae.start=Number.parseInt(this.sliceSerialize(Ee),10),this.data.expectingFirstListItemValue=void 0}}function m(){const Ee=this.resume(),Ae=this.stack[this.stack.length-1];Ae.lang=Ee}function b(){const Ee=this.resume(),Ae=this.stack[this.stack.length-1];Ae.meta=Ee}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const Ee=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=Ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const Ee=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=Ee.replace(/(\r?\n|\r)$/g,"")}function S(Ee){const Ae=this.resume(),Ze=this.stack[this.stack.length-1];Ze.label=Ae,Ze.identifier=Fs(this.sliceSerialize(Ee)).toLowerCase()}function C(){const Ee=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=Ee}function T(){const Ee=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=Ee}function A(Ee){const Ae=this.stack[this.stack.length-1];if(!Ae.depth){const Ze=this.sliceSerialize(Ee).length;Ae.depth=Ze}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function N(Ee){const Ae=this.stack[this.stack.length-1];Ae.depth=this.sliceSerialize(Ee).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function I(Ee){const Ze=this.stack[this.stack.length-1].children;let rt=Ze[Ze.length-1];(!rt||rt.type!=="text")&&(rt=Ve(),rt.position={start:gc(Ee.start),end:void 0},Ze.push(rt)),this.stack.push(rt)}function P(Ee){const Ae=this.stack.pop();Ae.value+=this.sliceSerialize(Ee),Ae.position.end=gc(Ee.end)}function H(Ee){const Ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ze=Ae.children[Ae.children.length-1];Ze.position.end=gc(Ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ae.type)&&(I.call(this,Ee),P.call(this,Ee))}function B(){this.data.atHardBreak=!0}function K(){const Ee=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=Ee}function j(){const Ee=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=Ee}function W(){const Ee=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=Ee}function D(){const Ee=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";Ee.type+="Reference",Ee.referenceType=Ae,delete Ee.url,delete Ee.title}else delete Ee.identifier,delete Ee.label;this.data.referenceType=void 0}function U(){const Ee=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";Ee.type+="Reference",Ee.referenceType=Ae,delete Ee.url,delete Ee.title}else delete Ee.identifier,delete Ee.label;this.data.referenceType=void 0}function Y(Ee){const Ae=this.sliceSerialize(Ee),Ze=this.stack[this.stack.length-2];Ze.label=v3e(Ae),Ze.identifier=Fs(Ae).toLowerCase()}function z(){const Ee=this.stack[this.stack.length-1],Ae=this.resume(),Ze=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ze.type==="link"){const rt=Ee.children;Ze.children=rt}else Ze.alt=Ae}function M(){const Ee=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=Ee}function Q(){const Ee=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=Ee}function q(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function V(Ee){const Ae=this.resume(),Ze=this.stack[this.stack.length-1];Ze.label=Ae,Ze.identifier=Fs(this.sliceSerialize(Ee)).toLowerCase(),this.data.referenceType="full"}function Z(Ee){this.data.characterReferenceType=Ee.type}function ee(Ee){const Ae=this.sliceSerialize(Ee),Ze=this.data.characterReferenceType;let rt;Ze?(rt=dae(Ae,Ze==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):rt=lO(Ae);const at=this.stack[this.stack.length-1];at.value+=rt}function te(Ee){const Ae=this.stack.pop();Ae.position.end=gc(Ee.end)}function oe(Ee){P.call(this,Ee);const Ae=this.stack[this.stack.length-1];Ae.url=this.sliceSerialize(Ee)}function pe(Ee){P.call(this,Ee);const Ae=this.stack[this.stack.length-1];Ae.url="mailto:"+this.sliceSerialize(Ee)}function he(){return{type:"blockquote",children:[]}}function ke(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $e(){return{type:"emphasis",children:[]}}function Pe(){return{type:"heading",depth:0,children:[]}}function Ce(){return{type:"break"}}function xe(){return{type:"html",value:""}}function ve(){return{type:"image",title:null,url:"",alt:null}}function Ne(){return{type:"link",title:null,url:"",children:[]}}function Ue(Ee){return{type:"list",ordered:Ee.type==="listOrdered",start:null,spread:Ee._spread,children:[]}}function Le(Ee){return{type:"listItem",spread:Ee._spread,checked:null,children:[]}}function Ye(){return{type:"paragraph",children:[]}}function De(){return{type:"strong",children:[]}}function Ve(){return{type:"text",value:""}}function lt(){return{type:"thematicBreak"}}}function gc(e){return{line:e.line,column:e.column,offset:e.offset}}function wae(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?wae(e,n):_3e(e,n)}}function _3e(e,t){let r;for(r in t)if(_ae.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function Kz(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ep({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ep({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ep({start:t.start,end:t.end})+") is still open")}function w3e(e){const t=this;t.parser=r;function r(n){return x3e(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function E3e(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function S3e(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
`}]}function C3e(e,t){const r=t.value?t.value+`
`:"",n={};t.lang&&(n.className=["language-"+t.lang]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function T3e(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function A3e(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function k3e(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),a=A0(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let s,o=e.footnoteCounts.get(n);o===void 0?(o=0,e.footnoteOrder.push(n),s=e.footnoteOrder.length):s=i+1,o+=1,e.footnoteCounts.set(n,o);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+a,id:r+"fnref-"+a+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function N3e(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function R3e(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function Eae(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=n:a.push({type:"text",value:n}),a}function M3e(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Eae(e,t);const a={src:A0(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(a.title=n.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function D3e(e,t){const r={src:A0(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function O3e(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function I3e(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Eae(e,t);const a={href:A0(n.url||"")};n.title!==null&&n.title!==void 0&&(a.title=n.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function L3e(e,t){const r={href:A0(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function P3e(e,t,r){const n=e.all(t),a=r?F3e(r):Sae(t),i={},s=[];if(typeof t.checked=="boolean"){const u=n[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},n.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++o<n.length;){const u=n[o];(a||o!==0||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
`}),u.type==="element"&&u.tagName==="p"&&!a?s.push(...u.children):s.push(u)}const l=n[n.length-1];l&&(a||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
`});const c={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,c),e.applyData(t,c)}function F3e(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=Sae(r[n])}return t}function Sae(e){const t=e.spread;return t??e.children.length>1}function B3e(e,t){const r={},n=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++a<n.length;){const s=n[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,i),e.applyData(t,i)}function z3e(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function j3e(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function q3e(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function U3e(e,t){const r=e.all(t),n=r.shift(),a=[];if(n){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],s),a.push(s)}if(r.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=nO(t.children[1]),l=nae(t.children[t.children.length-1]);o&&l&&(s.position={start:o,end:l}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function $3e(e,t,r){const n=r?r.children:void 0,i=(n?n.indexOf(t):1)===0?"th":"td",s=r&&r.type==="table"?r.align:void 0,o=s?s.length:t.children.length;let l=-1;const c=[];for(;++l<o;){const f=t.children[l],p={},m=s?s[l]:void 0;m&&(p.align=m);let b={type:"element",tagName:i,properties:p,children:[]};f&&(b.children=e.all(f),e.patch(f,b),b=e.applyData(f,b)),c.push(b)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function H3e(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const Xz=9,Yz=32;function G3e(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),a=0;const i=[];for(;n;)i.push(Zz(t.slice(a,n.index),a>0,!0),n[0]),a=n.index+n[0].length,n=r.exec(t);return i.push(Zz(t.slice(a),a>0,!1)),i.join("")}function Zz(e,t,r){let n=0,a=e.length;if(t){let i=e.codePointAt(n);for(;i===Xz||i===Yz;)n++,i=e.codePointAt(n)}if(r){let i=e.codePointAt(a-1);for(;i===Xz||i===Yz;)a--,i=e.codePointAt(a-1)}return a>n?e.slice(n,a):""}function V3e(e,t){const r={type:"text",value:G3e(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function W3e(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const K3e={blockquote:E3e,break:S3e,code:C3e,delete:T3e,emphasis:A3e,footnoteReference:k3e,heading:N3e,html:R3e,imageReference:M3e,image:D3e,inlineCode:O3e,linkReference:I3e,link:L3e,listItem:P3e,list:B3e,paragraph:z3e,root:j3e,strong:q3e,table:U3e,tableCell:H3e,tableRow:$3e,text:V3e,thematicBreak:W3e,toml:jv,yaml:jv,definition:jv,footnoteDefinition:jv};function jv(){}const Cae=-1,Nx=0,Cp=1,vb=2,uO=3,dO=4,fO=5,hO=6,Tae=7,Aae=8,Qz=typeof self=="object"?self:globalThis,X3e=(e,t)=>{const r=(a,i)=>(e.set(i,a),a),n=a=>{if(e.has(a))return e.get(a);const[i,s]=t[a];switch(i){case Nx:case Cae:return r(s,a);case Cp:{const o=r([],a);for(const l of s)o.push(n(l));return o}case vb:{const o=r({},a);for(const[l,c]of s)o[n(l)]=n(c);return o}case uO:return r(new Date(s),a);case dO:{const{source:o,flags:l}=s;return r(new RegExp(o,l),a)}case fO:{const o=r(new Map,a);for(const[l,c]of s)o.set(n(l),n(c));return o}case hO:{const o=r(new Set,a);for(const l of s)o.add(n(l));return o}case Tae:{const{name:o,message:l}=s;return r(new Qz[o](l),a)}case Aae:return r(BigInt(s),a);case"BigInt":return r(Object(BigInt(s)),a);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return r(new DataView(o),s)}}return r(new Qz[i](s),a)};return n},Jz=e=>X3e(new Map,e)(0),hf="",{toString:Y3e}={},{keys:Z3e}=Object,Uh=e=>{const t=typeof e;if(t!=="object"||!e)return[Nx,t];const r=Y3e.call(e).slice(8,-1);switch(r){case"Array":return[Cp,hf];case"Object":return[vb,hf];case"Date":return[uO,hf];case"RegExp":return[dO,hf];case"Map":return[fO,hf];case"Set":return[hO,hf];case"DataView":return[Cp,r]}return r.includes("Array")?[Cp,r]:r.includes("Error")?[Tae,r]:[vb,r]},qv=([e,t])=>e===Nx&&(t==="function"||t==="symbol"),Q3e=(e,t,r,n)=>{const a=(s,o)=>{const l=n.push(s)-1;return r.set(o,l),l},i=s=>{if(r.has(s))return r.get(s);let[o,l]=Uh(s);switch(o){case Nx:{let u=s;switch(l){case"bigint":o=Aae,u=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return a([Cae],s)}return a([o,u],s)}case Cp:{if(l){let p=s;return l==="DataView"?p=new Uint8Array(s.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(s)),a([l,[...p]],s)}const u=[],f=a([o,u],s);for(const p of s)u.push(i(p));return f}case vb:{if(l)switch(l){case"BigInt":return a([l,s.toString()],s);case"Boolean":case"Number":case"String":return a([l,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const u=[],f=a([o,u],s);for(const p of Z3e(s))(e||!qv(Uh(s[p])))&&u.push([i(p),i(s[p])]);return f}case uO:return a([o,s.toISOString()],s);case dO:{const{source:u,flags:f}=s;return a([o,{source:u,flags:f}],s)}case fO:{const u=[],f=a([o,u],s);for(const[p,m]of s)(e||!(qv(Uh(p))||qv(Uh(m))))&&u.push([i(p),i(m)]);return f}case hO:{const u=[],f=a([o,u],s);for(const p of s)(e||!qv(Uh(p)))&&u.push(i(p));return f}}const{message:c}=s;return a([o,{name:l,message:c}],s)};return i},ej=(e,{json:t,lossy:r}={})=>{const n=[];return Q3e(!(t||r),!!t,new Map,n)(e),n},bb=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Jz(ej(e,t)):structuredClone(e):(e,t)=>Jz(ej(e,t));function J3e(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function eRe(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function tRe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||J3e,n=e.options.footnoteBackLabel||eRe,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),f=String(c.identifier).toUpperCase(),p=A0(f.toLowerCase());let m=0;const b=[],v=e.footnoteCounts.get(f);for(;v!==void 0&&++m<=v;){b.length>0&&b.push({type:"text",value:" "});let S=typeof r=="string"?r:r(l,m);typeof S=="string"&&(S={type:"text",value:S}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,m),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const y=u[u.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const S=y.children[y.children.length-1];S&&S.type==="text"?S.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...b)}else u.push(...b);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(u,!0)};e.patch(c,_),o.push(_)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...bb(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
`}]}}const $m=(function(e){if(e==null)return iRe;if(typeof e=="function")return Rx(e);if(typeof e=="object")return Array.isArray(e)?rRe(e):nRe(e);if(typeof e=="string")return aRe(e);throw new Error("Expected function, string, or object as test")});function rRe(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=$m(e[r]);return Rx(n);function n(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function nRe(e){const t=e;return Rx(r);function r(n){const a=n;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function aRe(e){return Rx(t);function t(r){return r&&r.type===e}}function Rx(e){return t;function t(r,n,a){return!!(sRe(r)&&e.call(this,r,typeof n=="number"?n:void 0,a||void 0))}}function iRe(){return!0}function sRe(e){return e!==null&&typeof e=="object"&&"type"in e}const kae=[],oRe=!0,Y5=!1,Nae="skip";function pO(e,t,r,n){let a;typeof t=="function"&&typeof r!="function"?(n=r,r=t):a=t;const i=$m(a),s=n?-1:1;o(e,void 0,[])();function o(l,c,u){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=kae,b,v,y;if((!t||i(l,c,u[u.length-1]||void 0))&&(m=lRe(r(l,u)),m[0]===Y5))return m;if("children"in l&&l.children){const _=l;if(_.children&&m[0]!==Nae)for(v=(n?_.children.length:-1)+s,y=u.concat(_);v>-1&&v<_.children.length;){const S=_.children[v];if(b=o(S,v,y)(),b[0]===Y5)return b;v=typeof b[1]=="number"?b[1]:v+s}}return m}}}function lRe(e){return Array.isArray(e)?e:typeof e=="number"?[oRe,e]:e==null?kae:[e]}function mO(e,t,r,n){let a,i,s;typeof t=="function"&&typeof r!="function"?(i=void 0,s=t,a=r):(i=t,s=r,a=n),pO(e,i,o,a);function o(l,c){const u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return s(l,f,u)}}const Z5={}.hasOwnProperty,cRe={};function uRe(e,t){const r=t||cRe,n=new Map,a=new Map,i=new Map,s={...K3e,...r.handlers},o={all:c,applyData:fRe,definitionById:n,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:l,options:r,patch:dRe,wrap:pRe};return mO(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?n:a,p=String(u.identifier).toUpperCase();f.has(p)||f.set(p,u)}}),o;function l(u,f){const p=u.type,m=o.handlers[p];if(Z5.call(o.handlers,p)&&m)return m(o,u,f);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in u){const{children:v,...y}=u,_=bb(y);return _.children=o.all(u),_}return bb(u)}return(o.options.unknownHandler||hRe)(o,u,f)}function c(u){const f=[];if("children"in u){const p=u.children;let m=-1;for(;++m<p.length;){const b=o.one(p[m],u);if(b){if(m&&p[m-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=tj(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=tj(v.value))}Array.isArray(b)?f.push(...b):f.push(b)}}}return f}}function dRe(e,t){e.position&&(t.position=eke(e))}function fRe(e,t){let r=t;if(e&&e.data){const n=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const s="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:s}}r.type==="element"&&i&&Object.assign(r.properties,bb(i)),"children"in r&&r.children&&a!==null&&a!==void 0&&(r.children=a)}return r}function hRe(e,t){const r=t.data||{},n="value"in t&&!(Z5.call(r,"hProperties")||Z5.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pRe(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
`});++n<e.length;)n&&r.push({type:"text",value:`
`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
`}),r}function tj(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function rj(e,t){const r=uRe(e,t),n=r.one(e,void 0),a=tRe(r),i=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
`},a),i}function mRe(e,t){return e&&"run"in e?async function(r,n){const a=rj(r,{file:n,...t});await e.run(a,n)}:function(r,n){return rj(r,{file:n,...e||t})}}function nj(e){if(e)throw e}var uE,aj;function gRe(){if(aj)return uE;aj=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},i=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var u=e.call(c,"constructor"),f=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!u&&!f)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},s=function(c,u){r&&u.name==="__proto__"?r(c,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):c[u.name]=u.newValue},o=function(c,u){if(u==="__proto__")if(e.call(c,u)){if(n)return n(c,u).value}else return;return c[u]};return uE=function l(){var c,u,f,p,m,b,v=arguments[0],y=1,_=arguments.length,S=!1;for(typeof v=="boolean"&&(S=v,v=arguments[1]||{},y=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});y<_;++y)if(c=arguments[y],c!=null)for(u in c)f=o(v,u),p=o(c,u),v!==p&&(S&&p&&(i(p)||(m=a(p)))?(m?(m=!1,b=f&&a(f)?f:[]):b=f&&i(f)?f:{},s(v,{name:u,newValue:l(S,b,p)})):typeof p<"u"&&s(v,{name:u,newValue:p}));return v},uE}var vRe=gRe();const dE=Fl(vRe);function Q5(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 bRe(){const e=[],t={run:r,use:n};return t;function r(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...a);function o(l,...c){const u=e[++i];let f=-1;if(l){s(l);return}for(;++f<a.length;)(c[f]===null||c[f]===void 0)&&(c[f]=a[f]);a=c,u?xRe(u,o)(...c):s(null,...c)}}function n(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function xRe(e,t){let r;return n;function n(...s){const o=e.length>s.length;let l;o&&s.push(a);try{l=e.apply(this,s)}catch(c){const u=c;if(o&&r)throw u;return a(u)}o||(l&&l.then&&typeof l.then=="function"?l.then(i,a):l instanceof Error?a(l):i(l))}function a(s,...o){r||(r=!0,t(s,...o))}function i(s){a(null,s)}}const po={basename:yRe,dirname:_Re,extname:wRe,join:ERe,sep:"/"};function yRe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Hm(e);let r=0,n=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){r=a+1;break}}else n<0&&(i=!0,n=a+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let s=-1,o=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){r=a+1;break}}else s<0&&(i=!0,s=a+1),o>-1&&(e.codePointAt(a)===t.codePointAt(o--)?o<0&&(n=a):(o=-1,n=s));return r===n?n=s:n<0&&(n=e.length),e.slice(r,n)}function _Re(e){if(Hm(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function wRe(e){Hm(e);let t=e.length,r=-1,n=0,a=-1,i=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){n=t+1;break}continue}r<0&&(s=!0,r=t+1),o===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||r<0||i===0||i===1&&a===r-1&&a===n+1?"":e.slice(a,r)}function ERe(...e){let t=-1,r;for(;++t<e.length;)Hm(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":SRe(r)}function SRe(e){Hm(e);const t=e.codePointAt(0)===47;let r=CRe(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function CRe(e,t){let r="",n=0,a=-1,i=0,s=-1,o,l;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),a=s,i=0;continue}}else if(r.length>0){r="",n=0,a=s,i=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(a+1,s):r=e.slice(a+1,s),n=s-a-1;a=s,i=0}else o===46&&i>-1?i++:i=-1}return r}function Hm(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const TRe={cwd:ARe};function ARe(){return"/"}function J5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kRe(e){if(typeof e=="string")e=new URL(e);else if(!J5(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 NRe(e)}function NRe(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const fE=["history","path","basename","stem","extname","dirname"];class Rae{constructor(t){let r;t?J5(t)?r={path:t}:typeof t=="string"||RRe(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":TRe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<fE.length;){const i=fE[n];i in r&&r[i]!==void 0&&r[i]!==null&&(this[i]=i==="history"?[...r[i]]:r[i])}let a;for(a in r)fE.includes(a)||(this[a]=r[a])}get basename(){return typeof this.path=="string"?po.basename(this.path):void 0}set basename(t){pE(t,"basename"),hE(t,"basename"),this.path=po.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?po.dirname(this.path):void 0}set dirname(t){ij(this.basename,"dirname"),this.path=po.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?po.extname(this.path):void 0}set extname(t){if(hE(t,"extname"),ij(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=po.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){J5(t)&&(t=kRe(t)),pE(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?po.basename(this.path,this.extname):void 0}set stem(t){pE(t,"stem"),hE(t,"stem"),this.path=po.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const a=this.message(t,r,n);throw a.fatal=!0,a}info(t,r,n){const a=this.message(t,r,n);return a.fatal=void 0,a}message(t,r,n){const a=new Ta(t,r,n);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function hE(e,t){if(e&&e.includes(po.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+po.sep+"`")}function pE(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ij(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function RRe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const MRe=(function(e){const n=this.constructor.prototype,a=n[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,n),i}),DRe={}.hasOwnProperty;class gO extends MRe{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=bRe()}copy(){const t=new gO;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(dE(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(vE("data",this.frozen),this.namespace[t]=r,this):DRe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(vE("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[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const a=r.call(t,...n);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Uv(t),n=this.parser||this.Parser;return mE("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),mE("process",this.parser||this.Parser),gE("process",this.compiler||this.Compiler),r?a(void 0,r):new Promise(a);function a(i,s){const o=Uv(t),l=n.parse(o);n.run(l,o,function(u,f,p){if(u||!f||!p)return c(u);const m=f,b=n.stringify(m,p);LRe(b)?p.value=b:p.result=b,c(u,p)});function c(u,f){u||!f?s(u):i?i(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),mE("processSync",this.parser||this.Parser),gE("processSync",this.compiler||this.Compiler),this.process(t,a),oj("processSync","process",r),n;function a(i,s){r=!0,nj(i),n=s}}run(t,r,n){sj(t),this.freeze();const a=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?i(void 0,n):new Promise(i);function i(s,o){const l=Uv(r);a.run(t,l,c);function c(u,f,p){const m=f||t;u?o(u):s?s(m):n(void 0,m,p)}}}runSync(t,r){let n=!1,a;return this.run(t,r,i),oj("runSync","run",n),a;function i(s,o){nj(s),a=o,n=!0}}stringify(t,r){this.freeze();const n=Uv(r),a=this.compiler||this.Compiler;return gE("stringify",a),sj(t),a(t,n)}use(t,...r){const n=this.attachers,a=this.namespace;if(vE("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...f]=c;l(u,f)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))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(c.plugins),c.settings&&(a.settings=dE(!0,a.settings,c.settings))}function o(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];i(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let f=-1,p=-1;for(;++f<n.length;)if(n[f][0]===c){p=f;break}if(p===-1)n.push([c,...u]);else if(u.length>0){let[m,...b]=u;const v=n[p][1];Q5(v)&&Q5(m)&&(m=dE(!0,v,m)),n[p]=[c,m,...b]}}}}const ORe=new gO().freeze();function mE(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function gE(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function vE(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 sj(e){if(!Q5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function oj(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Uv(e){return IRe(e)?e:new Rae(e)}function IRe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function LRe(e){return typeof e=="string"||PRe(e)}function PRe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const FRe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",lj=[],cj={allowDangerousHtml:!0},BRe=/^(https?|ircs?|mailto|xmpp)$/i,zRe=[{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 V1(e){const t=jRe(e),r=qRe(e);return URe(t.runSync(t.parse(r),r),e)}function jRe(e){const t=e.rehypePlugins||lj,r=e.remarkPlugins||lj,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...cj}:cj;return ORe().use(w3e).use(r).use(mRe,n).use(t)}function qRe(e){const t=e.children||"",r=new Rae;return typeof t=="string"&&(r.value=t),r}function URe(e,t){const r=t.allowedElements,n=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||$Re;for(const u of zRe)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+FRe+u.id,void 0);return mO(e,c),ike(e,{Fragment:g.Fragment,components:a,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function c(u,f,p){if(u.type==="raw"&&p&&typeof f=="number")return s?p.children.splice(f,1):p.children[f]={type:"text",value:u.value},f;if(u.type==="element"){let m;for(m in oE)if(Object.hasOwn(oE,m)&&Object.hasOwn(u.properties,m)){const b=u.properties[m],v=oE[m];(v===null||v.includes(u.tagName))&&(u.properties[m]=l(String(b||""),m,u))}}if(u.type==="element"){let m=r?!r.includes(u.tagName):i?i.includes(u.tagName):!1;if(!m&&n&&typeof f=="number"&&(m=!n(u,f,p)),m&&p&&typeof f=="number")return o&&u.children?p.children.splice(f,1,...u.children):p.children.splice(f,1),f}}}function $Re(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||r!==-1&&t>r||n!==-1&&t>n||BRe.test(e.slice(0,t))?e:""}function Mae(e,t){const r=String(e);let n=r.indexOf(t),a=n,i=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===a?++i>s&&(s=i):i=1,a=n+t.length,n=r.indexOf(t,a);return s}function HRe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:i},exit:{mathFlow:a,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:o,mathText:s,mathTextData:o}};function e(l){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},l)}function t(){this.buffer()}function r(){const l=this.resume(),c=this.stack[this.stack.length-1];c.type,c.meta=l}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function a(l){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),u=this.stack[this.stack.length-1];u.type,this.exit(l),u.value=c;const f=u.data.hChildren[0];f.type,f.tagName,f.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function i(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function s(l){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,this.exit(l),u.value=c,u.data.hChildren.push({type:"text",value:c})}function o(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function GRe(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=a,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(i,s,o,l){const c=i.value||"",u=o.createTracker(l),f="$".repeat(Math.max(Mae(c,"$")+1,2)),p=o.enter("mathFlow");let m=u.move(f);if(i.meta){const b=o.enter("mathFlowMeta");m+=u.move(o.safe(i.meta,{after:`
`,before:m,encode:["$"],...u.current()})),b()}return m+=u.move(`
`),c&&(m+=u.move(c+`
`)),m+=u.move(f),p(),m}function n(i,s,o){let l=i.value||"",c=1;for(t||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(l);)c++;const u="$".repeat(c);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let f=-1;for(;++f<o.unsafe.length;){const p=o.unsafe[f];if(!p.atBreak)continue;const m=o.compilePattern(p);let b;for(;b=m.exec(l);){let v=b.index;l.codePointAt(v)===10&&l.codePointAt(v-1)===13&&v--,l=l.slice(0,v)+" "+l.slice(b.index+1)}}return u+l+u}function a(){return"$"}}const VRe={tokenize:WRe,concrete:!0,name:"mathFlow"},uj={tokenize:KRe,partial:!0};function WRe(e,t,r){const n=this,a=n.events[n.events.length-1],i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let s=0;return o;function o(S){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),l(S)}function l(S){return S===36?(e.consume(S),s++,l):s<2?r(S):(e.exit("mathFlowFenceSequence"),or(e,c,"whitespace")(S))}function c(S){return S===null||Tt(S)?f(S):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),u(S))}function u(S){return S===null||Tt(S)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),f(S)):S===36?r(S):(e.consume(S),u)}function f(S){return e.exit("mathFlowFence"),n.interrupt?t(S):e.attempt(uj,p,y)(S)}function p(S){return e.attempt({tokenize:_,partial:!0},y,m)(S)}function m(S){return(i?or(e,b,"linePrefix",i+1):b)(S)}function b(S){return S===null?y(S):Tt(S)?e.attempt(uj,p,y)(S):(e.enter("mathFlowValue"),v(S))}function v(S){return S===null||Tt(S)?(e.exit("mathFlowValue"),b(S)):(e.consume(S),v)}function y(S){return e.exit("mathFlow"),t(S)}function _(S,C,T){let A=0;return or(S,k,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function k(I){return S.enter("mathFlowFence"),S.enter("mathFlowFenceSequence"),N(I)}function N(I){return I===36?(A++,S.consume(I),N):A<s?T(I):(S.exit("mathFlowFenceSequence"),or(S,L,"whitespace")(I))}function L(I){return I===null||Tt(I)?(S.exit("mathFlowFence"),C(I)):T(I)}}}function KRe(e,t,r){const n=this;return a;function a(s){return s===null?t(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function XRe(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:YRe,previous:ZRe,name:"mathText"};function n(a,i,s){let o=0,l,c;return u;function u(v){return a.enter("mathText"),a.enter("mathTextSequence"),f(v)}function f(v){return v===36?(a.consume(v),o++,f):o<2&&!r?s(v):(a.exit("mathTextSequence"),p(v))}function p(v){return v===null?s(v):v===36?(c=a.enter("mathTextSequence"),l=0,b(v)):v===32?(a.enter("space"),a.consume(v),a.exit("space"),p):Tt(v)?(a.enter("lineEnding"),a.consume(v),a.exit("lineEnding"),p):(a.enter("mathTextData"),m(v))}function m(v){return v===null||v===32||v===36||Tt(v)?(a.exit("mathTextData"),p(v)):(a.consume(v),m)}function b(v){return v===36?(a.consume(v),l++,b):l===o?(a.exit("mathTextSequence"),a.exit("mathText"),i(v)):(c.type="mathTextData",m(v))}}}function YRe(e){let t=e.length-4,r=3,n,a;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[r][1].type="mathTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)a===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(a=n):(n===t||e[n][1].type==="lineEnding")&&(e[a][1].type="mathTextData",n!==a+2&&(e[a][1].end=e[n-1][1].end,e.splice(a+2,n-a-2),t-=n-a-2,n=a+2),a=void 0);return e}function ZRe(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function QRe(e){return{flow:{36:VRe},text:{36:XRe(e)}}}class Ci{constructor(t,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new Ci(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}}class cs{constructor(t,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=r}range(t,r){return new cs(r,Ci.range(this,t))}}class nt{constructor(t,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+t,a,i,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;a=s.start,i=s.end,a===o.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var l=o.slice(a,i).replace(/[^]/g,"$&̲"),c;a>15?c="…"+o.slice(a-15,a):c=o.slice(0,a);var u;i+15<o.length?u=o.slice(i,i+15)+"…":u=o.slice(i),n+=c+l+u}var f=new Error(n);return f.name="ParseError",f.__proto__=nt.prototype,f.position=a,a!=null&&i!=null&&(f.length=i-a),f.rawMessage=t,f}}nt.prototype.__proto__=Error.prototype;var JRe=function(t,r){return t.indexOf(r)!==-1},eMe=function(t,r){return t===void 0?r:t},tMe=/([A-Z])/g,rMe=function(t){return t.replace(tMe,"-$1").toLowerCase()},nMe={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},aMe=/[&><"']/g;function iMe(e){return String(e).replace(aMe,t=>nMe[t])}var Dae=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},sMe=function(t){var r=Dae(t);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},oMe=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},lMe=function(t){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},Nt={contains:JRe,deflt:eMe,escape:iMe,hyphenate:rMe,getBaseElem:Dae,isCharacterBox:sMe,protocolFromUrl:lMe},W1={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 cMe(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class vO{constructor(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 r in W1)if(W1.hasOwnProperty(r)){var n=W1[r];this[r]=t[r]!==void 0?n.processor?n.processor(t[r]):t[r]:cMe(n)}}reportNonstrict(t,r,n){var a=this.strict;if(typeof a=="function"&&(a=a(t,r,n)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new nt("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);a==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var a=this.strict;if(typeof a=="function")try{a=a(t,r,n)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if(t.url&&!t.protocol){var r=Nt.protocolFromUrl(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class vc{constructor(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}sup(){return xo[uMe[this.id]]}sub(){return xo[dMe[this.id]]}fracNum(){return xo[fMe[this.id]]}fracDen(){return xo[hMe[this.id]]}cramp(){return xo[pMe[this.id]]}text(){return xo[mMe[this.id]]}isTight(){return this.size>=2}}var bO=0,xb=1,Ff=2,xl=3,Qp=4,ss=5,r0=6,Ia=7,xo=[new vc(bO,0,!1),new vc(xb,0,!0),new vc(Ff,1,!1),new vc(xl,1,!0),new vc(Qp,2,!1),new vc(ss,2,!0),new vc(r0,3,!1),new vc(Ia,3,!0)],uMe=[Qp,ss,Qp,ss,r0,Ia,r0,Ia],dMe=[ss,ss,ss,ss,Ia,Ia,Ia,Ia],fMe=[Ff,xl,Qp,ss,r0,Ia,r0,Ia],hMe=[xl,xl,ss,ss,Ia,Ia,Ia,Ia],pMe=[xb,xb,xl,xl,ss,ss,Ia,Ia],mMe=[bO,xb,Ff,xl,Ff,xl,Ff,xl],It={DISPLAY:xo[bO],TEXT:xo[Ff],SCRIPT:xo[Qp],SCRIPTSCRIPT:xo[r0]},e6=[{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 gMe(e){for(var t=0;t<e6.length;t++)for(var r=e6[t],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(e>=a[0]&&e<=a[1])return r.name}return null}var K1=[];e6.forEach(e=>e.blocks.forEach(t=>K1.push(...t)));function Oae(e){for(var t=0;t<K1.length;t+=2)if(e>=K1[t]&&e<=K1[t+1])return!0;return!1}var pf=80,vMe=function(t,r){return"M95,"+(622+t+r)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.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
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+t/2.075+" -"+t+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+t)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},bMe=function(t,r){return"M263,"+(601+t+r)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+t/2.084+" -"+t+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+t)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},xMe=function(t,r){return"M983 "+(10+t+r)+`
l`+t/3.13+" -"+t+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},yMe=function(t,r){return"M424,"+(2398+t+r)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-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
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+t)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+r+`
h400000v`+(40+t)+"h-400000z"},_Me=function(t,r){return"M473,"+(2713+t+r)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-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
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+t)+" "+r+"h400000v"+(40+t)+"H1017.7z"},wMe=function(t){var r=t/2;return"M400000 "+t+" H0 L"+r+" 0 l65 45 L145 "+(t-80)+" H400000z"},EMe=function(t,r,n){var a=n-54-r-t;return"M702 "+(t+r)+"H400000"+(40+t)+`
H742v`+a+`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
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+r+"H400000v"+(40+t)+"H742z"},SMe=function(t,r,n){r=1e3*r;var a="";switch(t){case"sqrtMain":a=vMe(r,pf);break;case"sqrtSize1":a=bMe(r,pf);break;case"sqrtSize2":a=xMe(r,pf);break;case"sqrtSize3":a=yMe(r,pf);break;case"sqrtSize4":a=_Me(r,pf);break;case"sqrtTall":a=EMe(r,pf,n)}return a},CMe=function(t,r){switch(t){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},dj={doubleleftarrow:`M262 157
l10-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
 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
 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
c2 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
 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
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-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
 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
-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
-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
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-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
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
 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
-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
c-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
 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
 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
 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
 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
 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
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 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
 435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-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
-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
-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
 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
-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
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
 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
-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 11s5.3 5.3 12
 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
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-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
-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
 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 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-70-101l-7-8h399905v-40H95l7-8
c28.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
 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-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
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
 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
 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.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
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 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
-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
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.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
60.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
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 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
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.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
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 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
-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
 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
 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
-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
-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
 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-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
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.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
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-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
 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
 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
-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
-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
 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
-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
 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
m0 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
 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
-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
-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
 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
 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
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-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
 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
-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
 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-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
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
 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
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
 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
c-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
 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
 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
 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
-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
 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
 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-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
 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 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
 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
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
 -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
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-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
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-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
-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
-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
-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,
-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,
-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,
-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,
-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
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-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
s-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
121.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
s2.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
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-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 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 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-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
-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
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,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
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-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
c-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
M0 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
c1.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,
1c0,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,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 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
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-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
c-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
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},TMe=function(t,r){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
M347 1759 V0 h-84 V1759 v`+r+" 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
c-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,
-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.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
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-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,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
c-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
c-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
c0,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
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-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.")}};class Gm{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 Nt.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){for(var t="",r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t}toText(){var t=r=>r.toText();return this.children.map(t).join("")}}var Eo={"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]}},$v={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]},fj={Å:"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 AMe(e,t){Eo[e]=t}function xO(e,t,r){if(!Eo[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),a=Eo[t][n];if(!a&&e[0]in fj&&(n=fj[e[0]].charCodeAt(0),a=Eo[t][n]),!a&&r==="text"&&Oae(n)&&(a=Eo[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var bE={};function kMe(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!bE[t]){var r=bE[t]={cssEmPerMu:$v.quad[t]/18};for(var n in $v)$v.hasOwnProperty(n)&&(r[n]=$v[n][t])}return bE[t]}var NMe=[[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]],hj=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],pj=function(t,r){return r.size<2?t:NMe[t-1][r.size-1]};class hl{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||hl.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=hj[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={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};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return new hl(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:pj(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:hj[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=pj(hl.BASESIZE,t);return this.size===r&&this.textSize===hl.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}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!==hl.BASESIZE?["sizing","reset-size"+this.size,"size"+hl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=kMe(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}hl.BASESIZE=6;var t6={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},RMe={ex:!0,em:!0,mu:!0},Iae=function(t){return typeof t!="string"&&(t=t.unit),t in t6||t in RMe||t==="ex"},sn=function(t,r){var n;if(t.unit in t6)n=t6[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var a;if(r.style.isTight()?a=r.havingStyle(r.style.text()):a=r,t.unit==="ex")n=a.fontMetrics().xHeight;else if(t.unit==="em")n=a.fontMetrics().quad;else throw new nt("Invalid unit: '"+t.unit+"'");a!==r&&(n*=a.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},ct=function(t){return+t.toFixed(4)+"em"},$c=function(t){return t.filter(r=>r).join(" ")},Lae=function(t,r,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var a=r.getColor();a&&(this.style.color=a)}},Pae=function(t){var r=document.createElement(t);r.className=$c(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&r.setAttribute(a,this.attributes[a]);for(var i=0;i<this.children.length;i++)r.appendChild(this.children[i].toNode());return r},MMe=/[\s"'>/=\x00-\x1f]/,Fae=function(t){var r="<"+t;this.classes.length&&(r+=' class="'+Nt.escape($c(this.classes))+'"');var n="";for(var a in this.style)this.style.hasOwnProperty(a)&&(n+=Nt.hyphenate(a)+":"+this.style[a]+";");n&&(r+=' style="'+Nt.escape(n)+'"');for(var i in this.attributes)if(this.attributes.hasOwnProperty(i)){if(MMe.test(i))throw new nt("Invalid attribute name '"+i+"'");r+=" "+i+'="'+Nt.escape(this.attributes[i])+'"'}r+=">";for(var s=0;s<this.children.length;s++)r+=this.children[s].toMarkup();return r+="</"+t+">",r};class Vm{constructor(t,r,n,a){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,Lae.call(this,t,n,a),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return Nt.contains(this.classes,t)}toNode(){return Pae.call(this,"span")}toMarkup(){return Fae.call(this,"span")}}class yO{constructor(t,r,n,a){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,Lae.call(this,r,a),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return Nt.contains(this.classes,t)}toNode(){return Pae.call(this,"a")}toMarkup(){return Fae.call(this,"a")}}class DMe{constructor(t,r,n){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=r,this.src=t,this.classes=["mord"],this.style=n}hasClass(t){return Nt.contains(this.classes,t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);return t}toMarkup(){var t='<img src="'+Nt.escape(this.src)+'"'+(' alt="'+Nt.escape(this.alt)+'"'),r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=Nt.hyphenate(n)+":"+this.style[n]+";");return r&&(t+=' style="'+Nt.escape(r)+'"'),t+="'/>",t}}var OMe={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class fs{constructor(t,r,n,a,i,s,o,l){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=r||0,this.depth=n||0,this.italic=a||0,this.skew=i||0,this.width=s||0,this.classes=o||[],this.style=l||{},this.maxFontSize=0;var c=gMe(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=OMe[this.text])}hasClass(t){return Nt.contains(this.classes,t)}toNode(){var t=document.createTextNode(this.text),r=null;this.italic>0&&(r=document.createElement("span"),r.style.marginRight=ct(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=$c(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="<span";this.classes.length&&(t=!0,r+=' class="',r+=Nt.escape($c(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+this.italic+"em;");for(var a in this.style)this.style.hasOwnProperty(a)&&(n+=Nt.hyphenate(a)+":"+this.style[a]+";");n&&(t=!0,r+=' style="'+Nt.escape(n)+'"');var i=Nt.escape(this.text);return t?(r+=">",r+=i,r+="</span>",r):i}}class Nl{constructor(t,r){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var a=0;a<this.children.length;a++)r.appendChild(this.children[a].toNode());return r}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(t+=" "+r+'="'+Nt.escape(this.attributes[r])+'"');t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</svg>",t}}class Hc{constructor(t,r){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=r}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",dj[this.pathName]),r}toMarkup(){return this.alternate?'<path d="'+Nt.escape(this.alternate)+'"/>':'<path d="'+Nt.escape(dj[this.pathName])+'"/>'}}class r6{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var t="<line";for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(t+=" "+r+'="'+Nt.escape(this.attributes[r])+'"');return t+="/>",t}}function mj(e){if(e instanceof fs)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function IMe(e){if(e instanceof Vm)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var LMe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},PMe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Wr={math:{},text:{}};function G(e,t,r,n,a,i){Wr[e][a]={font:t,group:r,replace:n},i&&n&&(Wr[e][n]=Wr[e][a])}var X="math",Je="text",re="main",me="ams",Jr="accent-token",vt="bin",ja="close",k0="inner",Ot="mathord",Pn="op-token",ji="open",Mx="punct",ge="rel",jl="spacing",we="textord";G(X,re,ge,"≡","\\equiv",!0);G(X,re,ge,"≺","\\prec",!0);G(X,re,ge,"≻","\\succ",!0);G(X,re,ge,"∼","\\sim",!0);G(X,re,ge,"⊥","\\perp");G(X,re,ge,"⪯","\\preceq",!0);G(X,re,ge,"⪰","\\succeq",!0);G(X,re,ge,"≃","\\simeq",!0);G(X,re,ge,"∣","\\mid",!0);G(X,re,ge,"≪","\\ll",!0);G(X,re,ge,"≫","\\gg",!0);G(X,re,ge,"≍","\\asymp",!0);G(X,re,ge,"∥","\\parallel");G(X,re,ge,"⋈","\\bowtie",!0);G(X,re,ge,"⌣","\\smile",!0);G(X,re,ge,"⊑","\\sqsubseteq",!0);G(X,re,ge,"⊒","\\sqsupseteq",!0);G(X,re,ge,"≐","\\doteq",!0);G(X,re,ge,"⌢","\\frown",!0);G(X,re,ge,"∋","\\ni",!0);G(X,re,ge,"∝","\\propto",!0);G(X,re,ge,"⊢","\\vdash",!0);G(X,re,ge,"⊣","\\dashv",!0);G(X,re,ge,"∋","\\owns");G(X,re,Mx,".","\\ldotp");G(X,re,Mx,"⋅","\\cdotp");G(X,re,we,"#","\\#");G(Je,re,we,"#","\\#");G(X,re,we,"&","\\&");G(Je,re,we,"&","\\&");G(X,re,we,"ℵ","\\aleph",!0);G(X,re,we,"∀","\\forall",!0);G(X,re,we,"ℏ","\\hbar",!0);G(X,re,we,"∃","\\exists",!0);G(X,re,we,"∇","\\nabla",!0);G(X,re,we,"♭","\\flat",!0);G(X,re,we,"ℓ","\\ell",!0);G(X,re,we,"♮","\\natural",!0);G(X,re,we,"♣","\\clubsuit",!0);G(X,re,we,"℘","\\wp",!0);G(X,re,we,"♯","\\sharp",!0);G(X,re,we,"♢","\\diamondsuit",!0);G(X,re,we,"ℜ","\\Re",!0);G(X,re,we,"♡","\\heartsuit",!0);G(X,re,we,"ℑ","\\Im",!0);G(X,re,we,"♠","\\spadesuit",!0);G(X,re,we,"§","\\S",!0);G(Je,re,we,"§","\\S");G(X,re,we,"¶","\\P",!0);G(Je,re,we,"¶","\\P");G(X,re,we,"†","\\dag");G(Je,re,we,"†","\\dag");G(Je,re,we,"†","\\textdagger");G(X,re,we,"‡","\\ddag");G(Je,re,we,"‡","\\ddag");G(Je,re,we,"‡","\\textdaggerdbl");G(X,re,ja,"⎱","\\rmoustache",!0);G(X,re,ji,"⎰","\\lmoustache",!0);G(X,re,ja,"⟯","\\rgroup",!0);G(X,re,ji,"⟮","\\lgroup",!0);G(X,re,vt,"∓","\\mp",!0);G(X,re,vt,"⊖","\\ominus",!0);G(X,re,vt,"⊎","\\uplus",!0);G(X,re,vt,"⊓","\\sqcap",!0);G(X,re,vt,"∗","\\ast");G(X,re,vt,"⊔","\\sqcup",!0);G(X,re,vt,"◯","\\bigcirc",!0);G(X,re,vt,"∙","\\bullet",!0);G(X,re,vt,"‡","\\ddagger");G(X,re,vt,"≀","\\wr",!0);G(X,re,vt,"⨿","\\amalg");G(X,re,vt,"&","\\And");G(X,re,ge,"⟵","\\longleftarrow",!0);G(X,re,ge,"⇐","\\Leftarrow",!0);G(X,re,ge,"⟸","\\Longleftarrow",!0);G(X,re,ge,"⟶","\\longrightarrow",!0);G(X,re,ge,"⇒","\\Rightarrow",!0);G(X,re,ge,"⟹","\\Longrightarrow",!0);G(X,re,ge,"↔","\\leftrightarrow",!0);G(X,re,ge,"⟷","\\longleftrightarrow",!0);G(X,re,ge,"⇔","\\Leftrightarrow",!0);G(X,re,ge,"⟺","\\Longleftrightarrow",!0);G(X,re,ge,"↦","\\mapsto",!0);G(X,re,ge,"⟼","\\longmapsto",!0);G(X,re,ge,"↗","\\nearrow",!0);G(X,re,ge,"↩","\\hookleftarrow",!0);G(X,re,ge,"↪","\\hookrightarrow",!0);G(X,re,ge,"↘","\\searrow",!0);G(X,re,ge,"↼","\\leftharpoonup",!0);G(X,re,ge,"⇀","\\rightharpoonup",!0);G(X,re,ge,"↙","\\swarrow",!0);G(X,re,ge,"↽","\\leftharpoondown",!0);G(X,re,ge,"⇁","\\rightharpoondown",!0);G(X,re,ge,"↖","\\nwarrow",!0);G(X,re,ge,"⇌","\\rightleftharpoons",!0);G(X,me,ge,"≮","\\nless",!0);G(X,me,ge,"","\\@nleqslant");G(X,me,ge,"","\\@nleqq");G(X,me,ge,"⪇","\\lneq",!0);G(X,me,ge,"≨","\\lneqq",!0);G(X,me,ge,"","\\@lvertneqq");G(X,me,ge,"⋦","\\lnsim",!0);G(X,me,ge,"⪉","\\lnapprox",!0);G(X,me,ge,"⊀","\\nprec",!0);G(X,me,ge,"⋠","\\npreceq",!0);G(X,me,ge,"⋨","\\precnsim",!0);G(X,me,ge,"⪹","\\precnapprox",!0);G(X,me,ge,"≁","\\nsim",!0);G(X,me,ge,"","\\@nshortmid");G(X,me,ge,"∤","\\nmid",!0);G(X,me,ge,"⊬","\\nvdash",!0);G(X,me,ge,"⊭","\\nvDash",!0);G(X,me,ge,"⋪","\\ntriangleleft");G(X,me,ge,"⋬","\\ntrianglelefteq",!0);G(X,me,ge,"⊊","\\subsetneq",!0);G(X,me,ge,"","\\@varsubsetneq");G(X,me,ge,"⫋","\\subsetneqq",!0);G(X,me,ge,"","\\@varsubsetneqq");G(X,me,ge,"≯","\\ngtr",!0);G(X,me,ge,"","\\@ngeqslant");G(X,me,ge,"","\\@ngeqq");G(X,me,ge,"⪈","\\gneq",!0);G(X,me,ge,"≩","\\gneqq",!0);G(X,me,ge,"","\\@gvertneqq");G(X,me,ge,"⋧","\\gnsim",!0);G(X,me,ge,"⪊","\\gnapprox",!0);G(X,me,ge,"⊁","\\nsucc",!0);G(X,me,ge,"⋡","\\nsucceq",!0);G(X,me,ge,"⋩","\\succnsim",!0);G(X,me,ge,"⪺","\\succnapprox",!0);G(X,me,ge,"≆","\\ncong",!0);G(X,me,ge,"","\\@nshortparallel");G(X,me,ge,"∦","\\nparallel",!0);G(X,me,ge,"⊯","\\nVDash",!0);G(X,me,ge,"⋫","\\ntriangleright");G(X,me,ge,"⋭","\\ntrianglerighteq",!0);G(X,me,ge,"","\\@nsupseteqq");G(X,me,ge,"⊋","\\supsetneq",!0);G(X,me,ge,"","\\@varsupsetneq");G(X,me,ge,"⫌","\\supsetneqq",!0);G(X,me,ge,"","\\@varsupsetneqq");G(X,me,ge,"⊮","\\nVdash",!0);G(X,me,ge,"⪵","\\precneqq",!0);G(X,me,ge,"⪶","\\succneqq",!0);G(X,me,ge,"","\\@nsubseteqq");G(X,me,vt,"⊴","\\unlhd");G(X,me,vt,"⊵","\\unrhd");G(X,me,ge,"↚","\\nleftarrow",!0);G(X,me,ge,"↛","\\nrightarrow",!0);G(X,me,ge,"⇍","\\nLeftarrow",!0);G(X,me,ge,"⇏","\\nRightarrow",!0);G(X,me,ge,"↮","\\nleftrightarrow",!0);G(X,me,ge,"⇎","\\nLeftrightarrow",!0);G(X,me,ge,"△","\\vartriangle");G(X,me,we,"ℏ","\\hslash");G(X,me,we,"▽","\\triangledown");G(X,me,we,"◊","\\lozenge");G(X,me,we,"Ⓢ","\\circledS");G(X,me,we,"®","\\circledR");G(Je,me,we,"®","\\circledR");G(X,me,we,"∡","\\measuredangle",!0);G(X,me,we,"∄","\\nexists");G(X,me,we,"℧","\\mho");G(X,me,we,"Ⅎ","\\Finv",!0);G(X,me,we,"⅁","\\Game",!0);G(X,me,we,"‵","\\backprime");G(X,me,we,"▲","\\blacktriangle");G(X,me,we,"▼","\\blacktriangledown");G(X,me,we,"■","\\blacksquare");G(X,me,we,"⧫","\\blacklozenge");G(X,me,we,"★","\\bigstar");G(X,me,we,"∢","\\sphericalangle",!0);G(X,me,we,"∁","\\complement",!0);G(X,me,we,"ð","\\eth",!0);G(Je,re,we,"ð","ð");G(X,me,we,"╱","\\diagup");G(X,me,we,"╲","\\diagdown");G(X,me,we,"□","\\square");G(X,me,we,"□","\\Box");G(X,me,we,"◊","\\Diamond");G(X,me,we,"¥","\\yen",!0);G(Je,me,we,"¥","\\yen",!0);G(X,me,we,"✓","\\checkmark",!0);G(Je,me,we,"✓","\\checkmark");G(X,me,we,"ℶ","\\beth",!0);G(X,me,we,"ℸ","\\daleth",!0);G(X,me,we,"ℷ","\\gimel",!0);G(X,me,we,"ϝ","\\digamma",!0);G(X,me,we,"ϰ","\\varkappa");G(X,me,ji,"┌","\\@ulcorner",!0);G(X,me,ja,"┐","\\@urcorner",!0);G(X,me,ji,"└","\\@llcorner",!0);G(X,me,ja,"┘","\\@lrcorner",!0);G(X,me,ge,"≦","\\leqq",!0);G(X,me,ge,"⩽","\\leqslant",!0);G(X,me,ge,"⪕","\\eqslantless",!0);G(X,me,ge,"≲","\\lesssim",!0);G(X,me,ge,"⪅","\\lessapprox",!0);G(X,me,ge,"≊","\\approxeq",!0);G(X,me,vt,"⋖","\\lessdot");G(X,me,ge,"⋘","\\lll",!0);G(X,me,ge,"≶","\\lessgtr",!0);G(X,me,ge,"⋚","\\lesseqgtr",!0);G(X,me,ge,"⪋","\\lesseqqgtr",!0);G(X,me,ge,"≑","\\doteqdot");G(X,me,ge,"≓","\\risingdotseq",!0);G(X,me,ge,"≒","\\fallingdotseq",!0);G(X,me,ge,"∽","\\backsim",!0);G(X,me,ge,"⋍","\\backsimeq",!0);G(X,me,ge,"⫅","\\subseteqq",!0);G(X,me,ge,"⋐","\\Subset",!0);G(X,me,ge,"⊏","\\sqsubset",!0);G(X,me,ge,"≼","\\preccurlyeq",!0);G(X,me,ge,"⋞","\\curlyeqprec",!0);G(X,me,ge,"≾","\\precsim",!0);G(X,me,ge,"⪷","\\precapprox",!0);G(X,me,ge,"⊲","\\vartriangleleft");G(X,me,ge,"⊴","\\trianglelefteq");G(X,me,ge,"⊨","\\vDash",!0);G(X,me,ge,"⊪","\\Vvdash",!0);G(X,me,ge,"⌣","\\smallsmile");G(X,me,ge,"⌢","\\smallfrown");G(X,me,ge,"≏","\\bumpeq",!0);G(X,me,ge,"≎","\\Bumpeq",!0);G(X,me,ge,"≧","\\geqq",!0);G(X,me,ge,"⩾","\\geqslant",!0);G(X,me,ge,"⪖","\\eqslantgtr",!0);G(X,me,ge,"≳","\\gtrsim",!0);G(X,me,ge,"⪆","\\gtrapprox",!0);G(X,me,vt,"⋗","\\gtrdot");G(X,me,ge,"⋙","\\ggg",!0);G(X,me,ge,"≷","\\gtrless",!0);G(X,me,ge,"⋛","\\gtreqless",!0);G(X,me,ge,"⪌","\\gtreqqless",!0);G(X,me,ge,"≖","\\eqcirc",!0);G(X,me,ge,"≗","\\circeq",!0);G(X,me,ge,"≜","\\triangleq",!0);G(X,me,ge,"∼","\\thicksim");G(X,me,ge,"≈","\\thickapprox");G(X,me,ge,"⫆","\\supseteqq",!0);G(X,me,ge,"⋑","\\Supset",!0);G(X,me,ge,"⊐","\\sqsupset",!0);G(X,me,ge,"≽","\\succcurlyeq",!0);G(X,me,ge,"⋟","\\curlyeqsucc",!0);G(X,me,ge,"≿","\\succsim",!0);G(X,me,ge,"⪸","\\succapprox",!0);G(X,me,ge,"⊳","\\vartriangleright");G(X,me,ge,"⊵","\\trianglerighteq");G(X,me,ge,"⊩","\\Vdash",!0);G(X,me,ge,"∣","\\shortmid");G(X,me,ge,"∥","\\shortparallel");G(X,me,ge,"≬","\\between",!0);G(X,me,ge,"⋔","\\pitchfork",!0);G(X,me,ge,"∝","\\varpropto");G(X,me,ge,"◀","\\blacktriangleleft");G(X,me,ge,"∴","\\therefore",!0);G(X,me,ge,"∍","\\backepsilon");G(X,me,ge,"▶","\\blacktriangleright");G(X,me,ge,"∵","\\because",!0);G(X,me,ge,"⋘","\\llless");G(X,me,ge,"⋙","\\gggtr");G(X,me,vt,"⊲","\\lhd");G(X,me,vt,"⊳","\\rhd");G(X,me,ge,"≂","\\eqsim",!0);G(X,re,ge,"⋈","\\Join");G(X,me,ge,"≑","\\Doteq",!0);G(X,me,vt,"∔","\\dotplus",!0);G(X,me,vt,"∖","\\smallsetminus");G(X,me,vt,"⋒","\\Cap",!0);G(X,me,vt,"⋓","\\Cup",!0);G(X,me,vt,"⩞","\\doublebarwedge",!0);G(X,me,vt,"⊟","\\boxminus",!0);G(X,me,vt,"⊞","\\boxplus",!0);G(X,me,vt,"⋇","\\divideontimes",!0);G(X,me,vt,"⋉","\\ltimes",!0);G(X,me,vt,"⋊","\\rtimes",!0);G(X,me,vt,"⋋","\\leftthreetimes",!0);G(X,me,vt,"⋌","\\rightthreetimes",!0);G(X,me,vt,"⋏","\\curlywedge",!0);G(X,me,vt,"⋎","\\curlyvee",!0);G(X,me,vt,"⊝","\\circleddash",!0);G(X,me,vt,"⊛","\\circledast",!0);G(X,me,vt,"⋅","\\centerdot");G(X,me,vt,"⊺","\\intercal",!0);G(X,me,vt,"⋒","\\doublecap");G(X,me,vt,"⋓","\\doublecup");G(X,me,vt,"⊠","\\boxtimes",!0);G(X,me,ge,"⇢","\\dashrightarrow",!0);G(X,me,ge,"⇠","\\dashleftarrow",!0);G(X,me,ge,"⇇","\\leftleftarrows",!0);G(X,me,ge,"⇆","\\leftrightarrows",!0);G(X,me,ge,"⇚","\\Lleftarrow",!0);G(X,me,ge,"↞","\\twoheadleftarrow",!0);G(X,me,ge,"↢","\\leftarrowtail",!0);G(X,me,ge,"↫","\\looparrowleft",!0);G(X,me,ge,"⇋","\\leftrightharpoons",!0);G(X,me,ge,"↶","\\curvearrowleft",!0);G(X,me,ge,"↺","\\circlearrowleft",!0);G(X,me,ge,"↰","\\Lsh",!0);G(X,me,ge,"⇈","\\upuparrows",!0);G(X,me,ge,"↿","\\upharpoonleft",!0);G(X,me,ge,"⇃","\\downharpoonleft",!0);G(X,re,ge,"⊶","\\origof",!0);G(X,re,ge,"⊷","\\imageof",!0);G(X,me,ge,"⊸","\\multimap",!0);G(X,me,ge,"↭","\\leftrightsquigarrow",!0);G(X,me,ge,"⇉","\\rightrightarrows",!0);G(X,me,ge,"⇄","\\rightleftarrows",!0);G(X,me,ge,"↠","\\twoheadrightarrow",!0);G(X,me,ge,"↣","\\rightarrowtail",!0);G(X,me,ge,"↬","\\looparrowright",!0);G(X,me,ge,"↷","\\curvearrowright",!0);G(X,me,ge,"↻","\\circlearrowright",!0);G(X,me,ge,"↱","\\Rsh",!0);G(X,me,ge,"⇊","\\downdownarrows",!0);G(X,me,ge,"↾","\\upharpoonright",!0);G(X,me,ge,"⇂","\\downharpoonright",!0);G(X,me,ge,"⇝","\\rightsquigarrow",!0);G(X,me,ge,"⇝","\\leadsto");G(X,me,ge,"⇛","\\Rrightarrow",!0);G(X,me,ge,"↾","\\restriction");G(X,re,we,"‘","`");G(X,re,we,"$","\\$");G(Je,re,we,"$","\\$");G(Je,re,we,"$","\\textdollar");G(X,re,we,"%","\\%");G(Je,re,we,"%","\\%");G(X,re,we,"_","\\_");G(Je,re,we,"_","\\_");G(Je,re,we,"_","\\textunderscore");G(X,re,we,"∠","\\angle",!0);G(X,re,we,"∞","\\infty",!0);G(X,re,we,"′","\\prime");G(X,re,we,"△","\\triangle");G(X,re,we,"Γ","\\Gamma",!0);G(X,re,we,"Δ","\\Delta",!0);G(X,re,we,"Θ","\\Theta",!0);G(X,re,we,"Λ","\\Lambda",!0);G(X,re,we,"Ξ","\\Xi",!0);G(X,re,we,"Π","\\Pi",!0);G(X,re,we,"Σ","\\Sigma",!0);G(X,re,we,"Υ","\\Upsilon",!0);G(X,re,we,"Φ","\\Phi",!0);G(X,re,we,"Ψ","\\Psi",!0);G(X,re,we,"Ω","\\Omega",!0);G(X,re,we,"A","Α");G(X,re,we,"B","Β");G(X,re,we,"E","Ε");G(X,re,we,"Z","Ζ");G(X,re,we,"H","Η");G(X,re,we,"I","Ι");G(X,re,we,"K","Κ");G(X,re,we,"M","Μ");G(X,re,we,"N","Ν");G(X,re,we,"O","Ο");G(X,re,we,"P","Ρ");G(X,re,we,"T","Τ");G(X,re,we,"X","Χ");G(X,re,we,"¬","\\neg",!0);G(X,re,we,"¬","\\lnot");G(X,re,we,"⊤","\\top");G(X,re,we,"⊥","\\bot");G(X,re,we,"∅","\\emptyset");G(X,me,we,"∅","\\varnothing");G(X,re,Ot,"α","\\alpha",!0);G(X,re,Ot,"β","\\beta",!0);G(X,re,Ot,"γ","\\gamma",!0);G(X,re,Ot,"δ","\\delta",!0);G(X,re,Ot,"ϵ","\\epsilon",!0);G(X,re,Ot,"ζ","\\zeta",!0);G(X,re,Ot,"η","\\eta",!0);G(X,re,Ot,"θ","\\theta",!0);G(X,re,Ot,"ι","\\iota",!0);G(X,re,Ot,"κ","\\kappa",!0);G(X,re,Ot,"λ","\\lambda",!0);G(X,re,Ot,"μ","\\mu",!0);G(X,re,Ot,"ν","\\nu",!0);G(X,re,Ot,"ξ","\\xi",!0);G(X,re,Ot,"ο","\\omicron",!0);G(X,re,Ot,"π","\\pi",!0);G(X,re,Ot,"ρ","\\rho",!0);G(X,re,Ot,"σ","\\sigma",!0);G(X,re,Ot,"τ","\\tau",!0);G(X,re,Ot,"υ","\\upsilon",!0);G(X,re,Ot,"ϕ","\\phi",!0);G(X,re,Ot,"χ","\\chi",!0);G(X,re,Ot,"ψ","\\psi",!0);G(X,re,Ot,"ω","\\omega",!0);G(X,re,Ot,"ε","\\varepsilon",!0);G(X,re,Ot,"ϑ","\\vartheta",!0);G(X,re,Ot,"ϖ","\\varpi",!0);G(X,re,Ot,"ϱ","\\varrho",!0);G(X,re,Ot,"ς","\\varsigma",!0);G(X,re,Ot,"φ","\\varphi",!0);G(X,re,vt,"∗","*",!0);G(X,re,vt,"+","+");G(X,re,vt,"−","-",!0);G(X,re,vt,"⋅","\\cdot",!0);G(X,re,vt,"∘","\\circ",!0);G(X,re,vt,"÷","\\div",!0);G(X,re,vt,"±","\\pm",!0);G(X,re,vt,"×","\\times",!0);G(X,re,vt,"∩","\\cap",!0);G(X,re,vt,"∪","\\cup",!0);G(X,re,vt,"∖","\\setminus",!0);G(X,re,vt,"∧","\\land");G(X,re,vt,"∨","\\lor");G(X,re,vt,"∧","\\wedge",!0);G(X,re,vt,"∨","\\vee",!0);G(X,re,we,"√","\\surd");G(X,re,ji,"⟨","\\langle",!0);G(X,re,ji,"∣","\\lvert");G(X,re,ji,"∥","\\lVert");G(X,re,ja,"?","?");G(X,re,ja,"!","!");G(X,re,ja,"⟩","\\rangle",!0);G(X,re,ja,"∣","\\rvert");G(X,re,ja,"∥","\\rVert");G(X,re,ge,"=","=");G(X,re,ge,":",":");G(X,re,ge,"≈","\\approx",!0);G(X,re,ge,"≅","\\cong",!0);G(X,re,ge,"≥","\\ge");G(X,re,ge,"≥","\\geq",!0);G(X,re,ge,"←","\\gets");G(X,re,ge,">","\\gt",!0);G(X,re,ge,"∈","\\in",!0);G(X,re,ge,"","\\@not");G(X,re,ge,"⊂","\\subset",!0);G(X,re,ge,"⊃","\\supset",!0);G(X,re,ge,"⊆","\\subseteq",!0);G(X,re,ge,"⊇","\\supseteq",!0);G(X,me,ge,"⊈","\\nsubseteq",!0);G(X,me,ge,"⊉","\\nsupseteq",!0);G(X,re,ge,"⊨","\\models");G(X,re,ge,"←","\\leftarrow",!0);G(X,re,ge,"≤","\\le");G(X,re,ge,"≤","\\leq",!0);G(X,re,ge,"<","\\lt",!0);G(X,re,ge,"→","\\rightarrow",!0);G(X,re,ge,"→","\\to");G(X,me,ge,"≱","\\ngeq",!0);G(X,me,ge,"≰","\\nleq",!0);G(X,re,jl," ","\\ ");G(X,re,jl," ","\\space");G(X,re,jl," ","\\nobreakspace");G(Je,re,jl," ","\\ ");G(Je,re,jl," "," ");G(Je,re,jl," ","\\space");G(Je,re,jl," ","\\nobreakspace");G(X,re,jl,null,"\\nobreak");G(X,re,jl,null,"\\allowbreak");G(X,re,Mx,",",",");G(X,re,Mx,";",";");G(X,me,vt,"⊼","\\barwedge",!0);G(X,me,vt,"⊻","\\veebar",!0);G(X,re,vt,"⊙","\\odot",!0);G(X,re,vt,"⊕","\\oplus",!0);G(X,re,vt,"⊗","\\otimes",!0);G(X,re,we,"∂","\\partial",!0);G(X,re,vt,"⊘","\\oslash",!0);G(X,me,vt,"⊚","\\circledcirc",!0);G(X,me,vt,"⊡","\\boxdot",!0);G(X,re,vt,"△","\\bigtriangleup");G(X,re,vt,"▽","\\bigtriangledown");G(X,re,vt,"†","\\dagger");G(X,re,vt,"⋄","\\diamond");G(X,re,vt,"⋆","\\star");G(X,re,vt,"◃","\\triangleleft");G(X,re,vt,"▹","\\triangleright");G(X,re,ji,"{","\\{");G(Je,re,we,"{","\\{");G(Je,re,we,"{","\\textbraceleft");G(X,re,ja,"}","\\}");G(Je,re,we,"}","\\}");G(Je,re,we,"}","\\textbraceright");G(X,re,ji,"{","\\lbrace");G(X,re,ja,"}","\\rbrace");G(X,re,ji,"[","\\lbrack",!0);G(Je,re,we,"[","\\lbrack",!0);G(X,re,ja,"]","\\rbrack",!0);G(Je,re,we,"]","\\rbrack",!0);G(X,re,ji,"(","\\lparen",!0);G(X,re,ja,")","\\rparen",!0);G(Je,re,we,"<","\\textless",!0);G(Je,re,we,">","\\textgreater",!0);G(X,re,ji,"⌊","\\lfloor",!0);G(X,re,ja,"⌋","\\rfloor",!0);G(X,re,ji,"⌈","\\lceil",!0);G(X,re,ja,"⌉","\\rceil",!0);G(X,re,we,"\\","\\backslash");G(X,re,we,"∣","|");G(X,re,we,"∣","\\vert");G(Je,re,we,"|","\\textbar",!0);G(X,re,we,"∥","\\|");G(X,re,we,"∥","\\Vert");G(Je,re,we,"∥","\\textbardbl");G(Je,re,we,"~","\\textasciitilde");G(Je,re,we,"\\","\\textbackslash");G(Je,re,we,"^","\\textasciicircum");G(X,re,ge,"↑","\\uparrow",!0);G(X,re,ge,"⇑","\\Uparrow",!0);G(X,re,ge,"↓","\\downarrow",!0);G(X,re,ge,"⇓","\\Downarrow",!0);G(X,re,ge,"↕","\\updownarrow",!0);G(X,re,ge,"⇕","\\Updownarrow",!0);G(X,re,Pn,"∐","\\coprod");G(X,re,Pn,"⋁","\\bigvee");G(X,re,Pn,"⋀","\\bigwedge");G(X,re,Pn,"⨄","\\biguplus");G(X,re,Pn,"⋂","\\bigcap");G(X,re,Pn,"⋃","\\bigcup");G(X,re,Pn,"∫","\\int");G(X,re,Pn,"∫","\\intop");G(X,re,Pn,"∬","\\iint");G(X,re,Pn,"∭","\\iiint");G(X,re,Pn,"∏","\\prod");G(X,re,Pn,"∑","\\sum");G(X,re,Pn,"⨂","\\bigotimes");G(X,re,Pn,"⨁","\\bigoplus");G(X,re,Pn,"⨀","\\bigodot");G(X,re,Pn,"∮","\\oint");G(X,re,Pn,"∯","\\oiint");G(X,re,Pn,"∰","\\oiiint");G(X,re,Pn,"⨆","\\bigsqcup");G(X,re,Pn,"∫","\\smallint");G(Je,re,k0,"…","\\textellipsis");G(X,re,k0,"…","\\mathellipsis");G(Je,re,k0,"…","\\ldots",!0);G(X,re,k0,"…","\\ldots",!0);G(X,re,k0,"⋯","\\@cdots",!0);G(X,re,k0,"⋱","\\ddots",!0);G(X,re,we,"⋮","\\varvdots");G(Je,re,we,"⋮","\\varvdots");G(X,re,Jr,"ˊ","\\acute");G(X,re,Jr,"ˋ","\\grave");G(X,re,Jr,"¨","\\ddot");G(X,re,Jr,"~","\\tilde");G(X,re,Jr,"ˉ","\\bar");G(X,re,Jr,"˘","\\breve");G(X,re,Jr,"ˇ","\\check");G(X,re,Jr,"^","\\hat");G(X,re,Jr,"⃗","\\vec");G(X,re,Jr,"˙","\\dot");G(X,re,Jr,"˚","\\mathring");G(X,re,Ot,"","\\@imath");G(X,re,Ot,"","\\@jmath");G(X,re,we,"ı","ı");G(X,re,we,"ȷ","ȷ");G(Je,re,we,"ı","\\i",!0);G(Je,re,we,"ȷ","\\j",!0);G(Je,re,we,"ß","\\ss",!0);G(Je,re,we,"æ","\\ae",!0);G(Je,re,we,"œ","\\oe",!0);G(Je,re,we,"ø","\\o",!0);G(Je,re,we,"Æ","\\AE",!0);G(Je,re,we,"Œ","\\OE",!0);G(Je,re,we,"Ø","\\O",!0);G(Je,re,Jr,"ˊ","\\'");G(Je,re,Jr,"ˋ","\\`");G(Je,re,Jr,"ˆ","\\^");G(Je,re,Jr,"˜","\\~");G(Je,re,Jr,"ˉ","\\=");G(Je,re,Jr,"˘","\\u");G(Je,re,Jr,"˙","\\.");G(Je,re,Jr,"¸","\\c");G(Je,re,Jr,"˚","\\r");G(Je,re,Jr,"ˇ","\\v");G(Je,re,Jr,"¨",'\\"');G(Je,re,Jr,"˝","\\H");G(Je,re,Jr,"◯","\\textcircled");var Bae={"--":!0,"---":!0,"``":!0,"''":!0};G(Je,re,we,"–","--",!0);G(Je,re,we,"–","\\textendash");G(Je,re,we,"—","---",!0);G(Je,re,we,"—","\\textemdash");G(Je,re,we,"‘","`",!0);G(Je,re,we,"‘","\\textquoteleft");G(Je,re,we,"’","'",!0);G(Je,re,we,"’","\\textquoteright");G(Je,re,we,"“","``",!0);G(Je,re,we,"“","\\textquotedblleft");G(Je,re,we,"”","''",!0);G(Je,re,we,"”","\\textquotedblright");G(X,re,we,"°","\\degree",!0);G(Je,re,we,"°","\\degree");G(Je,re,we,"°","\\textdegree",!0);G(X,re,we,"£","\\pounds");G(X,re,we,"£","\\mathsterling",!0);G(Je,re,we,"£","\\pounds");G(Je,re,we,"£","\\textsterling",!0);G(X,me,we,"✠","\\maltese");G(Je,me,we,"✠","\\maltese");var gj='0123456789/@."';for(var xE=0;xE<gj.length;xE++){var vj=gj.charAt(xE);G(X,re,we,vj,vj)}var bj='0123456789!@*()-=+";:?/.,';for(var yE=0;yE<bj.length;yE++){var xj=bj.charAt(yE);G(Je,re,we,xj,xj)}var yb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var _E=0;_E<yb.length;_E++){var Hv=yb.charAt(_E);G(X,re,Ot,Hv,Hv),G(Je,re,we,Hv,Hv)}G(X,me,we,"C","ℂ");G(Je,me,we,"C","ℂ");G(X,me,we,"H","ℍ");G(Je,me,we,"H","ℍ");G(X,me,we,"N","ℕ");G(Je,me,we,"N","ℕ");G(X,me,we,"P","ℙ");G(Je,me,we,"P","ℙ");G(X,me,we,"Q","ℚ");G(Je,me,we,"Q","ℚ");G(X,me,we,"R","ℝ");G(Je,me,we,"R","ℝ");G(X,me,we,"Z","ℤ");G(Je,me,we,"Z","ℤ");G(X,re,Ot,"h","ℎ");G(Je,re,Ot,"h","ℎ");var qt="";for(var Na=0;Na<yb.length;Na++){var un=yb.charAt(Na);qt=String.fromCharCode(55349,56320+Na),G(X,re,Ot,un,qt),G(Je,re,we,un,qt),qt=String.fromCharCode(55349,56372+Na),G(X,re,Ot,un,qt),G(Je,re,we,un,qt),qt=String.fromCharCode(55349,56424+Na),G(X,re,Ot,un,qt),G(Je,re,we,un,qt),qt=String.fromCharCode(55349,56580+Na),G(X,re,Ot,un,qt),G(Je,re,we,un,qt),qt=String.fromCharCode(55349,56684+Na),G(X,re,Ot,un,qt),G(Je,re,we,un,qt),qt=String.fromCharCode(55349,56736+Na),G(X,re,Ot,un,qt),G(Je,re,we,un,qt),qt=String.fromCharCode(55349,56788+Na),G(X,re,Ot,un,qt),G(Je,re,we,un,qt),qt=String.fromCharCode(55349,56840+Na),G(X,re,Ot,un,qt),G(Je,re,we,un,qt),qt=String.fromCharCode(55349,56944+Na),G(X,re,Ot,un,qt),G(Je,re,we,un,qt),Na<26&&(qt=String.fromCharCode(55349,56632+Na),G(X,re,Ot,un,qt),G(Je,re,we,un,qt),qt=String.fromCharCode(55349,56476+Na),G(X,re,Ot,un,qt),G(Je,re,we,un,qt))}qt="𝕜";G(X,re,Ot,"k",qt);G(Je,re,we,"k",qt);for(var yu=0;yu<10;yu++){var bc=yu.toString();qt=String.fromCharCode(55349,57294+yu),G(X,re,Ot,bc,qt),G(Je,re,we,bc,qt),qt=String.fromCharCode(55349,57314+yu),G(X,re,Ot,bc,qt),G(Je,re,we,bc,qt),qt=String.fromCharCode(55349,57324+yu),G(X,re,Ot,bc,qt),G(Je,re,we,bc,qt),qt=String.fromCharCode(55349,57334+yu),G(X,re,Ot,bc,qt),G(Je,re,we,bc,qt)}var n6="ÐÞþ";for(var wE=0;wE<n6.length;wE++){var Gv=n6.charAt(wE);G(X,re,Ot,Gv,Gv),G(Je,re,we,Gv,Gv)}var Vv=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],yj=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],FMe=function(t,r){var n=t.charCodeAt(0),a=t.charCodeAt(1),i=(n-55296)*1024+(a-56320)+65536,s=r==="math"?0:1;if(119808<=i&&i<120484){var o=Math.floor((i-119808)/26);return[Vv[o][2],Vv[o][s]]}else if(120782<=i&&i<=120831){var l=Math.floor((i-120782)/10);return[yj[l][2],yj[l][s]]}else{if(i===120485||i===120486)return[Vv[0][2],Vv[0][s]];if(120486<i&&i<120782)return["",""];throw new nt("Unsupported character: "+t)}},Dx=function(t,r,n){return Wr[n][t]&&Wr[n][t].replace&&(t=Wr[n][t].replace),{value:t,metrics:xO(t,r,n)}},Ms=function(t,r,n,a,i){var s=Dx(t,r,n),o=s.metrics;t=s.value;var l;if(o){var c=o.italic;(n==="text"||a&&a.font==="mathit")&&(c=0),l=new fs(t,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+r+"' and mode '"+n+"'")),l=new fs(t,0,0,0,0,0,i);if(a){l.maxFontSize=a.sizeMultiplier,a.style.isTight()&&l.classes.push("mtight");var u=a.getColor();u&&(l.style.color=u)}return l},BMe=function(t,r,n,a){return a===void 0&&(a=[]),n.font==="boldsymbol"&&Dx(t,"Main-Bold",r).metrics?Ms(t,"Main-Bold",r,n,a.concat(["mathbf"])):t==="\\"||Wr[r][t].font==="main"?Ms(t,"Main-Regular",r,n,a):Ms(t,"AMS-Regular",r,n,a.concat(["amsrm"]))},zMe=function(t,r,n,a,i){return i!=="textord"&&Dx(t,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},jMe=function(t,r,n){var a=t.mode,i=t.text,s=["mord"],o=a==="math"||a==="text"&&r.font,l=o?r.font:r.fontFamily,c="",u="";if(i.charCodeAt(0)===55349&&([c,u]=FMe(i,a)),c.length>0)return Ms(i,c,a,r,s.concat(u));if(l){var f,p;if(l==="boldsymbol"){var m=zMe(i,a,r,s,n);f=m.fontName,p=[m.fontClass]}else o?(f=qae[l].fontName,p=[l]):(f=Wv(l,r.fontWeight,r.fontShape),p=[l,r.fontWeight,r.fontShape]);if(Dx(i,f,a).metrics)return Ms(i,f,a,r,s.concat(p));if(Bae.hasOwnProperty(i)&&f.slice(0,10)==="Typewriter"){for(var b=[],v=0;v<i.length;v++)b.push(Ms(i[v],f,a,r,s.concat(p)));return jae(b)}}if(n==="mathord")return Ms(i,"Math-Italic",a,r,s.concat(["mathnormal"]));if(n==="textord"){var y=Wr[a][i]&&Wr[a][i].font;if(y==="ams"){var _=Wv("amsrm",r.fontWeight,r.fontShape);return Ms(i,_,a,r,s.concat("amsrm",r.fontWeight,r.fontShape))}else if(y==="main"||!y){var S=Wv("textrm",r.fontWeight,r.fontShape);return Ms(i,S,a,r,s.concat(r.fontWeight,r.fontShape))}else{var C=Wv(y,r.fontWeight,r.fontShape);return Ms(i,C,a,r,s.concat(C,r.fontWeight,r.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},qMe=(e,t)=>{if($c(e.classes)!==$c(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0},UMe=e=>{for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof fs&&n instanceof fs&&qMe(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e},_O=function(t){for(var r=0,n=0,a=0,i=0;i<t.children.length;i++){var s=t.children[i];s.height>r&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>a&&(a=s.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=a},Qa=function(t,r,n,a){var i=new Vm(t,r,n,a);return _O(i),i},zae=(e,t,r,n)=>new Vm(e,t,r,n),$Me=function(t,r,n){var a=Qa([t],[],r);return a.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),a.style.borderBottomWidth=ct(a.height),a.maxFontSize=1,a},HMe=function(t,r,n,a){var i=new yO(t,r,n,a);return _O(i),i},jae=function(t){var r=new Gm(t);return _O(r),r},GMe=function(t,r){return t instanceof Gm?Qa([],[t],r):t},VMe=function(t){if(t.positionType==="individualShift"){for(var r=t.children,n=[r[0]],a=-r[0].shift-r[0].elem.depth,i=a,s=1;s<r.length;s++){var o=-r[s].shift-i-r[s].elem.depth,l=o-(r[s-1].elem.height+r[s-1].elem.depth);i=i+o,n.push({type:"kern",size:l}),n.push(r[s])}return{children:n,depth:a}}var c;if(t.positionType==="top"){for(var u=t.positionData,f=0;f<t.children.length;f++){var p=t.children[f];u-=p.type==="kern"?p.size:p.elem.height+p.elem.depth}c=u}else if(t.positionType==="bottom")c=-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")c=-m.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")c=-m.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:c}},WMe=function(t,r){for(var{children:n,depth:a}=VMe(t),i=0,s=0;s<n.length;s++){var o=n[s];if(o.type==="elem"){var l=o.elem;i=Math.max(i,l.maxFontSize,l.height)}}i+=2;var c=Qa(["pstrut"],[]);c.style.height=ct(i);for(var u=[],f=a,p=a,m=a,b=0;b<n.length;b++){var v=n[b];if(v.type==="kern")m+=v.size;else{var y=v.elem,_=v.wrapperClasses||[],S=v.wrapperStyle||{},C=Qa(_,[c,y],void 0,S);C.style.top=ct(-i-m-y.depth),v.marginLeft&&(C.style.marginLeft=v.marginLeft),v.marginRight&&(C.style.marginRight=v.marginRight),u.push(C),m+=y.height+y.depth}f=Math.min(f,m),p=Math.max(p,m)}var T=Qa(["vlist"],u);T.style.height=ct(p);var A;if(f<0){var k=Qa([],[]),N=Qa(["vlist"],[k]);N.style.height=ct(-f);var L=Qa(["vlist-s"],[new fs("​")]);A=[Qa(["vlist-r"],[T,L]),Qa(["vlist-r"],[N])]}else A=[Qa(["vlist-r"],[T])];var I=Qa(["vlist-t"],A);return A.length===2&&I.classes.push("vlist-t2"),I.height=p,I.depth=-f,I},KMe=(e,t)=>{var r=Qa(["mspace"],[],t),n=sn(e,t);return r.style.marginRight=ct(n),r},Wv=function(t,r,n){var a="";switch(t){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=t}var i;return r==="textbf"&&n==="textit"?i="BoldItalic":r==="textbf"?i="Bold":r==="textit"?i="Italic":i="Regular",a+"-"+i},qae={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"}},Uae={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},XMe=function(t,r){var[n,a,i]=Uae[t],s=new Hc(n),o=new Nl([s],{width:ct(a),height:ct(i),style:"width:"+ct(a),viewBox:"0 0 "+1e3*a+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=zae(["overlay"],[o],r);return l.height=i,l.style.height=ct(i),l.style.width=ct(a),l},Ie={fontMap:qae,makeSymbol:Ms,mathsym:BMe,makeSpan:Qa,makeSvgSpan:zae,makeLineSpan:$Me,makeAnchor:HMe,makeFragment:jae,wrapFragment:GMe,makeVList:WMe,makeOrd:jMe,makeGlue:KMe,staticSvg:XMe,svgData:Uae,tryCombineChars:UMe},nn={number:3,unit:"mu"},_u={number:4,unit:"mu"},il={number:5,unit:"mu"},YMe={mord:{mop:nn,mbin:_u,mrel:il,minner:nn},mop:{mord:nn,mop:nn,mrel:il,minner:nn},mbin:{mord:_u,mop:_u,mopen:_u,minner:_u},mrel:{mord:il,mop:il,mopen:il,minner:il},mopen:{},mclose:{mop:nn,mbin:_u,mrel:il,minner:nn},mpunct:{mord:nn,mop:nn,mrel:il,mopen:nn,mclose:nn,mpunct:nn,minner:nn},minner:{mord:nn,mop:nn,mbin:_u,mrel:il,mopen:nn,mpunct:nn,minner:nn}},ZMe={mord:{mop:nn},mop:{mord:nn,mop:nn},mbin:{},mrel:{},mopen:{},mclose:{mop:nn},mpunct:{},minner:{mop:nn}},$ae={},_b={},wb={};function ht(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:s}=e,o={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:a},l=0;l<r.length;++l)$ae[r[l]]=o;t&&(i&&(_b[t]=i),s&&(wb[t]=s))}function fd(e){var{type:t,htmlBuilder:r,mathmlBuilder:n}=e;ht({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var Eb=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Sn=function(t){return t.type==="ordgroup"?t.body:[t]},Rl=Ie.makeSpan,QMe=["leftmost","mbin","mopen","mrel","mop","mpunct"],JMe=["rightmost","mrel","mclose","mpunct"],e5e={display:It.DISPLAY,text:It.TEXT,script:It.SCRIPT,scriptscript:It.SCRIPTSCRIPT},t5e={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Vn=function(t,r,n,a){a===void 0&&(a=[null,null]);for(var i=[],s=0;s<t.length;s++){var o=_r(t[s],r);if(o instanceof Gm){var l=o.children;i.push(...l)}else i.push(o)}if(Ie.tryCombineChars(i),!n)return i;var c=r;if(t.length===1){var u=t[0];u.type==="sizing"?c=r.havingSize(u.size):u.type==="styling"&&(c=r.havingStyle(e5e[u.style]))}var f=Rl([a[0]||"leftmost"],[],r),p=Rl([a[1]||"rightmost"],[],r),m=n==="root";return _j(i,(b,v)=>{var y=v.classes[0],_=b.classes[0];y==="mbin"&&Nt.contains(JMe,_)?v.classes[0]="mord":_==="mbin"&&Nt.contains(QMe,y)&&(b.classes[0]="mord")},{node:f},p,m),_j(i,(b,v)=>{var y=a6(v),_=a6(b),S=y&&_?b.hasClass("mtight")?ZMe[y][_]:YMe[y][_]:null;if(S)return Ie.makeGlue(S,c)},{node:f},p,m),i},_j=function e(t,r,n,a,i){a&&t.push(a);for(var s=0;s<t.length;s++){var o=t[s],l=Hae(o);if(l){e(l.children,r,n,null,i);continue}var c=!o.hasClass("mspace");if(c){var u=r(o,n.node);u&&(n.insertAfter?n.insertAfter(u):(t.unshift(u),s++))}c?n.node=o:i&&o.hasClass("newline")&&(n.node=Rl(["leftmost"])),n.insertAfter=(f=>p=>{t.splice(f+1,0,p),s++})(s)}a&&t.pop()},Hae=function(t){return t instanceof Gm||t instanceof yO||t instanceof Vm&&t.hasClass("enclosing")?t:null},r5e=function e(t,r){var n=Hae(t);if(n){var a=n.children;if(a.length){if(r==="right")return e(a[a.length-1],"right");if(r==="left")return e(a[0],"left")}}return t},a6=function(t,r){return t?(r&&(t=r5e(t,r)),t5e[t.classes[0]]||null):null},Jp=function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return Rl(r.concat(n))},_r=function(t,r,n){if(!t)return Rl();if(_b[t.type]){var a=_b[t.type](t,r);if(n&&r.size!==n.size){a=Rl(r.sizingClasses(n),[a],r);var i=r.sizeMultiplier/n.sizeMultiplier;a.height*=i,a.depth*=i}return a}else throw new nt("Got group of unknown type: '"+t.type+"'")};function Kv(e,t){var r=Rl(["base"],e,t),n=Rl(["strut"]);return n.style.height=ct(r.height+r.depth),r.depth&&(n.style.verticalAlign=ct(-r.depth)),r.children.unshift(n),r}function i6(e,t){var r=null;e.length===1&&e[0].type==="tag"&&(r=e[0].tag,e=e[0].body);var n=Vn(e,t,"root"),a;n.length===2&&n[1].hasClass("tag")&&(a=n.pop());for(var i=[],s=[],o=0;o<n.length;o++)if(s.push(n[o]),n[o].hasClass("mbin")||n[o].hasClass("mrel")||n[o].hasClass("allowbreak")){for(var l=!1;o<n.length-1&&n[o+1].hasClass("mspace")&&!n[o+1].hasClass("newline");)o++,s.push(n[o]),n[o].hasClass("nobreak")&&(l=!0);l||(i.push(Kv(s,t)),s=[])}else n[o].hasClass("newline")&&(s.pop(),s.length>0&&(i.push(Kv(s,t)),s=[]),i.push(n[o]));s.length>0&&i.push(Kv(s,t));var c;r?(c=Kv(Vn(r,t,!0)),c.classes=["tag"],i.push(c)):a&&i.push(a);var u=Rl(["katex-html"],i);if(u.setAttribute("aria-hidden","true"),c){var f=c.children[0];f.style.height=ct(u.height+u.depth),u.depth&&(f.style.verticalAlign=ct(-u.depth))}return u}function Gae(e){return new Gm(e)}class Mi{constructor(t,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=$c(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof So&&this.children[n+1]instanceof So){for(var a=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof So;)a+=this.children[++n].toText();t.appendChild(new So(a).toNode())}else t.appendChild(this.children[n].toNode());return t}toMarkup(){var t="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(t+=" "+r+'="',t+=Nt.escape(this.attributes[r]),t+='"');this.classes.length>0&&(t+=' class ="'+Nt.escape($c(this.classes))+'"'),t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class So{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return Nt.escape(this.toText())}toText(){return this.text}}class n5e{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",ct(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ct(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var tt={MathNode:Mi,TextNode:So,SpaceNode:n5e,newDocumentFragment:Gae},hs=function(t,r,n){return Wr[r][t]&&Wr[r][t].replace&&t.charCodeAt(0)!==55349&&!(Bae.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=Wr[r][t].replace),new tt.TextNode(t)},wO=function(t){return t.length===1?t[0]:new tt.MathNode("mrow",t)},EO=function(t,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var a=t.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var i=t.text;if(Nt.contains(["\\imath","\\jmath"],i))return null;Wr[a][i]&&Wr[a][i].replace&&(i=Wr[a][i].replace);var s=Ie.fontMap[n].fontName;return xO(i,s,a)?Ie.fontMap[n].variant:null};function EE(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof So&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var r=e.children[0];return r instanceof So&&r.text===","}else return!1}var ui=function(t,r,n){if(t.length===1){var a=Ur(t[0],r);return n&&a instanceof Mi&&a.type==="mo"&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var i=[],s,o=0;o<t.length;o++){var l=Ur(t[o],r);if(l instanceof Mi&&s instanceof Mi){if(l.type==="mtext"&&s.type==="mtext"&&l.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...l.children);continue}else if(l.type==="mn"&&s.type==="mn"){s.children.push(...l.children);continue}else if(EE(l)&&s.type==="mn"){s.children.push(...l.children);continue}else if(l.type==="mn"&&EE(s))l.children=[...s.children,...l.children],i.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(s.type==="mn"||EE(s))){var c=l.children[0];c instanceof Mi&&c.type==="mn"&&(c.children=[...s.children,...c.children],i.pop())}else if(s.type==="mi"&&s.children.length===1){var u=s.children[0];if(u instanceof So&&u.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof So&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(l),s=l}return i},Gc=function(t,r,n){return wO(ui(t,r,n))},Ur=function(t,r){if(!t)return new tt.MathNode("mrow");if(wb[t.type]){var n=wb[t.type](t,r);return n}else throw new nt("Got group of unknown type: '"+t.type+"'")};function wj(e,t,r,n,a){var i=ui(e,r),s;i.length===1&&i[0]instanceof Mi&&Nt.contains(["mrow","mtable"],i[0].type)?s=i[0]:s=new tt.MathNode("mrow",i);var o=new tt.MathNode("annotation",[new tt.TextNode(t)]);o.setAttribute("encoding","application/x-tex");var l=new tt.MathNode("semantics",[s,o]),c=new tt.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var u=a?"katex":"katex-mathml";return Ie.makeSpan([u],[c])}var Vae=function(t){return new hl({style:t.displayMode?It.DISPLAY:It.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},Wae=function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=Ie.makeSpan(n,[t])}return t},a5e=function(t,r,n){var a=Vae(n),i;if(n.output==="mathml")return wj(t,r,a,n.displayMode,!0);if(n.output==="html"){var s=i6(t,a);i=Ie.makeSpan(["katex"],[s])}else{var o=wj(t,r,a,n.displayMode,!1),l=i6(t,a);i=Ie.makeSpan(["katex"],[o,l])}return Wae(i,n)},i5e=function(t,r,n){var a=Vae(n),i=i6(t,a),s=Ie.makeSpan(["katex"],[i]);return Wae(s,n)},s5e={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},o5e=function(t){var r=new tt.MathNode("mo",[new tt.TextNode(s5e[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},l5e={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],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]},c5e=function(t){return t.type==="ordgroup"?t.body.length:1},u5e=function(t,r){function n(){var o=4e5,l=t.label.slice(1);if(Nt.contains(["widehat","widecheck","widetilde","utilde"],l)){var c=t,u=c5e(c.base),f,p,m;if(u>5)l==="widehat"||l==="widecheck"?(f=420,o=2364,m=.42,p=l+"4"):(f=312,o=2340,m=.34,p="tilde4");else{var b=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][b],f=[0,239,300,360,420][b],m=[0,.24,.3,.3,.36,.42][b],p=l+b):(o=[0,600,1033,2339,2340][b],f=[0,260,286,306,312][b],m=[0,.26,.286,.3,.306,.34][b],p="tilde"+b)}var v=new Hc(p),y=new Nl([v],{width:"100%",height:ct(m),viewBox:"0 0 "+o+" "+f,preserveAspectRatio:"none"});return{span:Ie.makeSvgSpan([],[y],r),minWidth:0,height:m}}else{var _=[],S=l5e[l],[C,T,A]=S,k=A/1e3,N=C.length,L,I;if(N===1){var P=S[3];L=["hide-tail"],I=[P]}else if(N===2)L=["halfarrow-left","halfarrow-right"],I=["xMinYMin","xMaxYMin"];else if(N===3)L=["brace-left","brace-center","brace-right"],I=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
                    `+N+" children.");for(var H=0;H<N;H++){var B=new Hc(C[H]),K=new Nl([B],{width:"400em",height:ct(k),viewBox:"0 0 "+o+" "+A,preserveAspectRatio:I[H]+" slice"}),j=Ie.makeSvgSpan([L[H]],[K],r);if(N===1)return{span:j,minWidth:T,height:k};j.style.height=ct(k),_.push(j)}return{span:Ie.makeSpan(["stretchy"],_,r),minWidth:T,height:k}}}var{span:a,minWidth:i,height:s}=n();return a.height=s,a.style.height=ct(s),i>0&&(a.style.minWidth=ct(i)),a},d5e=function(t,r,n,a,i){var s,o=t.height+t.depth+n+a;if(/fbox|color|angl/.test(r)){if(s=Ie.makeSpan(["stretchy",r],[],i),r==="fbox"){var l=i.color&&i.getColor();l&&(s.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new r6({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new r6({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new Nl(c,{width:"100%",height:ct(o)});s=Ie.makeSvgSpan([],[u],i)}return s.height=o,s.style.height=ct(o),s},Ml={encloseSpan:d5e,mathMLnode:o5e,svgSpan:u5e};function er(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 SO(e){var t=Ox(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 Ox(e){return e&&(e.type==="atom"||PMe.hasOwnProperty(e.type))?e:null}var CO=(e,t)=>{var r,n,a;e&&e.type==="supsub"?(n=er(e.base,"accent"),r=n.base,e.base=r,a=IMe(_r(e,t)),e.base=n):(n=er(e,"accent"),r=n.base);var i=_r(r,t.havingCrampedStyle()),s=n.isShifty&&Nt.isCharacterBox(r),o=0;if(s){var l=Nt.getBaseElem(r),c=_r(l,t.havingCrampedStyle());o=mj(c).skew}var u=n.label==="\\c",f=u?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight),p;if(n.isStretchy)p=Ml.svgSpan(n,t),p=Ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ct(2*o)+")",marginLeft:ct(2*o)}:void 0}]},t);else{var m,b;n.label==="\\vec"?(m=Ie.staticSvg("vec",t),b=Ie.svgData.vec[1]):(m=Ie.makeOrd({mode:n.mode,text:n.label},t,"textord"),m=mj(m),m.italic=0,b=m.width,u&&(f+=m.depth)),p=Ie.makeSpan(["accent-body"],[m]);var v=n.label==="\\textcircled";v&&(p.classes.push("accent-full"),f=i.height);var y=o;v||(y-=b/2),p.style.left=ct(y),n.label==="\\textcircled"&&(p.style.top=".2em"),p=Ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]},t)}var _=Ie.makeSpan(["mord","accent"],[p],t);return a?(a.children[0]=_,a.height=Math.max(_.height,a.height),a.classes[0]="mord",a):_},Kae=(e,t)=>{var r=e.isStretchy?Ml.mathMLnode(e.label):new tt.MathNode("mo",[hs(e.label,e.mode)]),n=new tt.MathNode("mover",[Ur(e.base,t),r]);return n.setAttribute("accent","true"),n},f5e=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));ht({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 r=Eb(t[0]),n=!f5e.test(e.funcName),a=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:CO,mathmlBuilder:Kae});ht({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:CO,mathmlBuilder:Kae});ht({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:(e,t)=>{var r=_r(e.base,t),n=Ml.svgSpan(e,t),a=e.label==="\\utilde"?.12:0,i=Ie.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]},t);return Ie.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=Ml.mathMLnode(e.label),n=new tt.MathNode("munder",[Ur(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var Xv=e=>{var t=new tt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};ht({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,r){var{parser:n,funcName:a}=e;return{type:"xArrow",mode:n.mode,label:a,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),a=Ie.wrapFragment(_r(e.body,n,t),t),i=e.label.slice(0,2)==="\\x"?"x":"cd";a.classes.push(i+"-arrow-pad");var s;e.below&&(n=t.havingStyle(r.sub()),s=Ie.wrapFragment(_r(e.below,n,t),t),s.classes.push(i+"-arrow-pad"));var o=Ml.svgSpan(e,t),l=-t.fontMetrics().axisHeight+.5*o.height,c=-t.fontMetrics().axisHeight-.5*o.height-.111;(a.depth>.25||e.label==="\\xleftequilibrium")&&(c-=a.depth);var u;if(s){var f=-t.fontMetrics().axisHeight+s.height+.5*o.height+.111;u=Ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:o,shift:l},{type:"elem",elem:s,shift:f}]},t)}else u=Ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:c},{type:"elem",elem:o,shift:l}]},t);return u.children[0].children[0].children[1].classes.push("svg-align"),Ie.makeSpan(["mrel","x-arrow"],[u],t)},mathmlBuilder(e,t){var r=Ml.mathMLnode(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var a=Xv(Ur(e.body,t));if(e.below){var i=Xv(Ur(e.below,t));n=new tt.MathNode("munderover",[r,i,a])}else n=new tt.MathNode("mover",[r,a])}else if(e.below){var s=Xv(Ur(e.below,t));n=new tt.MathNode("munder",[r,s])}else n=Xv(),n=new tt.MathNode("mover",[r,n]);return n}});var h5e=Ie.makeSpan;function Xae(e,t){var r=Vn(e.body,t,!0);return h5e([e.mclass],r,t)}function Yae(e,t){var r,n=ui(e.body,t);return e.mclass==="minner"?r=new tt.MathNode("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new tt.MathNode("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new tt.MathNode("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ht({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Sn(a),isCharacterBox:Nt.isCharacterBox(a)}},htmlBuilder:Xae,mathmlBuilder:Yae});var Ix=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"};ht({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:Ix(t[0]),body:Sn(t[1]),isCharacterBox:Nt.isCharacterBox(t[1])}}});ht({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,a=t[1],i=t[0],s;n!=="\\stackrel"?s=Ix(a):s="mrel";var o={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Sn(a)},l={type:"supsub",mode:i.mode,base:o,sup:n==="\\underset"?null:i,sub:n==="\\underset"?i:null};return{type:"mclass",mode:r.mode,mclass:s,body:[l],isCharacterBox:Nt.isCharacterBox(l)}},htmlBuilder:Xae,mathmlBuilder:Yae});ht({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:Ix(t[0]),body:Sn(t[0])}},htmlBuilder(e,t){var r=Vn(e.body,t,!0),n=Ie.makeSpan([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=ui(e.body,t),n=new tt.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var p5e={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Ej=()=>({type:"styling",body:[],mode:"math",style:"display"}),Sj=e=>e.type==="textord"&&e.text==="@",m5e=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function g5e(e,t,r){var n=p5e[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var a=r.callFunction("\\\\cdleft",[t[0]],[]),i={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[i],[]),o=r.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[a,s,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function v5e(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 r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new nt("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],a=[n],i=0;i<t.length;i++){for(var s=t[i],o=Ej(),l=0;l<s.length;l++)if(!Sj(s[l]))o.body.push(s[l]);else{n.push(o),l+=1;var c=SO(s[l]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(c)>-1))if("<>AV".indexOf(c)>-1)for(var f=0;f<2;f++){for(var p=!0,m=l+1;m<s.length;m++){if(m5e(s[m],c)){p=!1,l=m;break}if(Sj(s[m]))throw new nt("Missing a "+c+" character to complete a CD arrow.",s[m]);u[f].body.push(s[m])}if(p)throw new nt("Missing a "+c+" character to complete a CD arrow.",s[l])}else throw new nt('Expected one of "<>AV=|." after @',s[l]);var b=g5e(c,u,e),v={type:"styling",body:[b],mode:"math",style:"display"};n.push(v),o=Ej()}i%2===0?n.push(o):n.shift(),n=[],a.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var y=new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:y,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}ht({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=Ie.wrapFragment(_r(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=ct(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new tt.MathNode("mrow",[Ur(e.label,t)]);return r=new tt.MathNode("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new tt.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});ht({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=Ie.wrapFragment(_r(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new tt.MathNode("mrow",[Ur(e.fragment,t)])}});ht({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=er(t[0],"ordgroup"),a=n.body,i="",s=0;s<a.length;s++){var o=er(a[s],"textord");i+=o.text}var l=parseInt(i),c;if(isNaN(l))throw new nt("\\@char has non-numeric argument "+i);if(l<0||l>=1114111)throw new nt("\\@char with invalid code point "+i);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:c}}});var Zae=(e,t)=>{var r=Vn(e.body,t.withColor(e.color),!1);return Ie.makeFragment(r)},Qae=(e,t)=>{var r=ui(e.body,t.withColor(e.color)),n=new tt.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};ht({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=er(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:Sn(a)}},htmlBuilder:Zae,mathmlBuilder:Qae});ht({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,a=er(t[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:i}},htmlBuilder:Zae,mathmlBuilder:Qae});ht({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,a=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:a&&er(a,"size").value}},htmlBuilder(e,t){var r=Ie.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=ct(sn(e.size,t)))),r},mathmlBuilder(e,t){var r=new tt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",ct(sn(e.size,t)))),r}});var s6={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Jae=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new nt("Expected a control sequence",e);return t},b5e=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},eie=(e,t,r,n)=>{var a=e.gullet.macros.get(r.text);a==null&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};ht({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(s6[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=s6[n.text]),er(t.parseFunction(),"internal");throw new nt("Invalid token after macro prefix",n)}});ht({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),a=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new nt("Expected a control sequence",n);for(var i=0,s,o=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){s=t.gullet.future(),o[i].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new nt('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new nt('Argument number "'+n.text+'" out of order');i++,o.push([])}else{if(n.text==="EOF")throw new nt("Expected a macro definition");o[i].push(n.text)}var{tokens:l}=t.gullet.consumeArg();return s&&l.unshift(s),(r==="\\edef"||r==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(a,{tokens:l,numArgs:i,delimiters:o},r===s6[r]),{type:"internal",mode:t.mode}}});ht({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=Jae(t.gullet.popToken());t.gullet.consumeSpaces();var a=b5e(t);return eie(t,n,a,r==="\\\\globallet"),{type:"internal",mode:t.mode}}});ht({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=Jae(t.gullet.popToken()),a=t.gullet.popToken(),i=t.gullet.popToken();return eie(t,n,i,r==="\\\\globalfuture"),t.gullet.pushToken(i),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var np=function(t,r,n){var a=Wr.math[t]&&Wr.math[t].replace,i=xO(a||t,r,n);if(!i)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return i},TO=function(t,r,n,a){var i=n.havingBaseStyle(r),s=Ie.makeSpan(a.concat(i.sizingClasses(n)),[t],n),o=i.sizeMultiplier/n.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=i.sizeMultiplier,s},tie=function(t,r,n){var a=r.havingBaseStyle(n),i=(1-r.sizeMultiplier/a.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=ct(i),t.height-=i,t.depth+=i},x5e=function(t,r,n,a,i,s){var o=Ie.makeSymbol(t,"Main-Regular",i,a),l=TO(o,r,a,s);return n&&tie(l,a,r),l},y5e=function(t,r,n,a){return Ie.makeSymbol(t,"Size"+r+"-Regular",n,a)},rie=function(t,r,n,a,i,s){var o=y5e(t,r,i,a),l=TO(Ie.makeSpan(["delimsizing","size"+r],[o],a),It.TEXT,a,s);return n&&tie(l,a,It.TEXT),l},SE=function(t,r,n){var a;r==="Size1-Regular"?a="delim-size1":a="delim-size4";var i=Ie.makeSpan(["delimsizinginner",a],[Ie.makeSpan([],[Ie.makeSymbol(t,r,n)])]);return{type:"elem",elem:i}},CE=function(t,r,n){var a=Eo["Size4-Regular"][t.charCodeAt(0)]?Eo["Size4-Regular"][t.charCodeAt(0)][4]:Eo["Size1-Regular"][t.charCodeAt(0)][4],i=new Hc("inner",CMe(t,Math.round(1e3*r))),s=new Nl([i],{width:ct(a),height:ct(r),style:"width:"+ct(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=Ie.makeSvgSpan([],[s],n);return o.height=r,o.style.height=ct(r),o.style.width=ct(a),{type:"elem",elem:o}},o6=.008,Yv={type:"kern",size:-1*o6},_5e=["|","\\lvert","\\rvert","\\vert"],w5e=["\\|","\\lVert","\\rVert","\\Vert"],nie=function(t,r,n,a,i,s){var o,l,c,u,f="",p=0;o=c=u=t,l=null;var m="Size1-Regular";t==="\\uparrow"?c=u="⏐":t==="\\Uparrow"?c=u="‖":t==="\\downarrow"?o=c="⏐":t==="\\Downarrow"?o=c="‖":t==="\\updownarrow"?(o="\\uparrow",c="⏐",u="\\downarrow"):t==="\\Updownarrow"?(o="\\Uparrow",c="‖",u="\\Downarrow"):Nt.contains(_5e,t)?(c="∣",f="vert",p=333):Nt.contains(w5e,t)?(c="∥",f="doublevert",p=556):t==="["||t==="\\lbrack"?(o="⎡",c="⎢",u="⎣",m="Size4-Regular",f="lbrack",p=667):t==="]"||t==="\\rbrack"?(o="⎤",c="⎥",u="⎦",m="Size4-Regular",f="rbrack",p=667):t==="\\lfloor"||t==="⌊"?(c=o="⎢",u="⎣",m="Size4-Regular",f="lfloor",p=667):t==="\\lceil"||t==="⌈"?(o="⎡",c=u="⎢",m="Size4-Regular",f="lceil",p=667):t==="\\rfloor"||t==="⌋"?(c=o="⎥",u="⎦",m="Size4-Regular",f="rfloor",p=667):t==="\\rceil"||t==="⌉"?(o="⎤",c=u="⎥",m="Size4-Regular",f="rceil",p=667):t==="("||t==="\\lparen"?(o="⎛",c="⎜",u="⎝",m="Size4-Regular",f="lparen",p=875):t===")"||t==="\\rparen"?(o="⎞",c="⎟",u="⎠",m="Size4-Regular",f="rparen",p=875):t==="\\{"||t==="\\lbrace"?(o="⎧",l="⎨",u="⎩",c="⎪",m="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(o="⎫",l="⎬",u="⎭",c="⎪",m="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(o="⎧",u="⎩",c="⎪",m="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(o="⎫",u="⎭",c="⎪",m="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(o="⎧",u="⎭",c="⎪",m="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(o="⎫",u="⎩",c="⎪",m="Size4-Regular");var b=np(o,m,i),v=b.height+b.depth,y=np(c,m,i),_=y.height+y.depth,S=np(u,m,i),C=S.height+S.depth,T=0,A=1;if(l!==null){var k=np(l,m,i);T=k.height+k.depth,A=2}var N=v+C+T,L=Math.max(0,Math.ceil((r-N)/(A*_))),I=N+L*A*_,P=a.fontMetrics().axisHeight;n&&(P*=a.sizeMultiplier);var H=I/2-P,B=[];if(f.length>0){var K=I-v-C,j=Math.round(I*1e3),W=TMe(f,Math.round(K*1e3)),D=new Hc(f,W),U=(p/1e3).toFixed(3)+"em",Y=(j/1e3).toFixed(3)+"em",z=new Nl([D],{width:U,height:Y,viewBox:"0 0 "+p+" "+j}),M=Ie.makeSvgSpan([],[z],a);M.height=j/1e3,M.style.width=U,M.style.height=Y,B.push({type:"elem",elem:M})}else{if(B.push(SE(u,m,i)),B.push(Yv),l===null){var Q=I-v-C+2*o6;B.push(CE(c,Q,a))}else{var q=(I-v-C-T)/2+2*o6;B.push(CE(c,q,a)),B.push(Yv),B.push(SE(l,m,i)),B.push(Yv),B.push(CE(c,q,a))}B.push(Yv),B.push(SE(o,m,i))}var F=a.havingBaseStyle(It.TEXT),V=Ie.makeVList({positionType:"bottom",positionData:H,children:B},F);return TO(Ie.makeSpan(["delimsizing","mult"],[V],F),It.TEXT,a,s)},TE=80,AE=.08,kE=function(t,r,n,a,i){var s=SMe(t,a,n),o=new Hc(t,s),l=new Nl([o],{width:"400em",height:ct(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Ie.makeSvgSpan(["hide-tail"],[l],i)},E5e=function(t,r){var n=r.havingBaseSizing(),a=oie("\\surd",t*n.sizeMultiplier,sie,n),i=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l=0,c=0,u=0,f;return a.type==="small"?(u=1e3+1e3*s+TE,t<1?i=1:t<1.4&&(i=.7),l=(1+s+AE)/i,c=(1+s)/i,o=kE("sqrtMain",l,u,s,r),o.style.minWidth="0.853em",f=.833/i):a.type==="large"?(u=(1e3+TE)*Tp[a.size],c=(Tp[a.size]+s)/i,l=(Tp[a.size]+s+AE)/i,o=kE("sqrtSize"+a.size,l,u,s,r),o.style.minWidth="1.02em",f=1/i):(l=t+s+AE,c=t+s,u=Math.floor(1e3*t+s)+TE,o=kE("sqrtTall",l,u,s,r),o.style.minWidth="0.742em",f=1.056),o.height=c,o.style.height=ct(l),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*i}},aie=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],S5e=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],iie=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Tp=[0,1.2,1.8,2.4,3],C5e=function(t,r,n,a,i){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),Nt.contains(aie,t)||Nt.contains(iie,t))return rie(t,r,!1,n,a,i);if(Nt.contains(S5e,t))return nie(t,Tp[r],!1,n,a,i);throw new nt("Illegal delimiter: '"+t+"'")},T5e=[{type:"small",style:It.SCRIPTSCRIPT},{type:"small",style:It.SCRIPT},{type:"small",style:It.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],A5e=[{type:"small",style:It.SCRIPTSCRIPT},{type:"small",style:It.SCRIPT},{type:"small",style:It.TEXT},{type:"stack"}],sie=[{type:"small",style:It.SCRIPTSCRIPT},{type:"small",style:It.SCRIPT},{type:"small",style:It.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],k5e=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";throw new Error("Add support for delim type '"+t.type+"' here.")},oie=function(t,r,n,a){for(var i=Math.min(2,3-a.style.size),s=i;s<n.length&&n[s].type!=="stack";s++){var o=np(t,k5e(n[s]),"math"),l=o.height+o.depth;if(n[s].type==="small"){var c=a.havingBaseStyle(n[s].style);l*=c.sizeMultiplier}if(l>r)return n[s]}return n[n.length-1]},lie=function(t,r,n,a,i,s){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var o;Nt.contains(iie,t)?o=T5e:Nt.contains(aie,t)?o=sie:o=A5e;var l=oie(t,r,o,a);return l.type==="small"?x5e(t,l.style,n,a,i,s):l.type==="large"?rie(t,l.size,n,a,i,s):nie(t,r,n,a,i,s)},N5e=function(t,r,n,a,i,s){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,l=901,c=5/a.fontMetrics().ptPerEm,u=Math.max(r-o,n+o),f=Math.max(u/500*l,2*u-c);return lie(t,f,!0,a,i,s)},yl={sqrtImage:E5e,sizedDelim:C5e,sizeToMaxHeight:Tp,customSizedDelim:lie,leftRightDelim:N5e},Cj={"\\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}},R5e=["(","\\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 Lx(e,t){var r=Ox(e);if(r&&Nt.contains(R5e,r.text))return r;throw r?new nt("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new nt("Invalid delimiter type '"+e.type+"'",e)}ht({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 r=Lx(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Cj[e.funcName].size,mclass:Cj[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?Ie.makeSpan([e.mclass]):yl.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(hs(e.delim,e.mode));var r=new tt.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=ct(yl.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function Tj(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ht({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new nt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Lx(t[0],e).text,color:r}}});ht({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Lx(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=er(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{Tj(e);for(var r=Vn(e.body,t,!0,["mopen","mclose"]),n=0,a=0,i=!1,s=0;s<r.length;s++)r[s].isMiddle?i=!0:(n=Math.max(r[s].height,n),a=Math.max(r[s].depth,a));n*=t.sizeMultiplier,a*=t.sizeMultiplier;var o;if(e.left==="."?o=Jp(t,["mopen"]):o=yl.leftRightDelim(e.left,n,a,t,e.mode,["mopen"]),r.unshift(o),i)for(var l=1;l<r.length;l++){var c=r[l],u=c.isMiddle;u&&(r[l]=yl.leftRightDelim(u.delim,n,a,u.options,e.mode,[]))}var f;if(e.right===".")f=Jp(t,["mclose"]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=yl.leftRightDelim(e.right,n,a,p,e.mode,["mclose"])}return r.push(f),Ie.makeSpan(["minner"],r,t)},mathmlBuilder:(e,t)=>{Tj(e);var r=ui(e.body,t);if(e.left!=="."){var n=new tt.MathNode("mo",[hs(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var a=new tt.MathNode("mo",[hs(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),r.push(a)}return wO(r)}});ht({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Lx(t[0],e);if(!e.parser.leftrightDepth)throw new nt("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if(e.delim===".")r=Jp(t,[]);else{r=yl.sizedDelim(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?hs("|","text"):hs(e.delim,e.mode),n=new tt.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var AO=(e,t)=>{var r=Ie.wrapFragment(_r(e.body,t),t),n=e.label.slice(1),a=t.sizeMultiplier,i,s=0,o=Nt.isCharacterBox(e.body);if(n==="sout")i=Ie.makeSpan(["stretchy","sout"]),i.height=t.fontMetrics().defaultRuleThickness/a,s=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var l=sn({number:.6,unit:"pt"},t),c=sn({number:.35,unit:"ex"},t),u=t.havingBaseSizing();a=a/u.sizeMultiplier;var f=r.height+r.depth+l+c;r.style.paddingLeft=ct(f/2+l);var p=Math.floor(1e3*f*a),m=wMe(p),b=new Nl([new Hc("phase",m)],{width:"400em",height:ct(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=Ie.makeSvgSpan(["hide-tail"],[b],t),i.style.height=ct(f),s=r.depth+l+c}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var v=0,y=0,_=0;/box/.test(n)?(_=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),v=t.fontMetrics().fboxsep+(n==="colorbox"?0:_),y=v):n==="angl"?(_=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),v=4*_,y=Math.max(0,.25-r.depth)):(v=o?.2:0,y=v),i=Ml.encloseSpan(r,n,v,y,t),/fbox|boxed|fcolorbox/.test(n)?(i.style.borderStyle="solid",i.style.borderWidth=ct(_)):n==="angl"&&_!==.049&&(i.style.borderTopWidth=ct(_),i.style.borderRightWidth=ct(_)),s=r.depth+y,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var S;if(e.backgroundColor)S=Ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:s},{type:"elem",elem:r,shift:0}]},t);else{var C=/cancel|phase/.test(n)?["svg-align"]:[];S=Ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:i,shift:s,wrapperClasses:C}]},t)}return/cancel/.test(n)&&(S.height=r.height,S.depth=r.depth),/cancel/.test(n)&&!o?Ie.makeSpan(["mord","cancel-lap"],[S],t):Ie.makeSpan(["mord"],[S],t)},kO=(e,t)=>{var r=0,n=new tt.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Ur(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};ht({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,i=er(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:s}},htmlBuilder:AO,mathmlBuilder:kO});ht({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,i=er(t[0],"color-token").color,s=er(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:s,borderColor:i,body:o}},htmlBuilder:AO,mathmlBuilder:kO});ht({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}});ht({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:AO,mathmlBuilder:kO});ht({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var cie={};function Lo(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:s}=e,o={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l<r.length;++l)cie[r[l]]=o;i&&(_b[t]=i),s&&(wb[t]=s)}var uie={};function ie(e,t){uie[e]=t}function Aj(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for(r==="\\relax"&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);r==="\\hline"||r==="\\hdashline";)e.consume(),t.push(r==="\\hdashline"),e.consumeSpaces(),r=e.fetch().text;return t}var Px=e=>{var t=e.parser.settings;if(!t.displayMode)throw new nt("{"+e.envName+"} can be used only in display mode.")};function NO(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function Zc(e,t,r){var{hskipBeforeAndAfter:n,addJot:a,cols:i,arraystretch:s,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:f,leqno:p}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)s=1;else if(s=parseFloat(m),!s||s<0)throw new nt("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var b=[],v=[b],y=[],_=[],S=l!=null?[]:void 0;function C(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function T(){S&&(e.gullet.macros.get("\\df@tag")?(S.push(e.subparse([new cs("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):S.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(C(),_.push(Aj(e));;){var A=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),A={type:"ordgroup",mode:e.mode,body:A},r&&(A={type:"styling",mode:e.mode,style:r,body:[A]}),b.push(A);var k=e.fetch().text;if(k==="&"){if(f&&b.length===f){if(c||o)throw new nt("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(k==="\\end"){T(),b.length===1&&A.type==="styling"&&A.body[0].body.length===0&&(v.length>1||!u)&&v.pop(),_.length<v.length+1&&_.push([]);break}else if(k==="\\\\"){e.consume();var N=void 0;e.gullet.future().text!==" "&&(N=e.parseSizeGroup(!0)),y.push(N?N.value:null),T(),_.push(Aj(e)),b=[],v.push(b),C()}else throw new nt("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:a,arraystretch:s,body:v,cols:i,rowGaps:y,hskipBeforeAndAfter:n,hLinesBeforeRow:_,colSeparationType:o,tags:S,leqno:p}}function RO(e){return e.slice(0,1)==="d"?"display":"text"}var Po=function(t,r){var n,a,i=t.body.length,s=t.hLinesBeforeRow,o=0,l=new Array(i),c=[],u=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,p=5*f;if(t.colSeparationType&&t.colSeparationType==="small"){var m=r.havingStyle(It.SCRIPT).sizeMultiplier;p=.2778*(m/r.sizeMultiplier)}var b=t.colSeparationType==="CD"?sn({number:3,unit:"ex"},r):12*f,v=3*f,y=t.arraystretch*b,_=.7*y,S=.3*y,C=0;function T(ve){for(var Ne=0;Ne<ve.length;++Ne)Ne>0&&(C+=.25),c.push({pos:C,isDashed:ve[Ne]})}for(T(s[0]),n=0;n<t.body.length;++n){var A=t.body[n],k=_,N=S;o<A.length&&(o=A.length);var L=new Array(A.length);for(a=0;a<A.length;++a){var I=_r(A[a],r);N<I.depth&&(N=I.depth),k<I.height&&(k=I.height),L[a]=I}var P=t.rowGaps[n],H=0;P&&(H=sn(P,r),H>0&&(H+=S,N<H&&(N=H),H=0)),t.addJot&&(N+=v),L.height=k,L.depth=N,C+=k,L.pos=C,C+=N+H,l[n]=L,T(s[n+1])}var B=C/2+r.fontMetrics().axisHeight,K=t.cols||[],j=[],W,D,U=[];if(t.tags&&t.tags.some(ve=>ve))for(n=0;n<i;++n){var Y=l[n],z=Y.pos-B,M=t.tags[n],Q=void 0;M===!0?Q=Ie.makeSpan(["eqn-num"],[],r):M===!1?Q=Ie.makeSpan([],[],r):Q=Ie.makeSpan([],Vn(M,r,!0),r),Q.depth=Y.depth,Q.height=Y.height,U.push({type:"elem",elem:Q,shift:z})}for(a=0,D=0;a<o||D<K.length;++a,++D){for(var q=K[D]||{},F=!0;q.type==="separator";){if(F||(W=Ie.makeSpan(["arraycolsep"],[]),W.style.width=ct(r.fontMetrics().doubleRuleSep),j.push(W)),q.separator==="|"||q.separator===":"){var V=q.separator==="|"?"solid":"dashed",Z=Ie.makeSpan(["vertical-separator"],[],r);Z.style.height=ct(C),Z.style.borderRightWidth=ct(u),Z.style.borderRightStyle=V,Z.style.margin="0 "+ct(-u/2);var ee=C-B;ee&&(Z.style.verticalAlign=ct(-ee)),j.push(Z)}else throw new nt("Invalid separator type: "+q.separator);D++,q=K[D]||{},F=!1}if(!(a>=o)){var te=void 0;(a>0||t.hskipBeforeAndAfter)&&(te=Nt.deflt(q.pregap,p),te!==0&&(W=Ie.makeSpan(["arraycolsep"],[]),W.style.width=ct(te),j.push(W)));var oe=[];for(n=0;n<i;++n){var pe=l[n],he=pe[a];if(he){var ke=pe.pos-B;he.depth=pe.depth,he.height=pe.height,oe.push({type:"elem",elem:he,shift:ke})}}oe=Ie.makeVList({positionType:"individualShift",children:oe},r),oe=Ie.makeSpan(["col-align-"+(q.align||"c")],[oe]),j.push(oe),(a<o-1||t.hskipBeforeAndAfter)&&(te=Nt.deflt(q.postgap,p),te!==0&&(W=Ie.makeSpan(["arraycolsep"],[]),W.style.width=ct(te),j.push(W)))}}if(l=Ie.makeSpan(["mtable"],j),c.length>0){for(var se=Ie.makeLineSpan("hline",r,u),qe=Ie.makeLineSpan("hdashline",r,u),$e=[{type:"elem",elem:l,shift:0}];c.length>0;){var Pe=c.pop(),Ce=Pe.pos-B;Pe.isDashed?$e.push({type:"elem",elem:qe,shift:Ce}):$e.push({type:"elem",elem:se,shift:Ce})}l=Ie.makeVList({positionType:"individualShift",children:$e},r)}if(U.length===0)return Ie.makeSpan(["mord"],[l],r);var xe=Ie.makeVList({positionType:"individualShift",children:U},r);return xe=Ie.makeSpan(["tag"],[xe],r),Ie.makeFragment([l,xe])},M5e={c:"center ",l:"left ",r:"right "},Fo=function(t,r){for(var n=[],a=new tt.MathNode("mtd",[],["mtr-glue"]),i=new tt.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<t.body.length;s++){for(var o=t.body[s],l=[],c=0;c<o.length;c++)l.push(new tt.MathNode("mtd",[Ur(o[c],r)]));t.tags&&t.tags[s]&&(l.unshift(a),l.push(a),t.leqno?l.unshift(i):l.push(i)),n.push(new tt.MathNode("mtr",l))}var u=new tt.MathNode("mtable",n),f=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);u.setAttribute("rowspacing",ct(f));var p="",m="";if(t.cols&&t.cols.length>0){var b=t.cols,v="",y=!1,_=0,S=b.length;b[0].type==="separator"&&(p+="top ",_=1),b[b.length-1].type==="separator"&&(p+="bottom ",S-=1);for(var C=_;C<S;C++)b[C].type==="align"?(m+=M5e[b[C].align],y&&(v+="none "),y=!0):b[C].type==="separator"&&y&&(v+=b[C].separator==="|"?"solid ":"dashed ",y=!1);u.setAttribute("columnalign",m.trim()),/[sd]/.test(v)&&u.setAttribute("columnlines",v.trim())}if(t.colSeparationType==="align"){for(var T=t.cols||[],A="",k=1;k<T.length;k++)A+=k%2?"0em ":"1em ";u.setAttribute("columnspacing",A.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?u.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?u.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?u.setAttribute("columnspacing","0.5em"):u.setAttribute("columnspacing","1em");var N="",L=t.hLinesBeforeRow;p+=L[0].length>0?"left ":"",p+=L[L.length-1].length>0?"right ":"";for(var I=1;I<L.length-1;I++)N+=L[I].length===0?"none ":L[I][0]?"dashed ":"solid ";return/[sd]/.test(N)&&u.setAttribute("rowlines",N.trim()),p!==""&&(u=new tt.MathNode("menclose",[u]),u.setAttribute("notation",p.trim())),t.arraystretch&&t.arraystretch<1&&(u=new tt.MathNode("mstyle",[u]),u.setAttribute("scriptlevel","1")),u},die=function(t,r){t.envName.indexOf("ed")===-1&&Px(t);var n=[],a=t.envName.indexOf("at")>-1?"alignat":"align",i=t.envName==="split",s=Zc(t.parser,{cols:n,addJot:!0,autoTag:i?void 0:NO(t.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:i?2:void 0,leqno:t.parser.settings.leqno},"display"),o,l=0,c={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var u="",f=0;f<r[0].body.length;f++){var p=er(r[0].body[f],"textord");u+=p.text}o=Number(u),l=o*2}var m=!l;s.body.forEach(function(_){for(var S=1;S<_.length;S+=2){var C=er(_[S],"styling"),T=er(C.body[0],"ordgroup");T.body.unshift(c)}if(m)l<_.length&&(l=_.length);else{var A=_.length/2;if(o<A)throw new nt("Too many math in a row: "+("expected "+o+", but got "+A),_[0])}});for(var b=0;b<l;++b){var v="r",y=0;b%2===1?v="l":b>0&&m&&(y=1),n[b]={type:"align",align:v,pregap:y,postgap:0}}return s.colSeparationType=m?"align":"alignat",s};Lo({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=Ox(t[0]),n=r?[t[0]]:er(t[0],"ordgroup").body,a=n.map(function(s){var o=SO(s),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new nt("Unknown column alignment: "+l,s)}),i={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return Zc(e.parser,i,RO(e.envName))},htmlBuilder:Po,mathmlBuilder:Fo});Lo({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("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var a=e.parser;if(a.consumeSpaces(),a.fetch().text==="["){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,"lcr".indexOf(r)===-1)throw new nt("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:r}]}}var i=Zc(e.parser,n,RO(e.envName)),s=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:Po,mathmlBuilder:Fo});Lo({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=Zc(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:Po,mathmlBuilder:Fo});Lo({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=Ox(t[0]),n=r?[t[0]]:er(t[0],"ordgroup").body,a=n.map(function(s){var o=SO(s),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new nt("Unknown column alignment: "+l,s)});if(a.length>1)throw new nt("{subarray} can contain only one column");var i={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5};if(i=Zc(e.parser,i,"script"),i.body.length>0&&i.body[0].length>1)throw new nt("{subarray} can contain only one column");return i},htmlBuilder:Po,mathmlBuilder:Fo});Lo({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}]},r=Zc(e.parser,t,RO(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Po,mathmlBuilder:Fo});Lo({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:die,htmlBuilder:Po,mathmlBuilder:Fo});Lo({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Nt.contains(["gather","gather*"],e.envName)&&Px(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:NO(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Zc(e.parser,t,"display")},htmlBuilder:Po,mathmlBuilder:Fo});Lo({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:die,htmlBuilder:Po,mathmlBuilder:Fo});Lo({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Px(e);var t={autoTag:NO(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Zc(e.parser,t,"display")},htmlBuilder:Po,mathmlBuilder:Fo});Lo({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Px(e),v5e(e.parser)},htmlBuilder:Po,mathmlBuilder:Fo});ie("\\nonumber","\\gdef\\@eqnsw{0}");ie("\\notag","\\nonumber");ht({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new nt(e.funcName+" valid only within array environment")}});var kj=cie;ht({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];if(a.type!=="ordgroup")throw new nt("Invalid environment name",a);for(var i="",s=0;s<a.body.length;++s)i+=er(a.body[s],"textord").text;if(n==="\\begin"){if(!kj.hasOwnProperty(i))throw new nt("No such environment: "+i,a);var o=kj[i],{args:l,optArgs:c}=r.parseArguments("\\begin{"+i+"}",o),u={mode:r.mode,envName:i,parser:r},f=o.handler(u,l,c);r.expect("\\end",!1);var p=r.nextToken,m=er(r.parseFunction(),"environment");if(m.name!==i)throw new nt("Mismatch: \\begin{"+i+"} matched by \\end{"+m.name+"}",p);return f}return{type:"environment",mode:r.mode,name:i,nameGroup:a}}});var fie=(e,t)=>{var r=e.font,n=t.withFont(r);return _r(e.body,n)},hie=(e,t)=>{var r=e.font,n=t.withFont(r);return Ur(e.body,n)},Nj={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ht({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:r,funcName:n}=e,a=Eb(t[0]),i=n;return i in Nj&&(i=Nj[i]),{type:"font",mode:r.mode,font:i.slice(1),body:a}},htmlBuilder:fie,mathmlBuilder:hie});ht({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0],a=Nt.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:Ix(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:a}}});ht({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:a}=e,{mode:i}=r,s=r.parseExpression(!0,a),o="math"+n.slice(1);return{type:"font",mode:i,font:o,body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:fie,mathmlBuilder:hie});var pie=(e,t)=>{var r=t;return e==="display"?r=r.id>=It.SCRIPT.id?r.text():It.DISPLAY:e==="text"&&r.size===It.DISPLAY.size?r=It.TEXT:e==="script"?r=It.SCRIPT:e==="scriptscript"&&(r=It.SCRIPTSCRIPT),r},MO=(e,t)=>{var r=pie(e.size,t.style),n=r.fracNum(),a=r.fracDen(),i;i=t.havingStyle(n);var s=_r(e.numer,i,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height<o?o:s.height,s.depth=s.depth<l?l:s.depth}i=t.havingStyle(a);var c=_r(e.denom,i,t),u,f,p;e.hasBarLine?(e.barSize?(f=sn(e.barSize,t),u=Ie.makeLineSpan("frac-line",t,f)):u=Ie.makeLineSpan("frac-line",t),f=u.height,p=u.height):(u=null,f=0,p=t.fontMetrics().defaultRuleThickness);var m,b,v;r.size===It.DISPLAY.size||e.size==="display"?(m=t.fontMetrics().num1,f>0?b=3*p:b=7*p,v=t.fontMetrics().denom1):(f>0?(m=t.fontMetrics().num2,b=p):(m=t.fontMetrics().num3,b=3*p),v=t.fontMetrics().denom2);var y;if(u){var S=t.fontMetrics().axisHeight;m-s.depth-(S+.5*f)<b&&(m+=b-(m-s.depth-(S+.5*f))),S-.5*f-(c.height-v)<b&&(v+=b-(S-.5*f-(c.height-v)));var C=-(S-.5*f);y=Ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:v},{type:"elem",elem:u,shift:C},{type:"elem",elem:s,shift:-m}]},t)}else{var _=m-s.depth-(c.height-v);_<b&&(m+=.5*(b-_),v+=.5*(b-_)),y=Ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:v},{type:"elem",elem:s,shift:-m}]},t)}i=t.havingStyle(r),y.height*=i.sizeMultiplier/t.sizeMultiplier,y.depth*=i.sizeMultiplier/t.sizeMultiplier;var T;r.size===It.DISPLAY.size?T=t.fontMetrics().delim1:r.size===It.SCRIPTSCRIPT.size?T=t.havingStyle(It.SCRIPT).fontMetrics().delim2:T=t.fontMetrics().delim2;var A,k;return e.leftDelim==null?A=Jp(t,["mopen"]):A=yl.customSizedDelim(e.leftDelim,T,!0,t.havingStyle(r),e.mode,["mopen"]),e.continued?k=Ie.makeSpan([]):e.rightDelim==null?k=Jp(t,["mclose"]):k=yl.customSizedDelim(e.rightDelim,T,!0,t.havingStyle(r),e.mode,["mclose"]),Ie.makeSpan(["mord"].concat(i.sizingClasses(t)),[A,Ie.makeSpan(["mfrac"],[y]),k],t)},DO=(e,t)=>{var r=new tt.MathNode("mfrac",[Ur(e.numer,t),Ur(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=sn(e.barSize,t);r.setAttribute("linethickness",ct(n))}var a=pie(e.size,t.style);if(a.size!==t.style.size){r=new tt.MathNode("mstyle",[r]);var i=a.size===It.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var o=new tt.MathNode("mo",[new tt.TextNode(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(r),e.rightDelim!=null){var l=new tt.MathNode("mo",[new tt.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return wO(s)}return r};ht({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],i=t[1],s,o=null,l=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",l=")";break;case"\\\\bracefrac":s=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:a,denom:i,hasBarLine:s,leftDelim:o,rightDelim:l,size:c,barSize:null}},htmlBuilder:MO,mathmlBuilder:DO});ht({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],i=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:a,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});ht({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,a;switch(r){case"\\over":a="\\frac";break;case"\\choose":a="\\binom";break;case"\\atop":a="\\\\atopfrac";break;case"\\brace":a="\\\\bracefrac";break;case"\\brack":a="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:a,token:n}}});var Rj=["display","text","script","scriptscript"],Mj=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};ht({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],a=t[5],i=Eb(t[0]),s=i.type==="atom"&&i.family==="open"?Mj(i.text):null,o=Eb(t[1]),l=o.type==="atom"&&o.family==="close"?Mj(o.text):null,c=er(t[2],"size"),u,f=null;c.isBlank?u=!0:(f=c.value,u=f.number>0);var p="auto",m=t[3];if(m.type==="ordgroup"){if(m.body.length>0){var b=er(m.body[0],"textord");p=Rj[Number(b.text)]}}else m=er(m,"textord"),p=Rj[Number(m.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:a,continued:!1,hasBarLine:u,barSize:f,leftDelim:s,rightDelim:l,size:p}},htmlBuilder:MO,mathmlBuilder:DO});ht({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:a}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:er(t[0],"size").value,token:a}}});ht({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],i=oMe(er(t[1],"infix").size),s=t[2],o=i.number>0;return{type:"genfrac",mode:r.mode,numer:a,denom:s,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:MO,mathmlBuilder:DO});var mie=(e,t)=>{var r=t.style,n,a;e.type==="supsub"?(n=e.sup?_r(e.sup,t.havingStyle(r.sup()),t):_r(e.sub,t.havingStyle(r.sub()),t),a=er(e.base,"horizBrace")):a=er(e,"horizBrace");var i=_r(a.base,t.havingBaseStyle(It.DISPLAY)),s=Ml.svgSpan(a,t),o;if(a.isOver?(o=Ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:s}]},t),o.children[0].children[0].children[1].classes.push("svg-align")):(o=Ie.makeVList({positionType:"bottom",positionData:i.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:i}]},t),o.children[0].children[0].children[0].classes.push("svg-align")),n){var l=Ie.makeSpan(["mord",a.isOver?"mover":"munder"],[o],t);a.isOver?o=Ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):o=Ie.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ie.makeSpan(["mord",a.isOver?"mover":"munder"],[o],t)},D5e=(e,t)=>{var r=Ml.mathMLnode(e.label);return new tt.MathNode(e.isOver?"mover":"munder",[Ur(e.base,t),r])};ht({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:mie,mathmlBuilder:D5e});ht({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],a=er(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:Sn(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Vn(e.body,t,!1);return Ie.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Gc(e.body,t);return r instanceof Mi||(r=new Mi("mrow",[r])),r.setAttribute("href",e.href),r}});ht({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=er(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i<n.length;i++){var s=n[i];s==="~"&&(s="\\textasciitilde"),a.push({type:"textord",mode:"text",text:s})}var o={type:"text",mode:r.mode,font:"\\texttt",body:a};return{type:"href",mode:r.mode,href:n,body:Sn(o)}}});ht({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:Sn(t[0])}},htmlBuilder(e,t){var r=Vn(e.body,t,!1);return Ie.makeFragment(r)},mathmlBuilder(e,t){return new tt.MathNode("mrow",ui(e.body,t))}});ht({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,token:a}=e,i=er(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var c=i.split(","),u=0;u<c.length;u++){var f=c[u].split("=");if(f.length!==2)throw new nt("Error parsing key-value for \\htmlData");l["data-"+f[0].trim()]=f[1].trim()}o={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(o)?{type:"html",mode:r.mode,attributes:l,body:Sn(s)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=Vn(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var a=Ie.makeSpan(n,r,t);for(var i in e.attributes)i!=="class"&&e.attributes.hasOwnProperty(i)&&a.setAttribute(i,e.attributes[i]);return a},mathmlBuilder:(e,t)=>Gc(e.body,t)});ht({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Sn(t[0]),mathml:Sn(t[1])}},htmlBuilder:(e,t)=>{var r=Vn(e.html,t,!1);return Ie.makeFragment(r)},mathmlBuilder:(e,t)=>Gc(e.mathml,t)});var NE=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new nt("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!Iae(n))throw new nt("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};ht({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,a={number:0,unit:"em"},i={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(r[0])for(var l=er(r[0],"raw").string,c=l.split(","),u=0;u<c.length;u++){var f=c[u].split("=");if(f.length===2){var p=f[1].trim();switch(f[0].trim()){case"alt":o=p;break;case"width":a=NE(p);break;case"height":i=NE(p);break;case"totalheight":s=NE(p);break;default:throw new nt("Invalid key: '"+f[0]+"' in \\includegraphics.")}}}var m=er(t[0],"url").url;return o===""&&(o=m,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:m})?{type:"includegraphics",mode:n.mode,alt:o,width:a,height:i,totalheight:s,src:m}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=sn(e.height,t),n=0;e.totalheight.number>0&&(n=sn(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=sn(e.width,t));var i={height:ct(r+n)};a>0&&(i.width=ct(a)),n>0&&(i.verticalAlign=ct(-n));var s=new DMe(e.src,e.alt,i);return s.height=r,s.depth=n,s},mathmlBuilder:(e,t)=>{var r=new tt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=sn(e.height,t),a=0;if(e.totalheight.number>0&&(a=sn(e.totalheight,t)-n,r.setAttribute("valign",ct(-a))),r.setAttribute("height",ct(n+a)),e.width.number>0){var i=sn(e.width,t);r.setAttribute("width",ct(i))}return r.setAttribute("src",e.src),r}});ht({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,a=er(t[0],"size");if(r.settings.strict){var i=n[1]==="m",s=a.value.unit==="mu";i?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+a.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder(e,t){return Ie.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var r=sn(e.dimension,t);return new tt.SpaceNode(r)}});ht({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=Ie.makeSpan([],[_r(e.body,t)]),r=Ie.makeSpan(["inner"],[r],t)):r=Ie.makeSpan(["inner"],[_r(e.body,t)]);var n=Ie.makeSpan(["fix"],[]),a=Ie.makeSpan([e.alignment],[r,n],t),i=Ie.makeSpan(["strut"]);return i.style.height=ct(a.height+a.depth),a.depth&&(i.style.verticalAlign=ct(-a.depth)),a.children.unshift(i),a=Ie.makeSpan(["thinbox"],[a],t),Ie.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var r=new tt.MathNode("mpadded",[Ur(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});ht({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,a=n.mode;n.switchMode("math");var i=r==="\\("?"\\)":"$",s=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:s}}});ht({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new nt("Mismatched "+e.funcName)}});var Dj=(e,t)=>{switch(t.style.size){case It.DISPLAY.size:return e.display;case It.TEXT.size:return e.text;case It.SCRIPT.size:return e.script;case It.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ht({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Sn(t[0]),text:Sn(t[1]),script:Sn(t[2]),scriptscript:Sn(t[3])}},htmlBuilder:(e,t)=>{var r=Dj(e,t),n=Vn(r,t,!1);return Ie.makeFragment(n)},mathmlBuilder:(e,t)=>{var r=Dj(e,t);return Gc(r,t)}});var gie=(e,t,r,n,a,i,s)=>{e=Ie.makeSpan([],[e]);var o=r&&Nt.isCharacterBox(r),l,c;if(t){var u=_r(t,n.havingStyle(a.sup()),n);c={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var f=_r(r,n.havingStyle(a.sub()),n);l={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var p;if(c&&l){var m=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s;p=Ie.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ct(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ct(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var b=e.height-s;p=Ie.makeVList({positionType:"top",positionData:b,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ct(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n)}else if(c){var v=e.depth+s;p=Ie.makeVList({positionType:"bottom",positionData:v,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:ct(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return e;var y=[p];if(l&&i!==0&&!o){var _=Ie.makeSpan(["mspace"],[],n);_.style.marginRight=ct(i),y.unshift(_)}return Ie.makeSpan(["mop","op-limits"],y,n)},vie=["\\smallint"],N0=(e,t)=>{var r,n,a=!1,i;e.type==="supsub"?(r=e.sup,n=e.sub,i=er(e.base,"op"),a=!0):i=er(e,"op");var s=t.style,o=!1;s.size===It.DISPLAY.size&&i.symbol&&!Nt.contains(vie,i.name)&&(o=!0);var l;if(i.symbol){var c=o?"Size2-Regular":"Size1-Regular",u="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(u=i.name.slice(1),i.name=u==="oiint"?"\\iint":"\\iiint"),l=Ie.makeSymbol(i.name,c,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),u.length>0){var f=l.italic,p=Ie.staticSvg(u+"Size"+(o?"2":"1"),t);l=Ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:o?.08:0}]},t),i.name="\\"+u,l.classes.unshift("mop"),l.italic=f}}else if(i.body){var m=Vn(i.body,t,!0);m.length===1&&m[0]instanceof fs?(l=m[0],l.classes[0]="mop"):l=Ie.makeSpan(["mop"],m,t)}else{for(var b=[],v=1;v<i.name.length;v++)b.push(Ie.mathsym(i.name[v],i.mode,t));l=Ie.makeSpan(["mop"],b,t)}var y=0,_=0;return(l instanceof fs||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift&&(y=(l.height-l.depth)/2-t.fontMetrics().axisHeight,_=l.italic),a?gie(l,r,n,t,s,_,y):(y&&(l.style.position="relative",l.style.top=ct(y)),l)},Wm=(e,t)=>{var r;if(e.symbol)r=new Mi("mo",[hs(e.name,e.mode)]),Nt.contains(vie,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Mi("mo",ui(e.body,t));else{r=new Mi("mi",[new So(e.name.slice(1))]);var n=new Mi("mo",[hs("⁡","text")]);e.parentIsSupSub?r=new Mi("mrow",[r,n]):r=Gae([r,n])}return r},O5e={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ht({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:r,funcName:n}=e,a=n;return a.length===1&&(a=O5e[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:N0,mathmlBuilder:Wm});ht({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Sn(n)}},htmlBuilder:N0,mathmlBuilder:Wm});var I5e={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ht({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:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:N0,mathmlBuilder:Wm});ht({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:N0,mathmlBuilder:Wm});ht({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=I5e[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:N0,mathmlBuilder:Wm});var bie=(e,t)=>{var r,n,a=!1,i;e.type==="supsub"?(r=e.sup,n=e.sub,i=er(e.base,"operatorname"),a=!0):i=er(e,"operatorname");var s;if(i.body.length>0){for(var o=i.body.map(f=>{var p=f.text;return typeof p=="string"?{type:"textord",mode:f.mode,text:p}:f}),l=Vn(o,t.withFont("mathrm"),!0),c=0;c<l.length;c++){var u=l[c];u instanceof fs&&(u.text=u.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=Ie.makeSpan(["mop"],l,t)}else s=Ie.makeSpan(["mop"],[],t);return a?gie(s,r,n,t,t.style,0,0):s},L5e=(e,t)=>{for(var r=ui(e.body,t.withFont("mathrm")),n=!0,a=0;a<r.length;a++){var i=r[a];if(!(i instanceof tt.SpaceNode))if(i instanceof tt.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var s=i.children[0];i.children.length===1&&s instanceof tt.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var o=r.map(u=>u.toText()).join("");r=[new tt.TextNode(o)]}var l=new tt.MathNode("mi",r);l.setAttribute("mathvariant","normal");var c=new tt.MathNode("mo",[hs("⁡","text")]);return e.parentIsSupSub?new tt.MathNode("mrow",[l,c]):tt.newDocumentFragment([l,c])};ht({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"operatorname",mode:r.mode,body:Sn(a),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:bie,mathmlBuilder:L5e});ie("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");fd({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ie.makeFragment(Vn(e.body,t,!1)):Ie.makeSpan(["mord"],Vn(e.body,t,!0),t)},mathmlBuilder(e,t){return Gc(e.body,t,!0)}});ht({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=_r(e.body,t.havingCrampedStyle()),n=Ie.makeLineSpan("overline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]},t);return Ie.makeSpan(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new tt.MathNode("mo",[new tt.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new tt.MathNode("mover",[Ur(e.body,t),r]);return n.setAttribute("accent","true"),n}});ht({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:Sn(n)}},htmlBuilder:(e,t)=>{var r=Vn(e.body,t.withPhantom(),!1);return Ie.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=ui(e.body,t);return new tt.MathNode("mphantom",r)}});ht({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=Ie.makeSpan([],[_r(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Ie.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>{var r=ui(Sn(e.body),t),n=new tt.MathNode("mphantom",r),a=new tt.MathNode("mpadded",[n]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}});ht({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=Ie.makeSpan(["inner"],[_r(e.body,t.withPhantom())]),n=Ie.makeSpan(["fix"],[]);return Ie.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=ui(Sn(e.body),t),n=new tt.MathNode("mphantom",r),a=new tt.MathNode("mpadded",[n]);return a.setAttribute("width","0px"),a}});ht({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=er(t[0],"size").value,a=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder(e,t){var r=_r(e.body,t),n=sn(e.dy,t);return Ie.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new tt.MathNode("mpadded",[Ur(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}});ht({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});ht({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,a=r[0],i=er(t[0],"size"),s=er(t[1],"size");return{type:"rule",mode:n.mode,shift:a&&er(a,"size").value,width:i.value,height:s.value}},htmlBuilder(e,t){var r=Ie.makeSpan(["mord","rule"],[],t),n=sn(e.width,t),a=sn(e.height,t),i=e.shift?sn(e.shift,t):0;return r.style.borderRightWidth=ct(n),r.style.borderTopWidth=ct(a),r.style.bottom=ct(i),r.width=n,r.height=a+i,r.depth=-i,r.maxFontSize=a*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=sn(e.width,t),n=sn(e.height,t),a=e.shift?sn(e.shift,t):0,i=t.color&&t.getColor()||"black",s=new tt.MathNode("mspace");s.setAttribute("mathbackground",i),s.setAttribute("width",ct(r)),s.setAttribute("height",ct(n));var o=new tt.MathNode("mpadded",[s]);return a>=0?o.setAttribute("height",ct(a)):(o.setAttribute("height",ct(a)),o.setAttribute("depth",ct(-a))),o.setAttribute("voffset",ct(a)),o}});function xie(e,t,r){for(var n=Vn(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier,i=0;i<n.length;i++){var s=n[i].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[i].classes,t.sizingClasses(r)):n[i].classes[s+1]==="reset-size"+t.size&&(n[i].classes[s+1]="reset-size"+r.size),n[i].height*=a,n[i].depth*=a}return Ie.makeFragment(n)}var Oj=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],P5e=(e,t)=>{var r=t.havingSize(e.size);return xie(e.body,r,t)};ht({type:"sizing",names:Oj,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:a}=e,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:Oj.indexOf(n)+1,body:i}},htmlBuilder:P5e,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=ui(e.body,r),a=new tt.MathNode("mstyle",n);return a.setAttribute("mathsize",ct(r.sizeMultiplier)),a}});ht({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,a=!1,i=!1,s=r[0]&&er(r[0],"ordgroup");if(s)for(var o="",l=0;l<s.body.length;++l){var c=s.body[l];if(o=c.text,o==="t")a=!0;else if(o==="b")i=!0;else{a=!1,i=!1;break}}else a=!0,i=!0;var u=t[0];return{type:"smash",mode:n.mode,body:u,smashHeight:a,smashDepth:i}},htmlBuilder:(e,t)=>{var r=Ie.makeSpan([],[_r(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var a=0;a<r.children.length;a++)r.children[a].depth=0;var i=Ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return Ie.makeSpan(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var r=new tt.MathNode("mpadded",[Ur(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}});ht({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,a=r[0],i=t[0];return{type:"sqrt",mode:n.mode,body:i,index:a}},htmlBuilder(e,t){var r=_r(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=Ie.wrapFragment(r,t);var n=t.fontMetrics(),a=n.defaultRuleThickness,i=a;t.style.id<It.TEXT.id&&(i=t.fontMetrics().xHeight);var s=a+i/4,o=r.height+r.depth+s+a,{span:l,ruleWidth:c,advanceWidth:u}=yl.sqrtImage(o,t),f=l.height-c;f>r.height+r.depth+s&&(s=(s+f-r.height-r.depth)/2);var p=l.height-r.height-s-c;r.style.paddingLeft=ct(u);var m=Ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:l},{type:"kern",size:c}]},t);if(e.index){var b=t.havingStyle(It.SCRIPTSCRIPT),v=_r(e.index,b,t),y=.6*(m.height-m.depth),_=Ie.makeVList({positionType:"shift",positionData:-y,children:[{type:"elem",elem:v}]},t),S=Ie.makeSpan(["root"],[_]);return Ie.makeSpan(["mord","sqrt"],[S,m],t)}else return Ie.makeSpan(["mord","sqrt"],[m],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new tt.MathNode("mroot",[Ur(r,t),Ur(n,t)]):new tt.MathNode("msqrt",[Ur(r,t)])}});var Ij={display:It.DISPLAY,text:It.TEXT,script:It.SCRIPT,scriptscript:It.SCRIPTSCRIPT};ht({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:a}=e,i=a.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:s,body:i}},htmlBuilder(e,t){var r=Ij[e.style],n=t.havingStyle(r).withFont("");return xie(e.body,n,t)},mathmlBuilder(e,t){var r=Ij[e.style],n=t.havingStyle(r),a=ui(e.body,n),i=new tt.MathNode("mstyle",a),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var F5e=function(t,r){var n=t.base;if(n)if(n.type==="op"){var a=n.limits&&(r.style.size===It.DISPLAY.size||n.alwaysHandleSupSub);return a?N0:null}else if(n.type==="operatorname"){var i=n.alwaysHandleSupSub&&(r.style.size===It.DISPLAY.size||n.limits);return i?bie:null}else{if(n.type==="accent")return Nt.isCharacterBox(n.base)?CO:null;if(n.type==="horizBrace"){var s=!t.sub;return s===n.isOver?mie:null}else return null}else return null};fd({type:"supsub",htmlBuilder(e,t){var r=F5e(e,t);if(r)return r(e,t);var{base:n,sup:a,sub:i}=e,s=_r(n,t),o,l,c=t.fontMetrics(),u=0,f=0,p=n&&Nt.isCharacterBox(n);if(a){var m=t.havingStyle(t.style.sup());o=_r(a,m,t),p||(u=s.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(i){var b=t.havingStyle(t.style.sub());l=_r(i,b,t),p||(f=s.depth+b.fontMetrics().subDrop*b.sizeMultiplier/t.sizeMultiplier)}var v;t.style===It.DISPLAY?v=c.sup1:t.style.cramped?v=c.sup3:v=c.sup2;var y=t.sizeMultiplier,_=ct(.5/c.ptPerEm/y),S=null;if(l){var C=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(s instanceof fs||C)&&(S=ct(-s.italic))}var T;if(o&&l){u=Math.max(u,v,o.depth+.25*c.xHeight),f=Math.max(f,c.sub2);var A=c.defaultRuleThickness,k=4*A;if(u-o.depth-(l.height-f)<k){f=k-(u-o.depth)+l.height;var N=.8*c.xHeight-(u-o.depth);N>0&&(u+=N,f-=N)}var L=[{type:"elem",elem:l,shift:f,marginRight:_,marginLeft:S},{type:"elem",elem:o,shift:-u,marginRight:_}];T=Ie.makeVList({positionType:"individualShift",children:L},t)}else if(l){f=Math.max(f,c.sub1,l.height-.8*c.xHeight);var I=[{type:"elem",elem:l,marginLeft:S,marginRight:_}];T=Ie.makeVList({positionType:"shift",positionData:f,children:I},t)}else if(o)u=Math.max(u,v,o.depth+.25*c.xHeight),T=Ie.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:o,marginRight:_}]},t);else throw new Error("supsub must have either sup or sub.");var P=a6(s,"right")||"mord";return Ie.makeSpan([P],[s,Ie.makeSpan(["msupsub"],[T])],t)},mathmlBuilder(e,t){var r=!1,n,a;e.base&&e.base.type==="horizBrace"&&(a=!!e.sup,a===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var i=[Ur(e.base,t)];e.sub&&i.push(Ur(e.sub,t)),e.sup&&i.push(Ur(e.sup,t));var s;if(r)s=n?"mover":"munder";else if(e.sub)if(e.sup){var c=e.base;c&&c.type==="op"&&c.limits&&t.style===It.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(t.style===It.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===It.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===It.DISPLAY)?s="munder":s="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===It.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===It.DISPLAY)?s="mover":s="msup"}return new tt.MathNode(s,i)}});fd({type:"atom",htmlBuilder(e,t){return Ie.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new tt.MathNode("mo",[hs(e.text,e.mode)]);if(e.family==="bin"){var n=EO(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});var yie={mi:"italic",mn:"normal",mtext:"normal"};fd({type:"mathord",htmlBuilder(e,t){return Ie.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new tt.MathNode("mi",[hs(e.text,e.mode,t)]),n=EO(e,t)||"italic";return n!==yie[r.type]&&r.setAttribute("mathvariant",n),r}});fd({type:"textord",htmlBuilder(e,t){return Ie.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=hs(e.text,e.mode,t),n=EO(e,t)||"normal",a;return e.mode==="text"?a=new tt.MathNode("mtext",[r]):/[0-9]/.test(e.text)?a=new tt.MathNode("mn",[r]):e.text==="\\prime"?a=new tt.MathNode("mo",[r]):a=new tt.MathNode("mi",[r]),n!==yie[a.type]&&a.setAttribute("mathvariant",n),a}});var RE={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ME={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};fd({type:"spacing",htmlBuilder(e,t){if(ME.hasOwnProperty(e.text)){var r=ME[e.text].className||"";if(e.mode==="text"){var n=Ie.makeOrd(e,t,"textord");return n.classes.push(r),n}else return Ie.makeSpan(["mspace",r],[Ie.mathsym(e.text,e.mode,t)],t)}else{if(RE.hasOwnProperty(e.text))return Ie.makeSpan(["mspace",RE[e.text]],[],t);throw new nt('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(ME.hasOwnProperty(e.text))r=new tt.MathNode("mtext",[new tt.TextNode(" ")]);else{if(RE.hasOwnProperty(e.text))return new tt.MathNode("mspace");throw new nt('Unknown type of space "'+e.text+'"')}return r}});var Lj=()=>{var e=new tt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};fd({type:"tag",mathmlBuilder(e,t){var r=new tt.MathNode("mtable",[new tt.MathNode("mtr",[Lj(),new tt.MathNode("mtd",[Gc(e.body,t)]),Lj(),new tt.MathNode("mtd",[Gc(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Pj={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Fj={"\\textbf":"textbf","\\textmd":"textmd"},B5e={"\\textit":"textit","\\textup":"textup"},Bj=(e,t)=>{var r=e.font;if(r){if(Pj[r])return t.withTextFontFamily(Pj[r]);if(Fj[r])return t.withTextFontWeight(Fj[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(B5e[r])};ht({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:r,funcName:n}=e,a=t[0];return{type:"text",mode:r.mode,body:Sn(a),font:n}},htmlBuilder(e,t){var r=Bj(e,t),n=Vn(e.body,r,!0);return Ie.makeSpan(["mord","text"],n,r)},mathmlBuilder(e,t){var r=Bj(e,t);return Gc(e.body,r)}});ht({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=_r(e.body,t),n=Ie.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ie.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return Ie.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new tt.MathNode("mo",[new tt.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new tt.MathNode("munder",[Ur(e.body,t),r]);return n.setAttribute("accentunder","true"),n}});ht({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=_r(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ie.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return new tt.MathNode("mpadded",[Ur(e.body,t)],["vcenter"])}});ht({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new nt("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=zj(e),n=[],a=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var s=r[i];s==="~"&&(s="\\textasciitilde"),n.push(Ie.makeSymbol(s,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return Ie.makeSpan(["mord","text"].concat(a.sizingClasses(t)),Ie.tryCombineChars(n),a)},mathmlBuilder(e,t){var r=new tt.TextNode(zj(e)),n=new tt.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var zj=e=>e.body.replace(/ /g,e.star?"␣":" "),Rc=$ae,_ie=`[ \r
	]`,z5e="\\\\[a-zA-Z@]+",j5e="\\\\[^\uD800-\uDFFF]",q5e="("+z5e+")"+_ie+"*",U5e=`\\\\(
|[ \r	]+
?)[ \r	]*`,l6="[̀-ͯ]",$5e=new RegExp(l6+"+$"),H5e="("+_ie+"+)|"+(U5e+"|")+"([!-\\[\\]-‧‪-퟿豈-]"+(l6+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(l6+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+q5e)+("|"+j5e+")");class jj{constructor(t,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=r,this.tokenRegex=new RegExp(H5e,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new cs("EOF",new Ci(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new nt("Unexpected character: '"+t[r]+"'",new cs(t[r],new Ci(this,r,r+1)));var a=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[a]===14){var i=t.indexOf(`
`,this.tokenRegex.lastIndex);return i===-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=i+1,this.lex()}return new cs(a,new Ci(this,r,this.tokenRegex.lastIndex))}}class G5e{constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new nt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}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,r,n){if(n===void 0&&(n=!1),n){for(var a=0;a<this.undefStack.length;a++)delete this.undefStack[a][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(t)&&(i[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}}var V5e=uie;ie("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});ie("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});ie("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});ie("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});ie("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});ie("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ie("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var qj={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};ie("\\char",function(e){var t=e.popToken(),r,n="";if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new nt("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=qj[t.text],n==null||n>=r)throw new nt("Invalid base-"+r+" digit "+t.text);for(var a;(a=qj[e.future().text])!=null&&a<r;)n*=r,n+=a,e.popToken()}return"\\@char{"+n+"}"});var OO=(e,t,r,n)=>{var a=e.consumeArg().tokens;if(a.length!==1)throw new nt("\\newcommand's first argument must be a macro name");var i=a[0].text,s=e.isDefined(i);if(s&&!t)throw new nt("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!s&&!r)throw new nt("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(a=e.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var l="",c=e.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new nt("Invalid number of arguments: "+l);o=parseInt(l),a=e.consumeArg().tokens}return s&&n||e.macros.set(i,{tokens:a,numArgs:o}),""};ie("\\newcommand",e=>OO(e,!1,!0,!1));ie("\\renewcommand",e=>OO(e,!0,!1,!1));ie("\\providecommand",e=>OO(e,!0,!0,!0));ie("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});ie("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});ie("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Rc[r],Wr.math[r],Wr.text[r]),""});ie("\\bgroup","{");ie("\\egroup","}");ie("~","\\nobreakspace");ie("\\lq","`");ie("\\rq","'");ie("\\aa","\\r a");ie("\\AA","\\r A");ie("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ie("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ie("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ie("ℬ","\\mathscr{B}");ie("ℰ","\\mathscr{E}");ie("ℱ","\\mathscr{F}");ie("ℋ","\\mathscr{H}");ie("ℐ","\\mathscr{I}");ie("ℒ","\\mathscr{L}");ie("ℳ","\\mathscr{M}");ie("ℛ","\\mathscr{R}");ie("ℭ","\\mathfrak{C}");ie("ℌ","\\mathfrak{H}");ie("ℨ","\\mathfrak{Z}");ie("\\Bbbk","\\Bbb{k}");ie("·","\\cdotp");ie("\\llap","\\mathllap{\\textrm{#1}}");ie("\\rlap","\\mathrlap{\\textrm{#1}}");ie("\\clap","\\mathclap{\\textrm{#1}}");ie("\\mathstrut","\\vphantom{(}");ie("\\underbar","\\underline{\\text{#1}}");ie("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');ie("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ie("\\ne","\\neq");ie("≠","\\neq");ie("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ie("∉","\\notin");ie("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ie("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ie("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ie("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ie("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ie("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ie("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ie("⟂","\\perp");ie("‼","\\mathclose{!\\mkern-0.8mu!}");ie("∌","\\notni");ie("⌜","\\ulcorner");ie("⌝","\\urcorner");ie("⌞","\\llcorner");ie("⌟","\\lrcorner");ie("©","\\copyright");ie("®","\\textregistered");ie("️","\\textregistered");ie("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ie("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ie("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ie("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ie("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ie("⋮","\\vdots");ie("\\varGamma","\\mathit{\\Gamma}");ie("\\varDelta","\\mathit{\\Delta}");ie("\\varTheta","\\mathit{\\Theta}");ie("\\varLambda","\\mathit{\\Lambda}");ie("\\varXi","\\mathit{\\Xi}");ie("\\varPi","\\mathit{\\Pi}");ie("\\varSigma","\\mathit{\\Sigma}");ie("\\varUpsilon","\\mathit{\\Upsilon}");ie("\\varPhi","\\mathit{\\Phi}");ie("\\varPsi","\\mathit{\\Psi}");ie("\\varOmega","\\mathit{\\Omega}");ie("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ie("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ie("\\boxed","\\fbox{$\\displaystyle{#1}$}");ie("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ie("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ie("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ie("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ie("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Uj={",":"\\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"};ie("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Uj?t=Uj[r]:(r.slice(0,4)==="\\not"||r in Wr.math&&Nt.contains(["bin","rel"],Wr.math[r].group))&&(t="\\dotsb"),t});var IO={")":!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};ie("\\dotso",function(e){var t=e.future().text;return t in IO?"\\ldots\\,":"\\ldots"});ie("\\dotsc",function(e){var t=e.future().text;return t in IO&&t!==","?"\\ldots\\,":"\\ldots"});ie("\\cdots",function(e){var t=e.future().text;return t in IO?"\\@cdots\\,":"\\@cdots"});ie("\\dotsb","\\cdots");ie("\\dotsm","\\cdots");ie("\\dotsi","\\!\\cdots");ie("\\dotsx","\\ldots\\,");ie("\\DOTSI","\\relax");ie("\\DOTSB","\\relax");ie("\\DOTSX","\\relax");ie("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ie("\\,","\\tmspace+{3mu}{.1667em}");ie("\\thinspace","\\,");ie("\\>","\\mskip{4mu}");ie("\\:","\\tmspace+{4mu}{.2222em}");ie("\\medspace","\\:");ie("\\;","\\tmspace+{5mu}{.2777em}");ie("\\thickspace","\\;");ie("\\!","\\tmspace-{3mu}{.1667em}");ie("\\negthinspace","\\!");ie("\\negmedspace","\\tmspace-{4mu}{.2222em}");ie("\\negthickspace","\\tmspace-{5mu}{.277em}");ie("\\enspace","\\kern.5em ");ie("\\enskip","\\hskip.5em\\relax");ie("\\quad","\\hskip1em\\relax");ie("\\qquad","\\hskip2em\\relax");ie("\\tag","\\@ifstar\\tag@literal\\tag@paren");ie("\\tag@paren","\\tag@literal{({#1})}");ie("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new nt("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ie("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ie("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ie("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ie("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ie("\\newline","\\\\\\relax");ie("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var wie=ct(Eo["Main-Regular"][84][1]-.7*Eo["Main-Regular"][65][1]);ie("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+wie+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ie("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+wie+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ie("\\hspace","\\@ifstar\\@hspacer\\@hspace");ie("\\@hspace","\\hskip #1\\relax");ie("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ie("\\ordinarycolon",":");ie("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ie("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ie("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ie("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ie("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ie("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ie("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ie("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ie("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ie("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ie("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ie("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ie("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ie("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ie("∷","\\dblcolon");ie("∹","\\eqcolon");ie("≔","\\coloneqq");ie("≕","\\eqqcolon");ie("⩴","\\Coloneqq");ie("\\ratio","\\vcentcolon");ie("\\coloncolon","\\dblcolon");ie("\\colonequals","\\coloneqq");ie("\\coloncolonequals","\\Coloneqq");ie("\\equalscolon","\\eqqcolon");ie("\\equalscoloncolon","\\Eqqcolon");ie("\\colonminus","\\coloneq");ie("\\coloncolonminus","\\Coloneq");ie("\\minuscolon","\\eqcolon");ie("\\minuscoloncolon","\\Eqcolon");ie("\\coloncolonapprox","\\Colonapprox");ie("\\coloncolonsim","\\Colonsim");ie("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ie("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ie("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ie("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ie("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ie("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ie("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ie("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ie("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ie("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ie("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ie("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ie("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ie("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ie("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ie("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ie("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ie("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ie("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ie("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ie("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ie("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ie("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ie("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ie("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ie("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ie("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ie("\\imath","\\html@mathml{\\@imath}{ı}");ie("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ie("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ie("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ie("⟦","\\llbracket");ie("⟧","\\rrbracket");ie("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ie("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ie("⦃","\\lBrace");ie("⦄","\\rBrace");ie("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ie("⦵","\\minuso");ie("\\darr","\\downarrow");ie("\\dArr","\\Downarrow");ie("\\Darr","\\Downarrow");ie("\\lang","\\langle");ie("\\rang","\\rangle");ie("\\uarr","\\uparrow");ie("\\uArr","\\Uparrow");ie("\\Uarr","\\Uparrow");ie("\\N","\\mathbb{N}");ie("\\R","\\mathbb{R}");ie("\\Z","\\mathbb{Z}");ie("\\alef","\\aleph");ie("\\alefsym","\\aleph");ie("\\Alpha","\\mathrm{A}");ie("\\Beta","\\mathrm{B}");ie("\\bull","\\bullet");ie("\\Chi","\\mathrm{X}");ie("\\clubs","\\clubsuit");ie("\\cnums","\\mathbb{C}");ie("\\Complex","\\mathbb{C}");ie("\\Dagger","\\ddagger");ie("\\diamonds","\\diamondsuit");ie("\\empty","\\emptyset");ie("\\Epsilon","\\mathrm{E}");ie("\\Eta","\\mathrm{H}");ie("\\exist","\\exists");ie("\\harr","\\leftrightarrow");ie("\\hArr","\\Leftrightarrow");ie("\\Harr","\\Leftrightarrow");ie("\\hearts","\\heartsuit");ie("\\image","\\Im");ie("\\infin","\\infty");ie("\\Iota","\\mathrm{I}");ie("\\isin","\\in");ie("\\Kappa","\\mathrm{K}");ie("\\larr","\\leftarrow");ie("\\lArr","\\Leftarrow");ie("\\Larr","\\Leftarrow");ie("\\lrarr","\\leftrightarrow");ie("\\lrArr","\\Leftrightarrow");ie("\\Lrarr","\\Leftrightarrow");ie("\\Mu","\\mathrm{M}");ie("\\natnums","\\mathbb{N}");ie("\\Nu","\\mathrm{N}");ie("\\Omicron","\\mathrm{O}");ie("\\plusmn","\\pm");ie("\\rarr","\\rightarrow");ie("\\rArr","\\Rightarrow");ie("\\Rarr","\\Rightarrow");ie("\\real","\\Re");ie("\\reals","\\mathbb{R}");ie("\\Reals","\\mathbb{R}");ie("\\Rho","\\mathrm{P}");ie("\\sdot","\\cdot");ie("\\sect","\\S");ie("\\spades","\\spadesuit");ie("\\sub","\\subset");ie("\\sube","\\subseteq");ie("\\supe","\\supseteq");ie("\\Tau","\\mathrm{T}");ie("\\thetasym","\\vartheta");ie("\\weierp","\\wp");ie("\\Zeta","\\mathrm{Z}");ie("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ie("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ie("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ie("\\bra","\\mathinner{\\langle{#1}|}");ie("\\ket","\\mathinner{|{#1}\\rangle}");ie("\\braket","\\mathinner{\\langle{#1}\\rangle}");ie("\\Bra","\\left\\langle#1\\right|");ie("\\Ket","\\left|#1\\right\\rangle");var Eie=e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,i=t.consumeArg().tokens,s=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=f=>p=>{e&&(p.macros.set("|",s),a.length&&p.macros.set("\\|",o));var m=f;if(!f&&a.length){var b=p.future();b.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?a:n,numArgs:0}};t.macros.set("|",l(!1)),a.length&&t.macros.set("\\|",l(!0));var c=t.consumeArg().tokens,u=t.expandTokens([...i,...c,...r]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};ie("\\bra@ket",Eie(!1));ie("\\bra@set",Eie(!0));ie("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ie("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ie("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ie("\\angln","{\\angl n}");ie("\\blue","\\textcolor{##6495ed}{#1}");ie("\\orange","\\textcolor{##ffa500}{#1}");ie("\\pink","\\textcolor{##ff00af}{#1}");ie("\\red","\\textcolor{##df0030}{#1}");ie("\\green","\\textcolor{##28ae7b}{#1}");ie("\\gray","\\textcolor{gray}{#1}");ie("\\purple","\\textcolor{##9d38bd}{#1}");ie("\\blueA","\\textcolor{##ccfaff}{#1}");ie("\\blueB","\\textcolor{##80f6ff}{#1}");ie("\\blueC","\\textcolor{##63d9ea}{#1}");ie("\\blueD","\\textcolor{##11accd}{#1}");ie("\\blueE","\\textcolor{##0c7f99}{#1}");ie("\\tealA","\\textcolor{##94fff5}{#1}");ie("\\tealB","\\textcolor{##26edd5}{#1}");ie("\\tealC","\\textcolor{##01d1c1}{#1}");ie("\\tealD","\\textcolor{##01a995}{#1}");ie("\\tealE","\\textcolor{##208170}{#1}");ie("\\greenA","\\textcolor{##b6ffb0}{#1}");ie("\\greenB","\\textcolor{##8af281}{#1}");ie("\\greenC","\\textcolor{##74cf70}{#1}");ie("\\greenD","\\textcolor{##1fab54}{#1}");ie("\\greenE","\\textcolor{##0d923f}{#1}");ie("\\goldA","\\textcolor{##ffd0a9}{#1}");ie("\\goldB","\\textcolor{##ffbb71}{#1}");ie("\\goldC","\\textcolor{##ff9c39}{#1}");ie("\\goldD","\\textcolor{##e07d10}{#1}");ie("\\goldE","\\textcolor{##a75a05}{#1}");ie("\\redA","\\textcolor{##fca9a9}{#1}");ie("\\redB","\\textcolor{##ff8482}{#1}");ie("\\redC","\\textcolor{##f9685d}{#1}");ie("\\redD","\\textcolor{##e84d39}{#1}");ie("\\redE","\\textcolor{##bc2612}{#1}");ie("\\maroonA","\\textcolor{##ffbde0}{#1}");ie("\\maroonB","\\textcolor{##ff92c6}{#1}");ie("\\maroonC","\\textcolor{##ed5fa6}{#1}");ie("\\maroonD","\\textcolor{##ca337c}{#1}");ie("\\maroonE","\\textcolor{##9e034e}{#1}");ie("\\purpleA","\\textcolor{##ddd7ff}{#1}");ie("\\purpleB","\\textcolor{##c6b9fc}{#1}");ie("\\purpleC","\\textcolor{##aa87ff}{#1}");ie("\\purpleD","\\textcolor{##7854ab}{#1}");ie("\\purpleE","\\textcolor{##543b78}{#1}");ie("\\mintA","\\textcolor{##f5f9e8}{#1}");ie("\\mintB","\\textcolor{##edf2df}{#1}");ie("\\mintC","\\textcolor{##e0e5cc}{#1}");ie("\\grayA","\\textcolor{##f6f7f7}{#1}");ie("\\grayB","\\textcolor{##f0f1f2}{#1}");ie("\\grayC","\\textcolor{##e3e5e6}{#1}");ie("\\grayD","\\textcolor{##d6d8da}{#1}");ie("\\grayE","\\textcolor{##babec2}{#1}");ie("\\grayF","\\textcolor{##888d93}{#1}");ie("\\grayG","\\textcolor{##626569}{#1}");ie("\\grayH","\\textcolor{##3b3e40}{#1}");ie("\\grayI","\\textcolor{##21242c}{#1}");ie("\\kaBlue","\\textcolor{##314453}{#1}");ie("\\kaGreen","\\textcolor{##71B307}{#1}");var Sie={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class W5e{constructor(t,r,n){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=r,this.expansionCount=0,this.feed(t),this.macros=new G5e(V5e,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new jj(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 r,n,a;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:a,end:n}=this.consumeArg(["]"])}else({tokens:a,start:r,end:n}=this.consumeArg());return this.pushToken(new cs("EOF",n.loc)),this.pushTokens(a),r.range(n,"")}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var a=this.future(),i,s=0,o=0;do{if(i=this.popToken(),r.push(i),i.text==="{")++s;else if(i.text==="}"){if(--s,s===-1)throw new nt("Extra }",i)}else if(i.text==="EOF")throw new nt("Unexpected end of input in a macro argument, expected '"+(t&&n?t[o]:"}")+"'",i);if(t&&n)if((s===0||s===1&&t[o]==="{")&&i.text===t[o]){if(++o,o===t.length){r.splice(-o,o);break}}else o=0}while(s!==0||n);return a.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:a,end:i}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new nt("The length of delimiters doesn't match the number of args!");for(var n=r[0],a=0;a<n.length;a++){var i=this.popToken();if(n[a]!==i.text)throw new nt("Use of the macro doesn't match its definition",i)}}for(var s=[],o=0;o<t;o++)s.push(this.consumeArg(r&&r[o+1]).tokens);return s}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new nt("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,a=r.noexpand?null:this._getExpansion(n);if(a==null||t&&a.unexpandable){if(t&&a==null&&n[0]==="\\"&&!this.isDefined(n))throw new nt("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var i=a.tokens,s=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var l=i[o];if(l.text==="#"){if(o===0)throw new nt("Incomplete placeholder at end of macro body",l);if(l=i[--o],l.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(l.text))i.splice(o,2,...s[+l.text-1]);else throw new nt("Not a valid argument number",l)}}}return this.pushTokens(i),i.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}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new cs(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),r.push(a)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];if(n!=null&&n!==13)return}var a=typeof r=="function"?r(this):r;if(typeof a=="string"){var i=0;if(a.indexOf("#")!==-1)for(var s=a.replace(/##/g,"");s.indexOf("#"+(i+1))!==-1;)++i;for(var o=new jj(a,this.settings),l=[],c=o.lex();c.text!=="EOF";)l.push(c),c=o.lex();l.reverse();var u={tokens:l,numArgs:i};return u}return a}isDefined(t){return this.macros.has(t)||Rc.hasOwnProperty(t)||Wr.math.hasOwnProperty(t)||Wr.text.hasOwnProperty(t)||Sie.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Rc.hasOwnProperty(t)&&!Rc[t].primitive}}var $j=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Zv=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),DE={"́":{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"}},Hj={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"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̇",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"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̂",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"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̇",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"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̇",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Fx{constructor(t,r){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 W5e(t,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new nt("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&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 r=this.nextToken;this.consume(),this.gullet.pushToken(new cs("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var a=this.fetch();if(Fx.endOfExpression.indexOf(a.text)!==-1||r&&a.text===r||t&&Rc[a.text]&&Rc[a.text].infix)break;var i=this.parseAtom(r);if(i){if(i.type==="internal")continue}else break;n.push(i)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,a=0;a<t.length;a++)if(t[a].type==="infix"){if(r!==-1)throw new nt("only one infix operator per group",t[a].token);r=a,n=t[a].replaceWith}if(r!==-1&&n){var i,s,o=t.slice(0,r),l=t.slice(r+1);o.length===1&&o[0].type==="ordgroup"?i=o[0]:i={type:"ordgroup",mode:this.mode,body:o},l.length===1&&l[0].type==="ordgroup"?s=l[0]:s={type:"ordgroup",mode:this.mode,body:l};var c;return n==="\\\\abovefrac"?c=this.callFunction(n,[i,t[r],s],[]):c=this.callFunction(n,[i,s],[]),[c]}else return t}handleSupSubscript(t){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var a;do{var i;a=this.parseGroup(t)}while(((i=a)==null?void 0:i.type)==="internal");if(!a)throw new nt("Expected group after '"+n+"'",r);return a}formatUnsupportedCmd(t){for(var r=[],n=0;n<t.length;n++)r.push({type:"textord",mode:"text",text:t[n]});var a={type:"text",mode:this.mode,body:r},i={type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]};return i}parseAtom(t){var r=this.parseGroup("atom",t);if(r?.type==="internal"||this.mode==="text")return r;for(var n,a;;){this.consumeSpaces();var i=this.fetch();if(i.text==="\\limits"||i.text==="\\nolimits"){if(r&&r.type==="op"){var s=i.text==="\\limits";r.limits=s,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=i.text==="\\limits");else throw new nt("Limit controls must follow a math operator",i);this.consume()}else if(i.text==="^"){if(n)throw new nt("Double superscript",i);n=this.handleSupSubscript("superscript")}else if(i.text==="_"){if(a)throw new nt("Double subscript",i);a=this.handleSupSubscript("subscript")}else if(i.text==="'"){if(n)throw new nt("Double superscript",i);var o={type:"textord",mode:this.mode,text:"\\prime"},l=[o];for(this.consume();this.fetch().text==="'";)l.push(o),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:l}}else if(Zv[i.text]){var c=$j.test(i.text),u=[];for(u.push(new cs(Zv[i.text])),this.consume();;){var f=this.fetch().text;if(!Zv[f]||$j.test(f)!==c)break;u.unshift(new cs(Zv[f])),this.consume()}var p=this.subparse(u);c?a={type:"ordgroup",mode:"math",body:p}:n={type:"ordgroup",mode:"math",body:p}}else break}return n||a?{type:"supsub",mode:this.mode,base:r,sup:n,sub:a}:r}parseFunction(t,r){var n=this.fetch(),a=n.text,i=Rc[a];if(!i)return null;if(this.consume(),r&&r!=="atom"&&!i.allowedInArgument)throw new nt("Got function '"+a+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!i.allowedInText)throw new nt("Can't use function '"+a+"' in text mode",n);if(this.mode==="math"&&i.allowedInMath===!1)throw new nt("Can't use function '"+a+"' in math mode",n);var{args:s,optArgs:o}=this.parseArguments(a,i);return this.callFunction(a,s,o,n,t)}callFunction(t,r,n,a,i){var s={funcName:t,parser:this,token:a,breakOnTokenText:i},o=Rc[t];if(o&&o.handler)return o.handler(s,r,n);throw new nt("No function handler for "+t)}parseArguments(t,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var a=[],i=[],s=0;s<n;s++){var o=r.argTypes&&r.argTypes[s],l=s<r.numOptionalArgs;(r.primitive&&o==null||r.type==="sqrt"&&s===1&&i[0]==null)&&(o="primitive");var c=this.parseGroupOfType("argument to '"+t+"'",o,l);if(l)i.push(c);else if(c!=null)a.push(c);else throw new nt("Null argument, please report this as a bug")}return{args:a,optArgs:i}}parseGroupOfType(t,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var a=this.parseArgumentGroup(n,"text");return a!=null?{type:"styling",mode:a.mode,body:[a],style:"text"}:null}case"raw":{var i=this.parseStringGroup("raw",n);return i!=null?{type:"raw",mode:"text",string:i.text}:null}case"primitive":{if(n)throw new nt("A primitive argument cannot be optional");var s=this.parseGroup(t);if(s==null)throw new nt("Expected group as "+t,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new nt("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var a="",i;(i=this.fetch()).text!=="EOF";)a+=i.text,this.consume();return this.consume(),n.text=a,n}parseRegexGroup(t,r){for(var n=this.fetch(),a=n,i="",s;(s=this.fetch()).text!=="EOF"&&t.test(i+s.text);)a=s,i+=a.text,this.consume();if(i==="")throw new nt("Invalid "+r+": '"+n.text+"'",n);return n.range(a,i)}parseColorGroup(t){var r=this.parseStringGroup("color",t);if(r==null)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new nt("Invalid color: '"+r.text+"'",r);var a=n[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}}parseSizeGroup(t){var r,n=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",t),!r)return null;!t&&r.text.length===0&&(r.text="0pt",n=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!a)throw new nt("Invalid size: '"+r.text+"'",r);var i={number:+(a[1]+a[2]),unit:a[3]};if(!Iae(i))throw new nt("Invalid unit: '"+i.unit+"'",r);return{type:"size",mode:this.mode,value:i,isBlank:n}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(t,r){var n=this.gullet.scanArgument(t);if(n==null)return null;var a=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:n.loc,body:i};return r&&this.switchMode(a),s}parseGroup(t,r){var n=this.fetch(),a=n.text,i;if(a==="{"||a==="\\begingroup"){this.consume();var s=a==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,s),l=this.fetch();this.expect(s),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:Ci.range(n,l),body:o,semisimple:a==="\\begingroup"||void 0}}else if(i=this.parseFunction(r,t)||this.parseSymbol(),i==null&&a[0]==="\\"&&!Sie.hasOwnProperty(a)){if(this.settings.throwOnError)throw new nt("Undefined control sequence: "+a,n);i=this.formatUnsupportedCmd(a),this.consume()}return i}formLigatures(t){for(var r=t.length-1,n=0;n<r;++n){var a=t[n],i=a.text;i==="-"&&t[n+1].text==="-"&&(n+1<r&&t[n+2].text==="-"?(t.splice(n,3,{type:"textord",mode:"text",loc:Ci.range(a,t[n+2]),text:"---"}),r-=2):(t.splice(n,2,{type:"textord",mode:"text",loc:Ci.range(a,t[n+1]),text:"--"}),r-=1)),(i==="'"||i==="`")&&t[n+1].text===i&&(t.splice(n,2,{type:"textord",mode:"text",loc:Ci.range(a,t[n+1]),text:i+i}),r-=1)}}parseSymbol(){var t=this.fetch(),r=t.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),a=n.charAt(0)==="*";if(a&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new nt(`\\verb assertion failed --
                    please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:a}}Hj.hasOwnProperty(r[0])&&!Wr[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',t),r=Hj[r[0]]+r.slice(1));var i=$5e.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var s;if(Wr[this.mode][r]){this.settings.strict&&this.mode==="math"&&n6.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var o=Wr[this.mode][r].group,l=Ci.range(t),c;if(LMe.hasOwnProperty(o)){var u=o;c={type:"atom",mode:this.mode,family:u,loc:l,text:r}}else c={type:o,mode:this.mode,loc:l,text:r};s=c}else if(r.charCodeAt(0)>=128)this.settings.strict&&(Oae(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),s={type:"textord",mode:"text",loc:Ci.range(t),text:r};else return null;if(this.consume(),i)for(var f=0;f<i[0].length;f++){var p=i[0][f];if(!DE[p])throw new nt("Unknown accent ' "+p+"'",t);var m=DE[p][this.mode]||DE[p].text;if(!m)throw new nt("Accent "+p+" unsupported in "+this.mode+" mode",t);s={type:"accent",mode:this.mode,loc:Ci.range(t),label:m,isStretchy:!1,isShifty:!0,base:s}}return s}}Fx.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var LO=function(t,r){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Fx(t,r);delete n.gullet.macros.current["\\df@tag"];var a=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new nt("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:n.subparse([new cs("\\df@tag")])}]}return a},Cie=function(t,r,n){r.textContent="";var a=PO(t,n).toNode();r.appendChild(a)};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."),Cie=function(){throw new nt("KaTeX doesn't work in quirks mode.")});var K5e=function(t,r){var n=PO(t,r).toMarkup();return n},X5e=function(t,r){var n=new vO(r);return LO(t,n)},Tie=function(t,r,n){if(n.throwOnError||!(t instanceof nt))throw t;var a=Ie.makeSpan(["katex-error"],[new fs(r)]);return a.setAttribute("title",t.toString()),a.setAttribute("style","color:"+n.errorColor),a},PO=function(t,r){var n=new vO(r);try{var a=LO(t,n);return a5e(a,t,n)}catch(i){return Tie(i,t,n)}},Y5e=function(t,r){var n=new vO(r);try{var a=LO(t,n);return i5e(a,t,n)}catch(i){return Tie(i,t,n)}},Z5e="0.16.22",Q5e={Span:Vm,Anchor:yO,SymbolNode:fs,SvgNode:Nl,PathNode:Hc,LineNode:r6},Gj={version:Z5e,render:Cie,renderToString:K5e,ParseError:nt,SETTINGS_SCHEMA:W1,__parse:X5e,__renderToDomTree:PO,__renderToHTMLTree:Y5e,__setFontMetrics:AMe,__defineSymbol:G,__defineFunction:ht,__defineMacro:ie,__domTree:Q5e};const J5e={};function e6e(e){const t=this,r=e||J5e,n=t.data(),a=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);a.push(QRe(r)),i.push(HRe()),s.push(GRe(r))}function Vj(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,a=r.indexOf(t);for(;a!==-1;)n++,a=r.indexOf(t,a+t.length);return n}function t6e(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function r6e(e,t,r){const a=$m((r||{}).ignore||[]),i=n6e(t);let s=-1;for(;++s<i.length;)pO(e,"text",o);function o(c,u){let f=-1,p;for(;++f<u.length;){const m=u[f],b=p?p.children:void 0;if(a(m,b?b.indexOf(m):void 0,p))return;p=m}if(p)return l(c,u)}function l(c,u){const f=u[u.length-1],p=i[s][0],m=i[s][1];let b=0;const y=f.children.indexOf(c);let _=!1,S=[];p.lastIndex=0;let C=p.exec(c.value);for(;C;){const T=C.index,A={index:C.index,input:C.input,stack:[...u,c]};let k=m(...C,A);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?p.lastIndex=T+1:(b!==T&&S.push({type:"text",value:c.value.slice(b,T)}),Array.isArray(k)?S.push(...k):k&&S.push(k),b=T+C[0].length,_=!0),!p.global)break;C=p.exec(c.value)}return _?(b<c.value.length&&S.push({type:"text",value:c.value.slice(b)}),f.children.splice(y,1,...S)):S=[c],y+S.length}}function n6e(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const a=r[n];t.push([a6e(a[0]),i6e(a[1])])}return t}function a6e(e){return typeof e=="string"?new RegExp(t6e(e),"g"):e}function i6e(e){return typeof e=="function"?e:function(){return e}}const OE="phrasing",IE=["autolink","link","image","label"];function s6e(){return{transforms:[h6e],enter:{literalAutolink:l6e,literalAutolinkEmail:LE,literalAutolinkHttp:LE,literalAutolinkWww:LE},exit:{literalAutolink:f6e,literalAutolinkEmail:d6e,literalAutolinkHttp:c6e,literalAutolinkWww:u6e}}}function o6e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:OE,notInConstruct:IE},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:OE,notInConstruct:IE},{character:":",before:"[ps]",after:"\\/",inConstruct:OE,notInConstruct:IE}]}}function l6e(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function LE(e){this.config.enter.autolinkProtocol.call(this,e)}function c6e(e){this.config.exit.autolinkProtocol.call(this,e)}function u6e(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 d6e(e){this.config.exit.autolinkEmail.call(this,e)}function f6e(e){this.exit(e)}function h6e(e){r6e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,p6e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),m6e]],{ignore:["link","linkReference"]})}function p6e(e,t,r,n,a){let i="";if(!Aie(a)||(/^w/i.test(t)&&(r=t+r,t="",i="http://"),!g6e(r)))return!1;const s=v6e(r+n);if(!s[0])return!1;const o={type:"link",title:null,url:i+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function m6e(e,t,r,n){return!Aie(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function g6e(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 v6e(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const a=Vj(e,"(");let i=Vj(e,")");for(;n!==-1&&a>i;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),i++;return[e,r]}function Aie(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Yu(r)||Ax(r))&&(!t||r!==47)}kie.peek=T6e;function b6e(){this.buffer()}function x6e(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function y6e(){this.buffer()}function _6e(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function w6e(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Fs(this.sliceSerialize(e)).toLowerCase(),r.label=t}function E6e(e){this.exit(e)}function S6e(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Fs(this.sliceSerialize(e)).toLowerCase(),r.label=t}function C6e(e){this.exit(e)}function T6e(){return"["}function kie(e,t,r,n){const a=r.createTracker(n);let i=a.move("[^");const s=r.enter("footnoteReference"),o=r.enter("reference");return i+=a.move(r.safe(r.associationId(e),{after:"]",before:i})),o(),s(),i+=a.move("]"),i}function A6e(){return{enter:{gfmFootnoteCallString:b6e,gfmFootnoteCall:x6e,gfmFootnoteDefinitionLabelString:y6e,gfmFootnoteDefinition:_6e},exit:{gfmFootnoteCallString:w6e,gfmFootnoteCall:E6e,gfmFootnoteDefinitionLabelString:S6e,gfmFootnoteDefinition:C6e}}}function k6e(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:kie},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,a,i,s){const o=i.createTracker(s);let l=o.move("[^");const c=i.enter("footnoteDefinition"),u=i.enter("label");return l+=o.move(i.safe(i.associationId(n),{before:l,after:"]"})),u(),l+=o.move("]:"),n.children&&n.children.length>0&&(o.shift(4),l+=o.move((t?`
`:" ")+i.indentLines(i.containerFlow(n,o.current()),t?Nie:N6e))),c(),l}}function N6e(e,t,r){return t===0?e:Nie(e,t,r)}function Nie(e,t,r){return(r?"":"    ")+e}const R6e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Rie.peek=L6e;function M6e(){return{canContainEols:["delete"],enter:{strikethrough:O6e},exit:{strikethrough:I6e}}}function D6e(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:R6e}],handlers:{delete:Rie}}}function O6e(e){this.enter({type:"delete",children:[]},e)}function I6e(e){this.exit(e)}function Rie(e,t,r,n){const a=r.createTracker(n),i=r.enter("strikethrough");let s=a.move("~~");return s+=r.containerPhrasing(e,{...a.current(),before:s,after:"~"}),s+=a.move("~~"),i(),s}function L6e(){return"~"}function P6e(e){return e.length}function F6e(e,t){const r=t||{},n=(r.align||[]).concat(),a=r.stringLength||P6e,i=[],s=[],o=[],l=[];let c=0,u=-1;for(;++u<e.length;){const v=[],y=[];let _=-1;for(e[u].length>c&&(c=e[u].length);++_<e[u].length;){const S=B6e(e[u][_]);if(r.alignDelimiters!==!1){const C=a(S);y[_]=C,(l[_]===void 0||C>l[_])&&(l[_]=C)}v.push(S)}s[u]=v,o[u]=y}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<c;)i[f]=Wj(n[f]);else{const v=Wj(n);for(;++f<c;)i[f]=v}f=-1;const p=[],m=[];for(;++f<c;){const v=i[f];let y="",_="";v===99?(y=":",_=":"):v===108?y=":":v===114&&(_=":");let S=r.alignDelimiters===!1?1:Math.max(1,l[f]-y.length-_.length);const C=y+"-".repeat(S)+_;r.alignDelimiters!==!1&&(S=y.length+S+_.length,S>l[f]&&(l[f]=S),m[f]=S),p[f]=C}s.splice(1,0,p),o.splice(1,0,m),u=-1;const b=[];for(;++u<s.length;){const v=s[u],y=o[u];f=-1;const _=[];for(;++f<c;){const S=v[f]||"";let C="",T="";if(r.alignDelimiters!==!1){const A=l[f]-(y[f]||0),k=i[f];k===114?C=" ".repeat(A):k===99?A%2?(C=" ".repeat(A/2+.5),T=" ".repeat(A/2-.5)):(C=" ".repeat(A/2),T=C):T=" ".repeat(A)}r.delimiterStart!==!1&&!f&&_.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&S==="")&&(r.delimiterStart!==!1||f)&&_.push(" "),r.alignDelimiters!==!1&&_.push(C),_.push(S),r.alignDelimiters!==!1&&_.push(T),r.padding!==!1&&_.push(" "),(r.delimiterEnd!==!1||f!==c-1)&&_.push("|")}b.push(r.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return b.join(`
`)}function B6e(e){return e==null?"":String(e)}function Wj(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function z6e(e,t,r,n){const a=r.enter("blockquote"),i=r.createTracker(n);i.move("> "),i.shift(2);const s=r.indentLines(r.containerFlow(e,i.current()),j6e);return a(),s}function j6e(e,t,r){return">"+(r?"":" ")+e}function q6e(e,t){return Kj(e,t.inConstruct,!0)&&!Kj(e,t.notInConstruct,!1)}function Kj(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Xj(e,t,r,n){let a=-1;for(;++a<r.unsafe.length;)if(r.unsafe[a].character===`
`&&q6e(r.stack,r.unsafe[a]))return/[ \t]/.test(n.before)?"":" ";return`\\
`}function U6e(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function $6e(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 H6e(e,t,r,n){const a=$6e(r),i=e.value||"",s=a==="`"?"GraveAccent":"Tilde";if(U6e(e,r)){const f=r.enter("codeIndented"),p=r.indentLines(i,G6e);return f(),p}const o=r.createTracker(n),l=a.repeat(Math.max(Mae(i,a)+1,3)),c=r.enter("codeFenced");let u=o.move(l);if(e.lang){const f=r.enter(`codeFencedLang${s}`);u+=o.move(r.safe(e.lang,{before:u,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=r.enter(`codeFencedMeta${s}`);u+=o.move(" "),u+=o.move(r.safe(e.meta,{before:u,after:`
`,encode:["`"],...o.current()})),f()}return u+=o.move(`
`),i&&(u+=o.move(i+`
`)),u+=o.move(l),c(),u}function G6e(e,t,r){return(r?"":"    ")+e}function FO(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 V6e(e,t,r,n){const a=FO(r),i=a==='"'?"Quote":"Apostrophe",s=r.enter("definition");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("[");return c+=l.move(r.safe(r.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":`
`,...l.current()}))),o(),e.title&&(o=r.enter(`title${i}`),c+=l.move(" "+a),c+=l.move(r.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),o()),s(),c}function W6e(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function em(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Sb(e,t,r){const n=t0(e),a=t0(t);return n===void 0?a===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Mie.peek=K6e;function Mie(e,t,r,n){const a=W6e(r),i=r.enter("emphasis"),s=r.createTracker(n),o=s.move(a);let l=s.move(r.containerPhrasing(e,{after:a,before:o,...s.current()}));const c=l.charCodeAt(0),u=Sb(n.before.charCodeAt(n.before.length-1),c,a);u.inside&&(l=em(c)+l.slice(1));const f=l.charCodeAt(l.length-1),p=Sb(n.after.charCodeAt(0),f,a);p.inside&&(l=l.slice(0,-1)+em(f));const m=s.move(a);return i(),r.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},o+l+m}function K6e(e,t,r){return r.options.emphasis||"*"}function X6e(e,t){let r=!1;return mO(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,Y5}),!!((!e.depth||e.depth<3)&&oO(e)&&(t.options.setext||r))}function Y6e(e,t,r,n){const a=Math.max(Math.min(6,e.depth||1),1),i=r.createTracker(n);if(X6e(e,r)){const u=r.enter("headingSetext"),f=r.enter("phrasing"),p=r.containerPhrasing(e,{...i.current(),before:`
`,after:`
`});return f(),u(),p+`
`+(a===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
`))+1))}const s="#".repeat(a),o=r.enter("headingAtx"),l=r.enter("phrasing");i.move(s+" ");let c=r.containerPhrasing(e,{before:"# ",after:`
`,...i.current()});return/^[\t ]/.test(c)&&(c=em(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,r.options.closeAtx&&(c+=" "+s),l(),o(),c}Die.peek=Z6e;function Die(e){return e.value||""}function Z6e(){return"<"}Oie.peek=Q6e;function Oie(e,t,r,n){const a=FO(r),i=a==='"'?"Quote":"Apostrophe",s=r.enter("image");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("![");return c+=l.move(r.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=r.enter(`title${i}`),c+=l.move(" "+a),c+=l.move(r.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),o()),c+=l.move(")"),s(),c}function Q6e(){return"!"}Iie.peek=J6e;function Iie(e,t,r,n){const a=e.referenceType,i=r.enter("imageReference");let s=r.enter("label");const o=r.createTracker(n);let l=o.move("![");const c=r.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),s();const u=r.stack;r.stack=[],s=r.enter("reference");const f=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return s(),r.stack=u,i(),a==="full"||!c||c!==f?l+=o.move(f+"]"):a==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function J6e(){return"!"}Lie.peek=eDe;function Lie(e,t,r){let n=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(n);)a+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++i<r.unsafe.length;){const s=r.unsafe[i],o=r.compilePattern(s);let l;if(s.atBreak)for(;l=o.exec(n);){let c=l.index;n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(l.index+1)}}return a+n+a}function eDe(){return"`"}function Pie(e,t){const r=oO(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Fie.peek=tDe;function Fie(e,t,r,n){const a=FO(r),i=a==='"'?"Quote":"Apostrophe",s=r.createTracker(n);let o,l;if(Pie(e,r)){const u=r.stack;r.stack=[],o=r.enter("autolink");let f=s.move("<");return f+=s.move(r.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),o(),r.stack=u,f}o=r.enter("link"),l=r.enter("label");let c=s.move("[");return c+=s.move(r.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(r.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=r.enter("destinationRaw"),c+=s.move(r.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=r.enter(`title${i}`),c+=s.move(" "+a),c+=s.move(r.safe(e.title,{before:c,after:a,...s.current()})),c+=s.move(a),l()),c+=s.move(")"),o(),c}function tDe(e,t,r){return Pie(e,r)?"<":"["}Bie.peek=rDe;function Bie(e,t,r,n){const a=e.referenceType,i=r.enter("linkReference");let s=r.enter("label");const o=r.createTracker(n);let l=o.move("[");const c=r.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),s();const u=r.stack;r.stack=[],s=r.enter("reference");const f=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return s(),r.stack=u,i(),a==="full"||!c||c!==f?l+=o.move(f+"]"):a==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function rDe(){return"["}function BO(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 nDe(e){const t=BO(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function aDe(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 zie(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 iDe(e,t,r,n){const a=r.enter("list"),i=r.bulletCurrent;let s=e.ordered?aDe(r):BO(r);const o=e.ordered?s==="."?")":".":nDe(r);let l=t&&r.bulletLastUsed?s===r.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&u&&(!u.children||!u.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),zie(r)===s&&u){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=o),r.bulletCurrent=s;const c=r.containerFlow(e,n);return r.bulletLastUsed=s,r.bulletCurrent=i,a(),c}function sDe(e){const t=e.options.listItemIndent||"one";if(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 oDe(e,t,r,n){const a=sDe(r);let i=r.bulletCurrent||BO(r);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let s=i.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=r.createTracker(n);o.move(i+" ".repeat(s-i.length)),o.shift(s);const l=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,o.current()),u);return l(),c;function u(f,p,m){return p?(m?"":" ".repeat(s))+f:(m?i:i+" ".repeat(s-i.length))+f}}function lDe(e,t,r,n){const a=r.enter("paragraph"),i=r.enter("phrasing"),s=r.containerPhrasing(e,n);return i(),a(),s}const cDe=$m(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uDe(e,t,r,n){return(e.children.some(function(s){return cDe(s)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function dDe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}jie.peek=fDe;function jie(e,t,r,n){const a=dDe(r),i=r.enter("strong"),s=r.createTracker(n),o=s.move(a+a);let l=s.move(r.containerPhrasing(e,{after:a,before:o,...s.current()}));const c=l.charCodeAt(0),u=Sb(n.before.charCodeAt(n.before.length-1),c,a);u.inside&&(l=em(c)+l.slice(1));const f=l.charCodeAt(l.length-1),p=Sb(n.after.charCodeAt(0),f,a);p.inside&&(l=l.slice(0,-1)+em(f));const m=s.move(a+a);return i(),r.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},o+l+m}function fDe(e,t,r){return r.options.strong||"*"}function hDe(e,t,r,n){return r.safe(e.value,n)}function pDe(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 mDe(e,t,r){const n=(zie(r)+(r.options.ruleSpaces?" ":"")).repeat(pDe(r));return r.options.ruleSpaces?n.slice(0,-1):n}const qie={blockquote:z6e,break:Xj,code:H6e,definition:V6e,emphasis:Mie,hardBreak:Xj,heading:Y6e,html:Die,image:Oie,imageReference:Iie,inlineCode:Lie,link:Fie,linkReference:Bie,list:iDe,listItem:oDe,paragraph:lDe,root:uDe,strong:jie,text:hDe,thematicBreak:mDe};function gDe(){return{enter:{table:vDe,tableData:Yj,tableHeader:Yj,tableRow:xDe},exit:{codeText:yDe,table:bDe,tableData:PE,tableHeader:PE,tableRow:PE}}}function vDe(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function bDe(e){this.exit(e),this.data.inTable=void 0}function xDe(e){this.enter({type:"tableRow",children:[]},e)}function PE(e){this.exit(e)}function Yj(e){this.enter({type:"tableCell",children:[]},e)}function yDe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,_De));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function _De(e,t){return t==="|"?t:e}function wDe(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,a=t.stringLength,i=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:l,tableRow:o}};function s(m,b,v,y){return c(u(m,v,y),m.align)}function o(m,b,v,y){const _=f(m,v,y),S=c([_]);return S.slice(0,S.indexOf(`
`))}function l(m,b,v,y){const _=v.enter("tableCell"),S=v.enter("phrasing"),C=v.containerPhrasing(m,{...y,before:i,after:i});return S(),_(),C}function c(m,b){return F6e(m,{align:b,alignDelimiters:n,padding:r,stringLength:a})}function u(m,b,v){const y=m.children;let _=-1;const S=[],C=b.enter("table");for(;++_<y.length;)S[_]=f(y[_],b,v);return C(),S}function f(m,b,v){const y=m.children;let _=-1;const S=[],C=b.enter("tableRow");for(;++_<y.length;)S[_]=l(y[_],m,b,v);return C(),S}function p(m,b,v){let y=qie.inlineCode(m,b,v);return v.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function EDe(){return{exit:{taskListCheckValueChecked:Zj,taskListCheckValueUnchecked:Zj,paragraph:CDe}}}function SDe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:TDe}}}function Zj(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function CDe(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const a=t.children;let i=-1,s;for(;++i<a.length;){const o=a[i];if(o.type==="paragraph"){s=o;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function TDe(e,t,r,n){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=r.createTracker(n);i&&o.move(s);let l=qie.listItem(e,t,r,{...n,...o.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+s}}function ADe(){return[s6e(),A6e(),M6e(),gDe(),EDe()]}function kDe(e){return{extensions:[o6e(),k6e(e),D6e(),wDe(e),SDe()]}}const NDe={tokenize:LDe,partial:!0},Uie={tokenize:PDe,partial:!0},$ie={tokenize:FDe,partial:!0},Hie={tokenize:BDe,partial:!0},RDe={tokenize:zDe,partial:!0},Gie={name:"wwwAutolink",tokenize:ODe,previous:Wie},Vie={name:"protocolAutolink",tokenize:IDe,previous:Kie},ql={name:"emailAutolink",tokenize:DDe,previous:Xie},Bo={};function MDe(){return{text:Bo}}let wu=48;for(;wu<123;)Bo[wu]=ql,wu++,wu===58?wu=65:wu===91&&(wu=97);Bo[43]=ql;Bo[45]=ql;Bo[46]=ql;Bo[95]=ql;Bo[72]=[ql,Vie];Bo[104]=[ql,Vie];Bo[87]=[ql,Gie];Bo[119]=[ql,Gie];function DDe(e,t,r){const n=this;let a,i;return s;function s(f){return!c6(f)||!Xie.call(n,n.previous)||zO(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return c6(f)?(e.consume(f),o):f===64?(e.consume(f),l):r(f)}function l(f){return f===46?e.check(RDe,u,c)(f):f===45||f===95||wa(f)?(i=!0,e.consume(f),l):u(f)}function c(f){return e.consume(f),a=!0,l}function u(f){return i&&a&&Oa(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function ODe(e,t,r){const n=this;return a;function a(s){return s!==87&&s!==119||!Wie.call(n,n.previous)||zO(n.events)?r(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(NDe,e.attempt(Uie,e.attempt($ie,i),r),r)(s))}function i(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function IDe(e,t,r){const n=this;let a="",i=!1;return s;function s(f){return(f===72||f===104)&&Kie.call(n,n.previous)&&!zO(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(f),e.consume(f),o):r(f)}function o(f){if(Oa(f)&&a.length<5)return a+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const p=a.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return r(f)}function l(f){return f===47?(e.consume(f),i?c:(i=!0,l)):r(f)}function c(f){return f===null||gb(f)||qr(f)||Yu(f)||Ax(f)?r(f):e.attempt(Uie,e.attempt($ie,u),r)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function LDe(e,t,r){let n=0;return a;function a(s){return(s===87||s===119)&&n<3?(n++,e.consume(s),a):s===46&&n===3?(e.consume(s),i):r(s)}function i(s){return s===null?r(s):t(s)}}function PDe(e,t,r){let n,a,i;return s;function s(c){return c===46||c===95?e.check(Hie,l,o)(c):c===null||qr(c)||Yu(c)||c!==45&&Ax(c)?l(c):(i=!0,e.consume(c),s)}function o(c){return c===95?n=!0:(a=n,n=void 0),e.consume(c),s}function l(c){return a||n||!i?r(c):t(c)}}function FDe(e,t){let r=0,n=0;return a;function a(s){return s===40?(r++,e.consume(s),a):s===41&&n<r?i(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Hie,t,i)(s):s===null||qr(s)||Yu(s)?t(s):(e.consume(s),a)}function i(s){return s===41&&n++,e.consume(s),a}}function BDe(e,t,r){return n;function n(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),n):o===38?(e.consume(o),i):o===93?(e.consume(o),a):o===60||o===null||qr(o)||Yu(o)?t(o):r(o)}function a(o){return o===null||o===40||o===91||qr(o)||Yu(o)?t(o):n(o)}function i(o){return Oa(o)?s(o):r(o)}function s(o){return o===59?(e.consume(o),n):Oa(o)?(e.consume(o),s):r(o)}}function zDe(e,t,r){return n;function n(i){return e.consume(i),a}function a(i){return wa(i)?r(i):t(i)}}function Wie(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||qr(e)}function Kie(e){return!Oa(e)}function Xie(e){return!(e===47||c6(e))}function c6(e){return e===43||e===45||e===46||e===95||wa(e)}function zO(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const jDe={tokenize:KDe,partial:!0};function qDe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:GDe,continuation:{tokenize:VDe},exit:WDe}},text:{91:{name:"gfmFootnoteCall",tokenize:HDe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:UDe,resolveTo:$De}}}}function UDe(e,t,r){const n=this;let a=n.events.length;const i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s;for(;a--;){const l=n.events[a][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!s||!s._balanced)return r(l);const c=Fs(n.sliceSerialize({start:s.end,end:n.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function $De(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},o=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...o),e}function HDe(e,t,r){const n=this,a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(i>999||f===93&&!s||f===null||f===91||qr(f))return r(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return a.includes(Fs(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return qr(f)||(s=!0),i++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),i++,c):c(f)}}function GDe(e,t,r){const n=this,a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i,s=0,o;return l;function l(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):r(b)}function u(b){if(s>999||b===93&&!o||b===null||b===91||qr(b))return r(b);if(b===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return i=Fs(n.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return qr(b)||(o=!0),s++,e.consume(b),b===92?f:u}function f(b){return b===91||b===92||b===93?(e.consume(b),s++,u):u(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),a.includes(i)||a.push(i),or(e,m,"gfmFootnoteDefinitionWhitespace")):r(b)}function m(b){return t(b)}}function VDe(e,t,r){return e.check(Um,t,e.attempt(jDe,t,r))}function WDe(e){e.exit("gfmFootnoteDefinition")}function KDe(e,t,r){const n=this;return or(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(i):r(i)}}function XDe(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:i,resolveAll:a};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function a(s,o){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},f={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},p=[["enter",u,o],["enter",s[c][1],o],["exit",s[c][1],o],["enter",f,o]],m=o.parser.constructs.insideSpan.null;m&&Li(p,p.length,0,kx(m,s.slice(c+1,l),o)),Li(p,p.length,0,[["exit",f,o],["enter",s[l][1],o],["exit",s[l][1],o],["exit",u,o]]),Li(s,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function i(s,o,l){const c=this.previous,u=this.events;let f=0;return p;function p(b){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(b):(s.enter("strikethroughSequenceTemporary"),m(b))}function m(b){const v=t0(c);if(b===126)return f>1?l(b):(s.consume(b),f++,m);if(f<2&&!r)return l(b);const y=s.exit("strikethroughSequenceTemporary"),_=t0(b);return y._open=!_||_===2&&!!v,y._close=!v||v===2&&!!_,o(b)}}}class YDe{constructor(){this.map=[]}add(t,r,n){ZDe(this,t,r,n)}consume(t){if(this.map.sort(function(i,s){return i[0]-s[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let a=n.pop();for(;a;){for(const i of a)t.push(i);a=n.pop()}this.map.length=0}}function ZDe(e,t,r,n){let a=0;if(!(r===0&&n.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=r,e.map[a][2].push(...n);return}a+=1}e.map.push([t,r,n])}}function QDe(e,t){let r=!1;const n=[];for(;t<e.length;){const a=e[t];if(r){if(a[0]==="enter")a[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=n.length-1;n[i]=n[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function JDe(){return{flow:{null:{name:"table",tokenize:eOe,resolveAll:tOe}}}}function eOe(e,t,r){const n=this;let a=0,i=0,s;return o;function o(P){let H=n.events.length-1;for(;H>-1;){const j=n.events[H][1].type;if(j==="lineEnding"||j==="linePrefix")H--;else break}const B=H>-1?n.events[H][1].type:null,K=B==="tableHead"||B==="tableRow"?k:l;return K===k&&n.parser.lazy[n.now().line]?r(P):K(P)}function l(P){return e.enter("tableHead"),e.enter("tableRow"),c(P)}function c(P){return P===124||(s=!0,i+=1),u(P)}function u(P){return P===null?r(P):Tt(P)?i>1?(i=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),m):r(P):ur(P)?or(e,u,"whitespace")(P):(i+=1,s&&(s=!1,a+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),s=!0,u):(e.enter("data"),f(P)))}function f(P){return P===null||P===124||qr(P)?(e.exit("data"),u(P)):(e.consume(P),P===92?p:f)}function p(P){return P===92||P===124?(e.consume(P),f):f(P)}function m(P){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(P):(e.enter("tableDelimiterRow"),s=!1,ur(P)?or(e,b,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):b(P))}function b(P){return P===45||P===58?y(P):P===124?(s=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),v):A(P)}function v(P){return ur(P)?or(e,y,"whitespace")(P):y(P)}function y(P){return P===58?(i+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),_):P===45?(i+=1,_(P)):P===null||Tt(P)?T(P):A(P)}function _(P){return P===45?(e.enter("tableDelimiterFiller"),S(P)):A(P)}function S(P){return P===45?(e.consume(P),S):P===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(P))}function C(P){return ur(P)?or(e,T,"whitespace")(P):T(P)}function T(P){return P===124?b(P):P===null||Tt(P)?!s||a!==i?A(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):A(P)}function A(P){return r(P)}function k(P){return e.enter("tableRow"),N(P)}function N(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),N):P===null||Tt(P)?(e.exit("tableRow"),t(P)):ur(P)?or(e,N,"whitespace")(P):(e.enter("data"),L(P))}function L(P){return P===null||P===124||qr(P)?(e.exit("data"),N(P)):(e.consume(P),P===92?I:L)}function I(P){return P===92||P===124?(e.consume(P),L):L(P)}}function tOe(e,t){let r=-1,n=!0,a=0,i=[0,0,0,0],s=[0,0,0,0],o=!1,l=0,c,u,f;const p=new YDe;for(;++r<e.length;){const m=e[r],b=m[1];m[0]==="enter"?b.type==="tableHead"?(o=!1,l!==0&&(Qj(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(r,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(n=!0,f=void 0,i=[0,0,0,0],s=[0,r+1,0,0],o&&(o=!1,u={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(r,0,[["enter",u,t]])),a=b.type==="tableDelimiterRow"?2:u?3:1):a&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(i[1]!==0&&(s[0]=s[1],f=Qv(p,t,i,a,void 0,f),i=[0,0,0,0]),s[2]=r)):b.type==="tableCellDivider"&&(n?n=!1:(i[1]!==0&&(s[0]=s[1],f=Qv(p,t,i,a,void 0,f)),i=s,s=[i[1],r,0,0])):b.type==="tableHead"?(o=!0,l=r):b.type==="tableRow"||b.type==="tableDelimiterRow"?(l=r,i[1]!==0?(s[0]=s[1],f=Qv(p,t,i,a,r,f)):s[1]!==0&&(f=Qv(p,t,s,a,r,f)),a=0):a&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=r)}for(l!==0&&Qj(p,t,l,c,u),p.consume(t.events),r=-1;++r<t.events.length;){const m=t.events[r];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=QDe(t.events,r))}return e}function Qv(e,t,r,n,a,i){const s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(i.end=Object.assign({},Ef(t.events,r[0])),e.add(r[0],0,[["exit",i,t]]));const l=Ef(t.events,r[1]);if(i={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",i,t]]),r[2]!==0){const c=Ef(t.events,r[2]),u=Ef(t.events,r[3]),f={type:o,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){const p=t.events[r[2]],m=t.events[r[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){const b=r[2]+1,v=r[3]-r[2]-1;e.add(b,v,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return a!==void 0&&(i.end=Object.assign({},Ef(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function Qj(e,t,r,n,a){const i=[],s=Ef(t.events,r);a&&(a.end=Object.assign({},s),i.push(["exit",a,t])),n.end=Object.assign({},s),i.push(["exit",n,t]),e.add(r+1,0,i)}function Ef(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const rOe={name:"tasklistCheck",tokenize:aOe};function nOe(){return{text:{91:rOe}}}function aOe(e,t,r){const n=this;return a;function a(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return qr(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):r(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(l)}function o(l){return Tt(l)?t(l):ur(l)?e.check({tokenize:iOe},t,r)(l):r(l)}}function iOe(e,t,r){return or(e,n,"whitespace");function n(a){return a===null?r(a):t(a)}}function sOe(e){return uae([MDe(),qDe(),XDe(e),JDe(),nOe()])}const oOe={};function lOe(e){const t=this,r=e||oOe,n=t.data(),a=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);a.push(sOe(r)),i.push(ADe()),s.push(kDe(r))}const Jj=/[#.]/g;function cOe(e,t){const r=e||"",n={};let a=0,i,s;for(;a<r.length;){Jj.lastIndex=a;const o=Jj.exec(r),l=r.slice(a,o?o.index:r.length);l&&(i?i==="#"?n.id=l:Array.isArray(n.className)?n.className.push(l):n.className=[l]:s=l,a+=l.length),o&&(i=o[0],a++)}return{type:"element",tagName:s||t||"div",properties:n,children:[]}}function Yie(e,t,r){const n=r?hOe(r):void 0;function a(i,s,...o){let l;if(i==null){l={type:"root",children:[]};const c=s;o.unshift(c)}else{l=cOe(i,t);const c=l.tagName.toLowerCase(),u=n?n.get(c):void 0;if(l.tagName=u||c,uOe(s))o.unshift(s);else for(const[f,p]of Object.entries(s))dOe(e,l.properties,f,p)}for(const c of o)u6(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return a}function uOe(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const a=t[n];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const i=a;for(const s of i)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function dOe(e,t,r,n){const a=tae(e,r);let i;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;i=n}else typeof n=="boolean"?i=n:typeof n=="string"?a.spaceSeparated?i=Mz(n):a.commaSeparated?i=Tz(n):a.commaOrSpaceSeparated?i=Mz(Tz(n).join(" ")):i=eq(a,a.property,n):Array.isArray(n)?i=[...n]:i=a.property==="style"?fOe(n):String(n);if(Array.isArray(i)){const s=[];for(const o of i)s.push(eq(a,a.property,o));i=s}a.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[a.property]=i}}function u6(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 r of t)u6(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?u6(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function eq(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||Yp(r)===Yp(t)))return!0}return r}function fOe(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function hOe(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const pOe=["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"],mOe=Yie(rae,"div"),gOe=Yie(Tx,"g",pOe),FE={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function vOe(e,t){return Zie(e,{})||{type:"root",children:[]}}function Zie(e,t){const r=bOe(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function bOe(e,t){switch(e.nodeType){case 1:return wOe(e,t);case 3:return yOe(e);case 8:return _Oe(e);case 9:return tq(e,t);case 10:return xOe();case 11:return tq(e,t);default:return}}function tq(e,t){return{type:"root",children:Qie(e,t)}}function xOe(){return{type:"doctype"}}function yOe(e){return{type:"text",value:e.nodeValue||""}}function _Oe(e){return{type:"comment",value:e.nodeValue||""}}function wOe(e,t){const r=e.namespaceURI,n=r===FE.svg?gOe:mOe,a=r===FE.html?e.tagName.toLowerCase():e.tagName,i=r===FE.html&&a==="template"?e.content:e,s=e.getAttributeNames(),o={};let l=-1;for(;++l<s.length;)o[s[l]]=e.getAttribute(s[l])||"";return n(a,o,Qie(i,t))}function Qie(e,t){const r=e.childNodes,n=[];let a=-1;for(;++a<r.length;){const i=Zie(r[a],t);i!==void 0&&n.push(i)}return n}new DOMParser;function EOe(e,t){const r=SOe(e);return vOe(r)}function SOe(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const rq=(function(e,t,r){const n=$m(r);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(n(e.children[t],t,e))return e.children[t]}),hd=(function(e){if(e==null)return AOe;if(typeof e=="string")return TOe(e);if(typeof e=="object")return COe(e);if(typeof e=="function")return jO(e);throw new Error("Expected function, string, or array as `test`")});function COe(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=hd(e[r]);return jO(n);function n(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function TOe(e){return jO(t);function t(r){return r.tagName===e}}function jO(e){return t;function t(r,n,a){return!!(kOe(r)&&e.call(this,r,typeof n=="number"?n:void 0,a||void 0))}}function AOe(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function kOe(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const nq=/\n/g,aq=/[\t ]+/g,d6=hd("br"),iq=hd(POe),NOe=hd("p"),sq=hd("tr"),ROe=hd(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",LOe,FOe]),Jie=hd(["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 MOe(e,t){const r=t||{},n="children"in e?e.children:[],a=Jie(e),i=rse(e,{whitespace:r.whitespace||"normal"}),s=[];(e.type==="text"||e.type==="comment")&&s.push(...tse(e,{breakBefore:!0,breakAfter:!0}));let o=-1;for(;++o<n.length;)s.push(...ese(n[o],e,{whitespace:i,breakBefore:o?void 0:a,breakAfter:o<n.length-1?d6(n[o+1]):a}));const l=[];let c;for(o=-1;++o<s.length;){const u=s[o];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
`.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function ese(e,t,r){return e.type==="element"?DOe(e,t,r):e.type==="text"?r.whitespace==="normal"?tse(e,r):OOe(e):[]}function DOe(e,t,r){const n=rse(e,r),a=e.children||[];let i=-1,s=[];if(ROe(e))return s;let o,l;for(d6(e)||sq(e)&&rq(t,e,sq)?l=`
`:NOe(e)?(o=2,l=2):Jie(e)&&(o=1,l=1);++i<a.length;)s=s.concat(ese(a[i],e,{whitespace:n,breakBefore:i?void 0:o,breakAfter:i<a.length-1?d6(a[i+1]):l}));return iq(e)&&rq(t,e,iq)&&s.push("	"),o&&s.unshift(o),l&&s.push(l),s}function tse(e,t){const r=String(e.value),n=[],a=[];let i=0;for(;i<=r.length;){nq.lastIndex=i;const l=nq.exec(r),c=l&&"index"in l?l.index:r.length;n.push(IOe(r.slice(i,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),i===0?t.breakBefore:!0,c===r.length?t.breakAfter:!0)),i=c+1}let s=-1,o;for(;++s<n.length;)n[s].charCodeAt(n[s].length-1)===8203||s<n.length-1&&n[s+1].charCodeAt(0)===8203?(a.push(n[s]),o=void 0):n[s]?(typeof o=="number"&&a.push(o),a.push(n[s]),o=0):(s===0||s===n.length-1)&&a.push(0);return a}function OOe(e){return[String(e.value)]}function IOe(e,t,r){const n=[];let a=0,i;for(;a<e.length;){aq.lastIndex=a;const s=aq.exec(e);i=s?s.index:e.length,!a&&!i&&s&&!t&&n.push(""),a!==i&&n.push(e.slice(a,i)),a=s?i+s[0].length:i}return a!==i&&!r&&n.push(""),n.join(" ")}function rse(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function LOe(e){return!!(e.properties||{}).hidden}function POe(e){return e.tagName==="td"||e.tagName==="th"}function FOe(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const BOe={},zOe=[];function jOe(e){const t=e||BOe;return function(r,n){pO(r,"element",function(a,i){const s=Array.isArray(a.properties.className)?a.properties.className:zOe,o=s.includes("language-math"),l=s.includes("math-display"),c=s.includes("math-inline");let u=l;if(!o&&!l&&!c)return;let f=i[i.length-1],p=a;if(a.tagName==="code"&&o&&f&&f.type==="element"&&f.tagName==="pre"&&(p=f,f=i[i.length-2],u=!0),!f)return;const m=MOe(p,{whitespace:"pre"});let b;try{b=Gj.renderToString(m,{...t,displayMode:u,throwOnError:!0})}catch(y){const _=y,S=_.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...i,a],cause:_,place:a.position,ruleId:S,source:"rehype-katex"});try{b=Gj.renderToString(m,{...t,displayMode:u,strict:"ignore",throwOnError:!1})}catch{b=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(y)},children:[{type:"text",value:m}]}]}}typeof b=="string"&&(b=EOe(b).children);const v=f.children.indexOf(p);return f.children.splice(v,1,...b),Nae})}}var BE={},Eu={},oq={},zE={exports:{}},lq;function qO(){if(lq)return zE.exports;lq=1;var e=zE.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();return typeof __g=="number"&&(__g=e),zE.exports}var jE={exports:{}},cq;function UO(){if(cq)return jE.exports;cq=1;var e=jE.exports={version:"2.6.12"};return typeof __e=="number"&&(__e=e),jE.exports}var qE,uq;function qOe(){return uq||(uq=1,qE=function(e){if(typeof e!="function")throw TypeError(e+" is not a function!");return e}),qE}var UE,dq;function UOe(){if(dq)return UE;dq=1;var e=qOe();return UE=function(t,r,n){if(e(t),r===void 0)return t;switch(n){case 1:return function(a){return t.call(r,a)};case 2:return function(a,i){return t.call(r,a,i)};case 3:return function(a,i,s){return t.call(r,a,i,s)}}return function(){return t.apply(r,arguments)}},UE}var $E={},HE,fq;function $O(){return fq||(fq=1,HE=function(e){return typeof e=="object"?e!==null:typeof e=="function"}),HE}var GE,hq;function $Oe(){if(hq)return GE;hq=1;var e=$O();return GE=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t},GE}var VE,pq;function HO(){return pq||(pq=1,VE=function(e){try{return!!e()}catch{return!0}}),VE}var WE,mq;function Bx(){return mq||(mq=1,WE=!HO()(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})),WE}var KE,gq;function HOe(){if(gq)return KE;gq=1;var e=$O(),t=qO().document,r=e(t)&&e(t.createElement);return KE=function(n){return r?t.createElement(n):{}},KE}var XE,vq;function GOe(){return vq||(vq=1,XE=!Bx()&&!HO()(function(){return Object.defineProperty(HOe()("div"),"a",{get:function(){return 7}}).a!=7})),XE}var YE,bq;function VOe(){if(bq)return YE;bq=1;var e=$O();return YE=function(t,r){if(!e(t))return t;var n,a;if(r&&typeof(n=t.toString)=="function"&&!e(a=n.call(t))||typeof(n=t.valueOf)=="function"&&!e(a=n.call(t))||!r&&typeof(n=t.toString)=="function"&&!e(a=n.call(t)))return a;throw TypeError("Can't convert object to primitive value")},YE}var xq;function WOe(){if(xq)return $E;xq=1;var e=$Oe(),t=GOe(),r=VOe(),n=Object.defineProperty;return $E.f=Bx()?Object.defineProperty:function(i,s,o){if(e(i),s=r(s,!0),e(o),t)try{return n(i,s,o)}catch{}if("get"in o||"set"in o)throw TypeError("Accessors not supported!");return"value"in o&&(i[s]=o.value),i},$E}var ZE,yq;function KOe(){return yq||(yq=1,ZE=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),ZE}var QE,_q;function XOe(){if(_q)return QE;_q=1;var e=WOe(),t=KOe();return QE=Bx()?function(r,n,a){return e.f(r,n,t(1,a))}:function(r,n,a){return r[n]=a,r},QE}var JE,wq;function nse(){if(wq)return JE;wq=1;var e={}.hasOwnProperty;return JE=function(t,r){return e.call(t,r)},JE}var eS,Eq;function YOe(){if(Eq)return eS;Eq=1;var e=qO(),t=UO(),r=UOe(),n=XOe(),a=nse(),i="prototype",s=function(o,l,c){var u=o&s.F,f=o&s.G,p=o&s.S,m=o&s.P,b=o&s.B,v=o&s.W,y=f?t:t[l]||(t[l]={}),_=y[i],S=f?e:p?e[l]:(e[l]||{})[i],C,T,A;f&&(c=l);for(C in c)T=!u&&S&&S[C]!==void 0,!(T&&a(y,C))&&(A=T?S[C]:c[C],y[C]=f&&typeof S[C]!="function"?c[C]:b&&T?r(A,e):v&&S[C]==A?(function(k){var N=function(L,I,P){if(this instanceof k){switch(arguments.length){case 0:return new k;case 1:return new k(L);case 2:return new k(L,I)}return new k(L,I,P)}return k.apply(this,arguments)};return N[i]=k[i],N})(A):m&&typeof A=="function"?r(Function.call,A):A,m&&((y.virtual||(y.virtual={}))[C]=A,o&s.R&&_&&!_[C]&&n(_,C,A)))};return s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,eS=s,eS}var tS,Sq;function ZOe(){if(Sq)return tS;Sq=1;var e={}.toString;return tS=function(t){return e.call(t).slice(8,-1)},tS}var rS,Cq;function ase(){if(Cq)return rS;Cq=1;var e=ZOe();return rS=Object("z").propertyIsEnumerable(0)?Object:function(t){return e(t)=="String"?t.split(""):Object(t)},rS}var nS,Tq;function ise(){return Tq||(Tq=1,nS=function(e){if(e==null)throw TypeError("Can't call method on  "+e);return e}),nS}var aS,Aq;function sse(){if(Aq)return aS;Aq=1;var e=ase(),t=ise();return aS=function(r){return e(t(r))},aS}var iS,kq;function ose(){if(kq)return iS;kq=1;var e=Math.ceil,t=Math.floor;return iS=function(r){return isNaN(r=+r)?0:(r>0?t:e)(r)},iS}var sS,Nq;function QOe(){if(Nq)return sS;Nq=1;var e=ose(),t=Math.min;return sS=function(r){return r>0?t(e(r),9007199254740991):0},sS}var oS,Rq;function JOe(){if(Rq)return oS;Rq=1;var e=ose(),t=Math.max,r=Math.min;return oS=function(n,a){return n=e(n),n<0?t(n+a,0):r(n,a)},oS}var lS,Mq;function eIe(){if(Mq)return lS;Mq=1;var e=sse(),t=QOe(),r=JOe();return lS=function(n){return function(a,i,s){var o=e(a),l=t(o.length),c=r(s,l),u;if(n&&i!=i){for(;l>c;)if(u=o[c++],u!=u)return!0}else for(;l>c;c++)if((n||c in o)&&o[c]===i)return n||c||0;return!n&&-1}},lS}var cS={exports:{}},uS,Dq;function tIe(){return Dq||(Dq=1,uS=!0),uS}var Oq;function rIe(){if(Oq)return cS.exports;Oq=1;var e=UO(),t=qO(),r="__core-js_shared__",n=t[r]||(t[r]={});return(cS.exports=function(a,i){return n[a]||(n[a]=i!==void 0?i:{})})("versions",[]).push({version:e.version,mode:tIe()?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"}),cS.exports}var dS,Iq;function nIe(){if(Iq)return dS;Iq=1;var e=0,t=Math.random();return dS=function(r){return"Symbol(".concat(r===void 0?"":r,")_",(++e+t).toString(36))},dS}var fS,Lq;function aIe(){if(Lq)return fS;Lq=1;var e=rIe()("keys"),t=nIe();return fS=function(r){return e[r]||(e[r]=t(r))},fS}var hS,Pq;function iIe(){if(Pq)return hS;Pq=1;var e=nse(),t=sse(),r=eIe()(!1),n=aIe()("IE_PROTO");return hS=function(a,i){var s=t(a),o=0,l=[],c;for(c in s)c!=n&&e(s,c)&&l.push(c);for(;i.length>o;)e(s,c=i[o++])&&(~r(l,c)||l.push(c));return l},hS}var pS,Fq;function sIe(){return Fq||(Fq=1,pS="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")),pS}var mS,Bq;function oIe(){if(Bq)return mS;Bq=1;var e=iIe(),t=sIe();return mS=Object.keys||function(n){return e(n,t)},mS}var gS={},zq;function lIe(){return zq||(zq=1,gS.f=Object.getOwnPropertySymbols),gS}var vS={},jq;function cIe(){return jq||(jq=1,vS.f={}.propertyIsEnumerable),vS}var bS,qq;function uIe(){if(qq)return bS;qq=1;var e=ise();return bS=function(t){return Object(e(t))},bS}var xS,Uq;function dIe(){if(Uq)return xS;Uq=1;var e=Bx(),t=oIe(),r=lIe(),n=cIe(),a=uIe(),i=ase(),s=Object.assign;return xS=!s||HO()(function(){var o={},l={},c=Symbol(),u="abcdefghijklmnopqrst";return o[c]=7,u.split("").forEach(function(f){l[f]=f}),s({},o)[c]!=7||Object.keys(s({},l)).join("")!=u})?function(l,c){for(var u=a(l),f=arguments.length,p=1,m=r.f,b=n.f;f>p;)for(var v=i(arguments[p++]),y=m?t(v).concat(m(v)):t(v),_=y.length,S=0,C;_>S;)C=y[S++],(!e||b.call(v,C))&&(u[C]=v[C]);return u}:s,xS}var $q;function fIe(){if($q)return oq;$q=1;var e=YOe();return e(e.S+e.F,"Object",{assign:dIe()}),oq}var yS,Hq;function hIe(){return Hq||(Hq=1,fIe(),yS=UO().Object.assign),yS}var _S,Gq;function GO(){return Gq||(Gq=1,_S={default:hIe(),__esModule:!0}),_S}var Jv={},Vq;function pIe(){if(Vq)return Jv;Vq=1,Jv.__esModule=!0;var e=GO(),t=r(e);function r(n){return n&&n.__esModule?n:{default:n}}return Jv.default=t.default||function(n){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},Jv}var Wq;function lse(){if(Wq)return Eu;Wq=1,Object.defineProperty(Eu,"__esModule",{value:!0});var e=GO(),t=s(e),r=pIe(),n=s(r);Eu.createStyleObject=o,Eu.createClassNameString=l,Eu.createChildren=c,Eu.default=u;var a=Do(),i=s(a);function s(f){return f&&f.__esModule?f:{default:f}}function o(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments[2];return f.reduce(function(b,v){return(0,n.default)({},b,m[v])},p)}function l(f){return f.join(" ")}function c(f,p){var m=0;return function(b){return m+=1,b.map(function(v,y){return u({node:v,stylesheet:f,useInlineStyles:p,key:"code-segment-"+m+"-"+y})})}}function u(f){var p=f.node,m=f.stylesheet,b=f.style,v=b===void 0?{}:b,y=f.useInlineStyles,_=f.key,S=p.properties,C=p.type,T=p.tagName,A=p.value;if(C==="text")return A;if(T){var k=c(m,y),N=y?{style:o(S.className,(0,t.default)({},S.style,v),m)}:{className:l(S.className)},L=k(p.children);return i.default.createElement(T,(0,n.default)({key:_},N),L)}}return Eu}var e1={},t1={},Kq;function mIe(){return Kq||(Kq=1,t1.__esModule=!0,t1.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}),t1}var Xq;function gIe(){if(Xq)return e1;Xq=1,Object.defineProperty(e1,"__esModule",{value:!0});var e=GO(),t=l(e),r=mIe(),n=l(r);e1.default=function(_,S){return function(T){var A=T.language,k=T.children,N=T.style,L=N===void 0?S:N,I=T.customStyle,P=I===void 0?{}:I,H=T.codeTagProps,B=H===void 0?{}:H,K=T.useInlineStyles,j=K===void 0?!0:K,W=T.showLineNumbers,D=W===void 0?!1:W,U=T.startingLineNumber,Y=U===void 0?1:U,z=T.lineNumberContainerStyle,M=T.lineNumberStyle,Q=T.wrapLines,q=T.lineStyle,F=q===void 0?{}:q,V=T.renderer,Z=T.PreTag,ee=Z===void 0?"pre":Z,te=T.CodeTag,oe=te===void 0?"code":te,pe=T.code,he=pe===void 0?Array.isArray(k)?k[0]:k:pe,ke=(0,n.default)(T,["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","lineStyle","renderer","PreTag","CodeTag","code"]);Q=V&&Q===void 0?!0:Q,V=V||y;var se=A&&_.getLanguage(A)?_.highlight(A,he):_.highlightAuto(he);(se.language===null||A==="text")&&(se.value=[{type:"text",value:he}]);var qe=L.hljs||{backgroundColor:"#fff"},$e=j?(0,t.default)({},ke,{style:(0,t.default)({},qe,P)}):(0,t.default)({},ke,{className:"hljs"}),Pe=Q?v(se,F):se.value,Ce=D?i.default.createElement(p,{containerStyle:z,numberStyle:M,startingLineNumber:Y,codeString:he}):null;return i.default.createElement(ee,$e,Ce,i.default.createElement(oe,B,V({rows:Pe,stylesheet:L,useInlineStyles:j})))}};var a=Do(),i=l(a),s=lse(),o=l(s);function l(_){return _&&_.__esModule?_:{default:_}}var c=/\n/g;function u(_){return _.match(c)}function f(_){var S=_.lines,C=_.startingLineNumber,T=_.style;return S.map(function(A,k){var N=k+C;return i.default.createElement("span",{key:"line-"+k,className:"react-syntax-highlighter-line-number",style:typeof T=="function"?T(N):T},N+`
`)})}function p(_){var S=_.codeString,C=_.containerStyle,T=C===void 0?{float:"left",paddingRight:"10px"}:C,A=_.numberStyle,k=A===void 0?{}:A,N=_.startingLineNumber;return i.default.createElement("code",{style:T},f({lines:S.replace(/\n$/,"").split(`
`),style:k,startingLineNumber:N}))}function m(_){var S=_.children,C=_.lineNumber,T=_.lineStyle,A=_.className,k=A===void 0?[]:A;return{type:"element",tagName:"span",properties:{className:k,style:typeof T=="function"?T(C):T},children:S}}function b(_){for(var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],T=0;T<_.length;T++){var A=_[T];if(A.type==="text")C.push(m({children:[A],className:S}));else if(A.children){var k=S.concat(A.properties.className);C=C.concat(b(A.children,k))}}return C}function v(_,S){for(var C=b(_.value),T=[],A=-1,k=0,N=function(){var P=C[k],H=P.children[0].value,B=u(H);B&&(function(){var K=H.split(`
`);K.forEach(function(j,W){var D=T.length+1,U={type:"text",value:j+`
`};if(W===0){var Y=C.slice(A+1,k).concat(m({children:[U],className:P.properties.className}));T.push(m({children:Y,lineNumber:D,lineStyle:S}))}else if(W===K.length-1){var z=C[k+1]&&C[k+1].children&&C[k+1].children[0];if(z){var M={type:"text",value:""+j},Q=m({children:[M],className:P.properties.className});C.splice(k+1,0,Q)}else T.push(m({children:[U],lineNumber:D,lineStyle:S}))}else T.push(m({children:[U],lineNumber:D,lineStyle:S}))}),A=k})(),k++};k<C.length;)N();if(A!==C.length-1){var L=C.slice(A+1,C.length);L&&L.length&&T.push(m({children:L,lineNumber:T.length+1,lineStyle:S}))}return T}function y(_){var S=_.rows,C=_.stylesheet,T=_.useInlineStyles;return S.map(function(A,k){return(0,o.default)({node:A,stylesheet:C,useInlineStyles:T,key:"code-segement"+k})})}return e1}var r1={},Yq;function vIe(){return Yq||(Yq=1,Object.defineProperty(r1,"__esModule",{value:!0}),r1.default={hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#F0F0F0",color:"#444"},"hljs-subst":{color:"#444"},"hljs-comment":{color:"#888888"},"hljs-keyword":{fontWeight:"bold"},"hljs-attribute":{fontWeight:"bold"},"hljs-selector-tag":{fontWeight:"bold"},"hljs-meta-keyword":{fontWeight:"bold"},"hljs-doctag":{fontWeight:"bold"},"hljs-name":{fontWeight:"bold"},"hljs-type":{color:"#880000"},"hljs-string":{color:"#880000"},"hljs-number":{color:"#880000"},"hljs-selector-id":{color:"#880000"},"hljs-selector-class":{color:"#880000"},"hljs-quote":{color:"#880000"},"hljs-template-tag":{color:"#880000"},"hljs-deletion":{color:"#880000"},"hljs-title":{color:"#880000",fontWeight:"bold"},"hljs-section":{color:"#880000",fontWeight:"bold"},"hljs-regexp":{color:"#BC6060"},"hljs-symbol":{color:"#BC6060"},"hljs-variable":{color:"#BC6060"},"hljs-template-variable":{color:"#BC6060"},"hljs-link":{color:"#BC6060"},"hljs-selector-attr":{color:"#BC6060"},"hljs-selector-pseudo":{color:"#BC6060"},"hljs-literal":{color:"#78A960"},"hljs-built_in":{color:"#397300"},"hljs-bullet":{color:"#397300"},"hljs-code":{color:"#397300"},"hljs-addition":{color:"#397300"},"hljs-meta":{color:"#1f7199"},"hljs-meta-string":{color:"#4d99bf"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}}),r1}var wS={},Zq;function bIe(){return Zq||(Zq=1,(function(e){(function(t){t(e)})(function(t){var r=[],n=Object.keys,a={},i={},s=/^(no-?highlight|plain|text)$/i,o=/\blang(?:uage)?-([\w-]+)\b/i,l=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,c="</span>",u={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function f(D){return D.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function p(D){return D.nodeName.toLowerCase()}function m(D,U){var Y=D&&D.exec(U);return Y&&Y.index===0}function b(D){return s.test(D)}function v(D){var U,Y,z,M,Q=D.className+" ";if(Q+=D.parentNode?D.parentNode.className:"",Y=o.exec(Q),Y)return W(Y[1])?Y[1]:"no-highlight";for(Q=Q.split(/\s+/),U=0,z=Q.length;U<z;U++)if(M=Q[U],b(M)||W(M))return M}function y(D){var U,Y={},z=Array.prototype.slice.call(arguments,1);for(U in D)Y[U]=D[U];return z.forEach(function(M){for(U in M)Y[U]=M[U]}),Y}function _(D){var U=[];return(function Y(z,M){for(var Q=z.firstChild;Q;Q=Q.nextSibling)Q.nodeType===3?M+=Q.nodeValue.length:Q.nodeType===1&&(U.push({event:"start",offset:M,node:Q}),M=Y(Q,M),p(Q).match(/br|hr|img|input/)||U.push({event:"stop",offset:M,node:Q}));return M})(D,0),U}function S(D,U,Y){var z=0,M="",Q=[];function q(){return!D.length||!U.length?D.length?D:U:D[0].offset!==U[0].offset?D[0].offset<U[0].offset?D:U:U[0].event==="start"?D:U}function F(te){function oe(pe){return" "+pe.nodeName+'="'+f(pe.value).replace('"',"&quot;")+'"'}M+="<"+p(te)+r.map.call(te.attributes,oe).join("")+">"}function V(te){M+="</"+p(te)+">"}function Z(te){(te.event==="start"?F:V)(te.node)}for(;D.length||U.length;){var ee=q();if(M+=f(Y.substring(z,ee[0].offset)),z=ee[0].offset,ee===D){Q.reverse().forEach(V);do Z(ee.splice(0,1)[0]),ee=q();while(ee===D&&ee.length&&ee[0].offset===z);Q.reverse().forEach(F)}else ee[0].event==="start"?Q.push(ee[0].node):Q.pop(),Z(ee.splice(0,1)[0])}return M+f(Y.substr(z))}function C(D){return D.variants&&!D.cached_variants&&(D.cached_variants=D.variants.map(function(U){return y(D,{variants:null},U)})),D.cached_variants||D.endsWithParent&&[y(D)]||[D]}function T(D){function U(M){return M&&M.source||M}function Y(M,Q){return new RegExp(U(M),"m"+(D.case_insensitive?"i":"")+(Q?"g":""))}function z(M,Q){if(!M.compiled){if(M.compiled=!0,M.keywords=M.keywords||M.beginKeywords,M.keywords){var q={},F=function(Z,ee){D.case_insensitive&&(ee=ee.toLowerCase()),ee.split(" ").forEach(function(te){var oe=te.split("|");q[oe[0]]=[Z,oe[1]?Number(oe[1]):1]})};typeof M.keywords=="string"?F("keyword",M.keywords):n(M.keywords).forEach(function(Z){F(Z,M.keywords[Z])}),M.keywords=q}M.lexemesRe=Y(M.lexemes||/\w+/,!0),Q&&(M.beginKeywords&&(M.begin="\\b("+M.beginKeywords.split(" ").join("|")+")\\b"),M.begin||(M.begin=/\B|\b/),M.beginRe=Y(M.begin),!M.end&&!M.endsWithParent&&(M.end=/\B|\b/),M.end&&(M.endRe=Y(M.end)),M.terminator_end=U(M.end)||"",M.endsWithParent&&Q.terminator_end&&(M.terminator_end+=(M.end?"|":"")+Q.terminator_end)),M.illegal&&(M.illegalRe=Y(M.illegal)),M.relevance==null&&(M.relevance=1),M.contains||(M.contains=[]),M.contains=Array.prototype.concat.apply([],M.contains.map(function(Z){return C(Z==="self"?M:Z)})),M.contains.forEach(function(Z){z(Z,M)}),M.starts&&z(M.starts,Q);var V=M.contains.map(function(Z){return Z.beginKeywords?"\\.?("+Z.begin+")\\.?":Z.begin}).concat([M.terminator_end,M.illegal]).map(U).filter(Boolean);M.terminators=V.length?Y(V.join("|"),!0):{exec:function(){return null}}}}z(D)}function A(D,U,Y,z){function M(Ue,Le){var Ye,De;for(Ye=0,De=Le.contains.length;Ye<De;Ye++)if(m(Le.contains[Ye].beginRe,Ue))return Le.contains[Ye]}function Q(Ue,Le){if(m(Ue.endRe,Le)){for(;Ue.endsParent&&Ue.parent;)Ue=Ue.parent;return Ue}if(Ue.endsWithParent)return Q(Ue.parent,Le)}function q(Ue,Le){return!Y&&m(Le.illegalRe,Ue)}function F(Ue,Le){var Ye=he.case_insensitive?Le[0].toLowerCase():Le[0];return Ue.keywords.hasOwnProperty(Ye)&&Ue.keywords[Ye]}function V(Ue,Le,Ye,De){var Ve=De?"":u.classPrefix,lt='<span class="'+Ve,Ee=Ye?"":c;return lt+=Ue+'">',lt+Le+Ee}function Z(){var Ue,Le,Ye,De;if(!ke.keywords)return f(Pe);for(De="",Le=0,ke.lexemesRe.lastIndex=0,Ye=ke.lexemesRe.exec(Pe);Ye;)De+=f(Pe.substring(Le,Ye.index)),Ue=F(ke,Ye),Ue?(Ce+=Ue[1],De+=V(Ue[0],f(Ye[0]))):De+=f(Ye[0]),Le=ke.lexemesRe.lastIndex,Ye=ke.lexemesRe.exec(Pe);return De+f(Pe.substr(Le))}function ee(){var Ue=typeof ke.subLanguage=="string";if(Ue&&!a[ke.subLanguage])return f(Pe);var Le=Ue?A(ke.subLanguage,Pe,!0,se[ke.subLanguage]):k(Pe,ke.subLanguage.length?ke.subLanguage:void 0);return ke.relevance>0&&(Ce+=Le.relevance),Ue&&(se[ke.subLanguage]=Le.top),V(Le.language,Le.value,!1,!0)}function te(){qe+=ke.subLanguage!=null?ee():Z(),Pe=""}function oe(Ue){qe+=Ue.className?V(Ue.className,"",!0):"",ke=Object.create(Ue,{parent:{value:ke}})}function pe(Ue,Le){if(Pe+=Ue,Le==null)return te(),0;var Ye=M(Le,ke);if(Ye)return Ye.skip?Pe+=Le:(Ye.excludeBegin&&(Pe+=Le),te(),!Ye.returnBegin&&!Ye.excludeBegin&&(Pe=Le)),oe(Ye),Ye.returnBegin?0:Le.length;var De=Q(ke,Le);if(De){var Ve=ke;Ve.skip?Pe+=Le:(Ve.returnEnd||Ve.excludeEnd||(Pe+=Le),te(),Ve.excludeEnd&&(Pe=Le));do ke.className&&(qe+=c),ke.skip||(Ce+=ke.relevance),ke=ke.parent;while(ke!==De.parent);return De.starts&&oe(De.starts),Ve.returnEnd?0:Le.length}if(q(Le,ke))throw new Error('Illegal lexeme "'+Le+'" for mode "'+(ke.className||"<unnamed>")+'"');return Pe+=Le,Le.length||1}var he=W(D);if(!he)throw new Error('Unknown language: "'+D+'"');T(he);var ke=z||he,se={},qe="",$e;for($e=ke;$e!==he;$e=$e.parent)$e.className&&(qe=V($e.className,"",!0)+qe);var Pe="",Ce=0;try{for(var xe,ve,Ne=0;ke.terminators.lastIndex=Ne,xe=ke.terminators.exec(U),!!xe;)ve=pe(U.substring(Ne,xe.index),xe[0]),Ne=xe.index+ve;for(pe(U.substr(Ne)),$e=ke;$e.parent;$e=$e.parent)$e.className&&(qe+=c);return{relevance:Ce,value:qe,language:D,top:ke}}catch(Ue){if(Ue.message&&Ue.message.indexOf("Illegal")!==-1)return{relevance:0,value:f(U)};throw Ue}}function k(D,U){U=U||u.languages||n(a);var Y={relevance:0,value:f(D)},z=Y;return U.filter(W).forEach(function(M){var Q=A(M,D,!1);Q.language=M,Q.relevance>z.relevance&&(z=Q),Q.relevance>Y.relevance&&(z=Y,Y=Q)}),z.language&&(Y.second_best=z),Y}function N(D){return u.tabReplace||u.useBR?D.replace(l,function(U,Y){return u.useBR&&U===`
`?"<br>":u.tabReplace?Y.replace(/\t/g,u.tabReplace):""}):D}function L(D,U,Y){var z=U?i[U]:Y,M=[D.trim()];return D.match(/\bhljs\b/)||M.push("hljs"),D.indexOf(z)===-1&&M.push(z),M.join(" ").trim()}function I(D){var U,Y,z,M,Q,q=v(D);b(q)||(u.useBR?(U=document.createElementNS("http://www.w3.org/1999/xhtml","div"),U.innerHTML=D.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,`
`)):U=D,Q=U.textContent,z=q?A(q,Q,!0):k(Q),Y=_(U),Y.length&&(M=document.createElementNS("http://www.w3.org/1999/xhtml","div"),M.innerHTML=z.value,z.value=S(Y,_(M),Q)),z.value=N(z.value),D.innerHTML=z.value,D.className=L(D.className,q,z.language),D.result={language:z.language,re:z.relevance},z.second_best&&(D.second_best={language:z.second_best.language,re:z.second_best.relevance}))}function P(D){u=y(u,D)}function H(){if(!H.called){H.called=!0;var D=document.querySelectorAll("pre code");r.forEach.call(D,I)}}function B(){addEventListener("DOMContentLoaded",H,!1),addEventListener("load",H,!1)}function K(D,U){var Y=a[D]=U(t);Y.aliases&&Y.aliases.forEach(function(z){i[z]=D})}function j(){return n(a)}function W(D){return D=(D||"").toLowerCase(),a[D]||a[i[D]]}return t.highlight=A,t.highlightAuto=k,t.fixMarkup=N,t.highlightBlock=I,t.configure=P,t.initHighlighting=H,t.initHighlightingOnLoad=B,t.registerLanguage=K,t.listLanguages=j,t.getLanguage=W,t.inherit=y,t.IDENT_RE="[a-zA-Z]\\w*",t.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",t.NUMBER_RE="\\b\\d+(\\.\\d+)?",t.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",t.BINARY_NUMBER_RE="\\b(0b[01]+)",t.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",t.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},t.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},t.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},t.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},t.COMMENT=function(D,U,Y){var z=t.inherit({className:"comment",begin:D,end:U,contains:[]},Y||{});return z.contains.push(t.PHRASAL_WORDS_MODE),z.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),z},t.C_LINE_COMMENT_MODE=t.COMMENT("//","$"),t.C_BLOCK_COMMENT_MODE=t.COMMENT("/\\*","\\*/"),t.HASH_COMMENT_MODE=t.COMMENT("#","$"),t.NUMBER_MODE={className:"number",begin:t.NUMBER_RE,relevance:0},t.C_NUMBER_MODE={className:"number",begin:t.C_NUMBER_RE,relevance:0},t.BINARY_NUMBER_MODE={className:"number",begin:t.BINARY_NUMBER_RE,relevance:0},t.CSS_NUMBER_MODE={className:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},t.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[t.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[t.BACKSLASH_ESCAPE]}]},t.TITLE_MODE={className:"title",begin:t.IDENT_RE,relevance:0},t.UNDERSCORE_TITLE_MODE={className:"title",begin:t.UNDERSCORE_IDENT_RE,relevance:0},t.METHOD_GUARD={begin:"\\.\\s*"+t.UNDERSCORE_IDENT_RE,relevance:0},t})})(wS)),wS}var ES={exports:{}},Qq;function xIe(){return Qq||(Qq=1,(function(e){(function(){var t;t=e.exports=a,t.format=a,t.vsprintf=n,typeof console<"u"&&typeof console.log=="function"&&(t.printf=r);function r(){console.log(a.apply(null,arguments))}function n(i,s){return a.apply(null,[i].concat(s))}function a(i){for(var s=1,o=[].slice.call(arguments),l=0,c=i.length,u="",f,p=!1,m,b,v=!1,y,_=function(){return o[s++]},S=function(){for(var C="";/\d/.test(i[l]);)C+=i[l++],f=i[l];return C.length>0?parseInt(C):null};l<c;++l)if(f=i[l],p)switch(p=!1,f=="."?(v=!1,f=i[++l]):f=="0"&&i[l+1]=="."?(v=!0,l+=2,f=i[l]):v=!0,y=S(),f){case"b":u+=parseInt(_(),10).toString(2);break;case"c":m=_(),typeof m=="string"||m instanceof String?u+=m:u+=String.fromCharCode(parseInt(m,10));break;case"d":u+=parseInt(_(),10);break;case"f":b=String(parseFloat(_()).toFixed(y||6)),u+=v?b:b.replace(/^0/,"");break;case"j":u+=JSON.stringify(_());break;case"o":u+="0"+parseInt(_(),10).toString(8);break;case"s":u+=_();break;case"x":u+="0x"+parseInt(_(),10).toString(16);break;case"X":u+="0x"+parseInt(_(),10).toString(16).toUpperCase();break;default:u+=f;break}else f==="%"?p=!0:u+=f;return u}})()})(ES)),ES.exports}var SS,Jq;function yIe(){if(Jq)return SS;Jq=1;var e=xIe(),t=r(Error);SS=t,t.eval=r(EvalError),t.range=r(RangeError),t.reference=r(ReferenceError),t.syntax=r(SyntaxError),t.type=r(TypeError),t.uri=r(URIError),t.create=r;function r(n){return a.displayName=n.displayName||n.name,a;function a(i){return i&&(i=e.apply(null,arguments)),new n(i)}}return SS}var CS,eU;function _Ie(){if(eU)return CS;eU=1;var e=bIe(),t=yIe();function r(){}r.prototype=e;var n=new r;CS=n,n.highlight=C,n.highlightAuto=S,n.registerLanguage=T,n.getLanguage=H;var a=e.inherit,i={}.hasOwnProperty,s=[].concat,o="hljs-",l="case_insensitive",c="cached_variants",u=" ",f="|",p="element",m="text",b="span",v=[],y={},_={};function S(B,K){var j=K||{},W=j.subset||v,D=j.prefix,U=W.length,Y=-1,z,M,Q,q;if(D==null&&(D=o),typeof B!="string")throw t("Expected `string` for value, got `%s`",B);for(M=L({}),z=L({});++Y<U;)q=W[Y],H(q)&&(Q=L(A(q,B,!1,D)),Q.language=q,Q.relevance>M.relevance&&(M=Q),Q.relevance>z.relevance&&(M=z,z=Q));return M.language&&(z.secondBest=M),z}function C(B,K,j){var W=j||{},D=W.prefix;return D==null&&(D=o),L(A(B,K,!0,D))}function T(B,K){var j=K(n),W=j.aliases,D=W&&W.length,U=-1;for(y[B]=j,v.push(B);++U<D;)_[W[U]]=B}function A(B,K,j,W,D){var U={},Y=[],z="",M=0,Q,q,F,V,Z,ee,te,oe;if(typeof B!="string")throw t("Expected `string` for name, got `%s`",B);if(typeof K!="string")throw t("Expected `string` for value, got `%s`",K);if(Q=H(B),q=D||Q,oe=[],F=q,V=oe,!Q)throw t("Unknown language: `%s` is not registered",B);N(Q);try{for(q.terminators.lastIndex=0,Z=0,te=q.terminators.exec(K);te;)ee=pe(K.substring(Z,te.index),te[0]),Z=te.index+ee,q.terminators.lastIndex=Z,te=q.terminators.exec(K);for(pe(K.substr(Z)),F=q;F.parent;)F.className&&Ye(),F=F.parent;return{relevance:M,value:V,language:B,top:q}}catch(De){if(De.message.indexOf("Illegal")===-1)throw De;return{relevance:0,value:Pe(K,[])}}function pe(De,Ve){var lt,Ee,Ae;if(z+=De,Ve===void 0)return $e(ke(),V),0;if(lt=Le(Ve,q),lt)return $e(ke(),V),he(lt,Ve),lt.returnBegin?0:Ve.length;if(Ee=Ue(q,Ve),Ee){Ae=q,Ae.returnEnd||Ae.excludeEnd||(z+=Ve),$e(ke(),V);do q.className&&Ye(),M+=q.relevance,q=q.parent;while(q!==Ee.parent);return Ae.excludeEnd&&Pe(Ve,V),z="",Ee.starts&&he(Ee.starts,""),Ae.returnEnd?0:Ve.length}if(Ne(Ve,q))throw t('Illegal lexeme "%s" for mode "%s"',Ve,q.className||"<unnamed>");return z+=Ve,Ve.length||1}function he(De,Ve){var lt;De.className&&(lt=xe(De.className,[])),De.returnBegin?z="":De.excludeBegin?(Pe(Ve,V),z=""):z=Ve,lt&&(V.push(lt),Y.push(V),V=lt.children),q=Object.create(De,{parent:{value:q}})}function ke(){var De=q.subLanguage?se():qe();return z="",De}function se(){var De=typeof q.subLanguage=="string",Ve;return De&&!y[q.subLanguage]?Pe(z,[]):(De?Ve=A(q.subLanguage,z,!0,W,U[q.subLanguage]):Ve=S(z,{subset:q.subLanguage.length?q.subLanguage:void 0,prefix:W}),q.relevance>0&&(M+=Ve.relevance),De&&(U[q.subLanguage]=Ve.top),[xe(Ve.language,Ve.value,!0)])}function qe(){var De=[],Ve,lt,Ee,Ae;if(!q.keywords)return Pe(z,De);for(Ve=0,q.lexemesRe.lastIndex=0,lt=q.lexemesRe.exec(z);lt;)Pe(z.substring(Ve,lt.index),De),Ae=ve(q,lt),Ae?(M+=Ae[1],Ee=xe(Ae[0],[]),De.push(Ee),Pe(lt[0],Ee.children)):Pe(lt[0],De),Ve=q.lexemesRe.lastIndex,lt=q.lexemesRe.exec(z);return Pe(z.substr(Ve),De),De}function $e(De,Ve){for(var lt=De.length,Ee=-1,Ae;++Ee<lt;)Ae=De[Ee],Ae.type===m?Pe(Ae.value,Ve):Ve.push(Ae)}function Pe(De,Ve){var lt;return De&&(lt=Ve[Ve.length-1],lt&&lt.type===m?lt.value+=De:Ve.push(Ce(De))),Ve}function Ce(De){return{type:m,value:De}}function xe(De,Ve,lt){return{type:p,tagName:b,properties:{className:[(lt?"":W)+De]},children:Ve}}function ve(De,Ve){var lt=Ve[0];return Q[l]&&(lt=lt.toLowerCase()),i.call(De.keywords,lt)&&De.keywords[lt]}function Ne(De,Ve){return!j&&I(Ve.illegalRe,De)}function Ue(De,Ve){if(I(De.endRe,Ve)){for(;De.endsParent&&De.parent;)De=De.parent;return De}if(De.endsWithParent)return Ue(De.parent,Ve)}function Le(De,Ve){for(var lt=Ve.contains,Ee=lt.length,Ae=-1;++Ae<Ee;)if(I(lt[Ae].beginRe,De))return lt[Ae]}function Ye(){V=Y.pop()||oe}}function k(B){var K,j,W,D;if(B.variants&&!B[c]){for(W=B.variants,K=W.length,j=-1,D=[];++j<K;)D[j]=a(B,{variants:null},W[j]);B[c]=D}return B[c]||(B.endsWithParent?[a(B)]:[B])}function N(B){K(B);function K(D,U){var Y={},z;if(D.compiled)return;D.compiled=!0,D.keywords=D.keywords||D.beginKeywords,D.keywords&&(typeof D.keywords=="string"?Q("keyword",D.keywords):Object.keys(D.keywords).forEach(function(q){Q(q,D.keywords[q])}),D.keywords=Y),D.lexemesRe=j(D.lexemes||/\w+/,!0),U&&(D.beginKeywords&&(D.begin="\\b("+D.beginKeywords.split(u).join(f)+")\\b"),D.begin||(D.begin=/\B|\b/),D.beginRe=j(D.begin),!D.end&&!D.endsWithParent&&(D.end=/\B|\b/),D.end&&(D.endRe=j(D.end)),D.terminatorEnd=W(D.end)||"",D.endsWithParent&&U.terminatorEnd&&(D.terminatorEnd+=(D.end?f:"")+U.terminatorEnd)),D.illegal&&(D.illegalRe=j(D.illegal)),D.relevance===void 0&&(D.relevance=1),D.contains||(D.contains=[]),D.contains=s.apply([],D.contains.map(function(q){return k(q==="self"?D:q)})),D.contains.forEach(function(q){K(q,D)}),D.starts&&K(D.starts,U),z=D.contains.map(M).concat([D.terminatorEnd,D.illegal]).map(W).filter(Boolean),D.terminators=z.length?j(z.join(f),!0):{exec:P};function M(q){return q.beginKeywords?"\\.?("+q.begin+")\\.?":q.begin}function Q(q,F){var V,Z,ee,te;for(B[l]&&(F=F.toLowerCase()),V=F.split(u),te=V.length,ee=-1;++ee<te;)Z=V[ee].split(f),Y[Z[0]]=[q,Z[1]?Number(Z[1]):1]}}function j(D,U){return new RegExp(W(D),"m"+(B[l]?"i":"")+(U?"g":""))}function W(D){return D&&D.source||D}}function L(B){return{relevance:B.relevance||0,language:B.language||null,value:B.value||[]}}function I(B,K){var j=B&&B.exec(K);return j&&j.index===0}function P(){return null}function H(B){return B=B.toLowerCase(),y[B]||y[_[B]]}return CS}var TS,tU;function wIe(){return tU||(tU=1,TS=function(e){var t="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+",r="далее ",n="возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ",a=r+n,i="загрузитьизфайла ",s="вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент ",o=i+s,l="разделительстраниц разделительстрок символтабуляции ",c="ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон ",u="acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища ",f="wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ",p=l+c+u+f,m="webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля ",b="автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени форматкартинки ширинаподчиненныхэлементовформы ",v="виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента ",y="авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных ",_="использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц ",S="отображениевремениэлементовпланировщика ",C="типфайлаформатированногодокумента ",T="обходрезультатазапроса типзаписизапроса ",A="видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов ",k="доступкфайлу режимдиалогавыборафайла режимоткрытияфайла ",N="типизмеренияпостроителязапроса ",L="видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений ",I="wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs форматдатыjson экранированиесимволовjson ",P="видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных использованиеусловногооформлениякомпоновкиданных ",H="важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты статусразборапочтовогосообщения ",B="режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации ",K="расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии типхранилищасертификатовкриптографии ",j="кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip режимсохраненияпутейzip уровеньсжатияzip ",W="звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp ",D="направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса ",U="httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса типномерадокумента типномеразадачи типформы удалениедвижений ",Y="важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты",z=m+b+v+y+_+S+C+T+A+k+N+L+I+P+H+B+K+j+W+D+U+Y,M="comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных ",Q="comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура фиксированноесоответствие фиксированныймассив ",q=M+Q,F="null истина ложь неопределено",V=e.inherit(e.NUMBER_MODE),Z={className:"string",begin:'"|\\|',end:'"|$',contains:[{begin:'""'}]},ee={begin:"'",end:"'",excludeBegin:!0,excludeEnd:!0,contains:[{className:"number",begin:"\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}"}]},te=e.inherit(e.C_LINE_COMMENT_MODE),oe={className:"meta",lexemes:t,begin:"#|&",end:"$",keywords:{"meta-keyword":a+o},contains:[te]},pe={className:"symbol",begin:"~",end:";|:",excludeEnd:!0},he={className:"function",lexemes:t,variants:[{begin:"процедура|функция",end:"\\)",keywords:"процедура функция"},{begin:"конецпроцедуры|конецфункции",keywords:"конецпроцедуры конецфункции"}],contains:[{begin:"\\(",end:"\\)",endsParent:!0,contains:[{className:"params",lexemes:t,begin:t,end:",",excludeEnd:!0,endsWithParent:!0,keywords:{keyword:"знач",literal:F},contains:[V,Z,ee]},te]},e.inherit(e.TITLE_MODE,{begin:t})]};return{case_insensitive:!0,lexemes:t,keywords:{keyword:a,built_in:p,class:z,type:q,literal:F},contains:[oe,he,te,pe,V,Z,ee]}}),TS}var AS,rU;function EIe(){return rU||(rU=1,AS=function(e){var t={ruleDeclaration:"^[a-zA-Z][a-zA-Z0-9-]*",unexpectedChars:"[!@#$^&',?+~`|:]"},r=["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],n=e.COMMENT(";","$"),a={className:"symbol",begin:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/},i={className:"symbol",begin:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/},s={className:"symbol",begin:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/},o={className:"symbol",begin:/%[si]/},l={begin:t.ruleDeclaration+"\\s*=",returnBegin:!0,end:/=/,relevance:0,contains:[{className:"attribute",begin:t.ruleDeclaration}]};return{illegal:t.unexpectedChars,keywords:r.join(" "),contains:[l,n,a,i,s,o,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}),AS}var kS,nU;function SIe(){return nU||(nU=1,kS=function(e){return{contains:[{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+\\b",relevance:0},{className:"string",begin:'"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)',end:'"',keywords:"GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE",illegal:"\\n",relevance:10},{className:"string",begin:/\[/,end:/\]/,illegal:"\\n"},{className:"string",begin:'"',end:'"',illegal:"\\n"}]}}),kS}var NS,aU;function CIe(){return aU||(aU=1,NS=function(e){var t="[a-zA-Z_$][a-zA-Z0-9_$]*",r="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",n={className:"rest_arg",begin:"[.]{3}",end:t,relevance:10};return{aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"class",beginKeywords:"package",end:"{",contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.TITLE_MODE]},{className:"meta",beginKeywords:"import include",end:";",keywords:{"meta-keyword":"import include"}},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n]},{begin:":\\s*"+r}]},e.METHOD_GUARD],illegal:/#/}}),NS}var RS,iU;function TIe(){return iU||(iU=1,RS=function(e){var t="\\d(_|\\d)*",r="[eE][-+]?"+t,n=t+"(\\."+t+")?("+r+")?",a="\\w+",i=t+"#"+a+"(\\."+a+")?#("+r+")?",s="\\b("+i+"|"+n+")",o="[A-Za-z](_?[A-Za-z0-9.])*",l=`[]{}%#'"`,c=e.COMMENT("--","$"),u={begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:l,contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:o,endsParent:!0,relevance:0}]};return{case_insensitive:!0,keywords:{keyword:"abort else new return abs elsif not reverse abstract end accept entry select access exception of separate aliased exit or some all others subtype and for out synchronized array function overriding at tagged generic package task begin goto pragma terminate body private then if procedure type case in protected constant interface is raise use declare range delay limited record when delta loop rem while digits renames with do mod requeue xor",literal:"True False"},contains:[c,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:s,relevance:0},{className:"symbol",begin:"'"+o},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:l},{begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overriding function procedure with is renames return",returnBegin:!0,contains:[c,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:l},u,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:l}]},{className:"type",begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:l},u]}}),RS}var MS,sU;function AIe(){return sU||(sU=1,MS=function(e){var t={className:"number",begin:"[\\$%]\\d+"};return{aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:"</?",end:">"},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all"},contains:[{className:"meta",begin:"\\s\\[",end:"\\]$"},{className:"variable",begin:"[\\$%]\\{",end:"\\}",contains:["self",t]},t,e.QUOTE_STRING_MODE]}}],illegal:/\S/}}),MS}var DS,oU;function kIe(){return oU||(oU=1,DS=function(e){var t=e.inherit(e.QUOTE_STRING_MODE,{illegal:""}),r={className:"params",begin:"\\(",end:"\\)",contains:["self",e.C_NUMBER_MODE,t]},n=e.COMMENT("--","$"),a=e.COMMENT("\\(\\*","\\*\\)",{contains:["self",n]}),i=[n,a,e.HASH_COMMENT_MODE];return{aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[t,e.C_NUMBER_MODE,{className:"built_in",begin:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{className:"literal",begin:"\\b(text item delimiters|current application|missing value)\\b"},{className:"keyword",begin:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference)|POSIX file|POSIX path|(date|time) string|quoted form)\\b"},{beginKeywords:"on",illegal:"[${=;\\n]",contains:[e.UNDERSCORE_TITLE_MODE,r]}].concat(i),illegal:"//|->|=>|\\[\\["}}),DS}var OS,lU;function NIe(){return lU||(lU=1,OS=function(e){var t={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},r={className:"string",variants:[{begin:'(u8?|U)?L?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'(u8?|U)?R"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},n={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},a={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(r,{className:"meta-string"}),{className:"meta-string",begin:/<[^\n>]*>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i=e.IDENT_RE+"\\s*\\(",s={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},o=[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,r];return{aliases:["c","cc","h","c++","h++","hpp"],keywords:s,illegal:"</",contains:o.concat([a,{begin:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",end:">",keywords:s,contains:["self",t]},{begin:e.IDENT_RE+"::",keywords:s},{variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:s,contains:o.concat([{begin:/\(/,end:/\)/,keywords:s,contains:o.concat(["self"]),relevance:0}]),relevance:0},{className:"function",begin:"("+e.IDENT_RE+"[\\*&\\s]+)+"+i,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:s,illegal:/[^\w\s\*&]/,contains:[{begin:i,returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:s,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,n,t]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a]},{className:"class",beginKeywords:"class struct",end:/[{;:]/,contains:[{begin:/</,end:/>/,contains:["self"]},e.TITLE_MODE]}]),exports:{preprocessor:a,strings:r,keywords:s}}}),OS}var IS,cU;function RIe(){return cU||(cU=1,IS=function(e){var t=e.getLanguage("cpp").exports;return{keywords:{keyword:"boolean byte word string String array "+t.keywords.keyword,built_in:"setup loop while catch for if do goto try switch case else default break continue return KeyboardController MouseController SoftwareSerial EthernetServer EthernetClient LiquidCrystal RobotControl GSMVoiceCall EthernetUDP EsploraTFT HttpClient RobotMotor WiFiClient GSMScanner FileSystem Scheduler GSMServer YunClient YunServer IPAddress GSMClient GSMModem Keyboard Ethernet Console GSMBand Esplora Stepper Process WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage Client Server GSMPIN FileIO Bridge Serial EEPROM Stream Mouse Audio Servo File Task GPRS WiFi Wire TFT GSM SPI SD runShellCommandAsynchronously analogWriteResolution retrieveCallingNumber printFirmwareVersion analogReadResolution sendDigitalPortPair noListenOnLocalhost readJoystickButton setFirmwareVersion readJoystickSwitch scrollDisplayRight getVoiceCallStatus scrollDisplayLeft writeMicroseconds delayMicroseconds beginTransmission getSignalStrength runAsynchronously getAsynchronously listenOnLocalhost getCurrentCarrier readAccelerometer messageAvailable sendDigitalPorts lineFollowConfig countryNameWrite runShellCommand readStringUntil rewindDirectory readTemperature setClockDivider readLightSensor endTransmission analogReference detachInterrupt countryNameRead attachInterrupt encryptionType readBytesUntil robotNameWrite readMicrophone robotNameRead cityNameWrite userNameWrite readJoystickY readJoystickX mouseReleased openNextFile scanNetworks noInterrupts digitalWrite beginSpeaker mousePressed isActionDone mouseDragged displayLogos noAutoscroll addParameter remoteNumber getModifiers keyboardRead userNameRead waitContinue processInput parseCommand printVersion readNetworks writeMessage blinkVersion cityNameRead readMessage setDataMode parsePacket isListening setBitOrder beginPacket isDirectory motorsWrite drawCompass digitalRead clearScreen serialEvent rightToLeft setTextSize leftToRight requestFrom keyReleased compassRead analogWrite interrupts WiFiServer disconnect playMelody parseFloat autoscroll getPINUsed setPINUsed setTimeout sendAnalog readSlider analogRead beginWrite createChar motorsStop keyPressed tempoWrite readButton subnetMask debugPrint macAddress writeGreen randomSeed attachGPRS readString sendString remotePort releaseAll mouseMoved background getXChange getYChange answerCall getResult voiceCall endPacket constrain getSocket writeJSON getButton available connected findUntil readBytes exitValue readGreen writeBlue startLoop IPAddress isPressed sendSysex pauseMode gatewayIP setCursor getOemKey tuneWrite noDisplay loadImage switchPIN onRequest onReceive changePIN playFile noBuffer parseInt overflow checkPIN knobRead beginTFT bitClear updateIR bitWrite position writeRGB highByte writeRed setSpeed readBlue noStroke remoteIP transfer shutdown hangCall beginSMS endWrite attached maintain noCursor checkReg checkPUK shiftOut isValid shiftIn pulseIn connect println localIP pinMode getIMEI display noBlink process getBand running beginSD drawBMP lowByte setBand release bitRead prepare pointTo readRed setMode noFill remove listen stroke detach attach noTone exists buffer height bitSet circle config cursor random IRread setDNS endSMS getKey micros millis begin print write ready flush width isPIN blink clear press mkdir rmdir close point yield image BSSID click delay read text move peek beep rect line open seek fill size turn stop home find step tone sqrt RSSI SSID end bit tan cos sin pow map abs max min get run put",literal:"DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL DEFAULT OUTPUT INPUT HIGH LOW"},contains:[t.preprocessor,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}),IS}var LS,uU;function MIe(){return uU||(uU=1,LS=function(e){return{case_insensitive:!0,aliases:["arm"],lexemes:"\\.?"+e.IDENT_RE,keywords:{meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",end:"\\s"},e.COMMENT("[;@]","$",{relevance:0}),e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"[=#]\\w+"}],relevance:0}]}}),LS}var PS,dU;function DIe(){return dU||(dU=1,PS=function(e){var t="[A-Za-z0-9\\._:-]+",r={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:t,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/[^\s"'=<>`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],case_insensitive:!0,contains:[{className:"meta",begin:"<!DOCTYPE",end:">",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},e.COMMENT("<!--","-->",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{begin:/<\?(php)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0}]},{className:"tag",begin:"<style(?=\\s|>|$)",end:">",keywords:{name:"style"},contains:[r],starts:{end:"</style>",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:"<script(?=\\s|>|$)",end:">",keywords:{name:"script"},contains:[r],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars","xml"]}},{className:"meta",variants:[{begin:/<\?xml/,end:/\?>/,relevance:10},{begin:/<\?\w+/,end:/\?>/}]},{className:"tag",begin:"</?",end:"/?>",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},r]}]}}),PS}var FS,fU;function OIe(){return fU||(fU=1,FS=function(e){return{aliases:["adoc"],contains:[e.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),e.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"section",relevance:10,variants:[{begin:"^(={1,5}) .+?( \\1)?$"},{begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{className:"meta",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"meta",begin:"^\\[.+?\\]$",relevance:0},{className:"quote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{className:"strong",begin:"\\B\\*(?![\\*\\s])",end:"(\\n{2}|\\*)",contains:[{begin:"\\\\*\\w",relevance:0}]},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0},{className:"emphasis",begin:"_(?![_\\s])",end:"(\\n{2}|_)",relevance:0},{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}),FS}var BS,hU;function IIe(){return hU||(hU=1,BS=function(e){var t="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance",r="get set args call";return{keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},e.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:t+" "+r,excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:t,illegal:/["\[\]]/,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",keywords:t+" "+r,relevance:0},e.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:t,excludeEnd:!0,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:t,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}),BS}var zS,pU;function LIe(){return pU||(pU=1,zS=function(e){var t={begin:"`[\\s\\S]"};return{case_insensitive:!0,aliases:["ahk"],keywords:{keyword:"Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group",literal:"A|0 true false NOT AND OR",built_in:"ComSpec Clipboard ClipboardAll ErrorLevel"},contains:[{className:"built_in",begin:"A_[a-zA-Z0-9]+"},t,e.inherit(e.QUOTE_STRING_MODE,{contains:[t]}),e.COMMENT(";","$",{relevance:0}),e.C_BLOCK_COMMENT_MODE,{className:"number",begin:e.NUMBER_RE,relevance:0},{className:"subst",begin:"%(?=[a-zA-Z0-9#_$@])",end:"%",illegal:"[^a-zA-Z0-9#_$@]"},{className:"built_in",begin:"^\\s*\\w+\\s*,"},{className:"meta",begin:"^\\s*#w+",end:"$",relevance:0},{className:"symbol",contains:[t],variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{begin:",\\s*,"}]}}),zS}var jS,mU;function PIe(){return mU||(mU=1,jS=function(e){var t="ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",r="True False And Null Not Or",n="Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait",a={variants:[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#cs","#ce"),e.COMMENT("#comments-start","#comments-end")]},i={begin:"\\$[A-z0-9_]+"},s={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},o={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},l={className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"comments include include-once NoTrayIcon OnAutoItStartRegister pragma compile RequireAdmin"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",keywords:{"meta-keyword":"include"},end:"$",contains:[s,{className:"meta-string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},s,a]},c={className:"symbol",begin:"@[A-z0-9_]+"},u={className:"function",beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[i,s,o]}]};return{case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:t,built_in:n,literal:r},contains:[a,i,s,o,l,c,u]}}),jS}var qS,gU;function FIe(){return gU||(gU=1,qS=function(e){return{case_insensitive:!0,lexemes:"\\.?"+e.IDENT_RE,keywords:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),e.C_NUMBER_MODE,e.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"symbol",begin:"^[A-Za-z0-9_.$]+:"},{className:"meta",begin:"#",end:"$"},{className:"subst",begin:"@[0-9]+"}]}}),qS}var US,vU;function BIe(){return vU||(vU=1,US=function(e){var t={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},r="BEGIN END if else while do for in break continue delete next nextfile function func exit|10",n={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]};return{keywords:{keyword:r},contains:[t,n,e.REGEXP_MODE,e.HASH_COMMENT_MODE,e.NUMBER_MODE]}}),US}var $S,bU;function zIe(){return bU||(bU=1,$S=function(e){return{keywords:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]}]}}),$S}var HS,xU;function jIe(){return xU||(xU=1,HS=function(e){var t={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},r={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}]},n={className:"string",begin:/'/,end:/'/};return{aliases:["sh","zsh"],lexemes:/\b-?[a-z\._]+\b/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"meta",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},e.HASH_COMMENT_MODE,r,n,t]}}),HS}var GS,yU;function qIe(){return yU||(yU=1,GS=function(e){return{case_insensitive:!0,illegal:"^.",lexemes:"[a-zA-Z][a-zA-Z0-9_$%!#]*",keywords:{keyword:"ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO HEX$ IF|0 THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE WEND WIDTH WINDOW WRITE XOR"},contains:[e.QUOTE_STRING_MODE,e.COMMENT("REM","$",{relevance:10}),e.COMMENT("'","$",{relevance:0}),{className:"symbol",begin:"^[0-9]+ ",relevance:10},{className:"number",begin:"\\b([0-9]+[0-9edED.]*[#!]?)",relevance:0},{className:"number",begin:"(&[hH][0-9a-fA-F]{1,4})"},{className:"number",begin:"(&[oO][0-7]{1,6})"}]}}),GS}var VS,_U;function UIe(){return _U||(_U=1,VS=function(e){return{contains:[{className:"attribute",begin:/</,end:/>/},{begin:/::=/,starts:{end:/$/,contains:[{begin:/</,end:/>/},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}]}}),VS}var WS,wU;function $Ie(){return wU||(wU=1,WS=function(e){var t={className:"literal",begin:"[\\+\\-]",relevance:0};return{aliases:["bf"],contains:[e.COMMENT(`[^\\[\\]\\.,\\+\\-<> \r
]`,`[\\[\\]\\.,\\+\\-<> \r
]`,{returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/\+\+|\-\-/,returnBegin:!0,contains:[t]},t]}}),WS}var KS,EU;function HIe(){return EU||(EU=1,KS=function(e){var t="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",r="false true",n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],a={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},i={className:"string",begin:/(#\d+)+/},s={className:"number",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},o={className:"string",begin:'"',end:'"'},l={className:"function",beginKeywords:"procedure",end:/[:;]/,keywords:"procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[a,i]}].concat(n)},c={className:"class",begin:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",returnBegin:!0,contains:[e.TITLE_MODE,l]};return{case_insensitive:!0,keywords:{keyword:t,literal:r},illegal:/\/\*/,contains:[a,i,s,o,e.NUMBER_MODE,c,l]}}),KS}var XS,SU;function GIe(){return SU||(SU=1,XS=function(e){return{aliases:["capnp"],keywords:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.HASH_COMMENT_MODE,{className:"meta",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"symbol",begin:/@\d+\b/},{className:"class",beginKeywords:"struct enum",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"class",beginKeywords:"interface",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]}]}}),XS}var YS,CU;function VIe(){return CU||(CU=1,YS=function(e){var t="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",r="shared abstract formal default actual variable late native deprecatedfinal sealed annotation suppressWarnings small",n="doc by license see throws tagged",a={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:t,relevance:10},i=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[a]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return a.contains=i,{keywords:{keyword:t+" "+r,meta:n},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"meta",begin:'@[a-z]\\w*(?:\\:"[^"]*")?'}].concat(i)}}),YS}var ZS,TU;function WIe(){return TU||(TU=1,ZS=function(e){return{aliases:["clean","icl","dcl"],keywords:{keyword:"if let in with where case of class instance otherwise implementation definition system module from import qualified as special code inline foreign export ccall stdcall generic derive infix infixl infixr",literal:"True False"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{begin:"->|<-[|:]?|::|#!?|>>=|\\{\\||\\|\\}|:==|=:|\\.\\.|<>|`"}]}}),ZS}var QS,AU;function KIe(){return AU||(AU=1,QS=function(e){var t={"builtin-name":"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},r="a-zA-Z_\\-!.?+*=<>&#'",n="["+r+"]["+r+"0-9/;:]*",a="[-+]?\\d+(\\.\\d+)?",i={begin:n,relevance:0},s={className:"number",begin:a,relevance:0},o=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),l=e.COMMENT(";","$",{relevance:0}),c={className:"literal",begin:/\b(true|false|nil)\b/},u={begin:"[\\[\\{]",end:"[\\]\\}]"},f={className:"comment",begin:"\\^"+n},p=e.COMMENT("\\^\\{","\\}"),m={className:"symbol",begin:"[:]{1,2}"+n},b={begin:"\\(",end:"\\)"},v={endsWithParent:!0,relevance:0},y={keywords:t,lexemes:n,className:"name",begin:n,starts:v},_=[b,o,f,p,l,m,u,s,c,i];return b.contains=[e.COMMENT("comment",""),y,v],v.contains=_,u.contains=_,p.contains=[u],{aliases:["clj"],illegal:/\S/,contains:[b,o,f,p,l,m,u,s,c]}}),QS}var JS,kU;function XIe(){return kU||(kU=1,JS=function(e){return{contains:[{className:"meta",begin:/^([\w.-]+|\s*#_)=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}),JS}var eC,NU;function YIe(){return NU||(NU=1,eC=function(e){return{aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or equal less greater strless strgreater strequal matches"},contains:[{className:"variable",begin:"\\${",end:"}"},e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}),eC}var tC,RU;function ZIe(){return RU||(RU=1,tC=function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},r="[A-Za-z$_][0-9A-Za-z$_]*",n={className:"subst",begin:/#\{/,end:/}/,keywords:t},a=[e.BINARY_NUMBER_MODE,e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[n,e.HASH_COMMENT_MODE]},{begin:"//[gim]*",relevance:0},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{begin:"@"+r},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];n.contains=a;var i=e.inherit(e.TITLE_MODE,{begin:r}),s="(\\(.*\\))?\\s*\\B[-=]>",o={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(a)}]};return{aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:a.concat([e.COMMENT("###","###"),e.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+r+"\\s*=\\s*"+s,end:"[-=]>",returnBegin:!0,contains:[i,o]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:s,end:"[-=]>",returnBegin:!0,contains:[o]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[i]},i]},{begin:r+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),tC}var rC,MU;function QIe(){return MU||(MU=1,rC=function(e){return{keywords:{keyword:"_ as at cofix else end exists exists2 fix for forall fun if IF in let match mod Prop return Set then Type using where with Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture Conjectures Constant constr Constraint Constructors Context Corollary CreateHintDb Cut Declare Defined Definition Delimit Dependencies DependentDerive Drop eauto End Equality Eval Example Existential Existentials Existing Export exporting Extern Extract Extraction Fact Field Fields File Fixpoint Focus for From Function Functional Generalizable Global Goal Grab Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident Identity If Immediate Implicit Import Include Inductive Infix Info Initial Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation Obligations Opaque Open Optimize Options Parameter Parameters Parametric Path Paths pattern Polymorphic Preterm Print Printing Program Projections Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused Unfold Universe Universes Unset Unshelve using Variable Variables Variant Verbose Visibility where with",built_in:"abstract absurd admit after apply as assert assumption at auto autorewrite autounfold before bottom btauto by case case_eq cbn cbv change classical_left classical_right clear clearbody cofix compare compute congruence constr_eq constructor contradict contradiction cut cutrewrite cycle decide decompose dependent destruct destruction dintuition discriminate discrR do double dtauto eapply eassumption eauto ecase econstructor edestruct ediscriminate eelim eexact eexists einduction einjection eleft elim elimtype enough equality erewrite eright esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail field field_simplify field_simplify_eq first firstorder fix fold fourier functional generalize generalizing gfail give_up has_evar hnf idtac in induction injection instantiate intro intro_pattern intros intuition inversion inversion_clear is_evar is_var lapply lazy left lia lra move native_compute nia nsatz omega once pattern pose progress proof psatz quote record red refine reflexivity remember rename repeat replace revert revgoals rewrite rewrite_strat right ring ring_simplify rtauto set setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve specialize split split_Rabs split_Rmult stepl stepr subst sum swap symmetry tactic tauto time timeout top transitivity trivial try tryif unfold unify until using vm_compute with"},contains:[e.QUOTE_STRING_MODE,e.COMMENT("\\(\\*","\\*\\)"),e.C_NUMBER_MODE,{className:"type",excludeBegin:!0,begin:"\\|\\s*",end:"\\w+"},{begin:/[-=]>/}]}}),rC}var nC,DU;function JIe(){return DU||(DU=1,nC=function(t){var r={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]}]},n={className:"number",begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",relevance:0},a="property parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii";return{case_insensitive:!0,aliases:["cos","cls"],keywords:a,contains:[n,r,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"comment",begin:/;/,end:"$",relevance:0},{className:"built_in",begin:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{className:"built_in",begin:/\$\$\$[a-zA-Z]+/},{className:"built_in",begin:/%[a-z]+(?:\.[a-z]+)*/},{className:"symbol",begin:/\^%?[a-zA-Z][\w]*/},{className:"keyword",begin:/##class|##super|#define|#dim/},{begin:/&sql\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"sql"},{begin:/&(js|jscript|javascript)</,end:/>/,excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"},{begin:/&html<\s*</,end:/>\s*>/,subLanguage:"xml"}]}}),nC}var aC,OU;function e8e(){return OU||(OU=1,aC=function(e){var t="primitive rsc_template",r="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml",n="property rsc_defaults op_defaults",a="params meta operations op rule attributes utilization",i="read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\",s="number string",o="Master Started Slave Stopped start promote demote stop monitor true false";return{aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:a+" "+i+" "+s,literal:o},contains:[e.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:t,starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+r.split(" ").join("|")+")\\s+",keywords:r,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:n,starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},e.QUOTE_STRING_MODE,{className:"meta",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"literal",begin:"[-]?(infinity|inf)",relevance:0},{className:"attr",begin:/([A-Za-z\$_\#][\w_-]+)=/,relevance:0},{className:"tag",begin:"</?",end:"/?>",relevance:0}]}}),aC}var iC,IU;function t8e(){return IU||(IU=1,iC=function(e){var t="(_[uif](8|16|32|64))?",r="[a-zA-Z_]\\w*[!?=]?",n="!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",a="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\][=?]?",i={keyword:"abstract alias as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},s={className:"subst",begin:"#{",end:"}",keywords:i},o={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:i};function l(v,y){var _=[{begin:v,end:y}];return _[0].contains=_,_}var c={className:"string",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%w?\\(",end:"\\)",contains:l("\\(","\\)")},{begin:"%w?\\[",end:"\\]",contains:l("\\[","\\]")},{begin:"%w?{",end:"}",contains:l("{","}")},{begin:"%w?<",end:">",contains:l("<",">")},{begin:"%w?/",end:"/"},{begin:"%w?%",end:"%"},{begin:"%w?-",end:"-"},{begin:"%w?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},u={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:l("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:l("\\[","\\]")},{begin:"%q{",end:"}",contains:l("{","}")},{begin:"%q<",end:">",contains:l("<",">")},{begin:"%q/",end:"/"},{begin:"%q%",end:"%"},{begin:"%q-",end:"-"},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},f={begin:"("+n+")\\s*",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/",end:"/[a-z]*"},{begin:"%r\\(",end:"\\)",contains:l("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:l("\\[","\\]")},{begin:"%r{",end:"}",contains:l("{","}")},{begin:"%r<",end:">",contains:l("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}]}],relevance:0},p={className:"regexp",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:"%r\\(",end:"\\)",contains:l("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:l("\\[","\\]")},{begin:"%r{",end:"}",contains:l("{","}")},{begin:"%r<",end:">",contains:l("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}],relevance:0},m={className:"meta",begin:"@\\[",end:"\\]",contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"})]},b=[o,c,u,f,p,m,e.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],relevance:10},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:a,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:a,endsParent:!0})],relevance:5},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[c,{begin:a}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]*[01])"+t},{begin:"\\b0o([0-7_]*[0-7])"+t},{begin:"\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])"+t},{begin:"\\b(([0-9][0-9_]*[0-9]|[0-9])(\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)"+t}],relevance:0}];return s.contains=b,o.contains=b.slice(1),{aliases:["cr"],lexemes:r,keywords:i,contains:b}}),iC}var sC,LU;function r8e(){return LU||(LU=1,sC=function(e){var t={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long nameof object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},r={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},n=e.inherit(r,{illegal:/\n/}),a={className:"subst",begin:"{",end:"}",keywords:t},i=e.inherit(a,{illegal:/\n/}),s={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},e.BACKSLASH_ESCAPE,i]},o={className:"string",begin:/\$@"/,end:'"',contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},a]},l=e.inherit(o,{illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},i]});a.contains=[o,s,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE],i.contains=[l,s,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];var c={variants:[o,s,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},u=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?";return{aliases:["csharp"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},c,e.C_NUMBER_MODE,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.TITLE_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"meta-string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+u+"\\s+)+"+e.IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[c,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}}),sC}var oC,PU;function n8e(){return PU||(PU=1,oC=function(e){return{case_insensitive:!1,lexemes:"[a-zA-Z][a-zA-Z0-9_-]*",keywords:{keyword:"base-uri child-src connect-src default-src font-src form-action frame-ancestors frame-src img-src media-src object-src plugin-types report-uri sandbox script-src style-src"},contains:[{className:"string",begin:"'",end:"'"},{className:"attribute",begin:"^Content",end:":",excludeEnd:!0}]}}),oC}var lC,FU;function a8e(){return FU||(FU=1,lC=function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={begin:/[A-Z\_\.\-]+\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(font-face|page)",lexemes:"[a-z-]+",keywords:"font-face page"},{begin:"@",end:"[{;]",illegal:/:/,contains:[{className:"keyword",begin:/\w+/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:t,relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,r]}]}}),lC}var cC,BU;function i8e(){return BU||(BU=1,cC=function(e){var t={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},r="(0|[1-9][\\d_]*)",n="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",a="0[bB][01_]+",i="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",s="0[xX]"+i,o="([eE][+-]?"+n+")",l="("+n+"(\\.\\d*|"+o+")|\\d+\\."+n+n+"|\\."+r+o+"?)",c="(0[xX]("+i+"\\."+i+"|\\.?"+i+")[pP][+-]?"+n+")",u="("+r+"|"+a+"|"+s+")",f="("+c+"|"+l+")",p=`\\\\(['"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};`,m={className:"number",begin:"\\b"+u+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},b={className:"number",begin:"\\b("+f+"([fF]|L|i|[fF]i|Li)?|"+u+"(i|[fF]i|Li))",relevance:0},v={className:"string",begin:"'("+p+"|.)",end:"'",illegal:"."},y={begin:p,relevance:0},_={className:"string",begin:'"',contains:[y],end:'"[cwd]?'},S={className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},C={className:"string",begin:"`",end:"`[cwd]?"},T={className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},A={className:"string",begin:'q"\\{',end:'\\}"'},k={className:"meta",begin:"^#!",end:"$",relevance:5},N={className:"meta",begin:"#(line)",end:"$",relevance:5},L={className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"},I=e.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{lexemes:e.UNDERSCORE_IDENT_RE,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,I,T,_,S,C,A,b,m,v,k,N,L]}}),cC}var uC,zU;function s8e(){return zU||(zU=1,uC=function(e){return{aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"quote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"^```w*s*$",end:"^```s*$"},{begin:"`.+?`"},{begin:"^( {4}|	)",end:"$",relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}),uC}var dC,jU;function o8e(){return jU||(jU=1,dC=function(e){var t={className:"subst",begin:"\\$\\{",end:"}",keywords:"true false null this is new super"},r={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[e.BACKSLASH_ESCAPE,t]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]}]};t.contains=[e.C_NUMBER_MODE,r];var n={keyword:"assert async await break case catch class const continue default do else enum extends false final finally for if in is new null rethrow return super switch sync this throw true try var void while with yield abstract as dynamic export external factory get implements import library operator part set static typedef",built_in:"print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num document window querySelector querySelectorAll Element ElementList"};return{keywords:n,contains:[r,e.COMMENT("/\\*\\*","\\*/",{subLanguage:"markdown"}),e.COMMENT("///","$",{subLanguage:"markdown"}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}}),dC}var fC,qU;function l8e(){return qU||(qU=1,fC=function(e){var t="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure absolute reintroduce operator as is abstract alias assembler bitpacked break continue cppdecl cvar enumerator experimental platform deprecated unimplemented dynamic export far16 forward generic helper implements interrupt iochecks local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat specialize strict unaligned varargs ",r=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],n={className:"meta",variants:[{begin:/\{\$/,end:/\}/},{begin:/\(\*\$/,end:/\*\)/}]},a={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},i={className:"string",begin:/(#\d+)+/},s={begin:e.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE]},o={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[a,i,n].concat(r)},n].concat(r)};return{aliases:["dpr","dfm","pas","pascal","freepascal","lazarus","lpr","lfm"],case_insensitive:!0,keywords:t,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[a,i,e.NUMBER_MODE,s,o,n].concat(r)}}),fC}var hC,UU;function c8e(){return UU||(UU=1,hC=function(e){return{aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/\*{5}/,end:/\*{5}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",end:"$"}]}}),hC}var pC,$U;function u8e(){return $U||($U=1,pC=function(e){var t={begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE]};return{aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),e.COMMENT(/\{#/,/#}/),{className:"template-tag",begin:/\{%/,end:/%}/,contains:[{className:"name",begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[t],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/}}/,contains:[t]}]}}),pC}var mC,HU;function d8e(){return HU||(HU=1,mC=function(e){return{aliases:["bind","zone"],keywords:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{className:"number",begin:"((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])\\b"},e.inherit(e.NUMBER_MODE,{begin:/\b\d+[dhwm]?/})]}}),mC}var gC,GU;function f8e(){return GU||(GU=1,gC=function(e){return{aliases:["docker"],case_insensitive:!0,keywords:"from maintainer expose env arg user onbuild stopsignal",contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]\n/,subLanguage:"bash"}}],illegal:"</"}}),gC}var vC,VU;function h8e(){return VU||(VU=1,vC=function(e){var t=e.COMMENT(/^\s*@?rem\b/,/$/,{relevance:10}),r={begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"};return{aliases:["bat","cmd"],case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:"if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq",built_in:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux shift cd dir echo setlocal endlocal set pause copy append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol ping net ipconfig taskkill xcopy ren del"},contains:[{className:"variable",begin:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{className:"function",begin:r.begin,end:"goto:eof",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),t]},{className:"number",begin:"\\b\\d+",relevance:0},t]}}),vC}var bC,WU;function p8e(){return WU||(WU=1,bC=function(e){var t={className:"string",begin:/"/,end:/"/},r={className:"string",begin:/'/,end:/'/},n={className:"string",begin:"[\\w-?]+:\\w+",end:"\\W",relevance:0},a={className:"string",begin:"\\w+-?\\w+",end:"\\W",relevance:0};return{keywords:"dsconfig",contains:[{className:"keyword",begin:"^dsconfig",end:"\\s",excludeEnd:!0,relevance:10},{className:"built_in",begin:"(list|create|get|set|delete)-(\\w+)",end:"\\s",excludeEnd:!0,illegal:"!@#$%^&*()",relevance:10},{className:"built_in",begin:"--(\\w+)",end:"\\s",excludeEnd:!0},t,r,n,a,e.HASH_COMMENT_MODE]}}),bC}var xC,KU;function m8e(){return KU||(KU=1,xC=function(e){var t={className:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},r={className:"number",variants:[{begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:e.C_NUMBER_RE}],relevance:0},n={className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef ifdef ifndef"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{"meta-keyword":"include"},contains:[e.inherit(t,{className:"meta-string"}),{className:"meta-string",begin:"<",end:">",illegal:"\\n"}]},t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},a={className:"variable",begin:"\\&[a-z\\d_]*\\b"},i={className:"meta-keyword",begin:"/[a-z][a-z\\d-]*/"},s={className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},o={className:"params",begin:"<",end:">",contains:[r,a]},l={className:"class",begin:/[a-zA-Z_][a-zA-Z\d_@]*\s{/,end:/[{;=]/,returnBegin:!0,excludeEnd:!0},c={className:"class",begin:"/\\s*{",end:"};",relevance:10,contains:[a,i,s,l,o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,t]};return{keywords:"",contains:[c,a,i,s,l,o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,t,n,{begin:e.IDENT_RE+"::",keywords:""}]}}),xC}var yC,XU;function g8e(){return XU||(XU=1,yC=function(e){var t="if eq ne lt lte gt gte select default math sep";return{aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"template-tag",begin:/\{[#\/]/,end:/\}/,illegal:/;/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,starts:{endsWithParent:!0,relevance:0,contains:[e.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{/,end:/\}/,illegal:/;/,keywords:t}]}}),yC}var _C,YU;function v8e(){return YU||(YU=1,_C=function(e){var t=e.COMMENT(/\(\*/,/\*\)/),r={className:"attribute",begin:/^[ ]*[a-zA-Z][a-zA-Z-]*([\s-]+[a-zA-Z][a-zA-Z]*)*/},n={className:"meta",begin:/\?.*\?/},a={begin:/=/,end:/;/,contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]};return{illegal:/\S/,contains:[t,r,a]}}),_C}var wC,ZU;function b8e(){return ZU||(ZU=1,wC=function(e){var t="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?",r="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",n="and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote",a={className:"subst",begin:"#\\{",end:"}",lexemes:t,keywords:n},i={className:"string",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},s={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:t,endsParent:!0})]},o=e.inherit(s,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),l=[i,e.HASH_COMMENT_MODE,o,s,{className:"symbol",begin:":(?!\\s)",contains:[i,{begin:r}],relevance:0},{className:"symbol",begin:t+":",relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"->"},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[e.HASH_COMMENT_MODE,{className:"regexp",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return a.contains=l,{lexemes:t,keywords:n,contains:l}}),wC}var EC,QU;function x8e(){return QU||(QU=1,EC=function(e){var t={variants:[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})]},r={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},n={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},t]},a={begin:"{",end:"}",contains:n.contains};return{keywords:"let in if then else case of where module import exposing type alias as infix infixl infixr port effect command subscription",contains:[{beginKeywords:"port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[n,t],illegal:"\\W\\.|;"},{begin:"import",end:"$",keywords:"import as exposing",contains:[n,t],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[r,n,a,t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"port",end:"$",keywords:"port",contains:[t]},e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,r,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}],illegal:/;/}}),EC}var SC,JU;function y8e(){return JU||(JU=1,SC=function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},n={className:"doctag",begin:"@[A-Za-z]+"},a={begin:"#<",end:">"},i=[e.COMMENT("#","$",{contains:[n]}),e.COMMENT("^\\=begin","^\\=end",{contains:[n],relevance:10}),e.COMMENT("^__END__","\\n$")],s={className:"subst",begin:"#\\{",end:"}",keywords:r},o={className:"string",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<(-?)\w+$/,end:/^\s*\w+$/}]},l={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:r},c=[o,a,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(i)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:t}),l].concat(i)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[o,{begin:t}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:r},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[a,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,s],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(i),relevance:0}].concat(i);s.contains=c,l.contains=c;var u="[>?]>",f="[\\w#]+\\(\\w+\\):\\d+:\\d+>",p="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",m=[{begin:/^\s*=>/,starts:{end:"$",contains:c}},{className:"meta",begin:"^("+u+"|"+f+"|"+p+")",starts:{end:"$",contains:c}}];return{aliases:["rb","gemspec","podspec","thor","irb"],keywords:r,illegal:/\/\*/,contains:i.concat(m).concat(c)}}),SC}var CC,e$;function _8e(){return e$||(e$=1,CC=function(e){return{subLanguage:"xml",contains:[e.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}),CC}var TC,t$;function w8e(){return t$||(t$=1,TC=function(e){return{keywords:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"meta",begin:"^[0-9]+> ",relevance:10},e.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\?(::)?([A-Z]\\w*(::)?)+"},{begin:"->"},{begin:"ok"},{begin:"!"},{begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}),TC}var AC,r$;function E8e(){return r$||(r$=1,AC=function(e){var t="[a-z'][a-zA-Z0-9_']*",r="("+t+":"+t+"|"+t+")",n={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},a=e.COMMENT("%","$"),i={className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},s={begin:"fun\\s+"+t+"/\\d+"},o={begin:r+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:r,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},l={begin:"{",end:"}",relevance:0},c={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},u={begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},f={begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:"{",end:"}",relevance:0}]},p={beginKeywords:"fun receive if try case",end:"end",keywords:n};p.contains=[a,s,e.inherit(e.APOS_STRING_MODE,{className:""}),p,o,e.QUOTE_STRING_MODE,i,l,c,u,f];var m=[a,s,p,o,e.QUOTE_STRING_MODE,i,l,c,u,f];o.contains[1].contains=m,l.contains=m,f.contains[1].contains=m;var b={className:"params",begin:"\\(",end:"\\)",contains:m};return{aliases:["erl"],keywords:n,illegal:"(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",contains:[{className:"function",begin:"^"+t+"\\s*\\(",end:"->",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[b,e.inherit(e.TITLE_MODE,{begin:t})],starts:{end:";|\\.",keywords:n,contains:m}},a,{begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,lexemes:"-"+e.IDENT_RE,keywords:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",contains:[b]},i,e.QUOTE_STRING_MODE,f,c,u,l,{begin:/\.$/}]}}),AC}var kC,n$;function S8e(){return n$||(n$=1,kC=function(e){return{aliases:["xlsx","xls"],case_insensitive:!0,lexemes:/[a-zA-Z][\w\.]*/,keywords:{built_in:"ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF|0 IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST"},contains:[{begin:/^=/,end:/[^=]/,returnEnd:!0,illegal:/=/,relevance:10},{className:"symbol",begin:/\b[A-Z]{1,2}\d+\b/,end:/[^\d]/,excludeEnd:!0,relevance:0},{className:"symbol",begin:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,relevance:0},e.BACKSLASH_ESCAPE,e.QUOTE_STRING_MODE,{className:"number",begin:e.NUMBER_RE+"(%)?",relevance:0},e.COMMENT(/\bN\(/,/\)/,{excludeBegin:!0,excludeEnd:!0,illegal:/\n/})]}}),kC}var NC,a$;function C8e(){return a$||(a$=1,NC=function(e){return{contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attr"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}),NC}var RC,i$;function T8e(){return i$||(i$=1,RC=function(e){var t={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},r={className:"string",variants:[{begin:'"',end:'"'}]},n={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/},a={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[n]};return{keywords:{literal:"true false",keyword:"case class def else enum if impl import in lat rel index let match namespace switch type yield with"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t,r,a,e.C_NUMBER_MODE]}}),RC}var MC,s$;function A8e(){return s$||(s$=1,MC=function(e){var t={className:"params",begin:"\\(",end:"\\)"},r={literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated  c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image"};return{case_insensitive:!0,aliases:["f90","f95"],keywords:r,illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,t]},e.COMMENT("!","$",{relevance:0}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),MC}var DC,o$;function k8e(){return o$||(o$=1,DC=function(e){var t={begin:"<",end:">",contains:[e.inherit(e.TITLE_MODE,{begin:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],keywords:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",illegal:/\/\*/,contains:[{className:"keyword",begin:/\b(yield|return|let|do)!/},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:'"""',end:'"""'},e.COMMENT("\\(\\*","\\*\\)"),{className:"class",beginKeywords:"type",end:"\\(|=|$",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE,t]},{className:"meta",begin:"\\[<",end:">\\]",relevance:10},{className:"symbol",begin:"\\B('[A-Za-z])\\b",contains:[e.BACKSLASH_ESCAPE]},e.C_LINE_COMMENT_MODE,e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),e.C_NUMBER_MODE]}}),DC}var OC,l$;function N8e(){return l$||(l$=1,OC=function(e){var t={keyword:"abort acronym acronyms alias all and assign binary card diag display else eq file files for free ge gt if integer le loop lt maximizing minimizing model models ne negative no not option options or ord positive prod put putpage puttl repeat sameas semicont semiint smax smin solve sos1 sos2 sum system table then until using while xor yes",literal:"eps inf na","built-in":"abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power randBinomial randLinear randTriangle round rPower sigmoid sign signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion handleCollect handleDelete handleStatus handleSubmit heapFree heapLimit heapSize jobHandle jobKill jobStatus jobTerminate licenseLevel licenseStatus maxExecError sleep timeClose timeComp timeElapsed timeExec timeStart"},r={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},n={className:"symbol",variants:[{begin:/\=[lgenxc]=/},{begin:/\$/}]},a={className:"comment",variants:[{begin:"'",end:"'"},{begin:'"',end:'"'}],illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},i={begin:"/",end:"/",keywords:t,contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE]},s={begin:/[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,excludeBegin:!0,end:"$",endsWithParent:!0,contains:[a,i,{className:"comment",begin:/([ ]*[a-z0-9&#*=?@>\\<:\-,()$\[\]_.{}!+%^]+)+/,relevance:0}]};return{aliases:["gms"],case_insensitive:!0,keywords:t,contains:[e.COMMENT(/^\$ontext/,/^\$offtext/),{className:"meta",begin:"^\\$[a-z0-9]+",end:"$",returnBegin:!0,contains:[{className:"meta-keyword",begin:"^\\$[a-z0-9]+"}]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{beginKeywords:"set sets parameter parameters variable variables scalar scalars equation equations",end:";",contains:[e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,s]},{beginKeywords:"table",end:";",returnBegin:!0,contains:[{beginKeywords:"table",end:"$",contains:[s]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE]},{className:"function",begin:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,returnBegin:!0,contains:[{className:"title",begin:/^[a-z0-9_]+/},r,n]},e.C_NUMBER_MODE,n]}}),OC}var IC,c$;function R8e(){return c$||(c$=1,IC=function(e){var t={keyword:"and bool break call callexe checkinterrupt clear clearg closeall cls comlog compile continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new not open or output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll setarray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn indnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname threadBegin threadEnd threadEndFor threadFor threadJoin threadStat time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribute h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin strtrim sylvester",literal:"DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS"},r={className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{"meta-keyword":"include"},contains:[{className:"meta-string",begin:'"',end:'"',illegal:"\\n"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},n=e.UNDERSCORE_IDENT_RE+"\\s*\\(?",a=[{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}];return{aliases:["gss"],case_insensitive:!0,keywords:t,illegal:"(\\{[%#]|[%#]\\})",contains:[e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("@","@"),r,{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{className:"function",beginKeywords:"proc keyword",end:";",excludeEnd:!0,keywords:t,contains:[{begin:n,returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE],relevance:0},e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r].concat(a)},{className:"function",beginKeywords:"fn",end:";",excludeEnd:!0,keywords:t,contains:[{begin:n+e.IDENT_RE+"\\)?\\s*\\=\\s*",returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE],relevance:0},e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE].concat(a)},{className:"function",begin:"\\bexternal (proc|keyword|fn)\\s+",end:";",excludeEnd:!0,keywords:t,contains:[{begin:n,returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE],relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"function",begin:"\\bexternal (matrix|string|array|sparse matrix|struct "+e.IDENT_RE+")\\s+",end:";",excludeEnd:!0,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}}),IC}var LC,u$;function M8e(){return u$||(u$=1,LC=function(e){var t="[A-Z_][A-Z0-9_.]*",r="\\%",n="IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR",a={className:"meta",begin:"([O])([0-9]+)"},i=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(/\(/,/\)/),e.inherit(e.C_NUMBER_MODE,{begin:"([-+]?([0-9]*\\.?[0-9]+\\.?))|"+e.C_NUMBER_RE}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"name",begin:"([G])([0-9]+\\.?[0-9]?)"},{className:"name",begin:"([M])([0-9]+\\.?[0-9]?)"},{className:"attr",begin:"(VC|VS|#)",end:"(\\d+)"},{className:"attr",begin:"(VZOFX|VZOFY|VZOFZ)"},{className:"built_in",begin:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",end:"([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])"},{className:"symbol",variants:[{begin:"N",end:"\\d+",illegal:"\\W"}]}];return{aliases:["nc"],case_insensitive:!0,lexemes:t,keywords:n,contains:[{className:"meta",begin:r},a].concat(i)}}),LC}var PC,d$;function D8e(){return d$||(d$=1,PC=function(e){return{aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"symbol",begin:"\\*",relevance:0},{className:"meta",begin:"@[^@\\s]+"},{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},e.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},e.QUOTE_STRING_MODE]}}),PC}var FC,f$;function O8e(){return f$||(f$=1,FC=function(e){return{keywords:{keyword:"break continue discard do else for if return while switch case default attribute binding buffer ccw centroid centroid varying coherent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBufferiimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},illegal:'"',contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"}]}}),FC}var BC,h$;function I8e(){return h$||(h$=1,BC=function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"`"}]},{className:"number",variants:[{begin:e.C_NUMBER_RE+"[dflsi]",relevance:1},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:/\s*\{/,excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,illegal:/["']/}]}]}}),BC}var zC,p$;function L8e(){return p$||(p$=1,zC=function(e){return{keywords:{keyword:"println readln print import module function local return let var while for foreach times in case when match with break continue augment augmentation each find filter reduce if then else otherwise try catch finally raise throw orIfNull DynamicObject|10 DynamicVariable struct Observable map set vector list array",literal:"true false null"},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}),zC}var jC,m$;function P8e(){return m$||(m$=1,jC=function(e){return{case_insensitive:!0,keywords:{keyword:"task project allprojects subprojects artifacts buildscript configurations dependencies repositories sourceSets description delete from into include exclude source classpath destinationDir includes options sourceCompatibility targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant def abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true antlrtask checkstyle codenarc copy boolean byte char class double float int interface long short void compile runTime file fileTree abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.REGEXP_MODE]}}),jC}var qC,g$;function F8e(){return g$||(g$=1,qC=function(e){return{keywords:{literal:"true false null",keyword:"byte short char int long boolean float double void def as in assert trait super this abstract static volatile transient public private protected synchronized final class interface enum if else for while switch case break default continue throw throws try catch finally implements extends new import package return instanceof"},contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},{className:"string",begin:"'''",end:"'''"},{className:"string",begin:"\\$/",end:"/\\$",relevance:10},e.APOS_STRING_MODE,{className:"regexp",begin:/~?\/[^\/\n]+\//,contains:[e.BACKSLASH_ESCAPE]},e.QUOTE_STRING_MODE,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
`},e.BINARY_NUMBER_MODE,{className:"class",beginKeywords:"class interface trait enum",end:"{",illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"},{className:"string",begin:/[^\?]{0}[A-Za-z0-9_$]+ *:/},{begin:/\?/,end:/\:/},{className:"symbol",begin:"^\\s*[A-Za-z0-9_$]+:",relevance:0}],illegal:/#|<\//}}),qC}var UC,v$;function B8e(){return v$||(v$=1,UC=function(e){return{case_insensitive:!0,contains:[{className:"meta",begin:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",relevance:10},e.COMMENT("^\\s*(!=#|=#|-#|/).*$",!1,{relevance:0}),{begin:"^\\s*(-|=|!=)(?!#)",starts:{end:"\\n",subLanguage:"ruby"}},{className:"tag",begin:"^\\s*%",contains:[{className:"selector-tag",begin:"\\w+"},{className:"selector-id",begin:"#[\\w-]+"},{className:"selector-class",begin:"\\.[\\w-]+"},{begin:"{\\s*",end:"\\s*}",contains:[{begin:":\\w+\\s*=>",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:":\\w+"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:"\\w+",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:"#{",starts:{end:"}",subLanguage:"ruby"}}]}}),UC}var $C,b$;function z8e(){return b$||(b$=1,$C=function(e){var t={"builtin-name":"each in with if else unless bindattr action collection debugger log outlet template unbound view yield"};return{aliases:["hbs","html.hbs","html.handlebars"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT("{{!(--)?","(--)?}}"),{className:"template-tag",begin:/\{\{[#\/]/,end:/\}\}/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,keywords:t,starts:{endsWithParent:!0,relevance:0,contains:[e.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,keywords:t}]}}),$C}var HC,x$;function j8e(){return x$||(x$=1,HC=function(e){var t={variants:[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})]},r={className:"meta",begin:"{-#",end:"#-}"},n={className:"meta",begin:"^#",end:"$"},a={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},i={begin:"\\(",end:"\\)",illegal:'"',contains:[r,n,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{begin:"[_a-z][\\w']*"}),t]},s={begin:"{",end:"}",contains:i.contains};return{aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[i,t],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[i,t],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[a,i,t]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[r,a,i,s,t]},{beginKeywords:"default",end:"$",contains:[a,i,t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[a,e.QUOTE_STRING_MODE,t]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},r,n,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,a,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}]}}),HC}var GC,y$;function q8e(){return y$||(y$=1,GC=function(e){var t="Int Float String Bool Dynamic Void Array ";return{aliases:["hx"],keywords:{keyword:"break case cast catch continue default do dynamic else enum extern for function here if import in inline never new override package private get set public return static super switch this throw trace try typedef untyped using var while "+t,built_in:"trace this",literal:"true false null _"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"},{className:"subst",begin:"\\$",end:"\\W}"}]},e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"@:",end:"$"},{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elseif end error"}},{className:"type",begin:":[ 	]*",end:"[^A-Za-z0-9_ 	\\->]",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:":[ 	]*",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"new *",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"class",beginKeywords:"enum",end:"\\{",contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"abstract",end:"[\\{$]",contains:[{className:"type",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"from +",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"to +",end:"\\W",excludeBegin:!0,excludeEnd:!0},e.TITLE_MODE],keywords:{keyword:"abstract from to"}},{className:"class",begin:"\\b(class|interface) +",end:"[\\{$]",excludeEnd:!0,keywords:"class interface",contains:[{className:"keyword",begin:"\\b(extends|implements) +",keywords:"extends implements",contains:[{className:"type",begin:e.IDENT_RE,relevance:0}]},e.TITLE_MODE]},{className:"function",beginKeywords:"function",end:"\\(",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE]}],illegal:/<\//}}),GC}var VC,_$;function U8e(){return _$||(_$=1,VC=function(e){return{case_insensitive:!0,lexemes:/[\w\._]+/,keywords:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",begin:'{"',end:'"}',contains:[e.BACKSLASH_ESCAPE]},e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),e.NUMBER_MODE,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"symbol",begin:"^\\*(\\w+|@)"},e.NUMBER_MODE,e.C_NUMBER_MODE]}}),VC}var WC,w$;function $8e(){return w$||(w$=1,WC=function(e){var t="action collection component concat debugger each each-in else get hash if input link-to loc log mut outlet partial query-params render textarea unbound unless with yield view",r={illegal:/\}\}/,begin:/[a-zA-Z0-9_]+=/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/[a-zA-Z0-9_]+/}]};e.QUOTE_STRING_MODE;var n={endsWithParent:!0,relevance:0,keywords:{keyword:"as",built_in:t},contains:[e.QUOTE_STRING_MODE,r,e.NUMBER_MODE]};return{case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT("{{!(--)?","(--)?}}"),{className:"template-tag",begin:/\{\{[#\/]/,end:/\}\}/,contains:[{className:"name",begin:/[a-zA-Z\.\-]+/,keywords:{"builtin-name":t},starts:n}]},{className:"template-variable",begin:/\{\{[a-zA-Z][a-zA-Z\-]+/,end:/\}\}/,keywords:{keyword:"as",built_in:t},contains:[e.QUOTE_STRING_MODE]}]}}),WC}var KC,E$;function H8e(){return E$||(E$=1,KC=function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],illegal:"\\S",contains:[{begin:"^"+t,end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{begin:"^[A-Z]+ (.*?) "+t+"$",returnBegin:!0,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{begin:t},{className:"keyword",begin:"[A-Z]+"}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{end:"$",relevance:0}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}),KC}var XC,S$;function G8e(){return S$||(S$=1,XC=function(e){var t={"builtin-name":"!= % %= & &= * ** **= *= *map + += , --build-class-- --import-- -= . / // //= /= < << <<= <= = > >= >> >>= @ @= ^ ^= abs accumulate all and any ap-compose ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast callable calling-module-name car case cdr chain chr coll? combinations compile compress cond cons cons? continue count curry cut cycle dec def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first flatten float? fn fnc fnr for for* format fraction genexpr gensym get getattr global globals group-by hasattr hash hex id identity if if* if-not if-python2 import in inc input instance? integer integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass iter iterable? iterate iterator? keyword keyword? lambda last len let lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all map max merge-with method-decorator min multi-decorator multicombinations name neg? next none? nonlocal not not-in not? nth numeric? oct odd? open or ord partition permutations pos? post-route postwalk pow prewalk print product profile/calls profile/cpu put-route quasiquote quote raise range read read-str recursive-replace reduce remove repeat repeatedly repr require rest round route route-with-methods rwm second seq set-comp setattr setv some sorted string string? sum switch symbol? take take-nth take-while tee try unless unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms xi xor yield yield-from zero? zip zip-longest | |= ~"},r="a-zA-Z_\\-!.?+*=<>&#'",n="["+r+"]["+r+"0-9/;:]*",a="[-+]?\\d+(\\.\\d+)?",i={className:"meta",begin:"^#!",end:"$"},s={begin:n,relevance:0},o={className:"number",begin:a,relevance:0},l=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),c=e.COMMENT(";","$",{relevance:0}),u={className:"literal",begin:/\b([Tt]rue|[Ff]alse|nil|None)\b/},f={begin:"[\\[\\{]",end:"[\\]\\}]"},p={className:"comment",begin:"\\^"+n},m=e.COMMENT("\\^\\{","\\}"),b={className:"symbol",begin:"[:]{1,2}"+n},v={begin:"\\(",end:"\\)"},y={endsWithParent:!0,relevance:0},_={keywords:t,lexemes:n,className:"name",begin:n,starts:y},S=[v,l,p,m,c,b,f,o,u,s];return v.contains=[e.COMMENT("comment",""),_,y],y.contains=S,f.contains=S,{aliases:["hylang"],illegal:/\S/,contains:[i,v,l,p,m,c,b,f,o,u]}}),XC}var YC,C$;function V8e(){return C$||(C$=1,YC=function(e){var t="\\[",r="\\]";return{aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:t,end:r}]},{className:"section",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\(This",end:"\\)"}]},{className:"comment",begin:t,end:r,contains:["self"]}]}}),YC}var ZC,T$;function W8e(){return T$||(T$=1,ZC=function(e){var t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]};return{aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT(";","$"),e.HASH_COMMENT_MODE,{className:"section",begin:/^\s*\[+/,end:/\]+/},{begin:/^[a-z0-9\[\]_-]+\s*=\s*/,end:"$",returnBegin:!0,contains:[{className:"attr",begin:/[a-z0-9\[\]_-]+/},{begin:/=/,endsWithParent:!0,relevance:0,contains:[{className:"literal",begin:/\bon|off|true|false|yes|no\b/},{className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},t,{className:"number",begin:/([\+\-]+)?[\d]+_[\d_]+/},e.NUMBER_MODE]}]}]}}),ZC}var QC,A$;function K8e(){return A$||(A$=1,QC=function(e){var t={className:"params",begin:"\\(",end:"\\)"},r={literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated  c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"};return{case_insensitive:!0,keywords:r,illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,t]},e.COMMENT("!","$",{relevance:0}),e.COMMENT("begin_doc","end_doc",{relevance:10}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),QC}var JC,k$;function X8e(){return k$||(k$=1,JC=function(e){var t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=t+"(<"+t+"(\\s*,\\s*"+t+")*>)?",n="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",a="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",i={className:"number",begin:a,relevance:0};return{aliases:["jsp"],keywords:n,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+r+"\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:n,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i,{className:"meta",begin:"@[A-Za-z]+"}]}}),JC}var eT,N$;function Y8e(){return N$||(N$=1,eT=function(e){var t="[A-Za-z$_][0-9A-Za-z$_]*",r={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},n={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},a={className:"subst",begin:"\\$\\{",end:"\\}",keywords:r,contains:[]},i={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,a]};a.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,n,e.REGEXP_MODE];var s=a.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{aliases:["js","jsx"],keywords:r,contains:[{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},{className:"meta",begin:/^#!/,end:/$/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{begin:/[{,]\s*/,relevance:0,contains:[{begin:t+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:t,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+t+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:s}]}]},{begin:/</,end:/(\/\w+|\w+\/)>/,subLanguage:"xml",contains:[{begin:/<\w+\s*\/>/,skip:!0},{begin:/<\w+/,end:/(\/\w+|\w+\/)>/,skip:!0,contains:[{begin:/<\w+\s*\/>/,skip:!0},"self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:s}],illegal:/\[|%/},{begin:/\$[(.]/},e.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0}],illegal:/#(?!!)/}}),eT}var tT,R$;function Z8e(){return R$||(R$=1,tT=function(e){var t={begin:/[\w-]+ *=/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/[\w-]+/}]},r={className:"params",begin:/\(/,end:/\)/,contains:[t],relevance:0},n={className:"function",begin:/:[\w\-.]+/,relevance:0},a={className:"string",begin:/\B(([\/.])[\w\-.\/=]+)+/},i={className:"params",begin:/--[\w\-=\/]+/};return{aliases:["wildfly-cli"],lexemes:"[a-z-]+",keywords:{keyword:"alias batch cd clear command connect connection-factory connection-info data-source deploy deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias undeploy unset version xa-data-source",literal:"true false"},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,i,n,a,r]}}),tT}var rT,M$;function Q8e(){return M$||(M$=1,rT=function(e){var t={literal:"true false null"},r=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],n={end:",",endsWithParent:!0,excludeEnd:!0,contains:r,keywords:t},a={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(n,{begin:/:/})],illegal:"\\S"},i={begin:"\\[",end:"\\]",contains:[e.inherit(n)],illegal:"\\S"};return r.splice(r.length,0,a,i),{contains:r,keywords:t,illegal:"\\S"}}),rT}var nT,D$;function J8e(){return D$||(D$=1,nT=function(e){var t={keyword:"in isa where baremodule begin break catch ccall const continue do else elseif end export false finally for function global if import importall let local macro module quote return true try using while type immutable abstract bitstype typealias ",literal:"true false ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im nothing pi γ π φ ",built_in:"ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool "},r="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",n={lexemes:r,keywords:t,illegal:/<\//},a={className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},i={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},s={className:"subst",begin:/\$\(/,end:/\)/,keywords:t},o={className:"variable",begin:"\\$"+r},l={className:"string",contains:[e.BACKSLASH_ESCAPE,s,o],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},c={className:"string",contains:[e.BACKSLASH_ESCAPE,s,o],begin:"`",end:"`"},u={className:"meta",begin:"@"+r},f={className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]};return n.contains=[a,i,l,c,u,f,e.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{begin:/<:/}],s.contains=n.contains,n}),nT}var aT,O$;function eLe(){return O$||(O$=1,aT=function(e){return{contains:[{className:"meta",begin:/^julia>/,relevance:10,starts:{end:/^(?![ ]{6})/,subLanguage:"julia"},aliases:["jldoctest"]}]}}),aT}var iT,I$;function tLe(){return I$||(I$=1,iT=function(e){var t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit initinterface annotation data sealed internal infix operator out by constructor super trait volatile transient native default",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},r={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},a={className:"subst",begin:"\\${",end:"}",contains:[e.APOS_STRING_MODE,e.C_NUMBER_MODE]},i={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},s={className:"string",variants:[{begin:'"""',end:'"""',contains:[i,a]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,i,a]}]},o={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(s,{className:"meta-string"})]}]};return{keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,n,o,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o,l,s,e.C_NUMBER_MODE]},e.C_BLOCK_COMMENT_MODE]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},o,l]},s,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
`},e.C_NUMBER_MODE]}}),iT}var sT,L$;function rLe(){return L$||(L$=1,sT=function(e){var t="[a-zA-Z_][\\w.]*",r="<\\?(lasso(script)?|=)",n="\\]|\\?>",a={literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},i=e.COMMENT("<!--","-->",{relevance:0}),s={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[i]}},o={className:"meta",begin:"\\[/noprocess|"+r},l={className:"symbol",begin:"'"+t+"'"},c=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$]"+t},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"type",begin:"::\\s*",end:t,illegal:"\\W"},{className:"params",variants:[{begin:"-(?!infinity)"+t,relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[l]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[e.inherit(e.TITLE_MODE,{begin:t+"(=(?!>))?|[-+*/%](?!>)"})]}];return{aliases:["ls","lassoscript"],case_insensitive:!0,lexemes:t+"|&[lg]t;",keywords:a,contains:[{className:"meta",begin:n,relevance:0,starts:{end:"\\[|"+r,returnEnd:!0,relevance:0,contains:[i]}},s,o,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",lexemes:t+"|&[lg]t;",keywords:a,contains:[{className:"meta",begin:n,relevance:0,starts:{end:"\\[noprocess\\]|"+r,returnEnd:!0,contains:[i]}},s,o].concat(c)}},{className:"meta",begin:"\\[",relevance:0},{className:"meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(c)}}),sT}var oT,P$;function nLe(){return P$||(P$=1,oT=function(e){return{contains:[{className:"attribute",begin:"^dn",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0},relevance:10},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0}},{className:"literal",begin:"^-",end:"$"},e.HASH_COMMENT_MODE]}}),oT}var lT,F$;function aLe(){return F$||(F$=1,lT=function(e){return{contains:[{className:"function",begin:"#+[A-Za-z_0-9]*\\(",end:" {",returnBegin:!0,excludeEnd:!0,contains:[{className:"keyword",begin:"#+"},{className:"title",begin:"[A-Za-z_][A-Za-z_0-9]*"},{className:"params",begin:"\\(",end:"\\)",endsParent:!0,contains:[{className:"string",begin:'"',end:'"'},{className:"variable",begin:"[A-Za-z_][A-Za-z_0-9]*"}]}]}]}}),lT}var cT,B$;function iLe(){return B$||(B$=1,cT=function(e){var t="[\\w-]+",r="("+t+"|@{"+t+"})",n=[],a=[],i=function(b){return{className:"string",begin:"~?"+b+".*?"+b}},s=function(b,v,y){return{className:b,begin:v,relevance:y}},o={begin:"\\(",end:"\\)",contains:a,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i("'"),i('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},s("number","#[0-9A-Fa-f]+\\b"),o,s("variable","@@?"+t,10),s("variable","@{"+t+"}"),s("built_in","~?`[^`]*?`"),{className:"attribute",begin:t+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var l=a.concat({begin:"{",end:"}",contains:n}),c={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},u={begin:r+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:r,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},f={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:a,relevance:0}},p={className:"variable",variants:[{begin:"@"+t+"\\s*:",relevance:15},{begin:"@"+t}],starts:{end:"[;}]",returnEnd:!0,contains:l}},m={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:r,end:"{"}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,c,s("keyword","all\\b"),s("variable","@{"+t+"}"),s("selector-tag",r+"%?",0),s("selector-id","#"+r),s("selector-class","\\."+r,0),s("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:l},{begin:"!important"}]};return n.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,p,u,m),{case_insensitive:!0,illegal:`[=>'/<($"]`,contains:n}}),cT}var uT,z$;function sLe(){return z$||(z$=1,uT=function(e){var t="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",r="\\|[^]*?\\|",n="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",a={className:"meta",begin:"^#!",end:"$"},i={className:"literal",begin:"\\b(t{1}|nil)\\b"},s={className:"number",variants:[{begin:n,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+n+" +"+n,end:"\\)"}]},o=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),l=e.COMMENT(";","$",{relevance:0}),c={begin:"\\*",end:"\\*"},u={className:"symbol",begin:"[:&]"+t},f={begin:t,relevance:0},p={begin:r},m={begin:"\\(",end:"\\)",contains:["self",i,o,s,f]},b={contains:[s,o,c,u,m,f],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{name:"quote"}},{begin:"'"+r}]},v={variants:[{begin:"'"+t},{begin:"#'"+t+"(::"+t+")*"}]},y={begin:"\\(\\s*",end:"\\)"},_={endsWithParent:!0,relevance:0};return y.contains=[{className:"name",variants:[{begin:t},{begin:r}]},_],_.contains=[b,v,y,i,s,o,l,c,u,p,f],{illegal:/\S/,contains:[s,a,i,o,l,b,v,y,f]}}),uT}var dT,j$;function oLe(){return j$||(j$=1,dT=function(e){var t={begin:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",relevance:0},r=[e.C_BLOCK_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("--","$"),e.COMMENT("[^:]//","$")],n=e.inherit(e.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),a=e.inherit(e.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",literal:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract union unload wait write"},contains:[t,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[t,a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,n]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[a,n],relevance:0},{beginKeywords:"command on",end:"$",contains:[t,a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,n]},{className:"meta",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,n].concat(r),illegal:";$|^\\[|^=|&|{"}}),dT}var fT,q$;function lLe(){return q$||(q$=1,fT=function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger case default function var with then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super case default function var void const let enum export import native __hasProp __extends __slice __bind __indexOf",literal:"true false null undefined yes no on off it that void",built_in:"npm require console print module global window document"},r="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",n=e.inherit(e.TITLE_MODE,{begin:r}),a={className:"subst",begin:/#\{/,end:/}/,keywords:t},i={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:t},s=[e.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,i]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,a,i]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"regexp",variants:[{begin:"//",end:"//[gim]*",contains:[a,e.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{begin:"@"+r},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];a.contains=s;var o={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(s)}]};return{aliases:["ls"],keywords:t,illegal:/\/\*/,contains:s.concat([e.COMMENT("\\/\\*","\\*\\/"),e.HASH_COMMENT_MODE,{className:"function",contains:[n,o],returnBegin:!0,variants:[{begin:"("+r+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?",end:"\\->\\*?"},{begin:"("+r+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+r+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[n]},n]},{begin:r+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),fT}var hT,U$;function cLe(){return U$||(U$=1,hT=function(e){var t="([-a-zA-Z$._][\\w\\-$.]*)";return{keywords:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common default hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress initialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_twice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr ptrtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalue insertvalue atomicrmw cmpxchg fence argmemonly double",contains:[{className:"keyword",begin:"i\\d+"},e.COMMENT(";","\\n",{relevance:0}),e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:'"',end:'[^\\\\]"'}],relevance:0},{className:"title",variants:[{begin:"@"+t},{begin:"@\\d+"},{begin:"!"+t},{begin:"!\\d+"+t}]},{className:"symbol",variants:[{begin:"%"+t},{begin:"%\\d+"},{begin:"#\\d+"}]},{className:"number",variants:[{begin:"0[xX][a-fA-F0-9]+"},{begin:"-?\\d+(?:[.]\\d+)?(?:[eE][-+]?\\d+(?:[.]\\d+)?)?"}],relevance:0}]}}),hT}var pT,$$;function uLe(){return $$||($$=1,pT=function(e){var t={className:"subst",begin:/\\[tn"\\]/},r={className:"string",begin:'"',end:'"',contains:[t]},n={className:"number",begin:e.C_NUMBER_RE},a={className:"literal",variants:[{begin:"\\b(?:PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b"},{begin:"\\b(?:XP_ERROR_(?:EXPERIENCES_DISABLED|EXPERIENCE_(?:DISABLED|SUSPENDED)|INVALID_(?:EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(?:FOUND|PERMITTED(?:_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(?:IVE|_(?:ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_ON_REZ|NAME|DESC|POS|PRIM_(?:COUNT|EQUIVALENCE)|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP|CREATOR|ATTACHED_POINT|RENDER_WEIGHT|(?:BODY_SHAPE|PATHFINDING)_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(?:BASE|TIP)|[LR]WING|FACE_(?:JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:ALPHA_MODE(?:_(?:BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(?:ALT_IMAGE_ENABLE|CONTROLS|(?:CURRENT|HOME)_URL|AUTO_(?:LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(?:WIDTH|HEIGHT)_PIXELS|WHITELIST(?:_ENABLE)?|PERMS_(?:INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(?:STANDARD|MINI)|PERM_(?:NONE|OWNER|GROUP|ANYONE)|MAX_(?:URL_LENGTH|WHITELIST_(?:SIZE|COUNT)|(?:WIDTH|HEIGHT)_PIXELS)))|MASK_(?:BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(?:TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(?:MEDIA_COMMAND_(?:STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(?:ALLOW_(?:FLY|(?:GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(?:GROUP_)?OBJECTS)|USE_(?:ACCESS_(?:GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(?:GROUP|ALL)_OBJECT_ENTRY)|COUNT_(?:TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(?:NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(?:MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(?:_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(?:HIDE|DEFAULT)|REGION_FLAG_(?:ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(?:COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(?:METHOD|MIMETYPE|BODY_(?:MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|STRING_(?:TRIM(?:_(?:HEAD|TAIL))?)|CLICK_ACTION_(?:NONE|TOUCH|SIT|BUY|PAY|OPEN(?:_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(?:NONE|SCRIPT_MEMORY)|RC_(?:DATA_FLAGS|DETECT_PHANTOM|GET_(?:LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(?:TYPES|AGENTS|(?:NON)?PHYSICAL|LAND))|RCERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(?:ALLOWED_(?:AGENT|GROUP)_(?:ADD|REMOVE)|BANNED_AGENT_(?:ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(?:COMMAND|CMD_(?:PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(?:GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(?:CMD_(?:(?:SMOOTH_)?STOP|JUMP)|DESIRED_(?:TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(?:_(?:[ABCD]|NONE))?|MAX_(?:DECEL|TURN_RADIUS|(?:ACCEL|SPEED)))|PURSUIT_(?:OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(?:CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(?:EVADE_(?:HIDDEN|SPOTTED)|FAILURE_(?:DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:GOAL|START)|NO_(?:NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(?:PARCEL_)?UNREACHABLE)|(?:GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|CONTENT_TYPE_(?:ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(?:RADIUS|STATIC)|(?:PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(?:AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b"},{begin:"\\b(?:FALSE|TRUE)\\b"},{begin:"\\b(?:ZERO_ROTATION)\\b"},{begin:"\\b(?:EOF|JSON_(?:ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(?:BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(?:GRANTED|DENIED))\\b"},{begin:"\\b(?:ZERO_VECTOR|TOUCH_INVALID_(?:TEXCOORD|VECTOR))\\b"}]},i={className:"built_in",begin:"\\b(?:ll(?:AgentInExperience|(?:Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(?:Details|ErrorMessage)|ReturnObjectsBy(?:ID|Owner)|Json(?:2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(?:Mag|Norm|Dist)|Rot(?:Between|2(?:Euler|Fwd|Left|Up))|(?:Euler|Axes)2Rot|Whisper|(?:Region|Owner)?Say|Shout|Listen(?:Control|Remove)?|Sensor(?:Repeat|Remove)?|Detected(?:Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|(?:[GS]et)(?:AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(?:Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(?:Scale|Offset|Rotate)Texture|(?:Rot)?Target(?:Remove)?|(?:Stop)?MoveToTarget|Apply(?:Rotational)?Impulse|Set(?:KeyframedMotion|ContentType|RegionPos|(?:Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(?:Queueing|Radius)|Vehicle(?:Type|(?:Float|Vector|Rotation)Param)|(?:Touch|Sit)?Text|Camera(?:Eye|At)Offset|PrimitiveParams|ClickAction|Link(?:Alpha|Color|PrimitiveParams(?:Fast)?|Texture(?:Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get(?:(?:Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(?:PrimitiveParams|Number(?:OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(?:Details|PermMask|PrimCount)|Parcel(?:MaxPrims|Details|Prim(?:Count|Owners))|Attached(?:List)?|(?:SPMax|Free|Used)Memory|Region(?:Name|TimeDilation|FPS|Corner|AgentCount)|Root(?:Position|Rotation)|UnixTime|(?:Parcel|Region)Flags|(?:Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(?:Prims|NotecardLines|Sides)|Animation(?:List)?|(?:Camera|Local)(?:Pos|Rot)|Vel|Accel|Omega|Time(?:stamp|OfDay)|(?:Object|CenterOf)?Mass|MassMKS|Energy|Owner|(?:Owner)?Key|SunDirection|Texture(?:Offset|Scale|Rot)|Inventory(?:Number|Name|Key|Type|Creator|PermMask)|Permissions(?:Key)?|StartParameter|List(?:Length|EntryType)|Date|Agent(?:Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(?:Name|State))|(?:Get|Reset|GetAndReset)Time|PlaySound(?:Slave)?|LoopSound(?:Master|Slave)?|(?:Trigger|Stop|Preload)Sound|(?:(?:Get|Delete)Sub|Insert)String|To(?:Upper|Lower)|Give(?:InventoryList|Money)|RezObject|(?:Stop)?LookAt|Sleep|CollisionFilter|(?:Take|Release)Controls|DetachFromAvatar|AttachToAvatar(?:Temp)?|InstantMessage|(?:GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(?:Length|Trim)|(?:Start|Stop)Animation|TargetOmega|Request(?:Experience)?Permissions|(?:Create|Break)Link|BreakAllLinks|(?:Give|Remove)Inventory|Water|PassTouches|Request(?:Agent|Inventory)Data|TeleportAgent(?:Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(?:Axis|Angle)|A(?:cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(?:CSV|Integer|Json|Float|String|Key|Vector|Rot|List(?:Strided)?)|DeleteSubList|List(?:Statistics|Sort|Randomize|(?:Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(?:CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(?:Slope|Normal|Contour)|GroundRepel|(?:Set|Remove)VehicleFlags|(?:AvatarOn)?(?:Link)?SitTarget|Script(?:Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(?:Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(?:Integer|String)ToBase64|XorBase64|Log(?:10)?|Base64To(?:String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(?:Load|Release|(?:E|Une)scape)URL|ParcelMedia(?:CommandList|Query)|ModPow|MapDestination|(?:RemoveFrom|AddTo|Reset)Land(?:Pass|Ban)List|(?:Set|Clear)CameraParams|HTTP(?:Request|Response)|TextBox|DetectedTouch(?:UV|Face|Pos|(?:N|Bin)ormal|ST)|(?:MD5|SHA1|DumpList2)String|Request(?:Secure)?URL|Clear(?:Prim|Link)Media|(?:Link)?ParticleSystem|(?:Get|Request)(?:Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(?:Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b"};return{illegal:":",contains:[r,{className:"comment",variants:[e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/")]},n,{className:"section",variants:[{begin:"\\b(?:state|default)\\b"},{begin:"\\b(?:state_(?:entry|exit)|touch(?:_(?:start|end))?|(?:land_)?collision(?:_(?:start|end))?|timer|listen|(?:no_)?sensor|control|(?:not_)?at_(?:rot_)?target|money|email|experience_permissions(?:_denied)?|run_time_permissions|changed|attach|dataserver|moving_(?:start|end)|link_message|(?:on|object)_rez|remote_data|http_re(?:sponse|quest)|path_update|transaction_result)\\b"}]},i,a,{className:"type",begin:"\\b(?:integer|float|string|key|vector|quaternion|rotation|list)\\b"}]}}),pT}var mT,H$;function dLe(){return H$||(H$=1,mT=function(e){var t="\\[=*\\[",r="\\]=*\\]",n={begin:t,end:r,contains:["self"]},a=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,r,{contains:[n],relevance:10})];return{lexemes:e.UNDERSCORE_IDENT_RE,keywords:{literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstringmodule next pairs pcall print rawequal rawget rawset require select setfenvsetmetatable tonumber tostring type unpack xpcall arg selfcoroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:a.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:a}].concat(a)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:r,contains:[n],relevance:5}])}}),mT}var gT,G$;function fLe(){return G$||(G$=1,gT=function(e){var t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},n={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t]},a={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*[:+?]?=",illegal:"\\n",returnBegin:!0,contains:[{begin:"^"+e.UNDERSCORE_IDENT_RE,end:"[:+?]?=",excludeEnd:!0}]},i={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{"meta-keyword":".PHONY"},lexemes:/[\.\w]+/},s={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{aliases:["mk","mak"],keywords:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath",lexemes:/[\w-]+/,contains:[e.HASH_COMMENT_MODE,t,r,n,a,i,s]}}),gT}var vT,V$;function hLe(){return V$||(V$=1,vT=function(e){return{aliases:["mma"],lexemes:"(\\$|\\b)"+e.IDENT_RE+"\\b",keywords:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber",contains:[{className:"comment",begin:/\(\*/,end:/\*\)/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{begin:/\{/,end:/\}/,illegal:/:/}]}}),vT}var bT,W$;function pLe(){return W$||(W$=1,bT=function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}],r={relevance:0,contains:[{begin:/'['\.]*/}]};return{keywords:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}]}]},{begin:/[a-zA-Z_][a-zA-Z_0-9]*'['\.]*/,returnBegin:!0,relevance:0,contains:[{begin:/[a-zA-Z_][a-zA-Z_0-9]*/,relevance:0},r.contains[0]]},{begin:"\\[",end:"\\]",contains:t,relevance:0,starts:r},{begin:"\\{",end:/}/,contains:t,relevance:0,starts:r},{begin:/\)/,relevance:0,starts:r},e.COMMENT("^\\s*\\%\\{\\s*$","^\\s*\\%\\}\\s*$"),e.COMMENT("\\%","$")].concat(t)}}),bT}var xT,K$;function mLe(){return K$||(K$=1,xT=function(e){var t="if then else elseif for thru do while unless step in and or not",r="true false unknown inf minf ind und %e %i %pi %phi %gamma",n=" abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type alias allroots alphacharp alphanumericp amortization %and annuity_fv annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2 applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method av average_degree backtrace bars barsplot barsplot_description base64 base64_decode bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description break bug_report build_info|10 buildq build_sample burn cabs canform canten cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2 charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps chinese cholesky christof chromatic_index chromatic_number cint circulant_graph clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse collectterms columnop columnspace columnswap columnvector combination combine comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph complete_graph complex_number_p components compose_functions concan concat conjugate conmetderiv connected_components connect_vertices cons constant constantp constituent constvalue cont2part content continuous_freq contortion contour_plot contract contract_edge contragrad contrib_ode convert coord copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1 covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate declare declare_constvalue declare_dimensions declare_fundamental_dimensions declare_fundamental_units declare_qty declare_translated declare_unit_conversion declare_units declare_weights decsym defcon define define_alt_display define_variable defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten delta demo demoivre denom depends derivdegree derivlist describe desolve determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export dimacs_import dimension dimensionless dimensions dimensions_as_list direct directory discrete_freq disjoin disjointp disolate disp dispcon dispform dispfun dispJordan display disprule dispterms distrib divide divisors divsum dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors euler ev eval_string evenp every evolution evolution2d evundiff example exp expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li expintegral_shi expintegral_si explicit explose exponentialize express expt exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge file_search file_type fillarray findde find_root find_root_abs find_root_error find_root_rel first fix flatten flength float floatnump floor flower_snark flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string get_pixel get_plot_option get_tex_environment get_tex_environment_default get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart imetric implicit implicit_derivative implicit_plot indexed_tensor indices induced_subgraph inferencep inference_result infix info_display init_atensor init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions integrate intersect intersection intervalp intopois intosum invariant1 invariant2 inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2 kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit Lindstedt linear linearinterpol linear_program linear_regression line_graph linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country make_polygon make_random_state make_rgb_picture makeset make_string_input_stream make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker max max_clique max_degree max_flow maximize_lp max_independent_set max_matching maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext newdet new_graph newline newton new_variable next_prime nicedummies niceindices ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst nthroot nullity nullspace num numbered_boundaries numberp number_to_octets num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin oid_to_octets op opena opena_binary openr openr_binary openw openw_binary operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface parg parGosper parse_string parse_timedate part part2cont partfrac partition partition_set partpol path_digraph path_graph pathname_directory pathname_name pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod powerseries powerset prefix prev_prime primep primes principal_components print printf printfile print_graph printpois printprops prodrac product properties propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2 quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan radius random random_bernoulli random_beta random_binomial random_bipartite_graph random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform random_exp random_f random_gamma random_general_finite_discrete random_geometric random_graph random_graph1 random_gumbel random_hypergeometric random_laplace random_logistic random_lognormal random_negative_binomial random_network random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto random_permutation random_poisson random_rayleigh random_regular_graph random_student_t random_tournament random_tree random_weibull range rank rat ratcoef ratdenom ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus rem remainder remarray rembox remcomps remcon remcoord remfun remfunction remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions remove_fundamental_units remove_plot_option remove_vertex rempart remrule remsym remvalue rename rename_file reset reset_displays residue resolvante resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann rinvariant risch rk rmdir rncombine romberg room rootscontract round row rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1 spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot starplot_description status std std1 std_bernoulli std_beta std_binomial std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull stemplot stirling stirling1 stirling2 strim striml strimr string stringout stringp strong_components struve_h struve_l sublis sublist sublist_indices submatrix subsample subset subsetp subst substinpart subst_parallel substpart substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext symbolp symmdifference symmetricp system take_channel take_inference tan tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference test_normality test_proportion test_proportions_difference test_rank_sum test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep totalfourier totient tpartpol trace tracematrix trace_options transform_sample translate translate_file transpose treefale tree_reduce treillis treinat triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget ultraspherical underlying_graph undiff union unique uniteigenvectors unitp units unit_step unitvector unorder unsum untellrat untimer untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table absboxchar activecontexts adapt_depth additive adim aform algebraic algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top azimuth background background_color backsubst berlefact bernstein_explicit besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest border boundaries_array box boxchar breakup %c capping cauchysum cbrange cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics colorbox columns commutative complex cone context contexts contour contour_levels cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp cube current_let_rule_package cylinder data_file_name debugmode decreasing default_let_rule_package delay dependencies derivabbrev derivsubst detout diagmetric diff dim dimensions dispflag display2d|10 display_format_internal distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart edge_color edge_coloring edge_partition edge_type edge_width %edispflag elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine factlim factorflag factorial_expand factors_only fb feature features file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10 file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color fill_density filled_func fixed_vertices flipflag float2bf font font_size fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both head_length head_type height hypergeometric_representation %iargs ibase icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued integrate_use_rootsof integration_constant integration_constant_counter interpolate_color intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10 maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties opsubst optimprefix optionset orientation origin orthopoly_returns_intervals outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart png_file pochhammer_max_index points pointsize point_size points_joined point_type poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list poly_secondary_elimination_order poly_top_reduction_only posfun position powerdisp pred prederror primep_number_of_tests product_use_gamma program programmode promote_float_to_bigfloat prompt proportional_axes props psexpand ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type show_vertices show_weight simp simplified_output simplify_products simpproduct simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch tr track transcompile transform transform_xy translate_fast_arrays transparent transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest",a="_ __ %|0 %%|0";return{lexemes:"[A-Za-z_%][0-9A-Za-z_%]*",keywords:{keyword:t,literal:r,built_in:n,symbol:a},contains:[{className:"comment",begin:"/\\*",end:"\\*/",contains:["self"]},e.QUOTE_STRING_MODE,{className:"number",relevance:0,variants:[{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b"},{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b",relevance:10},{begin:"\\b(\\.\\d+|\\d+\\.\\d+)\\b"},{begin:"\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b"}]}],illegal:/@/}}),xT}var yT,X$;function gLe(){return X$||(X$=1,yT=function(e){return{keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",illegal:"</",contains:[e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}),yT}var _T,Y$;function vLe(){return Y$||(Y$=1,_T=function(e){var t={keyword:"module use_module import_module include_module end_module initialise mutable initialize finalize finalise interface implementation pred mode func type inst solver any_pred any_func is semidet det nondet multi erroneous failure cc_nondet cc_multi typeclass instance where pragma promise external trace atomic or_else require_complete_switch require_det require_semidet require_multi require_nondet require_cc_multi require_cc_nondet require_erroneous require_failure",meta:"inline no_inline type_spec source_file fact_table obsolete memo loop_check minimal_model terminates does_not_terminate check_termination promise_equivalent_clauses foreign_proc foreign_decl foreign_code foreign_type foreign_import_module foreign_export_enum foreign_export foreign_enum may_call_mercury will_not_call_mercury thread_safe not_thread_safe maybe_thread_safe promise_pure promise_semipure tabled_for_io local untrailed trailed attach_to_io_state can_pass_as_mercury_type stable will_not_throw_exception may_modify_trail will_not_modify_trail may_duplicate may_not_duplicate affects_liveness does_not_affect_liveness doesnt_affect_liveness no_sharing unknown_sharing sharing",built_in:"some all not if then else true fail false try catch catch_any semidet_true semidet_false semidet_fail impure_true impure semipure"},r=e.COMMENT("%","$"),n={className:"number",begin:"0'.\\|0[box][0-9a-fA-F]*"},a=e.inherit(e.APOS_STRING_MODE,{relevance:0}),i=e.inherit(e.QUOTE_STRING_MODE,{relevance:0}),s={className:"subst",begin:"\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]",relevance:0};i.contains.push(s);var o={className:"built_in",variants:[{begin:"<=>"},{begin:"<=",relevance:0},{begin:"=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},l={className:"built_in",variants:[{begin:":-\\|-->"},{begin:"=",relevance:0}]};return{aliases:["m","moo"],keywords:t,contains:[o,l,r,e.C_BLOCK_COMMENT_MODE,n,e.NUMBER_MODE,a,i,{begin:/:-/}]}}),_T}var wT,Z$;function bLe(){return Z$||(Z$=1,wT=function(e){return{case_insensitive:!0,aliases:["mips"],lexemes:"\\.?"+e.IDENT_RE,keywords:{meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ",built_in:"$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 k0 k1 gp sp fp ra $f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 $f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt "},contains:[{className:"keyword",begin:"\\b(addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(.hb)?|jr(.hb)?|lbu?|lhu?|ll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|srlv?|subu?|sw[lr]?|xori?|wsbh|abs.[sd]|add.[sd]|alnv.ps|bc1[ft]l?|c.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et]).[sd]|(ceil|floor|round|trunc).[lw].[sd]|cfc1|cvt.d.[lsw]|cvt.l.[dsw]|cvt.ps.s|cvt.s.[dlw]|cvt.s.p[lu]|cvt.w.[dls]|div.[ds]|ldx?c1|luxc1|lwx?c1|madd.[sd]|mfc1|mov[fntz]?.[ds]|msub.[sd]|mth?c1|mul.[ds]|neg.[ds]|nmadd.[ds]|nmsub.[ds]|p[lu][lu].ps|recip.fmt|r?sqrt.[ds]|sdx?c1|sub.[ds]|suxc1|swx?c1|break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|tlti?u?|tnei?|wait|wrpgpr)",end:"\\s"},e.COMMENT("[;#]","$"),e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"0x[0-9a-f]+"},{begin:"\\b-?\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^\\s*[0-9]+:"},{begin:"[0-9]+[bf]"}],relevance:0}],illegal:"/"}}),wT}var ET,Q$;function xLe(){return Q$||(Q$=1,ET=function(e){return{keywords:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",contains:[e.COMMENT("::","$")]}}),ET}var ST,J$;function yLe(){return J$||(J$=1,ST=function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:t},n={begin:"->{",end:"}"},a={variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},i=[e.BACKSLASH_ESCAPE,r,a],s=[a,e.HASH_COMMENT_MODE,e.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),n,{className:"string",contains:i,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[e.BACKSLASH_ESCAPE],relevance:0}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return r.contains=s,n.contains=s,{aliases:["pl","pm"],lexemes:/[\w\.]+/,keywords:t,contains:s}}),ST}var CT,eH;function _Le(){return eH||(eH=1,CT=function(e){return{subLanguage:"xml",contains:[{className:"meta",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}),CT}var TT,tH;function wLe(){return tH||(tH=1,TT=function(e){var t={className:"number",relevance:0,variants:[{begin:"[$][a-fA-F0-9]+"},e.NUMBER_MODE]};return{case_insensitive:!0,keywords:{keyword:"public private property continue exit extern new try catch eachin not abstract final select case default const local global field end if then else elseif endif while wend repeat until forever for to step next return module inline throw import",built_in:"DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI",literal:"true false null and or shl shr mod"},illegal:/\/\*/,contains:[e.COMMENT("#rem","#end"),e.COMMENT("'","$",{relevance:0}),{className:"function",beginKeywords:"function method",end:"[(=:]|$",illegal:/\n/,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"$",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{className:"built_in",begin:"\\b(self|super)\\b"},{className:"meta",begin:"\\s*#",end:"$",keywords:{"meta-keyword":"if else elseif endif end then"}},{className:"meta",begin:"^\\s*strict\\b"},{beginKeywords:"alias",end:"=",contains:[e.UNDERSCORE_TITLE_MODE]},e.QUOTE_STRING_MODE,t]}}),TT}var AT,rH;function ELe(){return rH||(rH=1,AT=function(e){var t={keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",literal:"true false nil",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},r="[A-Za-z$_][0-9A-Za-z$_]*",n={className:"subst",begin:/#\{/,end:/}/,keywords:t},a=[e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n]}]},{className:"built_in",begin:"@__"+e.IDENT_RE},{begin:"@"+e.IDENT_RE},{begin:e.IDENT_RE+"\\\\"+e.IDENT_RE}];n.contains=a;var i=e.inherit(e.TITLE_MODE,{begin:r}),s="(\\(.*\\))?\\s*\\B[-=]>",o={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(a)}]};return{aliases:["moon"],keywords:t,illegal:/\/\*/,contains:a.concat([e.COMMENT("--","$"),{className:"function",begin:"^\\s*"+r+"\\s*=\\s*"+s,end:"[-=]>",returnBegin:!0,contains:[i,o]},{begin:/[\(,:=]\s*/,relevance:0,contains:[{className:"function",begin:s,end:"[-=]>",returnBegin:!0,contains:[o]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[i]},i]},{className:"name",begin:r+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),AT}var kT,nH;function SLe(){return nH||(nH=1,kT=function(e){return{case_insensitive:!0,contains:[{beginKeywords:"build create index delete drop explain infer|10 insert merge prepare select update upsert|10",end:/;/,endsWithParent:!0,keywords:{keyword:"all alter analyze and any array as asc begin between binary boolean break bucket build by call case cast cluster collate collection commit connect continue correlate cover create database dataset datastore declare decrement delete derived desc describe distinct do drop each element else end every except exclude execute exists explain fetch first flatten for force from function grant group gsi having if ignore ilike in include increment index infer inline inner insert intersect into is join key keys keyspace known last left let letting like limit lsm map mapping matched materialized merge minus namespace nest not number object offset on option or order outer over parse partition password path pool prepare primary private privilege procedure public raw realm reduce rename return returning revoke right role rollback satisfies schema select self semi set show some start statistics string system then to transaction trigger truncate under union unique unknown unnest unset update upsert use user using validate value valued values via view when where while with within work xor",literal:"true false null missing|5",built_in:"array_agg array_append array_concat array_contains array_count array_distinct array_ifnull array_length array_max array_min array_position array_prepend array_put array_range array_remove array_repeat array_replace array_reverse array_sort array_sum avg count max min sum greatest least ifmissing ifmissingornull ifnull missingif nullif ifinf ifnan ifnanorinf naninf neginfif posinfif clock_millis clock_str date_add_millis date_add_str date_diff_millis date_diff_str date_part_millis date_part_str date_trunc_millis date_trunc_str duration_to_str millis str_to_millis millis_to_str millis_to_utc millis_to_zone_name now_millis now_str str_to_duration str_to_utc str_to_zone_name decode_json encode_json encoded_size poly_length base64 base64_encode base64_decode meta uuid abs acos asin atan atan2 ceil cos degrees e exp ln log floor pi power radians random round sign sin sqrt tan trunc object_length object_names object_pairs object_inner_pairs object_values object_inner_values object_add object_put object_remove object_unwrap regexp_contains regexp_like regexp_position regexp_replace contains initcap length lower ltrim position repeat replace rtrim split substr title trim upper isarray isatom isboolean isnumber isobject isstring type toarray toatom toboolean tonumber toobject tostring"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE],relevance:0},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE],relevance:0},{className:"symbol",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE],relevance:2},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_BLOCK_COMMENT_MODE]}}),kT}var NT,aH;function CLe(){return aH||(aH=1,NT=function(e){var t={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+e.UNDERSCORE_IDENT_RE}]},r={endsWithParent:!0,lexemes:"[a-z/_]+",keywords:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[t]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},t]};return{aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s+{",returnBegin:!0,end:"{",contains:[{className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:r}],relevance:0}],illegal:"[^\\s\\}]"}}),NT}var RT,iH;function TLe(){return iH||(iH=1,RT=function(e){return{aliases:["nim"],keywords:{keyword:"addr and as asm bind block break case cast const continue converter discard distinct div do elif else end enum except export finally for from generic if import in include interface is isnot iterator let macro method mixin mod nil not notin object of or out proc ptr raise ref return shl shr static template try tuple type using var when while with without xor yield",literal:"shared guarded stdin stdout stderr result true false",built_in:"int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float float32 float64 bool char string cstring pointer expr stmt void auto any range array openarray varargs seq set clong culong cchar cschar cshort cint csize clonglong cfloat cdouble clongdouble cuchar cushort cuint culonglong cstringarray semistatic"},contains:[{className:"meta",begin:/{\./,end:/\.}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},e.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},e.HASH_COMMENT_MODE]}}),RT}var MT,sH;function ALe(){return sH||(sH=1,MT=function(e){var t={keyword:"rec with let in inherit assert if else then",literal:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},r={className:"subst",begin:/\$\{/,end:/}/,keywords:t},n={begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/\S+/}]},a={className:"string",contains:[r],variants:[{begin:"''",end:"''"},{begin:'"',end:'"'}]},i=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,n];return r.contains=i,{aliases:["nixos"],keywords:t,contains:i}}),MT}var DT,oH;function kLe(){return oH||(oH=1,DT=function(e){var t={className:"variable",begin:/\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)/},r={className:"variable",begin:/\$+{[\w\.:-]+}/},n={className:"variable",begin:/\$+\w+/,illegal:/\(\){}/},a={className:"variable",begin:/\$+\([\w\^\.:-]+\)/},i={className:"params",begin:"(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)"},s={className:"keyword",begin:/\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)/},o={className:"subst",begin:/\$(\\[nrt]|\$)/},l={className:"class",begin:/\w+\:\:\w+/},c={className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"},{begin:"`",end:"`"}],illegal:/\n/,contains:[o,t,r,n,a]};return{case_insensitive:!1,keywords:{keyword:"Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle",literal:"admin all auto both bottom bzip2 colored components current custom directory false force hide highest ifdiff ifnewer instfiles lastused leave left license listonly lzma nevershow none normal notset off on open print right show silent silentlog smooth textonly top true try un.components un.custom un.directory un.instfiles un.license uninstConfirm user Win10 Win7 Win8 WinVista zlib"},contains:[e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),{className:"function",beginKeywords:"Function PageEx Section SectionGroup",end:"$"},c,s,r,n,a,i,l,e.NUMBER_MODE]}}),DT}var OT,lH;function NLe(){return lH||(lH=1,OT=function(e){var t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,a="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],keywords:r,lexemes:n,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"}]},{className:"meta",begin:"#",end:"$",contains:[{className:"meta-string",variants:[{begin:'"',end:'"'},{begin:"<",end:">"}]}]},{className:"class",begin:"("+a.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:a,lexemes:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}),OT}var IT,cH;function RLe(){return cH||(cH=1,IT=function(e){return{aliases:["ml"],keywords:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}),IT}var LT,uH;function MLe(){return uH||(uH=1,LT=function(e){var t={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|children)"},r={className:"literal",begin:"false|true|PI|undef"},n={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},a=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),i={className:"meta",keywords:{"meta-keyword":"include use"},begin:"include|use <",end:">"},s={className:"params",begin:"\\(",end:"\\)",contains:["self",n,a,t,r]},o={begin:"[*!#%]",relevance:0},l={className:"function",beginKeywords:"module function",end:"\\=|\\{",contains:[s,e.UNDERSCORE_TITLE_MODE]};return{aliases:["scad"],keywords:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,i,a,t,o,l]}}),LT}var PT,dH;function DLe(){return dH||(dH=1,PT=function(e){var t="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained",r=e.COMMENT("{","}",{relevance:0}),n=e.COMMENT("\\(\\*","\\*\\)",{relevance:10}),a={className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},i={className:"string",begin:"(#\\d+)+"},s={className:"function",beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 destructor|10 procedure|10 method|10",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",keywords:t,contains:[a,i]},r,n]};return{case_insensitive:!0,lexemes:/\.?\w+/,keywords:t,illegal:'("|\\$[G-Zg-z]|\\/\\*|</|=>|->)',contains:[r,n,e.C_LINE_COMMENT_MODE,a,i,e.NUMBER_MODE,s,{className:"class",begin:"=\\bclass\\b",end:"end;",keywords:t,contains:[a,i,r,n,e.C_LINE_COMMENT_MODE,s]}]}}),PT}var FT,fH;function OLe(){return fH||(fH=1,FT=function(e){var t=e.COMMENT("{","}",{contains:["self"]});return{subLanguage:"xml",relevance:0,contains:[e.COMMENT("^#","$"),e.COMMENT("\\^rem{","}",{relevance:10,contains:[t]}),{className:"meta",begin:"^@(?:BASE|USE|CLASS|OPTIONS)$",relevance:10},{className:"title",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:"\\$\\{?[\\w\\-\\.\\:]+\\}?"},{className:"keyword",begin:"\\^[\\w\\-\\.\\:]+"},{className:"number",begin:"\\^#[0-9a-fA-F]+"},e.C_NUMBER_MODE]}}),FT}var BT,hH;function ILe(){return hH||(hH=1,BT=function(e){var t={className:"variable",begin:/\$[\w\d#@][\w\d_]*/},r={className:"variable",begin:/<(?!\/)/,end:/>/};return{aliases:["pf.conf"],lexemes:/[a-z0-9_<>-]+/,keywords:{built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to routeallow-opts divert-packet divert-reply divert-to flags group icmp-typeicmp6-type label once probability recieved-on rtable prio queuetos tag tagged user keep fragment for os dropaf-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robinsource-hash static-portdup-to reply-to route-toparent bandwidth default min max qlimitblock-policy debug fingerprints hostid limit loginterface optimizationreassemble ruleset-optimization basic none profile skip state-defaultsstate-policy timeoutconst counters persistno modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppysource-track global rule max-src-nodes max-src-states max-src-connmax-src-conn-rate overload flushscrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},contains:[e.HASH_COMMENT_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE,t,r]}}),BT}var zT,pH;function LLe(){return pH||(pH=1,zT=function(e){var t={begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},r={className:"meta",begin:/<\?(php)?|\?>/},n={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},a={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["php3","php4","php5","php6"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[r]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[e.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},r,{className:"keyword",begin:/\$this\b/},t,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",t,e.C_BLOCK_COMMENT_MODE,n,a]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},n,a]}}),zT}var jT,mH;function PLe(){return mH||(mH=1,jT=function(e){var t={keyword:"actor addressof and as be break class compile_error compile_intrinsicconsume continue delegate digestof do else elseif embed end errorfor fun if ifdef in interface is isnt lambda let match new not objector primitive recover repeat return struct then trait try type until use var where while with xor",meta:"iso val tag trn box ref",literal:"this false true"},r={className:"string",begin:'"""',end:'"""',relevance:10},n={className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE]},a={className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE],relevance:0},i={className:"type",begin:"\\b_?[A-Z][\\w]*",relevance:0},s={begin:e.IDENT_RE+"'",relevance:0},o={className:"class",beginKeywords:"class actor",end:"$",contains:[e.TITLE_MODE,e.C_LINE_COMMENT_MODE]},l={className:"function",beginKeywords:"new fun",end:"=>",contains:[e.TITLE_MODE,{begin:/\(/,end:/\)/,contains:[i,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:/:/,endsWithParent:!0,contains:[i]},e.C_LINE_COMMENT_MODE]};return{keywords:t,contains:[o,l,i,r,n,a,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}),jT}var qT,gH;function FLe(){return gH||(gH=1,qT=function(e){var t={begin:"`[\\s\\S]",relevance:0},r={className:"variable",variants:[{begin:/\$[\w\d][\w\d_:]*/}]},n={className:"literal",begin:/\$(null|true|false)\b/},a={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[t,r,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},i={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},s={className:"doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]},o=e.inherit(e.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[s]});return{aliases:["ps"],lexemes:/-?[A-z\.\-]+/,case_insensitive:!0,keywords:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",built_in:"Add-Computer Add-Content Add-History Add-JobTrigger Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-Variable Compare-Object Complete-Transaction Connect-PSSession Connect-WSMan Convert-Path ConvertFrom-Csv ConvertFrom-Json ConvertFrom-SecureString ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Process Disable-ComputerRestore Disable-JobTrigger Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-WSManCredSSP Disconnect-PSSession Disconnect-WSMan Disable-ScheduledJob Enable-ComputerRestore Enable-JobTrigger Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-ScheduledJob Enable-WSManCredSSP Enter-PSSession Exit-PSSession Export-Alias Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-PSSession ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-FormatData Get-Host Get-HotFix Get-Help Get-History Get-IseSnippet Get-Item Get-ItemProperty Get-Job Get-JobTrigger Get-Location Get-Member Get-Module Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-Clixml Import-Counter Import-Csv Import-IseSnippet Import-LocalizedData Import-PSSession Import-Module Invoke-AsWorkflow Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Event New-EventLog New-IseSnippet New-Item New-ItemProperty New-JobTrigger New-Object New-Module New-ModuleManifest New-PSDrive New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-Service New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Receive-Job Register-EngineEvent Register-ObjectEvent Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSSession Remove-PSSnapin Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-Location Set-PSBreakpoint Set-PSDebug Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-Command Unblock-File Undo-Transaction Unregister-Event Unregister-PSSessionConfiguration Unregister-ScheduledJob Update-FormatData Update-Help Update-List Update-TypeData Use-Transaction Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Output Write-Progress Write-Verbose Write-Warning Add-MDTPersistentDrive Disable-MDTMonitorService Enable-MDTMonitorService Get-MDTDeploymentShareStatistics Get-MDTMonitorData Get-MDTOperatingSystemCatalog Get-MDTPersistentDrive Import-MDTApplication Import-MDTDriver Import-MDTOperatingSystem Import-MDTPackage Import-MDTTaskSequence New-MDTDatabase Remove-MDTMonitorData Remove-MDTPersistentDrive Restore-MDTPersistentDrive Set-MDTMonitorData Test-MDTDeploymentShare Test-MDTMonitorData Update-MDTDatabaseSchema Update-MDTDeploymentShare Update-MDTLinkedDS Update-MDTMedia Update-MDTMedia Add-VamtProductKey Export-VamtData Find-VamtManagedMachine Get-VamtConfirmationId Get-VamtProduct Get-VamtProductKey Import-VamtData Initialize-VamtData Install-VamtConfirmationId Install-VamtProductActivation Install-VamtProductKey Update-VamtProduct",nomarkup:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},contains:[t,e.NUMBER_MODE,a,i,n,r,o]}}),qT}var UT,vH;function BLe(){return vH||(vH=1,UT=function(e){return{keywords:{keyword:"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI",title:"setup draw",built_in:"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}),UT}var $T,bH;function zLe(){return bH||(bH=1,$T=function(e){return{contains:[e.C_NUMBER_MODE,{begin:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},{begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{begin:"function calls",end:"$",contains:[e.C_NUMBER_MODE],relevance:10},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\(",end:"\\)$",excludeBegin:!0,excludeEnd:!0,relevance:0}]}}),$T}var HT,xH;function jLe(){return xH||(xH=1,HT=function(e){var t={begin:/[a-z][A-Za-z0-9_]*/,relevance:0},r={className:"symbol",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},n={begin:/\(/,end:/\)/,relevance:0},a={begin:/\[/,end:/\]/},i={className:"comment",begin:/%/,end:/$/,contains:[e.PHRASAL_WORDS_MODE]},s={className:"string",begin:/`/,end:/`/,contains:[e.BACKSLASH_ESCAPE]},o={className:"string",begin:/0\'(\\\'|.)/},l={className:"string",begin:/0\'\\s/},c={begin:/:-/},u=[t,r,n,c,a,i,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,s,o,l,e.C_NUMBER_MODE];return n.contains=u,a.contains=u,{contains:u.concat([{begin:/\.$/}])}}),HT}var GT,yH;function qLe(){return yH||(yH=1,GT=function(e){return{keywords:{keyword:"package import option optional required repeated group",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,{className:"class",beginKeywords:"message enum service",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"function",beginKeywords:"rpc",end:/;/,excludeEnd:!0,keywords:"rpc returns"},{begin:/^\s*[A-Z_]+/,end:/\s*=/,excludeEnd:!0}]}}),GT}var VT,_H;function ULe(){return _H||(_H=1,VT=function(e){var t={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},r=e.COMMENT("#","$"),n="([A-Za-z_]|::)(\\w|::)*",a=e.inherit(e.TITLE_MODE,{begin:n}),i={className:"variable",begin:"\\$"+n},s={className:"string",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]};return{aliases:["pp"],contains:[r,i,s,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[a,r]},{beginKeywords:"define",end:/\{/,contains:[{className:"section",begin:e.IDENT_RE,endsParent:!0}]},{begin:e.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"keyword",begin:e.IDENT_RE},{begin:/\{/,end:/\}/,keywords:t,relevance:0,contains:[s,r,{begin:"[a-zA-Z_]+\\s*=>",returnBegin:!0,end:"=>",contains:[{className:"attr",begin:e.IDENT_RE}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},i]}],relevance:0}]}}),VT}var WT,wH;function $Le(){return wH||(wH=1,WT=function(e){var t={className:"string",begin:'(~)?"',end:'"',illegal:"\\n"},r={className:"symbol",begin:"#[a-zA-Z_]\\w*\\$?"};return{aliases:["pb","pbi"],keywords:"And As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerEndIf CompilerEndSelect CompilerError CompilerIf CompilerSelect Continue Data DataSection EndDataSection Debug DebugLevel Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM EnableDebugger EnableExplicit End EndEnumeration EndIf EndImport EndInterface EndMacro EndProcedure EndSelect EndStructure EndStructureUnion EndWith Enumeration Extends FakeReturn For Next ForEach ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface Macro NewList Not Or ProcedureReturn Protected Prototype PrototypeC Read ReDim Repeat Until Restore Return Select Shared Static Step Structure StructureUnion Swap To Wend While With XIncludeFile XOr Procedure ProcedureC ProcedureCDLL ProcedureDLL Declare DeclareC DeclareCDLL DeclareDLL",contains:[e.COMMENT(";","$",{relevance:0}),{className:"function",begin:"\\b(Procedure|Declare)(C|CDLL|DLL)?\\b",end:"\\(",excludeEnd:!0,returnBegin:!0,contains:[{className:"keyword",begin:"(Procedure|Declare)(C|CDLL|DLL)?",excludeEnd:!0},{className:"type",begin:"\\.\\w*"},e.UNDERSCORE_TITLE_MODE]},t,r]}}),WT}var KT,EH;function HLe(){return EH||(EH=1,KT=function(e){var t={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},r={className:"meta",begin:/^(>>>|\.\.\.) /},n={className:"subst",begin:/\{/,end:/\}/,keywords:t,illegal:/#/},a={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[r],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[r],relevance:10},{begin:/(fr|rf|f)'''/,end:/'''/,contains:[r,n]},{begin:/(fr|rf|f)"""/,end:/"""/,contains:[r,n]},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},{begin:/(fr|rf|f)'/,end:/'/,contains:[n]},{begin:/(fr|rf|f)"/,end:/"/,contains:[n]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},i={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},s={className:"params",begin:/\(/,end:/\)/,contains:["self",r,i,a]};return n.contains=[a,i,r],{aliases:["py","gyp"],keywords:t,illegal:/(<\/|->|\?)|=>/,contains:[r,i,a,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,s,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}),KT}var XT,SH;function GLe(){return SH||(SH=1,XT=function(e){var t={keyword:"do while select delete by update from",literal:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",type:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"};return{aliases:["k","kdb"],keywords:t,lexemes:/(`?)[A-Za-z0-9_]+\b/,contains:[e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}),XT}var YT,CH;function VLe(){return CH||(CH=1,YT=function(e){var t={keyword:"in of on if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url variant vector2d vector3d vector4dPromise"},r="[a-zA-Z_][a-zA-Z0-9\\._]*",n={className:"keyword",begin:"\\bproperty\\b",starts:{className:"string",end:"(:|=|;|,|//|/\\*|$)",returnEnd:!0}},a={className:"keyword",begin:"\\bsignal\\b",starts:{className:"string",end:"(\\(|:|=|;|,|//|/\\*|$)",returnEnd:!0}},i={className:"attribute",begin:"\\bid\\s*:",starts:{className:"string",end:r,returnEnd:!1}},s={begin:r+"\\s*:",returnBegin:!0,contains:[{className:"attribute",begin:r,end:"\\s*:",excludeEnd:!0,relevance:0}],relevance:0},o={begin:r+"\\s*{",end:"{",returnBegin:!0,relevance:0,contains:[e.inherit(e.TITLE_MODE,{begin:r})]};return{aliases:["qt"],case_insensitive:!1,keywords:t,contains:[{className:"meta",begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{begin:/</,end:/>\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},a,n,{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:"\\."+e.IDENT_RE,relevance:0},i,s,o],illegal:/#/}}),YT}var ZT,TH;function WLe(){return TH||(TH=1,ZT=function(e){var t="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{contains:[e.HASH_COMMENT_MODE,{begin:t,lexemes:t,keywords:{keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{begin:"`",end:"`",relevance:0},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]}]}}),ZT}var QT,AH;function KLe(){return AH||(AH=1,QT=function(e){return{keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:"</",contains:[e.HASH_COMMENT_MODE,e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}),QT}var JT,kH;function XLe(){return kH||(kH=1,JT=function(e){var t="[a-zA-Z-_][^\\n{]+\\{",r={className:"attribute",begin:/[a-zA-Z-_]+/,end:/\s*:/,excludeEnd:!0,starts:{end:";",relevance:0,contains:[{className:"variable",begin:/\.[a-zA-Z-_]+/},{className:"keyword",begin:/\(optional\)/}]}};return{aliases:["graph","instances"],case_insensitive:!0,keywords:"import",contains:[{begin:"^facet "+t,end:"}",keywords:"facet",contains:[r,e.HASH_COMMENT_MODE]},{begin:"^\\s*instance of "+t,end:"}",keywords:"name count channels instance-data instance-state instance of",illegal:/\S/,contains:["self",r,e.HASH_COMMENT_MODE]},{begin:"^"+t,end:"}",contains:[r,e.HASH_COMMENT_MODE]},e.HASH_COMMENT_MODE]}}),JT}var e4,NH;function YLe(){return NH||(NH=1,e4=function(e){var t="foreach do while for if from to step else on-error and or not in",r="global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime",n="add remove enable disable set get print export edit find run debug error info warning",a="true false yes no nothing nil null",i="traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firewall firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw",s={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},o={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}]},l={className:"string",begin:/'/,end:/'/};return{aliases:["routeros","mikrotik"],case_insensitive:!0,lexemes:/:?[\w-]+/,keywords:{literal:a,keyword:t+" :"+t.split(" ").join(" :")+" :"+r.split(" ").join(" :")},contains:[{variants:[{begin:/^@/,end:/$/},{begin:/\/\*/,end:/\*\//},{begin:/%%/,end:/$/},{begin:/^'/,end:/$/},{begin:/^\s*\/[\w-]+=/,end:/$/},{begin:/\/\//,end:/$/},{begin:/^\[\</,end:/\>\]$/},{begin:/<\//,end:/>/},{begin:/^facet /,end:/\}/},{begin:"^1\\.\\.(\\d+)$",end:/$/}],illegal:/./},e.COMMENT("^#","$"),o,l,s,{begin:/[\w-]+\=([^\s\{\}\[\]\(\)]+)/,relevance:0,returnBegin:!0,contains:[{className:"attribute",begin:/[^=]+/},{begin:/=/,endsWithParent:!0,relevance:0,contains:[o,l,s,{className:"literal",begin:"\\b("+a.split(" ").join("|")+")\\b"},{begin:/("[^"]*"|[^\s\{\}\[\]]+)/}]}]},{className:"number",begin:/\*[0-9a-fA-F]+/},{begin:"\\b("+n.split(" ").join("|")+")([\\s[(]|])",returnBegin:!0,contains:[{className:"builtin-name",begin:/\w+/}]},{className:"built_in",variants:[{begin:"(\\.\\./|/|\\s)(("+i.split(" ").join("|")+");?\\s)+",relevance:10},{begin:/\.\./}]}]}}),e4}var t4,RH;function ZLe(){return RH||(RH=1,t4=function(e){return{keywords:{keyword:"float color point normal vector matrix while for if do return else break extern continue",built_in:"abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp faceforward filterstep floor format fresnel incident length lightsource log match max min mod noise normalize ntransform opposite option phong pnoise pow printf ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan texture textureinfo trace transform vtransform xcomp ycomp zcomp"},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"},{className:"class",beginKeywords:"surface displacement light volume imager",end:"\\("},{beginKeywords:"illuminate illuminance gather",end:"\\("}]}}),t4}var r4,MH;function QLe(){return MH||(MH=1,r4=function(e){return{keywords:{keyword:"BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM NUMDAYS READ_DATE STAGING",built_in:"IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"literal",variants:[{begin:"#\\s+[a-zA-Z\\ \\.]*",relevance:0},{begin:"#[a-zA-Z\\ \\.]+"}]}]}}),r4}var n4,DH;function JLe(){return DH||(DH=1,n4=function(e){var t="([ui](8|16|32|64|128|size)|f(32|64))?",r="alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self Self sizeof static struct super trait true type typeof unsafe unsized use virtual while where yield move default",n="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{aliases:["rs"],keywords:{keyword:r,literal:"true false Some None Ok Err",built_in:n},lexemes:e.IDENT_RE+"!?",illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+t},{begin:"\\b0o([0-7_]+)"+t},{begin:"\\b0x([A-Fa-f0-9_]+)"+t},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+t}],relevance:0},{className:"function",beginKeywords:"fn",end:"(\\(|<)",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"meta",begin:"#\\!?\\[",end:"\\]",contains:[{className:"meta-string",begin:/"/,end:/"/}]},{className:"class",beginKeywords:"type",end:";",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"\\S"},{className:"class",beginKeywords:"trait enum struct union",end:"{",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"[\\w\\d]"},{begin:e.IDENT_RE+"::",keywords:{built_in:n}},{begin:"->"}]}}),n4}var a4,OH;function e7e(){return OH||(OH=1,a4=function(e){var t={className:"meta",begin:"@[A-Za-z]+"},r={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:"\\${",end:"}"}]},n={className:"string",variants:[{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'"""',end:'"""',relevance:10},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,r]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[r],relevance:10}]},a={className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},i={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},s={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},o={className:"class",beginKeywords:"class object trait type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[i]},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[i]},s]},l={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[s]};return{keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,a,i,l,o,e.C_NUMBER_MODE,t]}}),a4}var i4,IH;function t7e(){return IH||(IH=1,i4=function(e){var t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",r="(\\-|\\+)?\\d+([./]\\d+)?",n=r+"[+\\-]"+r+"i",a={"builtin-name":"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},i={className:"meta",begin:"^#!",end:"$"},s={className:"literal",begin:"(#t|#f|#\\\\"+t+"|#\\\\.)"},o={className:"number",variants:[{begin:r,relevance:0},{begin:n,relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},l=e.QUOTE_STRING_MODE,c=[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#\\|","\\|#")],u={begin:t,relevance:0},f={className:"symbol",begin:"'"+t},p={endsWithParent:!0,relevance:0},m={variants:[{begin:/'/},{begin:"`"}],contains:[{begin:"\\(",end:"\\)",contains:["self",s,l,o,u,f]}]},b={className:"name",begin:t,lexemes:t,keywords:a},v={begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[b,{begin:/\(/,end:/\)/,endsParent:!0,contains:[u]}]},y={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[v,b,p]};return p.contains=[s,o,l,u,f,m,y].concat(c),{illegal:/\S/,contains:[i,o,l,f,m,y].concat(c)}}),i4}var s4,LH;function r7e(){return LH||(LH=1,s4=function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:`'|"`,end:`'|"`,contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}];return{aliases:["sci"],lexemes:/%?\w+/,keywords:{keyword:"abort break case clear catch continue do elseif else endfunction end for function global if pause return resume select try then while",literal:"%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan type typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{begin:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",end:"",relevance:0},{begin:"\\[",end:"\\]'*[\\.']*",relevance:0,contains:t},e.COMMENT("//","$")].concat(t)}}),s4}var o4,PH;function n7e(){return PH||(PH=1,o4=function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={className:"variable",begin:"(\\$"+t+")\\b"},n={className:"number",begin:"#[0-9A-Fa-f]+"};return e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},r,{className:"attribute",begin:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[r,n,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@",end:"[{;]",keywords:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",contains:[r,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,n,e.CSS_NUMBER_MODE,{begin:"\\s[A-Za-z0-9_.-]+",relevance:0}]}]}}),o4}var l4,FH;function a7e(){return FH||(FH=1,l4=function(e){return{aliases:["console"],contains:[{className:"meta",begin:"^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]",starts:{end:"$",subLanguage:"bash"}}]}}),l4}var c4,BH;function i7e(){return BH||(BH=1,c4=function(e){var t=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"],r=["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"],n=["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"];return{aliases:["smali"],contains:[{className:"string",begin:'"',end:'"',relevance:0},e.COMMENT("#","$",{relevance:0}),{className:"keyword",variants:[{begin:"\\s*\\.end\\s[a-zA-Z0-9]*"},{begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{begin:"\\s("+n.join("|")+")"}]},{className:"built_in",variants:[{begin:"\\s("+t.join("|")+")\\s"},{begin:"\\s("+t.join("|")+")((\\-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{begin:"\\s("+r.join("|")+")((\\-|/)[a-zA-Z0-9]+)*\\s",relevance:10}]},{className:"class",begin:`L[^(;:
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}),c4}var u4,zH;function s7e(){return zH||(zH=1,u4=function(e){var t="[a-z][a-zA-Z0-9_]*",r={className:"string",begin:"\\$.{1}"},n={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{aliases:["st"],keywords:"self super nil true false thisContext",contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:t+":",relevance:0},e.C_NUMBER_MODE,n,r,{begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{begin:"\\#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,r,e.C_NUMBER_MODE,n]}]}}),u4}var d4,jH;function o7e(){return jH||(jH=1,d4=function(e){return{aliases:["ml"],keywords:{keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}),d4}var f4,qH;function l7e(){return qH||(qH=1,f4=function(e){var t=e.getLanguage("cpp").exports,r={className:"variable",begin:/\b_+[a-zA-Z_]\w*/},n={className:"title",begin:/[a-zA-Z][a-zA-Z0-9]+_fnc_\w*/},a={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]};return{aliases:["sqf"],case_insensitive:!0,keywords:{keyword:"case catch default do else exit exitWith for forEach from if switch then throw to try waitUntil while with",built_in:"abs accTime acos action actionIDs actionKeys actionKeysImages actionKeysNames actionKeysNamesArray actionName actionParams activateAddons activatedAddons activateKey add3DENConnection add3DENEventHandler add3DENLayer addAction addBackpack addBackpackCargo addBackpackCargoGlobal addBackpackGlobal addCamShake addCuratorAddons addCuratorCameraArea addCuratorEditableObjects addCuratorEditingArea addCuratorPoints addEditorObject addEventHandler addGoggles addGroupIcon addHandgunItem addHeadgear addItem addItemCargo addItemCargoGlobal addItemPool addItemToBackpack addItemToUniform addItemToVest addLiveStats addMagazine addMagazineAmmoCargo addMagazineCargo addMagazineCargoGlobal addMagazineGlobal addMagazinePool addMagazines addMagazineTurret addMenu addMenuItem addMissionEventHandler addMPEventHandler addMusicEventHandler addOwnedMine addPlayerScores addPrimaryWeaponItem addPublicVariableEventHandler addRating addResources addScore addScoreSide addSecondaryWeaponItem addSwitchableUnit addTeamMember addToRemainsCollector addUniform addVehicle addVest addWaypoint addWeapon addWeaponCargo addWeaponCargoGlobal addWeaponGlobal addWeaponItem addWeaponPool addWeaponTurret agent agents AGLToASL aimedAtTarget aimPos airDensityRTD airportSide AISFinishHeal alive all3DENEntities allControls allCurators allCutLayers allDead allDeadMen allDisplays allGroups allMapMarkers allMines allMissionObjects allow3DMode allowCrewInImmobile allowCuratorLogicIgnoreAreas allowDamage allowDammage allowFileOperations allowFleeing allowGetIn allowSprint allPlayers allSites allTurrets allUnits allUnitsUAV allVariables ammo and animate animateDoor animateSource animationNames animationPhase animationSourcePhase animationState append apply armoryPoints arrayIntersect asin ASLToAGL ASLToATL assert assignAsCargo assignAsCargoIndex assignAsCommander assignAsDriver assignAsGunner assignAsTurret assignCurator assignedCargo assignedCommander assignedDriver assignedGunner assignedItems assignedTarget assignedTeam assignedVehicle assignedVehicleRole assignItem assignTeam assignToAirport atan atan2 atg ATLToASL attachedObject attachedObjects attachedTo attachObject attachTo attackEnabled backpack backpackCargo backpackContainer backpackItems backpackMagazines backpackSpaceFor behaviour benchmark binocular blufor boundingBox boundingBoxReal boundingCenter breakOut breakTo briefingName buildingExit buildingPos buttonAction buttonSetAction cadetMode call callExtension camCommand camCommit camCommitPrepared camCommitted camConstuctionSetParams camCreate camDestroy cameraEffect cameraEffectEnableHUD cameraInterest cameraOn cameraView campaignConfigFile camPreload camPreloaded camPrepareBank camPrepareDir camPrepareDive camPrepareFocus camPrepareFov camPrepareFovRange camPreparePos camPrepareRelPos camPrepareTarget camSetBank camSetDir camSetDive camSetFocus camSetFov camSetFovRange camSetPos camSetRelPos camSetTarget camTarget camUseNVG canAdd canAddItemToBackpack canAddItemToUniform canAddItemToVest cancelSimpleTaskDestination canFire canMove canSlingLoad canStand canSuspend canUnloadInCombat canVehicleCargo captive captiveNum cbChecked cbSetChecked ceil channelEnabled cheatsEnabled checkAIFeature checkVisibility civilian className clearAllItemsFromBackpack clearBackpackCargo clearBackpackCargoGlobal clearGroupIcons clearItemCargo clearItemCargoGlobal clearItemPool clearMagazineCargo clearMagazineCargoGlobal clearMagazinePool clearOverlay clearRadio clearWeaponCargo clearWeaponCargoGlobal clearWeaponPool clientOwner closeDialog closeDisplay closeOverlay collapseObjectTree collect3DENHistory combatMode commandArtilleryFire commandChat commander commandFire commandFollow commandFSM commandGetOut commandingMenu commandMove commandRadio commandStop commandSuppressiveFire commandTarget commandWatch comment commitOverlay compile compileFinal completedFSM composeText configClasses configFile configHierarchy configName configNull configProperties configSourceAddonList configSourceMod configSourceModList connectTerminalToUAV controlNull controlsGroupCtrl copyFromClipboard copyToClipboard copyWaypoints cos count countEnemy countFriendly countSide countType countUnknown create3DENComposition create3DENEntity createAgent createCenter createDialog createDiaryLink createDiaryRecord createDiarySubject createDisplay createGearDialog createGroup createGuardedPoint createLocation createMarker createMarkerLocal createMenu createMine createMissionDisplay createMPCampaignDisplay createSimpleObject createSimpleTask createSite createSoundSource createTask createTeam createTrigger createUnit createVehicle createVehicleCrew createVehicleLocal crew ctrlActivate ctrlAddEventHandler ctrlAngle ctrlAutoScrollDelay ctrlAutoScrollRewind ctrlAutoScrollSpeed ctrlChecked ctrlClassName ctrlCommit ctrlCommitted ctrlCreate ctrlDelete ctrlEnable ctrlEnabled ctrlFade ctrlHTMLLoaded ctrlIDC ctrlIDD ctrlMapAnimAdd ctrlMapAnimClear ctrlMapAnimCommit ctrlMapAnimDone ctrlMapCursor ctrlMapMouseOver ctrlMapScale ctrlMapScreenToWorld ctrlMapWorldToScreen ctrlModel ctrlModelDirAndUp ctrlModelScale ctrlParent ctrlParentControlsGroup ctrlPosition ctrlRemoveAllEventHandlers ctrlRemoveEventHandler ctrlScale ctrlSetActiveColor ctrlSetAngle ctrlSetAutoScrollDelay ctrlSetAutoScrollRewind ctrlSetAutoScrollSpeed ctrlSetBackgroundColor ctrlSetChecked ctrlSetEventHandler ctrlSetFade ctrlSetFocus ctrlSetFont ctrlSetFontH1 ctrlSetFontH1B ctrlSetFontH2 ctrlSetFontH2B ctrlSetFontH3 ctrlSetFontH3B ctrlSetFontH4 ctrlSetFontH4B ctrlSetFontH5 ctrlSetFontH5B ctrlSetFontH6 ctrlSetFontH6B ctrlSetFontHeight ctrlSetFontHeightH1 ctrlSetFontHeightH2 ctrlSetFontHeightH3 ctrlSetFontHeightH4 ctrlSetFontHeightH5 ctrlSetFontHeightH6 ctrlSetFontHeightSecondary ctrlSetFontP ctrlSetFontPB ctrlSetFontSecondary ctrlSetForegroundColor ctrlSetModel ctrlSetModelDirAndUp ctrlSetModelScale ctrlSetPosition ctrlSetScale ctrlSetStructuredText ctrlSetText ctrlSetTextColor ctrlSetTooltip ctrlSetTooltipColorBox ctrlSetTooltipColorShade ctrlSetTooltipColorText ctrlShow ctrlShown ctrlText ctrlTextHeight ctrlType ctrlVisible curatorAddons curatorCamera curatorCameraArea curatorCameraAreaCeiling curatorCoef curatorEditableObjects curatorEditingArea curatorEditingAreaType curatorMouseOver curatorPoints curatorRegisteredObjects curatorSelected curatorWaypointCost current3DENOperation currentChannel currentCommand currentMagazine currentMagazineDetail currentMagazineDetailTurret currentMagazineTurret currentMuzzle currentNamespace currentTask currentTasks currentThrowable currentVisionMode currentWaypoint currentWeapon currentWeaponMode currentWeaponTurret currentZeroing cursorObject cursorTarget customChat customRadio cutFadeOut cutObj cutRsc cutText damage date dateToNumber daytime deActivateKey debriefingText debugFSM debugLog deg delete3DENEntities deleteAt deleteCenter deleteCollection deleteEditorObject deleteGroup deleteIdentity deleteLocation deleteMarker deleteMarkerLocal deleteRange deleteResources deleteSite deleteStatus deleteTeam deleteVehicle deleteVehicleCrew deleteWaypoint detach detectedMines diag_activeMissionFSMs diag_activeScripts diag_activeSQFScripts diag_activeSQSScripts diag_captureFrame diag_captureSlowFrame diag_codePerformance diag_drawMode diag_enable diag_enabled diag_fps diag_fpsMin diag_frameNo diag_list diag_log diag_logSlowFrame diag_mergeConfigFile diag_recordTurretLimits diag_tickTime diag_toggle dialog diarySubjectExists didJIP didJIPOwner difficulty difficultyEnabled difficultyEnabledRTD difficultyOption direction directSay disableAI disableCollisionWith disableConversation disableDebriefingStats disableNVGEquipment disableRemoteSensors disableSerialization disableTIEquipment disableUAVConnectability disableUserInput displayAddEventHandler displayCtrl displayNull displayParent displayRemoveAllEventHandlers displayRemoveEventHandler displaySetEventHandler dissolveTeam distance distance2D distanceSqr distributionRegion do3DENAction doArtilleryFire doFire doFollow doFSM doGetOut doMove doorPhase doStop doSuppressiveFire doTarget doWatch drawArrow drawEllipse drawIcon drawIcon3D drawLine drawLine3D drawLink drawLocation drawPolygon drawRectangle driver drop east echo edit3DENMissionAttributes editObject editorSetEventHandler effectiveCommander emptyPositions enableAI enableAIFeature enableAimPrecision enableAttack enableAudioFeature enableCamShake enableCaustics enableChannel enableCollisionWith enableCopilot enableDebriefingStats enableDiagLegend enableEndDialog enableEngineArtillery enableEnvironment enableFatigue enableGunLights enableIRLasers enableMimics enablePersonTurret enableRadio enableReload enableRopeAttach enableSatNormalOnDetail enableSaving enableSentences enableSimulation enableSimulationGlobal enableStamina enableTeamSwitch enableUAVConnectability enableUAVWaypoints enableVehicleCargo endLoadingScreen endMission engineOn enginesIsOnRTD enginesRpmRTD enginesTorqueRTD entities estimatedEndServerTime estimatedTimeLeft evalObjectArgument everyBackpack everyContainer exec execEditorScript execFSM execVM exp expectedDestination exportJIPMessages eyeDirection eyePos face faction fadeMusic fadeRadio fadeSound fadeSpeech failMission fillWeaponsFromPool find findCover findDisplay findEditorObject findEmptyPosition findEmptyPositionReady findNearestEnemy finishMissionInit finite fire fireAtTarget firstBackpack flag flagOwner flagSide flagTexture fleeing floor flyInHeight flyInHeightASL fog fogForecast fogParams forceAddUniform forcedMap forceEnd forceMap forceRespawn forceSpeed forceWalk forceWeaponFire forceWeatherChange forEachMember forEachMemberAgent forEachMemberTeam format formation formationDirection formationLeader formationMembers formationPosition formationTask formatText formLeader freeLook fromEditor fuel fullCrew gearIDCAmmoCount gearSlotAmmoCount gearSlotData get3DENActionState get3DENAttribute get3DENCamera get3DENConnections get3DENEntity get3DENEntityID get3DENGrid get3DENIconsVisible get3DENLayerEntities get3DENLinesVisible get3DENMissionAttribute get3DENMouseOver get3DENSelected getAimingCoef getAllHitPointsDamage getAllOwnedMines getAmmoCargo getAnimAimPrecision getAnimSpeedCoef getArray getArtilleryAmmo getArtilleryComputerSettings getArtilleryETA getAssignedCuratorLogic getAssignedCuratorUnit getBackpackCargo getBleedingRemaining getBurningValue getCameraViewDirection getCargoIndex getCenterOfMass getClientState getClientStateNumber getConnectedUAV getCustomAimingCoef getDammage getDescription getDir getDirVisual getDLCs getEditorCamera getEditorMode getEditorObjectScope getElevationOffset getFatigue getFriend getFSMVariable getFuelCargo getGroupIcon getGroupIconParams getGroupIcons getHideFrom getHit getHitIndex getHitPointDamage getItemCargo getMagazineCargo getMarkerColor getMarkerPos getMarkerSize getMarkerType getMass getMissionConfig getMissionConfigValue getMissionDLCs getMissionLayerEntities getModelInfo getMousePosition getNumber getObjectArgument getObjectChildren getObjectDLC getObjectMaterials getObjectProxy getObjectTextures getObjectType getObjectViewDistance getOxygenRemaining getPersonUsedDLCs getPilotCameraDirection getPilotCameraPosition getPilotCameraRotation getPilotCameraTarget getPlayerChannel getPlayerScores getPlayerUID getPos getPosASL getPosASLVisual getPosASLW getPosATL getPosATLVisual getPosVisual getPosWorld getRelDir getRelPos getRemoteSensorsDisabled getRepairCargo getResolution getShadowDistance getShotParents getSlingLoad getSpeed getStamina getStatValue getSuppression getTerrainHeightASL getText getUnitLoadout getUnitTrait getVariable getVehicleCargo getWeaponCargo getWeaponSway getWPPos glanceAt globalChat globalRadio goggles goto group groupChat groupFromNetId groupIconSelectable groupIconsVisible groupId groupOwner groupRadio groupSelectedUnits groupSelectUnit grpNull gunner gusts halt handgunItems handgunMagazine handgunWeapon handsHit hasInterface hasPilotCamera hasWeapon hcAllGroups hcGroupParams hcLeader hcRemoveAllGroups hcRemoveGroup hcSelected hcSelectGroup hcSetGroup hcShowBar hcShownBar headgear hideBody hideObject hideObjectGlobal hideSelection hint hintC hintCadet hintSilent hmd hostMission htmlLoad HUDMovementLevels humidity image importAllGroups importance in inArea inAreaArray incapacitatedState independent inflame inflamed inGameUISetEventHandler inheritsFrom initAmbientLife inPolygon inputAction inRangeOfArtillery insertEditorObject intersect is3DEN is3DENMultiplayer isAbleToBreathe isAgent isArray isAutoHoverOn isAutonomous isAutotest isBleeding isBurning isClass isCollisionLightOn isCopilotEnabled isDedicated isDLCAvailable isEngineOn isEqualTo isEqualType isEqualTypeAll isEqualTypeAny isEqualTypeArray isEqualTypeParams isFilePatchingEnabled isFlashlightOn isFlatEmpty isForcedWalk isFormationLeader isHidden isInRemainsCollector isInstructorFigureEnabled isIRLaserOn isKeyActive isKindOf isLightOn isLocalized isManualFire isMarkedForCollection isMultiplayer isMultiplayerSolo isNil isNull isNumber isObjectHidden isObjectRTD isOnRoad isPipEnabled isPlayer isRealTime isRemoteExecuted isRemoteExecutedJIP isServer isShowing3DIcons isSprintAllowed isStaminaEnabled isSteamMission isStreamFriendlyUIEnabled isText isTouchingGround isTurnedOut isTutHintsEnabled isUAVConnectable isUAVConnected isUniformAllowed isVehicleCargo isWalking isWeaponDeployed isWeaponRested itemCargo items itemsWithMagazines join joinAs joinAsSilent joinSilent joinString kbAddDatabase kbAddDatabaseTargets kbAddTopic kbHasTopic kbReact kbRemoveTopic kbTell kbWasSaid keyImage keyName knowsAbout land landAt landResult language laserTarget lbAdd lbClear lbColor lbCurSel lbData lbDelete lbIsSelected lbPicture lbSelection lbSetColor lbSetCurSel lbSetData lbSetPicture lbSetPictureColor lbSetPictureColorDisabled lbSetPictureColorSelected lbSetSelectColor lbSetSelectColorRight lbSetSelected lbSetTooltip lbSetValue lbSize lbSort lbSortByValue lbText lbValue leader leaderboardDeInit leaderboardGetRows leaderboardInit leaveVehicle libraryCredits libraryDisclaimers lifeState lightAttachObject lightDetachObject lightIsOn lightnings limitSpeed linearConversion lineBreak lineIntersects lineIntersectsObjs lineIntersectsSurfaces lineIntersectsWith linkItem list listObjects ln lnbAddArray lnbAddColumn lnbAddRow lnbClear lnbColor lnbCurSelRow lnbData lnbDeleteColumn lnbDeleteRow lnbGetColumnsPosition lnbPicture lnbSetColor lnbSetColumnsPos lnbSetCurSelRow lnbSetData lnbSetPicture lnbSetText lnbSetValue lnbSize lnbText lnbValue load loadAbs loadBackpack loadFile loadGame loadIdentity loadMagazine loadOverlay loadStatus loadUniform loadVest local localize locationNull locationPosition lock lockCameraTo lockCargo lockDriver locked lockedCargo lockedDriver lockedTurret lockIdentity lockTurret lockWP log logEntities logNetwork logNetworkTerminate lookAt lookAtPos magazineCargo magazines magazinesAllTurrets magazinesAmmo magazinesAmmoCargo magazinesAmmoFull magazinesDetail magazinesDetailBackpack magazinesDetailUniform magazinesDetailVest magazinesTurret magazineTurretAmmo mapAnimAdd mapAnimClear mapAnimCommit mapAnimDone mapCenterOnCamera mapGridPosition markAsFinishedOnSteam markerAlpha markerBrush markerColor markerDir markerPos markerShape markerSize markerText markerType max members menuAction menuAdd menuChecked menuClear menuCollapse menuData menuDelete menuEnable menuEnabled menuExpand menuHover menuPicture menuSetAction menuSetCheck menuSetData menuSetPicture menuSetValue menuShortcut menuShortcutText menuSize menuSort menuText menuURL menuValue min mineActive mineDetectedBy missionConfigFile missionDifficulty missionName missionNamespace missionStart missionVersion mod modelToWorld modelToWorldVisual modParams moonIntensity moonPhase morale move move3DENCamera moveInAny moveInCargo moveInCommander moveInDriver moveInGunner moveInTurret moveObjectToEnd moveOut moveTime moveTo moveToCompleted moveToFailed musicVolume name nameSound nearEntities nearestBuilding nearestLocation nearestLocations nearestLocationWithDubbing nearestObject nearestObjects nearestTerrainObjects nearObjects nearObjectsReady nearRoads nearSupplies nearTargets needReload netId netObjNull newOverlay nextMenuItemIndex nextWeatherChange nMenuItems not numberToDate objectCurators objectFromNetId objectParent objNull objStatus onBriefingGroup onBriefingNotes onBriefingPlan onBriefingTeamSwitch onCommandModeChanged onDoubleClick onEachFrame onGroupIconClick onGroupIconOverEnter onGroupIconOverLeave onHCGroupSelectionChanged onMapSingleClick onPlayerConnected onPlayerDisconnected onPreloadFinished onPreloadStarted onShowNewObject onTeamSwitch openCuratorInterface openDLCPage openMap openYoutubeVideo opfor or orderGetIn overcast overcastForecast owner param params parseNumber parseText parsingNamespace particlesQuality pi pickWeaponPool pitch pixelGrid pixelGridBase pixelGridNoUIScale pixelH pixelW playableSlotsNumber playableUnits playAction playActionNow player playerRespawnTime playerSide playersNumber playGesture playMission playMove playMoveNow playMusic playScriptedMission playSound playSound3D position positionCameraToWorld posScreenToWorld posWorldToScreen ppEffectAdjust ppEffectCommit ppEffectCommitted ppEffectCreate ppEffectDestroy ppEffectEnable ppEffectEnabled ppEffectForceInNVG precision preloadCamera preloadObject preloadSound preloadTitleObj preloadTitleRsc preprocessFile preprocessFileLineNumbers primaryWeapon primaryWeaponItems primaryWeaponMagazine priority private processDiaryLink productVersion profileName profileNamespace profileNameSteam progressLoadingScreen progressPosition progressSetPosition publicVariable publicVariableClient publicVariableServer pushBack pushBackUnique putWeaponPool queryItemsPool queryMagazinePool queryWeaponPool rad radioChannelAdd radioChannelCreate radioChannelRemove radioChannelSetCallSign radioChannelSetLabel radioVolume rain rainbow random rank rankId rating rectangular registeredTasks registerTask reload reloadEnabled remoteControl remoteExec remoteExecCall remove3DENConnection remove3DENEventHandler remove3DENLayer removeAction removeAll3DENEventHandlers removeAllActions removeAllAssignedItems removeAllContainers removeAllCuratorAddons removeAllCuratorCameraAreas removeAllCuratorEditingAreas removeAllEventHandlers removeAllHandgunItems removeAllItems removeAllItemsWithMagazines removeAllMissionEventHandlers removeAllMPEventHandlers removeAllMusicEventHandlers removeAllOwnedMines removeAllPrimaryWeaponItems removeAllWeapons removeBackpack removeBackpackGlobal removeCuratorAddons removeCuratorCameraArea removeCuratorEditableObjects removeCuratorEditingArea removeDrawIcon removeDrawLinks removeEventHandler removeFromRemainsCollector removeGoggles removeGroupIcon removeHandgunItem removeHeadgear removeItem removeItemFromBackpack removeItemFromUniform removeItemFromVest removeItems removeMagazine removeMagazineGlobal removeMagazines removeMagazinesTurret removeMagazineTurret removeMenuItem removeMissionEventHandler removeMPEventHandler removeMusicEventHandler removeOwnedMine removePrimaryWeaponItem removeSecondaryWeaponItem removeSimpleTask removeSwitchableUnit removeTeamMember removeUniform removeVest removeWeapon removeWeaponGlobal removeWeaponTurret requiredVersion resetCamShake resetSubgroupDirection resistance resize resources respawnVehicle restartEditorCamera reveal revealMine reverse reversedMouseY roadAt roadsConnectedTo roleDescription ropeAttachedObjects ropeAttachedTo ropeAttachEnabled ropeAttachTo ropeCreate ropeCut ropeDestroy ropeDetach ropeEndPosition ropeLength ropes ropeUnwind ropeUnwound rotorsForcesRTD rotorsRpmRTD round runInitScript safeZoneH safeZoneW safeZoneWAbs safeZoneX safeZoneXAbs safeZoneY save3DENInventory saveGame saveIdentity saveJoysticks saveOverlay saveProfileNamespace saveStatus saveVar savingEnabled say say2D say3D scopeName score scoreSide screenshot screenToWorld scriptDone scriptName scriptNull scudState secondaryWeapon secondaryWeaponItems secondaryWeaponMagazine select selectBestPlaces selectDiarySubject selectedEditorObjects selectEditorObject selectionNames selectionPosition selectLeader selectMax selectMin selectNoPlayer selectPlayer selectRandom selectWeapon selectWeaponTurret sendAUMessage sendSimpleCommand sendTask sendTaskResult sendUDPMessage serverCommand serverCommandAvailable serverCommandExecutable serverName serverTime set set3DENAttribute set3DENAttributes set3DENGrid set3DENIconsVisible set3DENLayer set3DENLinesVisible set3DENMissionAttributes set3DENModelsVisible set3DENObjectType set3DENSelected setAccTime setAirportSide setAmmo setAmmoCargo setAnimSpeedCoef setAperture setApertureNew setArmoryPoints setAttributes setAutonomous setBehaviour setBleedingRemaining setCameraInterest setCamShakeDefParams setCamShakeParams setCamUseTi setCaptive setCenterOfMass setCollisionLight setCombatMode setCompassOscillation setCuratorCameraAreaCeiling setCuratorCoef setCuratorEditingAreaType setCuratorWaypointCost setCurrentChannel setCurrentTask setCurrentWaypoint setCustomAimCoef setDamage setDammage setDate setDebriefingText setDefaultCamera setDestination setDetailMapBlendPars setDir setDirection setDrawIcon setDropInterval setEditorMode setEditorObjectScope setEffectCondition setFace setFaceAnimation setFatigue setFlagOwner setFlagSide setFlagTexture setFog setFormation setFormationTask setFormDir setFriend setFromEditor setFSMVariable setFuel setFuelCargo setGroupIcon setGroupIconParams setGroupIconsSelectable setGroupIconsVisible setGroupId setGroupIdGlobal setGroupOwner setGusts setHideBehind setHit setHitIndex setHitPointDamage setHorizonParallaxCoef setHUDMovementLevels setIdentity setImportance setLeader setLightAmbient setLightAttenuation setLightBrightness setLightColor setLightDayLight setLightFlareMaxDistance setLightFlareSize setLightIntensity setLightnings setLightUseFlare setLocalWindParams setMagazineTurretAmmo setMarkerAlpha setMarkerAlphaLocal setMarkerBrush setMarkerBrushLocal setMarkerColor setMarkerColorLocal setMarkerDir setMarkerDirLocal setMarkerPos setMarkerPosLocal setMarkerShape setMarkerShapeLocal setMarkerSize setMarkerSizeLocal setMarkerText setMarkerTextLocal setMarkerType setMarkerTypeLocal setMass setMimic setMousePosition setMusicEffect setMusicEventHandler setName setNameSound setObjectArguments setObjectMaterial setObjectMaterialGlobal setObjectProxy setObjectTexture setObjectTextureGlobal setObjectViewDistance setOvercast setOwner setOxygenRemaining setParticleCircle setParticleClass setParticleFire setParticleParams setParticleRandom setPilotCameraDirection setPilotCameraRotation setPilotCameraTarget setPilotLight setPiPEffect setPitch setPlayable setPlayerRespawnTime setPos setPosASL setPosASL2 setPosASLW setPosATL setPosition setPosWorld setRadioMsg setRain setRainbow setRandomLip setRank setRectangular setRepairCargo setShadowDistance setShotParents setSide setSimpleTaskAlwaysVisible setSimpleTaskCustomData setSimpleTaskDescription setSimpleTaskDestination setSimpleTaskTarget setSimpleTaskType setSimulWeatherLayers setSize setSkill setSlingLoad setSoundEffect setSpeaker setSpeech setSpeedMode setStamina setStaminaScheme setStatValue setSuppression setSystemOfUnits setTargetAge setTaskResult setTaskState setTerrainGrid setText setTimeMultiplier setTitleEffect setTriggerActivation setTriggerArea setTriggerStatements setTriggerText setTriggerTimeout setTriggerType setType setUnconscious setUnitAbility setUnitLoadout setUnitPos setUnitPosWeak setUnitRank setUnitRecoilCoefficient setUnitTrait setUnloadInCombat setUserActionText setVariable setVectorDir setVectorDirAndUp setVectorUp setVehicleAmmo setVehicleAmmoDef setVehicleArmor setVehicleCargo setVehicleId setVehicleLock setVehiclePosition setVehicleTiPars setVehicleVarName setVelocity setVelocityTransformation setViewDistance setVisibleIfTreeCollapsed setWaves setWaypointBehaviour setWaypointCombatMode setWaypointCompletionRadius setWaypointDescription setWaypointForceBehaviour setWaypointFormation setWaypointHousePosition setWaypointLoiterRadius setWaypointLoiterType setWaypointName setWaypointPosition setWaypointScript setWaypointSpeed setWaypointStatements setWaypointTimeout setWaypointType setWaypointVisible setWeaponReloadingTime setWind setWindDir setWindForce setWindStr setWPPos show3DIcons showChat showCinemaBorder showCommandingMenu showCompass showCuratorCompass showGPS showHUD showLegend showMap shownArtilleryComputer shownChat shownCompass shownCuratorCompass showNewEditorObject shownGPS shownHUD shownMap shownPad shownRadio shownScoretable shownUAVFeed shownWarrant shownWatch showPad showRadio showScoretable showSubtitles showUAVFeed showWarrant showWatch showWaypoint showWaypoints side sideAmbientLife sideChat sideEmpty sideEnemy sideFriendly sideLogic sideRadio sideUnknown simpleTasks simulationEnabled simulCloudDensity simulCloudOcclusion simulInClouds simulWeatherSync sin size sizeOf skill skillFinal skipTime sleep sliderPosition sliderRange sliderSetPosition sliderSetRange sliderSetSpeed sliderSpeed slingLoadAssistantShown soldierMagazines someAmmo sort soundVolume spawn speaker speed speedMode splitString sqrt squadParams stance startLoadingScreen step stop stopEngineRTD stopped str sunOrMoon supportInfo suppressFor surfaceIsWater surfaceNormal surfaceType swimInDepth switchableUnits switchAction switchCamera switchGesture switchLight switchMove synchronizedObjects synchronizedTriggers synchronizedWaypoints synchronizeObjectsAdd synchronizeObjectsRemove synchronizeTrigger synchronizeWaypoint systemChat systemOfUnits tan targetKnowledge targetsAggregate targetsQuery taskAlwaysVisible taskChildren taskCompleted taskCustomData taskDescription taskDestination taskHint taskMarkerOffset taskNull taskParent taskResult taskState taskType teamMember teamMemberNull teamName teams teamSwitch teamSwitchEnabled teamType terminate terrainIntersect terrainIntersectASL text textLog textLogFormat tg time timeMultiplier titleCut titleFadeOut titleObj titleRsc titleText toArray toFixed toLower toString toUpper triggerActivated triggerActivation triggerArea triggerAttachedVehicle triggerAttachObject triggerAttachVehicle triggerStatements triggerText triggerTimeout triggerTimeoutCurrent triggerType turretLocal turretOwner turretUnit tvAdd tvClear tvCollapse tvCount tvCurSel tvData tvDelete tvExpand tvPicture tvSetCurSel tvSetData tvSetPicture tvSetPictureColor tvSetPictureColorDisabled tvSetPictureColorSelected tvSetPictureRight tvSetPictureRightColor tvSetPictureRightColorDisabled tvSetPictureRightColorSelected tvSetText tvSetTooltip tvSetValue tvSort tvSortByValue tvText tvTooltip tvValue type typeName typeOf UAVControl uiNamespace uiSleep unassignCurator unassignItem unassignTeam unassignVehicle underwater uniform uniformContainer uniformItems uniformMagazines unitAddons unitAimPosition unitAimPositionVisual unitBackpack unitIsUAV unitPos unitReady unitRecoilCoefficient units unitsBelowHeight unlinkItem unlockAchievement unregisterTask updateDrawIcon updateMenuItem updateObjectTree useAISteeringComponent useAudioTimeForMoves vectorAdd vectorCos vectorCrossProduct vectorDiff vectorDir vectorDirVisual vectorDistance vectorDistanceSqr vectorDotProduct vectorFromTo vectorMagnitude vectorMagnitudeSqr vectorMultiply vectorNormalized vectorUp vectorUpVisual vehicle vehicleCargoEnabled vehicleChat vehicleRadio vehicles vehicleVarName velocity velocityModelSpace verifySignature vest vestContainer vestItems vestMagazines viewDistance visibleCompass visibleGPS visibleMap visiblePosition visiblePositionASL visibleScoretable visibleWatch waves waypointAttachedObject waypointAttachedVehicle waypointAttachObject waypointAttachVehicle waypointBehaviour waypointCombatMode waypointCompletionRadius waypointDescription waypointForceBehaviour waypointFormation waypointHousePosition waypointLoiterRadius waypointLoiterType waypointName waypointPosition waypoints waypointScript waypointsEnabledUAV waypointShow waypointSpeed waypointStatements waypointTimeout waypointTimeoutCurrent waypointType waypointVisible weaponAccessories weaponAccessoriesCargo weaponCargo weaponDirection weaponInertia weaponLowered weapons weaponsItems weaponsItemsCargo weaponState weaponsTurret weightRTD west WFSideText wind",literal:"true false nil"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.NUMBER_MODE,r,n,a,t.preprocessor],illegal:/#/}}),f4}var h4,UH;function c7e(){return UH||(UH=1,h4=function(e){var t=e.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*#]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",end:/;/,endsWithParent:!0,lexemes:/[\w\.]+/,keywords:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE,{begin:'""'}]},{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t]},e.C_BLOCK_COMMENT_MODE,t]}}),h4}var p4,$H;function u7e(){return $H||($H=1,p4=function(e){return{contains:[e.HASH_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE,lexemes:e.UNDERSCORE_IDENT_RE,keywords:{name:"for in while repeat until if then else",symbol:"bernoulli bernoulli_logit binomial binomial_logit beta_binomial hypergeometric categorical categorical_logit ordered_logistic neg_binomial neg_binomial_2 neg_binomial_2_log poisson poisson_log multinomial normal exp_mod_normal skew_normal student_t cauchy double_exponential logistic gumbel lognormal chi_square inv_chi_square scaled_inv_chi_square exponential inv_gamma weibull frechet rayleigh wiener pareto pareto_type_2 von_mises uniform multi_normal multi_normal_prec multi_normal_cholesky multi_gp multi_gp_cholesky multi_student_t gaussian_dlm_obs dirichlet lkj_corr lkj_corr_cholesky wishart inv_wishart","selector-tag":"int real vector simplex unit_vector ordered positive_ordered row_vector matrix cholesky_factor_corr cholesky_factor_cov corr_matrix cov_matrix",title:"functions model data parameters quantities transformed generated",literal:"true false"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0}]}}),p4}var m4,HH;function d7e(){return HH||(HH=1,m4=function(e){return{aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize meqparse mer merg merge mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"symbol",begin:/`[a-zA-Z0-9_]+'/},{className:"variable",begin:/\$\{?[a-zA-Z0-9_]+\}?/},{className:"string",variants:[{begin:`\`"[^\r
]*?"'`},{begin:`"[^\r
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\(|$)"}]},e.COMMENT("^[ 	]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}),m4}var g4,GH;function f7e(){return GH||(GH=1,g4=function(e){var t="[A-Z_][A-Z0-9_.]*",r={keyword:"HEADER ENDSEC DATA"},n={className:"meta",begin:"ISO-10303-21;",relevance:10},a={className:"meta",begin:"END-ISO-10303-21;",relevance:10};return{aliases:["p21","step","stp"],case_insensitive:!0,lexemes:t,keywords:r,contains:[n,a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}),g4}var v4,VH;function h7e(){return VH||(VH=1,v4=function(e){var t={className:"variable",begin:"\\$"+e.IDENT_RE},r={className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},n=["charset","css","debug","extend","font-face","for","import","include","media","mixin","page","warn","while"],a=["after","before","first-letter","first-line","active","first-child","focus","hover","lang","link","visited"],i=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],s="[\\.\\s\\n\\[\\:,]",o=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"],l=["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"];return{aliases:["styl"],case_insensitive:!1,keywords:"if else for in",illegal:"("+l.join("|")+")",contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+s,returnBegin:!0,contains:[{className:"selector-class",begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"+s,returnBegin:!0,contains:[{className:"selector-id",begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\b("+i.join("|")+")"+s,returnBegin:!0,contains:[{className:"selector-tag",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"&?:?:\\b("+a.join("|")+")"+s},{begin:"@("+n.join("|")+")\\b"},t,e.CSS_NUMBER_MODE,e.NUMBER_MODE,{className:"function",begin:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[r,t,e.APOS_STRING_MODE,e.CSS_NUMBER_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE]}]},{className:"attribute",begin:"\\b("+o.reverse().join("|")+")\\b",starts:{end:/;|$/,contains:[r,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE,e.NUMBER_MODE,e.C_BLOCK_COMMENT_MODE],illegal:/\./,relevance:0}}]}}),v4}var b4,WH;function p7e(){return WH||(WH=1,b4=function(e){var t={className:"string",begin:`\\[
(multipart)?`,end:`\\]
`},r={className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},n={className:"string",begin:"(\\+|-)\\d+"},a={className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]};return{case_insensitive:!0,contains:[t,r,n,a]}}),b4}var x4,KH;function m7e(){return KH||(KH=1,x4=function(e){var t={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},r={className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*",relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a={className:"subst",begin:/\\\(/,end:"\\)",keywords:t,contains:[]},i={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0},s=e.inherit(e.QUOTE_STRING_MODE,{contains:[a,e.BACKSLASH_ESCAPE]});return a.contains=[i],{keywords:t,contains:[s,e.C_LINE_COMMENT_MODE,n,r,i,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin:/</,end:/>/},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,contains:["self",i,s,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:t,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta",begin:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n]}]}}),x4}var y4,XH;function g7e(){return XH||(XH=1,y4=function(e){var t={className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\(/,end:/\)/,contains:["self",{begin:/\\./}]}],relevance:10},r={className:"keyword",begin:/\$(?!noop)[a-zA-Z][_a-zA-Z0-9]*/,end:/\(/,excludeEnd:!0},n={className:"variable",begin:/%[_a-zA-Z0-9:]*/,end:"%"},a={className:"symbol",begin:/\\./};return{contains:[t,r,n,a]}}),y4}var _4,YH;function v7e(){return YH||(YH=1,_4=function(e){var t="true false yes no null",r="^[ \\-]*",n="[a-zA-Z_][\\w\\-]*",a={className:"attr",variants:[{begin:r+n+":"},{begin:r+'"'+n+'":'},{begin:r+"'"+n+"':"}]},i={className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]},s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]};return{case_insensitive:!0,aliases:["yml","YAML","yaml"],contains:[a,{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>] *$",returnEnd:!0,contains:s.contains,end:a.variants[0].begin},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!!"+e.UNDERSCORE_IDENT_RE},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"^ *-",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},e.C_NUMBER_MODE,s]}}),_4}var w4,ZH;function b7e(){return ZH||(ZH=1,w4=function(e){return{case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:"(s+)?---$",end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}),w4}var E4,QH;function x7e(){return QH||(QH=1,E4=function(e){return{aliases:["tk"],keywords:"after append apply array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock close concat continue dde dict encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent filename flush for foreach format gets glob global history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename return safe scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update uplevel upvar variable vwait while",contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{excludeEnd:!0,variants:[{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)",end:"[^a-zA-Z0-9_\\}\\$]"},{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"(\\))?[^a-zA-Z0-9_\\}\\$]"}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},{className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]}]}}),E4}var S4,JH;function y7e(){return JH||(JH=1,S4=function(e){var t={className:"tag",begin:/\\/,relevance:0,contains:[{className:"name",variants:[{begin:/[a-zA-Zа-яА-я]+[*]?/},{begin:/[^a-zA-Zа-яА-я0-9]/}],starts:{endsWithParent:!0,relevance:0,contains:[{className:"string",variants:[{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/}]},{begin:/\s*=\s*/,endsWithParent:!0,relevance:0,contains:[{className:"number",begin:/-?\d*\.?\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?/}]}]}}]};return{contains:[t,{className:"formula",contains:[t],relevance:0,variants:[{begin:/\$\$/,end:/\$\$/},{begin:/\$/,end:/\$/}]},e.COMMENT("%","$",{relevance:0})]}}),S4}var C4,eG;function _7e(){return eG||(eG=1,C4=function(e){var t="bool byte i16 i32 i64 double string binary";return{keywords:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",end:">",keywords:t,contains:["self"]}]}}),C4}var T4,tG;function w7e(){return tG||(tG=1,T4=function(e){var t={className:"number",begin:"[1-9][0-9]*",relevance:0},r={className:"symbol",begin:":[^\\]]+"},n={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|	    TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,r]},a={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,r]};return{keywords:{keyword:"ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN SUBSTR FINDSTR VOFFSET PROG ATTR MN POS",literal:"ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET"},contains:[n,a,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT("//","[;$]"),e.COMMENT("!","[;$]"),e.COMMENT("--eg:","$"),e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},e.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}),T4}var A4,rG;function E7e(){return rG||(rG=1,A4=function(e){var t={className:"params",begin:"\\(",end:"\\)"},r="attribute block constant cycle date dump include max min parent random range source template_from_string",n={beginKeywords:r,keywords:{name:r},relevance:0,contains:[t]},a={begin:/\|[A-Za-z_]+:?/,keywords:"abs batch capitalize convert_encoding date date_modify default escape first format join json_encode keys last length lower merge nl2br number_format raw replace reverse round slice sort split striptags title trim upper url_encode",contains:[n]},i="autoescape block do embed extends filter flush for if import include macro sandbox set spaceless use verbatim";return i=i+" "+i.split(" ").map(function(s){return"end"+s}).join(" "),{aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{#/,/#}/),{className:"template-tag",begin:/\{%/,end:/%}/,contains:[{className:"name",begin:/\w+/,keywords:i,starts:{endsWithParent:!0,contains:[a,n],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/}}/,contains:["self",a,n]}]}}),A4}var k4,nG;function S7e(){return nG||(nG=1,k4=function(e){var t={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract as from extends async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void Promise"};return{aliases:["ts"],keywords:t,contains:[{className:"meta",begin:/^\s*['"]use strict['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+e.IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.IDENT_RE},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:["self",e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}]}],relevance:0},{className:"function",begin:"function",end:/[\{;]/,excludeEnd:!0,keywords:t,contains:["self",e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:/["'\(]/}],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0,contains:["self",{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:/["'\(]/}]},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+e.IDENT_RE,relevance:0},{className:"meta",begin:"@[A-Za-z]+"}]}}),k4}var N4,aG;function C7e(){return aG||(aG=1,N4=function(e){return{keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:"{",excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[e.UNDERSCORE_TITLE_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$",relevance:2}]}}),N4}var R4,iG;function T7e(){return iG||(iG=1,R4=function(e){return{aliases:["vb"],case_insensitive:!0,keywords:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},illegal:"//|{|}|endif|gosub|variant|wend",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT("'","$",{returnBegin:!0,contains:[{className:"doctag",begin:"'''|<!--|-->",contains:[e.PHRASAL_WORDS_MODE]},{className:"doctag",begin:"</?",end:">",contains:[e.PHRASAL_WORDS_MODE]}]}),e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elseif end region externalsource"}}]}}),R4}var M4,sG;function A7e(){return sG||(sG=1,M4=function(e){return{aliases:["vbs"],case_insensitive:!0,keywords:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},illegal:"//",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{relevance:0}),e.C_NUMBER_MODE]}}),M4}var D4,oG;function k7e(){return oG||(oG=1,D4=function(e){return{subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}),D4}var O4,lG;function N7e(){return lG||(lG=1,O4=function(e){var t={keyword:"accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf|0 bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate|5 genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor",literal:"null",built_in:"$finish $stop $exit $fatal $error $warning $info $realtime $time $printtimescale $bitstoreal $bitstoshortreal $itor $signed $cast $bits $stime $timeformat $realtobits $shortrealtobits $rtoi $unsigned $asserton $assertkill $assertpasson $assertfailon $assertnonvacuouson $assertoff $assertcontrol $assertpassoff $assertfailoff $assertvacuousoff $isunbounded $sampled $fell $changed $past_gclk $fell_gclk $changed_gclk $rising_gclk $steady_gclk $coverage_control $coverage_get $coverage_save $set_coverage_db_name $rose $stable $past $rose_gclk $stable_gclk $future_gclk $falling_gclk $changing_gclk $display $coverage_get_max $coverage_merge $get_coverage $load_coverage_db $typename $unpacked_dimensions $left $low $increment $clog2 $ln $log10 $exp $sqrt $pow $floor $ceil $sin $cos $tan $countbits $onehot $isunknown $fatal $warning $dimensions $right $high $size $asin $acos $atan $atan2 $hypot $sinh $cosh $tanh $asinh $acosh $atanh $countones $onehot0 $error $info $random $dist_chi_square $dist_erlang $dist_exponential $dist_normal $dist_poisson $dist_t $dist_uniform $q_initialize $q_remove $q_exam $async$and$array $async$nand$array $async$or$array $async$nor$array $sync$and$array $sync$nand$array $sync$or$array $sync$nor$array $q_add $q_full $psprintf $async$and$plane $async$nand$plane $async$or$plane $async$nor$plane $sync$and$plane $sync$nand$plane $sync$or$plane $sync$nor$plane $system $display $displayb $displayh $displayo $strobe $strobeb $strobeh $strobeo $write $readmemb $readmemh $writememh $value$plusargs $dumpvars $dumpon $dumplimit $dumpports $dumpportson $dumpportslimit $writeb $writeh $writeo $monitor $monitorb $monitorh $monitoro $writememb $dumpfile $dumpoff $dumpall $dumpflush $dumpportsoff $dumpportsall $dumpportsflush $fclose $fdisplay $fdisplayb $fdisplayh $fdisplayo $fstrobe $fstrobeb $fstrobeh $fstrobeo $swrite $swriteb $swriteh $swriteo $fscanf $fread $fseek $fflush $feof $fopen $fwrite $fwriteb $fwriteh $fwriteo $fmonitor $fmonitorb $fmonitorh $fmonitoro $sformat $sformatf $fgetc $ungetc $fgets $sscanf $rewind $ftell $ferror"};return{aliases:["v","sv","svh"],case_insensitive:!1,keywords:t,lexemes:/[\w\$]+/,contains:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"number",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"\\b((\\d+'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{begin:"\\B(('(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{begin:"\\b([0-9_])+",relevance:0}]},{className:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{className:"meta",begin:"`",end:"$",keywords:{"meta-keyword":"define __FILE__ __LINE__ begin_keywords celldefine default_nettype define else elsif end_keywords endcelldefine endif ifdef ifndef include line nounconnected_drive pragma resetall timescale unconnected_drive undef undefineall"},relevance:0}]}}),O4}var I4,cG;function R7e(){return cG||(cG=1,I4=function(e){var t="\\d(_|\\d)*",r="[eE][-+]?"+t,n=t+"(\\."+t+")?("+r+")?",a="\\w+",i=t+"#"+a+"(\\."+a+")?#("+r+")?",s="\\b("+i+"|"+n+")";return{case_insensitive:!0,keywords:{keyword:"abs access after alias all and architecture array assert assume assume_guarantee attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",built_in:"boolean bit character integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_logic std_logic_vector unsigned signed boolean_vector integer_vector std_ulogic std_ulogic_vector unresolved_unsigned u_unsigned unresolved_signed u_signedreal_vector time_vector",literal:"false true note warning error failure line text side width"},illegal:"{",contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT("--","$"),e.QUOTE_STRING_MODE,{className:"number",begin:s,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[e.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[e.BACKSLASH_ESCAPE]}]}}),I4}var L4,uG;function M7e(){return uG||(uG=1,L4=function(e){return{lexemes:/[!#@\w]+/,keywords:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[e.NUMBER_MODE,e.APOS_STRING_MODE,{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},e.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]*/},{className:"function",beginKeywords:"function function!",end:"$",relevance:0,contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}),L4}var P4,dG;function D7e(){return dG||(dG=1,P4=function(e){return{case_insensitive:!0,lexemes:"[.%]?"+e.IDENT_RE,keywords:{keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0  xmm1  xmm2  xmm3  xmm4  xmm5  xmm6  xmm7  xmm8  xmm9 xmm10  xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0  ymm1  ymm2  ymm3  ymm4  ymm5  ymm6  ymm7  ymm8  ymm9 ymm10  ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0  zmm1  zmm2  zmm3  zmm4  zmm5  zmm6  zmm7  zmm8  zmm9 zmm10  zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__  __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__  __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}),P4}var F4,fG;function O7e(){return fG||(fG=1,F4=function(e){var t="ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts",r={keyword:"if then else do while until for loop import with is as where when by data constant integer real text name boolean symbol infix prefix postfix block tree",literal:"true false nil",built_in:"in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin acos atan exp expm1 log log2 log10 log1p pi at text_length text_range text_find text_replace contains page slide basic_slide title_slide title subtitle fade_in fade_out fade_at clear_color color line_color line_width texture_wrap texture_transform texture scale_?x scale_?y scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y rotate_?z? rectangle circle ellipse sphere path line_to move_to quad_to curve_to theme background contents locally time mouse_?x mouse_?y mouse_buttons "+t},n={className:"string",begin:'"',end:'"',illegal:"\\n"},a={className:"string",begin:"'",end:"'",illegal:"\\n"},i={className:"string",begin:"<<",end:">>"},s={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},o={beginKeywords:"import",end:"$",keywords:r,contains:[n]},l={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,keywords:r}})]};return{aliases:["tao"],lexemes:/[a-zA-Z][a-zA-Z0-9_?]*/,keywords:r,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,a,i,l,o,s,e.NUMBER_MODE]}}),F4}var B4,hG;function I7e(){return hG||(hG=1,B4=function(e){var t="for let if while then else return where group by xquery encoding versionmodule namespace boundary-space preserve strip default collation base-uri orderingcopy-namespaces order declare import schema namespace function option in allowing emptyat tumbling window sliding window start when only end when previous next stable ascendingdescending empty greatest least some every satisfies switch case typeswitch try catch andor to union intersect instance of treat as castable cast map array delete insert intoreplace value rename copy modify update",r="false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute",n={begin:/\$[a-zA-Z0-9\-]+/},a={className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},i={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},s={className:"meta",begin:"%\\w+"},o={className:"comment",begin:"\\(:",end:":\\)",relevance:10,contains:[{className:"doctag",begin:"@\\w+"}]},l={begin:"{",end:"}"},c=[n,i,a,o,s,l];return l.contains=c,{aliases:["xpath","xq"],case_insensitive:!1,lexemes:/[a-zA-Z\$][a-zA-Z0-9_:\-]*/,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{keyword:t,literal:r},contains:c}}),B4}var z4,pG;function L7e(){return pG||(pG=1,z4=function(e){var t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["zep"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var let while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally int uint long ulong char uchar double float bool boolean stringlikely unlikely",contains:[e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:`<<<['"]?\\w+['"]?$`,end:"^\\w+;",contains:[e.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",e.C_BLOCK_COMMENT_MODE,t,r]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},t,r]}}),z4}var j4,mG;function P7e(){if(mG)return j4;mG=1;var e=_Ie();return j4=e,e.registerLanguage("1c",wIe()),e.registerLanguage("abnf",EIe()),e.registerLanguage("accesslog",SIe()),e.registerLanguage("actionscript",CIe()),e.registerLanguage("ada",TIe()),e.registerLanguage("apache",AIe()),e.registerLanguage("applescript",kIe()),e.registerLanguage("cpp",NIe()),e.registerLanguage("arduino",RIe()),e.registerLanguage("armasm",MIe()),e.registerLanguage("xml",DIe()),e.registerLanguage("asciidoc",OIe()),e.registerLanguage("aspectj",IIe()),e.registerLanguage("autohotkey",LIe()),e.registerLanguage("autoit",PIe()),e.registerLanguage("avrasm",FIe()),e.registerLanguage("awk",BIe()),e.registerLanguage("axapta",zIe()),e.registerLanguage("bash",jIe()),e.registerLanguage("basic",qIe()),e.registerLanguage("bnf",UIe()),e.registerLanguage("brainfuck",$Ie()),e.registerLanguage("cal",HIe()),e.registerLanguage("capnproto",GIe()),e.registerLanguage("ceylon",VIe()),e.registerLanguage("clean",WIe()),e.registerLanguage("clojure",KIe()),e.registerLanguage("clojure-repl",XIe()),e.registerLanguage("cmake",YIe()),e.registerLanguage("coffeescript",ZIe()),e.registerLanguage("coq",QIe()),e.registerLanguage("cos",JIe()),e.registerLanguage("crmsh",e8e()),e.registerLanguage("crystal",t8e()),e.registerLanguage("cs",r8e()),e.registerLanguage("csp",n8e()),e.registerLanguage("css",a8e()),e.registerLanguage("d",i8e()),e.registerLanguage("markdown",s8e()),e.registerLanguage("dart",o8e()),e.registerLanguage("delphi",l8e()),e.registerLanguage("diff",c8e()),e.registerLanguage("django",u8e()),e.registerLanguage("dns",d8e()),e.registerLanguage("dockerfile",f8e()),e.registerLanguage("dos",h8e()),e.registerLanguage("dsconfig",p8e()),e.registerLanguage("dts",m8e()),e.registerLanguage("dust",g8e()),e.registerLanguage("ebnf",v8e()),e.registerLanguage("elixir",b8e()),e.registerLanguage("elm",x8e()),e.registerLanguage("ruby",y8e()),e.registerLanguage("erb",_8e()),e.registerLanguage("erlang-repl",w8e()),e.registerLanguage("erlang",E8e()),e.registerLanguage("excel",S8e()),e.registerLanguage("fix",C8e()),e.registerLanguage("flix",T8e()),e.registerLanguage("fortran",A8e()),e.registerLanguage("fsharp",k8e()),e.registerLanguage("gams",N8e()),e.registerLanguage("gauss",R8e()),e.registerLanguage("gcode",M8e()),e.registerLanguage("gherkin",D8e()),e.registerLanguage("glsl",O8e()),e.registerLanguage("go",I8e()),e.registerLanguage("golo",L8e()),e.registerLanguage("gradle",P8e()),e.registerLanguage("groovy",F8e()),e.registerLanguage("haml",B8e()),e.registerLanguage("handlebars",z8e()),e.registerLanguage("haskell",j8e()),e.registerLanguage("haxe",q8e()),e.registerLanguage("hsp",U8e()),e.registerLanguage("htmlbars",$8e()),e.registerLanguage("http",H8e()),e.registerLanguage("hy",G8e()),e.registerLanguage("inform7",V8e()),e.registerLanguage("ini",W8e()),e.registerLanguage("irpf90",K8e()),e.registerLanguage("java",X8e()),e.registerLanguage("javascript",Y8e()),e.registerLanguage("jboss-cli",Z8e()),e.registerLanguage("json",Q8e()),e.registerLanguage("julia",J8e()),e.registerLanguage("julia-repl",eLe()),e.registerLanguage("kotlin",tLe()),e.registerLanguage("lasso",rLe()),e.registerLanguage("ldif",nLe()),e.registerLanguage("leaf",aLe()),e.registerLanguage("less",iLe()),e.registerLanguage("lisp",sLe()),e.registerLanguage("livecodeserver",oLe()),e.registerLanguage("livescript",lLe()),e.registerLanguage("llvm",cLe()),e.registerLanguage("lsl",uLe()),e.registerLanguage("lua",dLe()),e.registerLanguage("makefile",fLe()),e.registerLanguage("mathematica",hLe()),e.registerLanguage("matlab",pLe()),e.registerLanguage("maxima",mLe()),e.registerLanguage("mel",gLe()),e.registerLanguage("mercury",vLe()),e.registerLanguage("mipsasm",bLe()),e.registerLanguage("mizar",xLe()),e.registerLanguage("perl",yLe()),e.registerLanguage("mojolicious",_Le()),e.registerLanguage("monkey",wLe()),e.registerLanguage("moonscript",ELe()),e.registerLanguage("n1ql",SLe()),e.registerLanguage("nginx",CLe()),e.registerLanguage("nimrod",TLe()),e.registerLanguage("nix",ALe()),e.registerLanguage("nsis",kLe()),e.registerLanguage("objectivec",NLe()),e.registerLanguage("ocaml",RLe()),e.registerLanguage("openscad",MLe()),e.registerLanguage("oxygene",DLe()),e.registerLanguage("parser3",OLe()),e.registerLanguage("pf",ILe()),e.registerLanguage("php",LLe()),e.registerLanguage("pony",PLe()),e.registerLanguage("powershell",FLe()),e.registerLanguage("processing",BLe()),e.registerLanguage("profile",zLe()),e.registerLanguage("prolog",jLe()),e.registerLanguage("protobuf",qLe()),e.registerLanguage("puppet",ULe()),e.registerLanguage("purebasic",$Le()),e.registerLanguage("python",HLe()),e.registerLanguage("q",GLe()),e.registerLanguage("qml",VLe()),e.registerLanguage("r",WLe()),e.registerLanguage("rib",KLe()),e.registerLanguage("roboconf",XLe()),e.registerLanguage("routeros",YLe()),e.registerLanguage("rsl",ZLe()),e.registerLanguage("ruleslanguage",QLe()),e.registerLanguage("rust",JLe()),e.registerLanguage("scala",e7e()),e.registerLanguage("scheme",t7e()),e.registerLanguage("scilab",r7e()),e.registerLanguage("scss",n7e()),e.registerLanguage("shell",a7e()),e.registerLanguage("smali",i7e()),e.registerLanguage("smalltalk",s7e()),e.registerLanguage("sml",o7e()),e.registerLanguage("sqf",l7e()),e.registerLanguage("sql",c7e()),e.registerLanguage("stan",u7e()),e.registerLanguage("stata",d7e()),e.registerLanguage("step21",f7e()),e.registerLanguage("stylus",h7e()),e.registerLanguage("subunit",p7e()),e.registerLanguage("swift",m7e()),e.registerLanguage("taggerscript",g7e()),e.registerLanguage("yaml",v7e()),e.registerLanguage("tap",b7e()),e.registerLanguage("tcl",x7e()),e.registerLanguage("tex",y7e()),e.registerLanguage("thrift",_7e()),e.registerLanguage("tp",w7e()),e.registerLanguage("twig",E7e()),e.registerLanguage("typescript",S7e()),e.registerLanguage("vala",C7e()),e.registerLanguage("vbnet",T7e()),e.registerLanguage("vbscript",A7e()),e.registerLanguage("vbscript-html",k7e()),e.registerLanguage("verilog",N7e()),e.registerLanguage("vhdl",R7e()),e.registerLanguage("vim",M7e()),e.registerLanguage("x86asm",D7e()),e.registerLanguage("xl",O7e()),e.registerLanguage("xquery",I7e()),e.registerLanguage("zephir",L7e()),j4}var gG;function F7e(){return gG||(gG=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=void 0;var t=lse();Object.defineProperty(e,"createElement",{enumerable:!0,get:function(){return l(t).default}});var r=gIe(),n=l(r),a=vIe(),i=l(a),s=P7e(),o=l(s);function l(c){return c&&c.__esModule?c:{default:c}}e.default=(0,n.default)(o.default,i.default)})(BE)),BE}var B7e=F7e();const cse=Fl(B7e),z7e=({content:e})=>{const[t,r]=E.useState(!1),[n,a]=E.useState(""),i=`react-code-${Math.random().toString(36).substring(2,8)}`,s=j7e(e),o=q7e(e);return g.jsx("div",{className:"relative grid w-full grid-cols-1 mt-2 mb-4 overflow-hidden rounded-lg",id:i,children:g.jsx("div",{onClick:()=>{r(!0),a(e)},className:"flex flex-col w-full gap-4",children:g.jsxs("div",{className:"flex w-full gap-3 px-3 py-3 border rounded-lg cursor-pointer bg-brand-50 border-brand-100",children:[g.jsx("div",{className:"flex items-center justify-center gap-2 p-2 rounded size-12 bg-brand-100 dark:bg-brand-200",children:g.jsx(Ege,{className:"size-5 text-brand-700 dark:text-brand-800"})}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("span",{className:"font-medium text-gray-900",children:s}),g.jsx("span",{className:"text-xs text-gray-600",children:o})]})]})})})},j7e=e=>{const t=e.match(/aria-label=["']([^"']+)["']/i);if(t&&t[1])return t[1];const r=e.match(/function\s+([A-Za-z0-9_]+)\s*\(/);if(r&&r[1])return r[1];const n=e.match(/export\s+(?:default)?\s*const\s+([A-Za-z0-9_]+)\s*=/);if(n&&n[1])return n[1];const a=e.match(/class\s+([A-Za-z0-9_]+)\s+extends\s+React\.Component/);if(a&&a[1])return a[1];const i=e.match(/title[=:]\s*["']([^"']+)["']/i)||e.match(/chart\s+title[=:]\s*["']([^"']+)["']/i);return i&&i[1]?i[1]:e.includes("recharts")?e.includes("LineChart")?"Line Chart Component":e.includes("BarChart")?"Bar Chart Component":e.includes("PieChart")?"Pie Chart Component":e.includes("AreaChart")?"Area Chart Component":e.includes("ComposedChart")?"Composed Chart Component":e.includes("RadarChart")?"Radar Chart Component":e.includes("Treemap")?"Treemap Component":e.includes("ScatterChart")?"Scatter Chart Component":"Recharts Visualization":e.includes("Chart from")?"Chart.js Visualization":e.includes("d3")?"D3.js Visualization":e.includes("<Form")||e.includes("onSubmit")?"Form Component":e.includes("<Table")||e.includes("<tr")||e.includes("<td")?"Table Component":e.includes("useState")||e.includes("useEffect")?"React Hooks Component":"React Component"},q7e=e=>{const t=[];if(e.includes("recharts")||e.includes("Chart")||e.includes("d3")){t.push("Data visualization");const a=e.match(/dataKey=["']([A-Za-z0-9_]+)["']/);a&&a[1]&&t.push(`showing ${a[1].toLowerCase()} data`)}if(e.includes("onSubmit")||e.includes("<Form"))return"Interactive form component";if(e.includes("useState"))return e.includes("fetch(")||e.includes("axios")?"Component with data fetching":"Interactive component with state";if(e.toLowerCase().includes("dashboard"))return"Dashboard component";if(e.toLowerCase().includes("analytics")||e.toLowerCase().includes("metrics"))return"Analytics visualization";const r=e.split(`
`).length;let n="";return r<30?n="Simple":r<100?n="Moderate":n="Complex",t.length>0?`${t.join(" ")}`:`${n} React component. Click to edit`};let Ap;try{Ap=require("react-syntax-highlighter/dist/styles/hljs/vs2015").default}catch{try{Ap=require("react-syntax-highlighter/dist/styles/default").default}catch{Ap={}}}const U7e=e=>{let t=e;return t=t.replace(/^(\d+)\.\s+\*\*(.*?)\*\*:?\s*$/gm,(r,n,a)=>`## ${n}. ${a}`),t=t.replace(/\\\[\s*\n?([\s\S]*?)\n?\s*\\\]/g,(r,n)=>`
\`\`\`
${n.replace(/\\times/g,"×").replace(/\\cdot/g,"·").replace(/\\frac\{([^}]+)\}\{([^}]+)\}/g,"($1 / $2)").replace(/\\sum/g,"Σ").replace(/\\\(/g,"").replace(/\\\)/g,"").trim()}
\`\`\`
`),t=t.replace(/\\\((.*?)\\\)/g,(r,n)=>`\`${n.replace(/\\times/g,"×").replace(/\\cdot/g,"·").replace(/\\frac\{([^}]+)\}\{([^}]+)\}/g,"($1 / $2)").trim()}\``),t=t.replace(/^(\s*)-\s+Where\s+\\\(([^)]+)\\\)\s*=\s*(.+)$/gm,"- **$2** = $3"),t=t.replace(/^(\s*)-\s+\*\*([^*]+)\*\*\s*=\s*(.+)$/gm,"$1- **$2** = $3"),t=t.replace(/^(\s*)[-*]\s*Where\s+(.+)$/gm,(r,n,a)=>a.split(",").map(s=>{const o=s.trim(),l=o.match(/^(\w+)\s*=\s*(.+)$/);return l?`${n}- **${l[1]}** = ${l[2]}`:`${n}- ${o}`}).join(`
`)),t=t.replace(/^(\s*)[-*]\s*([A-Z]+\s*=\s*[^,]+(?:,\s*[A-Z]+\s*=\s*[^,]+)+)\.?\s*$/gm,(r,n,a)=>a.split(",").map(s=>{const o=s.trim().replace(/\.$/,""),l=o.match(/^(\w+)\s*=\s*(.+)$/);return l?`${n}- **${l[1]}** = ${l[2]}`:`${n}- ${o}`}).join(`
`)),t=t.replace(/\n{4,}/g,`


`),t=t.replace(/^(#{1,6}\s+.*?)(\n{2,})/gm,`$1

`),t=t.replace(/\\times/g,"×").replace(/\\cdot/g,"·").replace(/\\pm/g,"±").replace(/\\infty/g,"∞").replace(/\\alpha/g,"α").replace(/\\beta/g,"β").replace(/\\gamma/g,"γ").replace(/\\Delta/g,"Δ").replace(/\\sum/g,"Σ"),t=t.replace(/```\n([^`]+)\n```/g,(r,n)=>`\`\`\`
${n.trim().replace(/\s+/g," ").replace(/\s*=\s*/g," = ").replace(/\s*\+\s*/g," + ").replace(/\s*-\s*/g," - ").replace(/\s*\*\s*/g," × ").replace(/\s*\/\s*/g," / ")}
\`\`\``),t},q4=/(@[^@]*?\.(?:\w+))/g,U4=({mention:e})=>{const t=()=>{};return g.jsx("span",{className:"font-medium text-brand-600 bg-brand-50 rounded-md px-1.5 py-0.5 cursor-pointer",onClick:t,children:e})},$7e=({content:e})=>{const t=`mermaid-block-${Math.random().toString(36).substr(2,9)}`;return g.jsx("div",{className:"overflow-x-auto mt-2 mb-4 w-full rounded-lg border border-gray-200",id:t,children:g.jsx(cse,{className:"text-sm xl:text-base",language:"mermaid",style:Ap,customStyle:{margin:0,borderRadius:0,lineHeight:1.6,padding:"1rem",background:"rgb(30, 30, 30)",fontSize:"0.875rem",width:"100%",maxWidth:"100%",overflowWrap:"break-word",wordBreak:"break-word"},showLineNumbers:!0,wrapLines:!0,wrapLongLines:!0,children:e})})},H7e=({content:e,language:t})=>{const r=`code-block-${Math.random().toString(36).substr(2,9)}`;return g.jsx("div",{className:"overflow-x-auto mt-2 mb-4 w-full rounded-lg border border-gray-200",id:r,children:g.jsx(cse,{className:"text-sm xl:text-base",language:t||"text",style:Ap,customStyle:{margin:0,borderRadius:0,lineHeight:1.6,padding:"1rem",fontSize:"0.875rem",width:"100%",maxWidth:"100%",overflowWrap:"break-word",wordBreak:"break-word"},showLineNumbers:!0,wrapLines:!0,wrapLongLines:!0,lineNumberStyle:{color:"#6b7280",fontSize:"0.75rem"},children:e})})},zx=({children:e="",classname:t="",useMath:r=!0,theme:n="light",backgroundContext:a="default"})=>{const i="text-xs xl:text-sm";E.useEffect(()=>{n==="dark"&&Wne(()=>Promise.resolve({}),__vite__mapDeps([0]))},[n]);const s=E.useMemo(()=>{let c=e;return c.startsWith("```markdown")?(c=c.substring(12),c.endsWith("```")&&(c=c.slice(0,-3))):c.startsWith("```")&&!c.startsWith("```c")&&(c=c.substring(3),c.endsWith("```")&&(c=c.slice(0,-3))),r||(c=U7e(c)),r?c=c.replace(/^\s*\$\s*$/gm,"").replace(/\n\s*\$\s*\n/g,`

`).replace(/\\\[([\s\S]*?)\\\]/g,`$$
$1
$$`).replace(/\$\$([\s\S]*?)\$\$/g,(u,f)=>`
$$${f.trim()}$$
`).replace(/\n\s*\n\s*\n+/g,`

`):c=c.replaceAll("$","\\$"),c},[e,r]),o=E.useMemo(()=>{const c=[lOe];return r&&c.push(e6e),c},[r]),l=E.useMemo(()=>{const c=[];return r&&c.push(jOe),c},[r]);return g.jsx("div",{className:ut(`w-full markdown-body markdown-body-${n} markdown-body-${a} ${i}`,t),children:s?g.jsx(V1,{remarkPlugins:o,rehypePlugins:l,components:{code:({className:c,children:u})=>{const f=String(u).trim(),p=/language-(\w+)/.exec(c||""),m=p?p[1]:"",b=!c,v=m==="mermaid",y=m==="jsx"||m==="tsx"||f.includes("import React")||f.includes("from 'react'")||f.includes('from "react"'),_=f.includes("import { ")&&(f.includes(" from 'recharts'")||f.includes(' from "recharts"'));if(b){const S=/^use[A-Z]/.test(f),C=/^[A-Z][A-Za-z0-9]*$/.test(f),T=/^[a-z_$][a-zA-Z0-9_$]*$/.test(f),A=f.split(/\s+/).length===1;return g.jsx("code",{className:ut(`font-mono font-normal px-1.5 py-0.5 rounded ${i}`,S?"bg-purple-100 text-purple-800":C?"bg-yellow-100 text-yellow-800":T?"bg-gray-100 text-gray-800":"bg-gray-50 text-gray-900",A?"inline-block":""),children:f})}return v?g.jsx($7e,{content:f}):y&&_?g.jsx(z7e,{content:f}):g.jsx(H7e,{content:f,language:m})},ul:({children:c})=>g.jsx("ul",{className:`text-gray-900 ${i}`,children:c}),li:({children:c})=>g.jsx("li",{className:`list-disc text-gray-900 ${i}`,children:c}),p:({children:c})=>{const u=f=>{const p=["Future Value","FV","Present Value","PV","Net Present Value","NPV","Internal Rate of Return","IRR","Return on Investment","ROI","Debt-to-Income Ratio","DTI","Savings Rate","interest rate","discount rate","cash flow"];let m=f;return p.forEach(b=>{const v=new RegExp(`\\b(${b})\\b`,"gi");m=m.replace(v,'<span class="financial-term">$1</span>')}),m};if(Array.isArray(c))return c.some(p=>typeof p=="string"&&p.includes("@"))?g.jsx("p",{className:`py-1 text-gray-900 ${i}`,children:c.map((p,m)=>{if(typeof p=="string"&&p.includes("@")){const b=p.split(q4);return g.jsx(E.Fragment,{children:b.map((v,y)=>v.startsWith("@")?g.jsx(U4,{mention:v},y):g.jsx("span",{dangerouslySetInnerHTML:{__html:u(v)}},y))},m)}if(typeof p=="string"){const b=p.trim();return b==="$"||b===""?null:g.jsx("span",{dangerouslySetInnerHTML:{__html:u(p)}},m)}return p})}):g.jsx("p",{className:`py-1 text-gray-900 ${i}`,children:c.map((p,m)=>{if(typeof p=="string"){const b=p.trim();return b==="$"||b===""?null:g.jsx("span",{dangerouslySetInnerHTML:{__html:u(p)}},m)}return p})});if(typeof c=="string"&&c.includes("@")){const f=c.split(q4);return g.jsx("p",{className:`py-1 text-gray-900 ${i}`,children:f.map((p,m)=>p.startsWith("@")?g.jsx(U4,{mention:p},m):g.jsx("span",{dangerouslySetInnerHTML:{__html:u(p)}},m))})}if(typeof c=="string"){const f=c.trim();return f==="$"||f===""?null:g.jsx("p",{className:`py-1 text-gray-900 ${i}`,dangerouslySetInnerHTML:{__html:u(c)}})}return g.jsx("p",{className:`py-1 text-gray-900 ${i}`,children:c})},table:({children:c})=>g.jsx("div",{className:"overflow-x-auto my-4 w-full",children:g.jsx("table",{className:"w-full rounded border border-gray-200 border-collapse table-fixed",style:{tableLayout:"fixed",width:"100%"},children:c})}),pre:({children:c})=>g.jsx("div",{className:"overflow-x-auto my-4 w-full",children:g.jsx("pre",{className:"overflow-x-auto p-4 w-full text-sm bg-gray-100 rounded-lg",style:{maxWidth:"100%",wordBreak:"break-word",overflowWrap:"break-word",whiteSpace:"pre-wrap"},children:c})}),thead:({children:c})=>g.jsx("thead",{className:"bg-gray-50",children:c}),tbody:({children:c})=>g.jsx("tbody",{className:"divide-y divide-gray-200",children:c}),tr:({children:c})=>g.jsx("tr",{children:c}),th:({children:c})=>g.jsx("th",{className:"px-4 py-3 text-sm font-medium tracking-wider text-left text-gray-900 uppercase break-words border-b border-gray-200 first:rounded-tl last:rounded-tr",children:c}),td:({children:c})=>{if(c&&typeof c=="object"&&"$$typeof"in c&&c.$$typeof===Symbol.for("react.element"))return g.jsx("td",{className:"px-4 py-3 text-gray-900 break-words border-b border-gray-200",children:c});if(Array.isArray(c)&&c.some(b=>b&&typeof b=="object"&&b.$$typeof===Symbol.for("react.element")))return g.jsx("td",{className:"px-4 py-3 text-gray-900 break-words border-b border-gray-200",children:c});const p=(Array.isArray(c)?c.map(m=>typeof m=="string"?m:"").join(""):String(c||"")).replace(/\*\*([^*]+)\*\*/g,(m,b)=>`<strong>${b}</strong>`).split(/(\[\[\d+\]\])/);return p?.length===1?g.jsx("td",{className:"px-4 py-3 text-gray-900 break-words border-b border-gray-200",children:c}):g.jsx("td",{className:"px-4 py-3 text-gray-900 break-words border-b border-gray-200",children:g.jsx("span",{className:"inline-flex flex-wrap gap-1 items-center",children:p?.map((m,b)=>g.jsx("span",{dangerouslySetInnerHTML:{__html:m}},b))})})},text:({children:c})=>{const u=Array.isArray(c)?c.map(m=>typeof m=="string"?m:"").join(""):String(c);if(u.includes("@")){const m=u.split(q4);return g.jsx("span",{className:"inline-flex flex-wrap items-center",children:m.map((b,v)=>b.startsWith("@")?g.jsx(U4,{mention:b},v):g.jsx("span",{children:b},v))})}const f=u.replace(/\*\*([^*]+)\*\*/g,(m,b)=>`<strong>${b}</strong>`),p=f.split(/(\[\[\d+\]\])/);return p.length===1?g.jsx("span",{dangerouslySetInnerHTML:{__html:f}}):g.jsx("span",{className:"inline-flex flex-wrap gap-1 items-center",children:p.map((m,b)=>g.jsx("span",{dangerouslySetInnerHTML:{__html:m}},b))})}},children:s}):g.jsx("div",{className:"italic text-gray-500",children:"No content to display"})})},G7e=({html:e,className:t="",theme:r="light",backgroundContext:n="default"})=>{const a="text-xs xl:text-sm",s=(f=>{const p=["p","div","span","strong","b","em","i","u","h1","h2","h3","h4","h5","h6","ul","ol","li","blockquote","code","pre","br","hr","a","img","button"],m=["class","id","style","href","src","alt","title","target","data-option","data-*"],b=document.createElement("div");b.innerHTML=f;const v=y=>{if(y.nodeType===Node.ELEMENT_NODE){const _=y,S=_.tagName.toLowerCase();if(!p.includes(S)){_.replaceWith(...Array.from(_.childNodes));return}Array.from(_.attributes).forEach(T=>{const A=T.name.toLowerCase(),k=m.includes(A)||A.startsWith("data-")||m.some(N=>N==="data-*");if(A==="onclick"){_.removeAttribute(T.name);return}k||_.removeAttribute(T.name)}),Array.from(_.childNodes).forEach(v)}};return v(b),b.innerHTML})(e),o=E.useRef(null);E.useEffect(()=>{if(!o.current)return;const f=p=>{const b=p.target.closest(".option-button");if(b){if(!l(b)){console.log("Button in inactive message, ignoring click");return}u(b)}};return o.current.addEventListener("click",f),console.log("Event delegation listener attached to container"),()=>{o.current&&(o.current.removeEventListener("click",f),console.log("Event delegation listener removed from container"))}},[]);const l=f=>{const p=f.closest("[data-message-id]");if(!p)return!0;const m=p.getAttribute("data-message-id"),b=m===c;return console.log(`Button message ID: ${m}, Current: ${c}, Active: ${b}`),b},c=E.useMemo(()=>`message-${s.length.toString(36)+s.substring(0,10).split("").map(p=>p.charCodeAt(0)).join("")}`,[s]),u=f=>{const p=f.textContent||"";console.log(`Active option button clicked: "${p}"`),console.log("Available global functions:",{sendMessageDirect:typeof window.sendMessageDirect,setInput:typeof window.setInput,sendMessage:typeof window.sendMessage});let m=!1;if(typeof window.sendMessageDirect=="function"&&!m)try{console.log(`Sending message directly: "${p}"`),window.sendMessageDirect(p),m=!0,console.log("Message sent directly via sendMessageDirect");return}catch(v){console.log("Direct send failed:",v)}else console.log("sendMessageDirect not available, trying fallback approaches");const b=["sendMessage","handleSendMessage","submitMessage"];for(const v of b)if(typeof window[v]=="function"&&!m)try{console.log(`Trying global function: ${v}`),window.setInput?(console.log(`Setting input via setInput: "${p}"`),window.setInput(p)):window.setInputText&&(console.log(`Setting input via setInputText: "${p}"`),window.setInputText(p)),setTimeout(()=>{window[v](),console.log(`Message sent via global ${v} function with delay`)},50),m=!0;break}catch(y){console.log(`Global ${v} call failed:`,y)}if(!m){console.log("Global approach failed, trying DOM fallback");const v=document.querySelector('textarea[placeholder="Ask me anything"]');if(v)console.log(`Found chat input, setting value: "${p}"`),v.value=p,v.dispatchEvent(new Event("input",{bubbles:!0})),v.dispatchEvent(new Event("change",{bubbles:!0})),v.focus(),setTimeout(()=>{const _=Array.from(document.querySelectorAll("button")).find(S=>(S.getAttribute("data-testid")?.includes("send")||S.className?.includes("send")||S.title?.includes("Send")||S.textContent?.includes("Send")||S.getAttribute("aria-label")?.includes("send"))&&S.offsetParent!==null);if(_)_.click(),console.log("Message sent via DOM fallback with delay");else{const S=new KeyboardEvent("keydown",{key:"Enter",code:"Enter",keyCode:13,which:13,bubbles:!0,cancelable:!0});v.dispatchEvent(S),console.log("Message sent via Enter key fallback")}},100);else{console.log(`Would send: ${p}`),console.log("No chat input found - searching for alternative selectors");const y=['textarea[placeholder="Type your message"]',"textarea",'input[type="text"]'];for(const _ of y){const S=document.querySelector(_);if(S){console.log(`Found alternative input with selector: ${_}`),S.value=p,S.dispatchEvent(new Event("input",{bubbles:!0})),S.dispatchEvent(new Event("change",{bubbles:!0})),S.focus();return}}alert(`Would send: ${p}

No chat input found`)}}};return g.jsx("div",{ref:o,className:ut(`html-renderer html-renderer-${r} html-renderer-${n} w-full ${a}`,t),"data-message-id":c,dangerouslySetInnerHTML:{__html:s}})},n0=({content:e,className:t="",useMath:r=!0,theme:n="light",backgroundContext:a="default",forceHtml:i=!1})=>{const s=u=>/<[^>]*>/.test(u),o=u=>u.includes("options-container")||u.includes("option-button")||u.includes("handleOptionClick")||u.includes("data-option"),l=u=>{const f=/<button[^>]*>/i.test(u),p=/<div[^>]*class=['"]?options-container['"]?[^>]*>/i.test(u),m=/onclick\s*=\s*['"][^'"]*['"]/.test(u);if(f||p||m)return!0;const b=(u.match(/<[^>]*>/g)||[]).length,v=(u.match(/[#*`\-_[]/g)||[]).length;return b>3&&b>=v*.6};return i||o(e)||s(e)&&l(e)?g.jsx(G7e,{html:e,className:t,theme:n,backgroundContext:a}):g.jsx(zx,{classname:t,useMath:r,theme:n,backgroundContext:a,children:e})},V7e=({agentId:e,onChatUpdate:t,onConnect:r,onDisconnect:n,onError:a,enabled:i=!0})=>{const s=E.useRef(null),o=E.useRef(null),l=E.useRef(0),c=E.useRef({onChatUpdate:t,onConnect:r,onDisconnect:n,onError:a}),[u,f]=E.useState(!1),[p,m]=E.useState("disconnected"),b=5,v=3e3;E.useEffect(()=>{c.current={onChatUpdate:t,onConnect:r,onDisconnect:n,onError:a}},[t,r,n,a]);const y=E.useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),s.current&&(s.current.onopen=null,s.current.onclose=null,s.current.onmessage=null,s.current.onerror=null,s.current.readyState===WebSocket.OPEN&&s.current.close(),s.current=null),f(!1),m("disconnected")},[]),_=E.useCallback(()=>{if(!(s.current?.readyState===WebSocket.OPEN||s.current?.readyState===WebSocket.CONNECTING||!i||!e))try{m(l.current>0?"reconnecting":"connecting");const T=`http://localhost:8080/api/agents/ws/dana-chat/${e}`;console.log(`${l.current>0?"Reconnecting":"Connecting"} WebSocket for agent ${e}...`);const A=new WebSocket(T);s.current=A,A.onopen=()=>{console.log(`✅ WebSocket connected for agent ${e}`),l.current=0,f(!0),m("connected"),c.current.onConnect?.()},A.onmessage=k=>{try{const N=JSON.parse(k.data);N.type==="chat_update"&&N.message&&c.current.onChatUpdate?.(N.message)}catch(N){console.error("Failed to parse WebSocket message:",N)}},A.onclose=k=>{console.log(`🔌 WebSocket disconnected for agent ${e}`,{code:k.code,reason:k.reason}),s.current=null,f(!1),m("disconnected"),c.current.onDisconnect?.(),i&&k.code!==1e3&&l.current<b?(l.current++,console.log(`🔄 Scheduling reconnect attempt ${l.current}/${b} in ${v}ms`),o.current=setTimeout(()=>{i&&e&&_()},v)):console.log(`❌ Not reconnecting: enabled=${i}, code=${k.code}, attempts=${l.current}/${b}`)},A.onerror=k=>{console.error(`❌ WebSocket error for agent ${e}:`,k),c.current.onError?.(k)}}catch(T){console.error("Failed to create WebSocket connection:",T),m("disconnected"),c.current.onError?.(T)}},[e,i]),S=E.useCallback(()=>{console.log(`🔌 Manually disconnecting WebSocket for agent ${e}`),y()},[e,y]),C=E.useCallback(T=>s.current?.readyState===WebSocket.OPEN?(s.current.send(JSON.stringify(T)),!0):(console.warn("Cannot send message: WebSocket not connected"),!1),[]);return E.useEffect(()=>(i&&e?_():y(),()=>{y()}),[e,i]),E.useEffect(()=>{l.current=0},[e]),{isConnected:u,connectionState:p,connect:_,disconnect:S,sendMessage:C,reconnectAttempts:l.current,maxReconnectAttempts:b}},f6=380,h6=800,use=420,W7e=2,K7e=({onResize:e,isResizing:t,setIsResizing:r})=>{const n=E.useRef(null),a=E.useRef(0),i=E.useRef(0),s=E.useCallback(o=>{if(o.preventDefault(),o.stopPropagation(),!n.current)return;r(!0),a.current=o.clientX,i.current=n.current.parentElement?.offsetWidth||use;const l=u=>{const f=u.clientX-a.current,p=Math.max(f6,Math.min(h6,i.current+f));e(p)},c=()=>{r(!1),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)},[e,r]);return E.useEffect(()=>()=>{t&&r(!1)},[t,r]),g.jsx("div",{ref:n,className:`
        absolute top-0 right-0 h-full z-50
        hover:bg-gray-200 hover:shadow-sm transition-all duration-200
        ${t?"bg-primary":"hover:bg-gray-200"}
        group
      `,onMouseDown:s,style:{width:`${W7e}px`,cursor:"col-resize"},title:"Drag to resize sidebar",children:g.jsx("div",{className:`
          absolute top-1/2 left-1/2 transform -translate-x-1/3 -translate-y-1/2
          w-2 h-8 rounded-full transition-all duration-200 border border-gray-300
          ${t?"bg-white shadow-sm":"bg-white shadow-sm group-hover:bg-primary"}
        `,style:{zIndex:60,pointerEvents:"none"}})})},X7e=({messages:e,isExpanded:t,onToggle:r})=>e.length===0?null:g.jsxs("div",{className:"flex flex-col gap-2 self-start px-3 py-2 text-left bg-gray-50 rounded-lg border border-gray-200",children:[g.jsxs("button",{onClick:r,className:"flex gap-2 items-center text-sm font-medium text-gray-600 transition-colors hover:text-gray-800",children:[t?g.jsx(_re,{className:"w-4 h-4"}):g.jsx(Ere,{className:"w-4 h-4"}),"Show thinking (",e.length,")"]}),t&&g.jsx("div",{className:"flex overflow-y-auto flex-col gap-3 max-h-60",children:e.map(n=>g.jsxs("div",{className:"flex flex-col gap-2 p-2 bg-white rounded border border-gray-200",children:[g.jsxs("div",{className:"flex gap-2 items-center",children:[n.status==="in_progress"&&g.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-gray-600 animate-spin border-t-transparent"}),n.status==="finish"&&g.jsx("div",{className:"flex justify-center items-center w-4 h-4 bg-green-500 rounded-full",children:g.jsx("div",{className:"w-2 h-2 bg-white rounded-full"})}),n.status==="error"&&g.jsx("div",{className:"flex justify-center items-center w-4 h-4 bg-red-500 rounded-full",children:g.jsx("div",{className:"w-2 h-2 bg-white rounded-full"})}),g.jsx("span",{className:"text-sm font-medium text-gray-600",children:n.toolName}),g.jsx("span",{className:"ml-auto text-xs text-gray-400",children:n.timestamp.toLocaleTimeString()})]}),g.jsx("span",{className:"text-sm text-gray-600",children:n.message}),n.progression!==void 0&&g.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full",children:g.jsx("div",{className:"h-2 bg-gray-600 rounded-full transition-all duration-300",style:{width:`${n.progression*100}%`}})})]},n.id))})]}),Y7e=({agentName:e,onConnectionStateChange:t})=>{const{agent_id:r}=gs(),[n,a]=E.useState(""),[i,s]=E.useState(!1),[o,l]=E.useState(!1),[c,u]=E.useState(!1),f=E.useMemo(()=>r?Vne(r):null,[r]),p=f?f(oe=>oe.messages):[],m=f?f(oe=>oe.addMessage):()=>{},b=f?f(oe=>oe.removeMessageById):()=>{},v=f?f(oe=>oe.clearMessages):()=>{},y=f?f(oe=>oe.setMessages):()=>{},_=f?f(oe=>oe.getMessageCount):()=>0;E.useEffect(()=>(window.sendMessage=()=>{n.trim()&&r&&V()},window.setInput=oe=>{a(oe)},()=>{delete window.sendMessage,delete window.setInput}),[n,r]);const{setAgentDetailActiveTab:S,setKnowledgeBaseActiveSubTab:C}=ud(),T=E.useRef(null),[A,k]=E.useState([]),[N,L]=E.useState(!1),[I,P]=E.useState(!1),[H,B]=E.useState(!1),[K,j]=E.useState(null),W=E.useRef(null),D=E.useRef(!1),U=E.useCallback((oe,pe)=>{if(D.current)return null;D.current=!0,u(!0);const he=setTimeout(()=>{u(!1),m({sender:"agent",text:oe?`Great — you've started with the ${oe} - the expert in ${pe}.
Now let's shape it into an agent that really works for you. To begin, tell me:
- What kind of ${pe.toLowerCase()} expertise should it focus on?
- Who will this agent primarily assist (e.g. individuals, analysts, business owners)?

💡 Tip: If you have a **job description**, you can paste it here — I'll use it to tailor the agent's knowledge base.`:`Exciting — you're about to build your own custom agent from the ground up! 🚀

To get started, let's define its foundation:

- What **domain or expertise** should your agent specialize in? (e.g. healthcare, semiconductor, education)
- **Who** will it assist? (e.g. financial analysts, IT engineers)?

💡 Tip: You can provide a **job description**, and I'll draft the starting expertise for your agent.`})},2e3);return W.current=he,he},[m]),Y=E.useCallback(()=>{if(D.current)return null;D.current=!0,u(!0);const oe=setTimeout(()=>{u(!1),m({sender:"agent",text:"Welcome! How can I assist you with this agent?"})},2e3);return W.current=oe,oe},[m]);E.useEffect(()=>{r&&r!==K&&(console.log(`[Agent Switch] Switching from ${K} to ${r}`),K&&(W.current&&(clearTimeout(W.current),W.current=null),v(),B(!1),P(!1),u(!1),D.current=!1),j(r))},[r,K,v]);const z=E.useCallback(()=>{if(r)try{H5(r),console.log(`[Exit Cleanup] Cleared smart-chat-storage for agent ${r}`)}catch(oe){console.warn("Failed to clear storage on exit:",oe)}},[r]);E.useEffect(()=>()=>{r&&K&&r!==K&&console.log(`[Cleanup] Cleaning up messages for agent ${K}`)},[r,K]),E.useEffect(()=>()=>{console.log(`[Unmount] Cleaning up component for agent ${r}`),W.current&&(clearTimeout(W.current),W.current=null),z(),B(!1),P(!1),j(null),u(!1),D.current=!1,i&&s(!1)},[r,i,z]);const M=E.useCallback(oe=>{const pe={id:`${Date.now()}-${Math.random()}`,toolName:oe.tool_name,message:oe.content,status:oe.status,progression:oe.progression,timestamp:new Date};k(he=>{const ke=he.findIndex(se=>se.toolName===oe.tool_name);if(ke!==-1){const se=[...he];return se[ke]=pe,se}return[...he,pe]}),setTimeout(()=>{k(he=>he.filter(ke=>Date.now()-ke.timestamp.getTime()<3600*1e3))},3600*1e3)},[]),{connectionState:Q}=V7e({agentId:r||"",onChatUpdate:M,onConnect:()=>console.log("🟢 WebSocket connected"),onDisconnect:()=>console.log("🔴 WebSocket disconnected"),onError:oe=>console.error("❌ WebSocket error:",oe),enabled:!!r});E.useEffect(()=>{t?.(Q)},[Q,t]);const q=()=>{a("Add knowledge about "),setTimeout(()=>{const oe=document.querySelector('textarea[placeholder="Type your message"]');oe&&(oe.focus(),oe.setSelectionRange(oe.value.length,oe.value.length))},100)},F=()=>{S("Knowledge Base"),C("Documents"),m({sender:"agent",text:"Now, please upload your files in Documents panel"})};E.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth"})},[p]),E.useEffect(()=>{(async()=>{if(!(!r||!f||I||H)){P(!0);try{const pe=await gt.getSmartChatHistory(r);if(Array.isArray(pe)&&pe.length>0){const he=_();(he===0||he!==pe.length)&&y(pe)}else if(_()===0){const he=e&&e!=="Untitled Agent"?e:"",se=Ii.getState().selectedAgent?.config?.domain||"Domain";U(he,se)}B(!0)}catch(pe){console.error("Failed to fetch chat history:",pe),_()===0&&Y(),B(!0)}finally{P(!1)}}})()},[r,e,f]),E.useEffect(()=>()=>{i&&s(!1)},[i]),E.useEffect(()=>{_()>0&&!H&&r===K&&B(!0)},[_,H,r,K]),E.useEffect(()=>{console.log(`[Debug] Messages changed: ${_()} messages, hasLoadedHistory: ${H}, agent_id: ${r}`)},[p,H,r]),E.useEffect(()=>{H&&_()===0&&r&&f&&(console.warn("[Recovery] Messages were lost, attempting to restore from API..."),(async()=>{try{const pe=await gt.getSmartChatHistory(r);Array.isArray(pe)&&pe.length>0&&(y(pe),console.log(`[Recovery] Successfully restored ${pe.length} messages`))}catch(pe){console.error("[Recovery] Failed to restore messages:",pe)}})())},[H,_,r,f]),E.useEffect(()=>()=>{W.current&&(clearTimeout(W.current),W.current=null)},[U,Y]);const V=async()=>{if(!n.trim()||!r||!f)return;m({sender:"user",text:n});const pe=n;a(""),s(!0);let he=null;try{const ke={sender:"agent",text:"Thinking...",id:`thinking-${Date.now()}-${Math.random()}`};m(ke),he=ke.id;const se=await gt.smartChat(r,pe);if(he&&b(he),m({sender:"agent",text:se.follow_up_message||se.agent_response||se.message||"..."}),se.success&&(se.updates_applied?.length>0||se.updated_domain_tree))try{if(!isNaN(Number(r))){const qe=await gt.getAgent(parseInt(r)),$e=Ii.getState();Ii.setState({...$e,selectedAgent:qe})}}catch(qe){console.warn("Failed to refresh agent data:",qe)}if(se.status==="knowledge_status_update"||se.updated_domain_tree){const qe=tO.getState();r&&qe.fetchKnowledgeData(r,!0)}}catch(ke){console.error("Failed to send message:",ke),he&&b(he),m({sender:"agent",text:"Sorry, something went wrong."})}finally{s(!1)}},Z=oe=>{oe.key==="Enter"&&!oe.shiftKey&&!o&&(oe.preventDefault(),V())},ee=()=>{l(!0)},te=()=>{l(!1)};return g.jsx(g.Fragment,{children:g.jsxs("div",{className:"flex overflow-y-auto flex-col h-full group",children:[g.jsxs("div",{className:"flex overflow-y-auto flex-col flex-1 gap-2 px-2 py-2 custom-scrollbar",children:[I&&g.jsxs("div",{className:"flex gap-2 items-center self-start px-3 py-2 text-left",children:[g.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-gray-600 animate-spin border-t-transparent"}),g.jsx("span",{className:"text-sm text-gray-700",children:"Loading chat history..."})]}),p.map((oe,pe)=>{const he=oe.id&&oe.id.startsWith("thinking-"),ke=oe.sender==="agent"&&(oe.text.includes("Hi! I'm Dana")||oe.text.includes("Hi! I'm here to help you to train")||oe.text.includes("Welcome! How can I assist you"));return g.jsx("div",{className:`rounded-sm px-3 py-2 text-sm ${oe.sender==="user"?"border border-gray-100 bg-gray-50":he?" self-start text-left border border-gray-100":" self-start text-left bg-white"}`,children:he?g.jsxs("div",{className:"flex gap-2 items-center px-3 py-2",children:[g.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-gray-600 animate-spin border-t-transparent"}),g.jsx("span",{className:"text-sm text-gray-700",children:oe.text})]}):g.jsxs(g.Fragment,{children:[g.jsx(n0,{content:oe.text,backgroundContext:oe.sender==="user"?"user":"agent"}),ke&&g.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[g.jsx("button",{onClick:q,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white rounded-md border border-gray-300 shadow-sm transition-colors duration-200 cursor-pointer hover:bg-gray-100",children:"Add knowledge on a topic"}),g.jsx("button",{onClick:F,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white rounded-md border border-gray-300 shadow-sm transition-colors duration-200 cursor-pointer hover:bg-gray-100",children:"Add documents"})]})]})},pe)}),c&&g.jsx("div",{className:"flex gap-2 items-center self-start px-3 py-2 text-left bg-white rounded-sm border border-gray-100",children:g.jsxs("div",{className:"flex gap-1",children:[g.jsx("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),g.jsx("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),g.jsx("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})}),g.jsx(X7e,{messages:A,isExpanded:N,onToggle:()=>L(!N)}),g.jsx("div",{ref:T})]}),g.jsx("div",{className:"p-3",children:g.jsxs("div",{className:"relative",children:[g.jsx("textarea",{className:`w-full min-h-[100px] max-h-[120px] pl-3 pr-12 py-3 text-sm rounded-lg bg-gray-100 border-gray-300
              focus:outline-none focus:ring-1 focus:ring-gray-500 focus:border-transparent resize-none overflow-y-auto`,value:n,onChange:oe=>a(oe.target.value),onKeyDown:Z,onCompositionStart:ee,onCompositionEnd:te,placeholder:"Type your message",disabled:i,rows:1,style:{height:"auto",minHeight:"100px"},onInput:oe=>{const pe=oe.target;pe.style.height="auto",pe.style.height=Math.min(pe.scrollHeight,120)+"px"}}),n.trim()&&g.jsx("button",{onClick:V,className:"absolute right-3 bottom-4 p-2 text-white bg-gray-700 rounded-full transition-colors hover:text-blue-600",title:"Send message",disabled:i,children:g.jsx(qD,{className:"w-4 h-4",strokeWidth:1.5})})]})})]})})},Z7e=()=>{const e=Ii(l=>l.selectedAgent),[t,r]=E.useState("disconnected"),[n,a]=E.useState(()=>{const l=localStorage.getItem("agent-detail-sidebar-width");if(l){const c=parseInt(l,10);return Math.max(f6,Math.min(h6,c))}return use}),[i,s]=E.useState(!1);E.useEffect(()=>{localStorage.setItem("agent-detail-sidebar-width",n.toString())},[n]);const o=E.useCallback(l=>{a(l)},[]);return g.jsxs("div",{className:"relative max-h-[calc(100vh-64px)] border-r border-gray-200 overflow-visible flex flex-col bg-gray-50",style:{width:`${n}px`,minWidth:`${f6}px`,maxWidth:`${h6}px`},children:[g.jsx(K7e,{onResize:o,isResizing:i,setIsResizing:s}),g.jsxs("div",{className:"flex overflow-y-auto flex-col h-full bg-white",children:[g.jsxs("div",{className:"flex gap-3 items-center p-2 h-14 border-b border-gray-200",children:[g.jsx("img",{className:"w-10 h-10 rounded-full",src:NAe,alt:"Dana avatar"}),g.jsxs("div",{className:"flex-1",children:[g.jsx("div",{className:"text-sm font-semibold text-gray-900",children:"Dana"}),g.jsx("div",{className:"text-xs text-gray-500",children:"Agent builder assistant"})]}),g.jsxs("div",{className:"flex gap-1 items-center",children:[g.jsx("div",{className:`w-2 h-2 rounded-full ${t==="connected"?"bg-green-500":t==="connecting"?"bg-yellow-500":"bg-red-500"}`}),g.jsx("span",{className:"text-xs text-gray-500 capitalize",children:t})]})]}),g.jsx("div",{className:"flex overflow-y-auto flex-col flex-1",children:g.jsx(Y7e,{agentName:e?.name,onConnectionStateChange:r})})]})]})};function di(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=di(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}var $4={exports:{}},H4={},G4={exports:{}},V4={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var vG;function Q7e(){if(vG)return V4;vG=1;var e=Do();function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function o(f,p){var m=p(),b=n({inst:{value:m,getSnapshot:p}}),v=b[0].inst,y=b[1];return i(function(){v.value=m,v.getSnapshot=p,l(v)&&y({inst:v})},[f,m,p]),a(function(){return l(v)&&y({inst:v}),f(function(){l(v)&&y({inst:v})})},[f]),s(m),m}function l(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!r(f,m)}catch{return!0}}function c(f,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:o;return V4.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,V4}var bG;function J7e(){return bG||(bG=1,G4.exports=Q7e()),G4.exports}/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var xG;function ePe(){if(xG)return H4;xG=1;var e=Do(),t=J7e();function r(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,o=e.useMemo,l=e.useDebugValue;return H4.useSyncExternalStoreWithSelector=function(c,u,f,p,m){var b=i(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=o(function(){function _(k){if(!S){if(S=!0,C=k,k=p(k),m!==void 0&&v.hasValue){var N=v.value;if(m(N,k))return T=N}return T=k}if(N=T,n(C,k))return N;var L=p(k);return m!==void 0&&m(N,L)?(C=k,N):(C=k,T=L)}var S=!1,C,T,A=f===void 0?null:f;return[function(){return _(u())},A===null?void 0:function(){return _(A())}]},[u,f,p,m]);var y=a(c,b[0],b[1]);return s(function(){v.hasValue=!0,v.value=y},[y]),l(y),y},H4}var yG;function tPe(){return yG||(yG=1,$4.exports=ePe()),$4.exports}var rPe=tPe();const nPe=Fl(rPe),aPe={},_G=e=>{let t;const r=new Set,n=(u,f)=>{const p=typeof u=="function"?u(t):u;if(!Object.is(p,t)){const m=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(b=>b(t,m))}},a=()=>t,l={setState:n,getState:a,getInitialState:()=>c,subscribe:u=>(r.add(u),()=>r.delete(u)),destroy:()=>{(aPe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},c=t=e(n,a,l);return l},iPe=e=>e?_G(e):_G,{useDebugValue:sPe}=ye,{useSyncExternalStoreWithSelector:oPe}=nPe,lPe=e=>e;function dse(e,t=lPe,r){const n=oPe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return sPe(n),n}const wG=(e,t)=>{const r=iPe(e),n=(a,i=t)=>dse(r,a,i);return Object.assign(n,r),n},cPe=(e,t)=>e?wG(e,t):wG;function li(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,a]of e)if(!Object.is(a,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||!Object.is(e[n],t[n]))return!1;return!0}var uPe={value:()=>{}};function jx(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new X1(r)}function X1(e){this._=e}function dPe(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",a=r.indexOf(".");if(a>=0&&(n=r.slice(a+1),r=r.slice(0,a)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}X1.prototype=jx.prototype={constructor:X1,on:function(e,t){var r=this._,n=dPe(e+"",r),a,i=-1,s=n.length;if(arguments.length<2){for(;++i<s;)if((a=(e=n[i]).type)&&(a=fPe(r[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(a=(e=n[i]).type)r[a]=EG(r[a],e.name,t);else if(t==null)for(a in r)r[a]=EG(r[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new X1(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var r=new Array(a),n=0,a,i;n<a;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],a=0,i=n.length;a<i;++a)n[a].value.apply(t,r)}};function fPe(e,t){for(var r=0,n=e.length,a;r<n;++r)if((a=e[r]).name===t)return a.value}function EG(e,t,r){for(var n=0,a=e.length;n<a;++n)if(e[n].name===t){e[n]=uPe,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var p6="http://www.w3.org/1999/xhtml";const SG={svg:"http://www.w3.org/2000/svg",xhtml:p6,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function qx(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),SG.hasOwnProperty(t)?{space:SG[t],local:e}:e}function hPe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===p6&&t.documentElement.namespaceURI===p6?t.createElement(e):t.createElementNS(r,e)}}function pPe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function fse(e){var t=qx(e);return(t.local?pPe:hPe)(t)}function mPe(){}function VO(e){return e==null?mPe:function(){return this.querySelector(e)}}function gPe(e){typeof e!="function"&&(e=VO(e));for(var t=this._groups,r=t.length,n=new Array(r),a=0;a<r;++a)for(var i=t[a],s=i.length,o=n[a]=new Array(s),l,c,u=0;u<s;++u)(l=i[u])&&(c=e.call(l,l.__data__,u,i))&&("__data__"in l&&(c.__data__=l.__data__),o[u]=c);return new Fi(n,this._parents)}function vPe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function bPe(){return[]}function hse(e){return e==null?bPe:function(){return this.querySelectorAll(e)}}function xPe(e){return function(){return vPe(e.apply(this,arguments))}}function yPe(e){typeof e=="function"?e=xPe(e):e=hse(e);for(var t=this._groups,r=t.length,n=[],a=[],i=0;i<r;++i)for(var s=t[i],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(n.push(e.call(l,l.__data__,c,s)),a.push(l));return new Fi(n,a)}function pse(e){return function(){return this.matches(e)}}function mse(e){return function(t){return t.matches(e)}}var _Pe=Array.prototype.find;function wPe(e){return function(){return _Pe.call(this.children,e)}}function EPe(){return this.firstElementChild}function SPe(e){return this.select(e==null?EPe:wPe(typeof e=="function"?e:mse(e)))}var CPe=Array.prototype.filter;function TPe(){return Array.from(this.children)}function APe(e){return function(){return CPe.call(this.children,e)}}function kPe(e){return this.selectAll(e==null?TPe:APe(typeof e=="function"?e:mse(e)))}function NPe(e){typeof e!="function"&&(e=pse(e));for(var t=this._groups,r=t.length,n=new Array(r),a=0;a<r;++a)for(var i=t[a],s=i.length,o=n[a]=[],l,c=0;c<s;++c)(l=i[c])&&e.call(l,l.__data__,c,i)&&o.push(l);return new Fi(n,this._parents)}function gse(e){return new Array(e.length)}function RPe(){return new Fi(this._enter||this._groups.map(gse),this._parents)}function Cb(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Cb.prototype={constructor:Cb,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 MPe(e){return function(){return e}}function DPe(e,t,r,n,a,i){for(var s=0,o,l=t.length,c=i.length;s<c;++s)(o=t[s])?(o.__data__=i[s],n[s]=o):r[s]=new Cb(e,i[s]);for(;s<l;++s)(o=t[s])&&(a[s]=o)}function OPe(e,t,r,n,a,i,s){var o,l,c=new Map,u=t.length,f=i.length,p=new Array(u),m;for(o=0;o<u;++o)(l=t[o])&&(p[o]=m=s.call(l,l.__data__,o,t)+"",c.has(m)?a[o]=l:c.set(m,l));for(o=0;o<f;++o)m=s.call(e,i[o],o,i)+"",(l=c.get(m))?(n[o]=l,l.__data__=i[o],c.delete(m)):r[o]=new Cb(e,i[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(p[o])===l&&(a[o]=l)}function IPe(e){return e.__data__}function LPe(e,t){if(!arguments.length)return Array.from(this,IPe);var r=t?OPe:DPe,n=this._parents,a=this._groups;typeof e!="function"&&(e=MPe(e));for(var i=a.length,s=new Array(i),o=new Array(i),l=new Array(i),c=0;c<i;++c){var u=n[c],f=a[c],p=f.length,m=PPe(e.call(u,u&&u.__data__,c,n)),b=m.length,v=o[c]=new Array(b),y=s[c]=new Array(b),_=l[c]=new Array(p);r(u,f,v,y,_,m,t);for(var S=0,C=0,T,A;S<b;++S)if(T=v[S]){for(S>=C&&(C=S+1);!(A=y[C])&&++C<b;);T._next=A||null}}return s=new Fi(s,n),s._enter=o,s._exit=l,s}function PPe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function FPe(){return new Fi(this._exit||this._groups.map(gse),this._parents)}function BPe(e,t,r){var n=this.enter(),a=this,i=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),r==null?i.remove():r(i),n&&a?n.merge(a).order():a}function zPe(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,a=r.length,i=n.length,s=Math.min(a,i),o=new Array(a),l=0;l<s;++l)for(var c=r[l],u=n[l],f=c.length,p=o[l]=new Array(f),m,b=0;b<f;++b)(m=c[b]||u[b])&&(p[b]=m);for(;l<a;++l)o[l]=r[l];return new Fi(o,this._parents)}function jPe(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],a=n.length-1,i=n[a],s;--a>=0;)(s=n[a])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function qPe(e){e||(e=UPe);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i){for(var s=r[i],o=s.length,l=a[i]=new Array(o),c,u=0;u<o;++u)(c=s[u])&&(l[u]=c);l.sort(t)}return new Fi(a,this._parents).order()}function UPe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $Pe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function HPe(){return Array.from(this)}function GPe(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],a=0,i=n.length;a<i;++a){var s=n[a];if(s)return s}return null}function VPe(){let e=0;for(const t of this)++e;return e}function WPe(){return!this.node()}function KPe(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var a=t[r],i=0,s=a.length,o;i<s;++i)(o=a[i])&&e.call(o,o.__data__,i,a);return this}function XPe(e){return function(){this.removeAttribute(e)}}function YPe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ZPe(e,t){return function(){this.setAttribute(e,t)}}function QPe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function JPe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function e9e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function t9e(e,t){var r=qx(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?YPe:XPe:typeof t=="function"?r.local?e9e:JPe:r.local?QPe:ZPe)(r,t))}function vse(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function r9e(e){return function(){this.style.removeProperty(e)}}function n9e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function a9e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function i9e(e,t,r){return arguments.length>1?this.each((t==null?r9e:typeof t=="function"?a9e:n9e)(e,t,r??"")):a0(this.node(),e)}function a0(e,t){return e.style.getPropertyValue(t)||vse(e).getComputedStyle(e,null).getPropertyValue(t)}function s9e(e){return function(){delete this[e]}}function o9e(e,t){return function(){this[e]=t}}function l9e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function c9e(e,t){return arguments.length>1?this.each((t==null?s9e:typeof t=="function"?l9e:o9e)(e,t)):this.node()[e]}function bse(e){return e.trim().split(/^|\s+/)}function WO(e){return e.classList||new xse(e)}function xse(e){this._node=e,this._names=bse(e.getAttribute("class")||"")}xse.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 yse(e,t){for(var r=WO(e),n=-1,a=t.length;++n<a;)r.add(t[n])}function _se(e,t){for(var r=WO(e),n=-1,a=t.length;++n<a;)r.remove(t[n])}function u9e(e){return function(){yse(this,e)}}function d9e(e){return function(){_se(this,e)}}function f9e(e,t){return function(){(t.apply(this,arguments)?yse:_se)(this,e)}}function h9e(e,t){var r=bse(e+"");if(arguments.length<2){for(var n=WO(this.node()),a=-1,i=r.length;++a<i;)if(!n.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?f9e:t?u9e:d9e)(r,t))}function p9e(){this.textContent=""}function m9e(e){return function(){this.textContent=e}}function g9e(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function v9e(e){return arguments.length?this.each(e==null?p9e:(typeof e=="function"?g9e:m9e)(e)):this.node().textContent}function b9e(){this.innerHTML=""}function x9e(e){return function(){this.innerHTML=e}}function y9e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function _9e(e){return arguments.length?this.each(e==null?b9e:(typeof e=="function"?y9e:x9e)(e)):this.node().innerHTML}function w9e(){this.nextSibling&&this.parentNode.appendChild(this)}function E9e(){return this.each(w9e)}function S9e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function C9e(){return this.each(S9e)}function T9e(e){var t=typeof e=="function"?e:fse(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function A9e(){return null}function k9e(e,t){var r=typeof e=="function"?e:fse(e),n=t==null?A9e:typeof t=="function"?t:VO(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function N9e(){var e=this.parentNode;e&&e.removeChild(this)}function R9e(){return this.each(N9e)}function M9e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function D9e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function O9e(e){return this.select(e?D9e:M9e)}function I9e(e){return arguments.length?this.property("__data__",e):this.node().__data__}function L9e(e){return function(t){e.call(this,t,this.__data__)}}function P9e(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function F9e(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,a=t.length,i;r<a;++r)i=t[r],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++n]=i;++n?t.length=n:delete this.__on}}}function B9e(e,t,r){return function(){var n=this.__on,a,i=L9e(t);if(n){for(var s=0,o=n.length;s<o;++s)if((a=n[s]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=r),a.value=t;return}}this.addEventListener(e.type,i,r),a={type:e.type,name:e.name,value:t,listener:i,options:r},n?n.push(a):this.__on=[a]}}function z9e(e,t,r){var n=P9e(e+""),a,i=n.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,u;l<c;++l)for(a=0,u=o[l];a<i;++a)if((s=n[a]).type===u.type&&s.name===u.name)return u.value}return}for(o=t?B9e:F9e,a=0;a<i;++a)this.each(o(n[a],t,r));return this}function wse(e,t,r){var n=vse(e),a=n.CustomEvent;typeof a=="function"?a=new a(t,r):(a=n.document.createEvent("Event"),r?(a.initEvent(t,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function j9e(e,t){return function(){return wse(this,e,t)}}function q9e(e,t){return function(){return wse(this,e,t.apply(this,arguments))}}function U9e(e,t){return this.each((typeof t=="function"?q9e:j9e)(e,t))}function*$9e(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],a=0,i=n.length,s;a<i;++a)(s=n[a])&&(yield s)}var Ese=[null];function Fi(e,t){this._groups=e,this._parents=t}function Km(){return new Fi([[document.documentElement]],Ese)}function H9e(){return this}Fi.prototype=Km.prototype={constructor:Fi,select:gPe,selectAll:yPe,selectChild:SPe,selectChildren:kPe,filter:NPe,data:LPe,enter:RPe,exit:FPe,join:BPe,merge:zPe,selection:H9e,order:jPe,sort:qPe,call:$Pe,nodes:HPe,node:GPe,size:VPe,empty:WPe,each:KPe,attr:t9e,style:i9e,property:c9e,classed:h9e,text:v9e,html:_9e,raise:E9e,lower:C9e,append:T9e,insert:k9e,remove:R9e,clone:O9e,datum:I9e,on:z9e,dispatch:U9e,[Symbol.iterator]:$9e};function Ds(e){return typeof e=="string"?new Fi([[document.querySelector(e)]],[document.documentElement]):new Fi([[e]],Ese)}function G9e(e){let t;for(;t=e.sourceEvent;)e=t;return e}function go(e,t){if(e=G9e(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}const V9e={passive:!1},tm={capture:!0,passive:!1};function W4(e){e.stopImmediatePropagation()}function Bf(e){e.preventDefault(),e.stopImmediatePropagation()}function Sse(e){var t=e.document.documentElement,r=Ds(e).on("dragstart.drag",Bf,tm);"onselectstart"in t?r.on("selectstart.drag",Bf,tm):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Cse(e,t){var r=e.document.documentElement,n=Ds(e).on("dragstart.drag",null);t&&(n.on("click.drag",Bf,tm),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const n1=e=>()=>e;function m6(e,{sourceEvent:t,subject:r,target:n,identifier:a,active:i,x:s,y:o,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}m6.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function W9e(e){return!e.ctrlKey&&!e.button}function K9e(){return this.parentNode}function X9e(e,t){return t??{x:e.x,y:e.y}}function Y9e(){return navigator.maxTouchPoints||"ontouchstart"in this}function Z9e(){var e=W9e,t=K9e,r=X9e,n=Y9e,a={},i=jx("start","drag","end"),s=0,o,l,c,u,f=0;function p(T){T.on("mousedown.drag",m).filter(n).on("touchstart.drag",y).on("touchmove.drag",_,V9e).on("touchend.drag touchcancel.drag",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(T,A){if(!(u||!e.call(this,T,A))){var k=C(this,t.call(this,T,A),T,A,"mouse");k&&(Ds(T.view).on("mousemove.drag",b,tm).on("mouseup.drag",v,tm),Sse(T.view),W4(T),c=!1,o=T.clientX,l=T.clientY,k("start",T))}}function b(T){if(Bf(T),!c){var A=T.clientX-o,k=T.clientY-l;c=A*A+k*k>f}a.mouse("drag",T)}function v(T){Ds(T.view).on("mousemove.drag mouseup.drag",null),Cse(T.view,c),Bf(T),a.mouse("end",T)}function y(T,A){if(e.call(this,T,A)){var k=T.changedTouches,N=t.call(this,T,A),L=k.length,I,P;for(I=0;I<L;++I)(P=C(this,N,T,A,k[I].identifier,k[I]))&&(W4(T),P("start",T,k[I]))}}function _(T){var A=T.changedTouches,k=A.length,N,L;for(N=0;N<k;++N)(L=a[A[N].identifier])&&(Bf(T),L("drag",T,A[N]))}function S(T){var A=T.changedTouches,k=A.length,N,L;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),N=0;N<k;++N)(L=a[A[N].identifier])&&(W4(T),L("end",T,A[N]))}function C(T,A,k,N,L,I){var P=i.copy(),H=go(I||k,A),B,K,j;if((j=r.call(T,new m6("beforestart",{sourceEvent:k,target:p,identifier:L,active:s,x:H[0],y:H[1],dx:0,dy:0,dispatch:P}),N))!=null)return B=j.x-H[0]||0,K=j.y-H[1]||0,function W(D,U,Y){var z=H,M;switch(D){case"start":a[L]=W,M=s++;break;case"end":delete a[L],--s;case"drag":H=go(Y||U,A),M=s;break}P.call(D,T,new m6(D,{sourceEvent:U,subject:j,target:p,identifier:L,active:M,x:H[0]+B,y:H[1]+K,dx:H[0]-z[0],dy:H[1]-z[1],dispatch:P}),N)}}return p.filter=function(T){return arguments.length?(e=typeof T=="function"?T:n1(!!T),p):e},p.container=function(T){return arguments.length?(t=typeof T=="function"?T:n1(T),p):t},p.subject=function(T){return arguments.length?(r=typeof T=="function"?T:n1(T),p):r},p.touchable=function(T){return arguments.length?(n=typeof T=="function"?T:n1(!!T),p):n},p.on=function(){var T=i.on.apply(i,arguments);return T===i?p:T},p.clickDistance=function(T){return arguments.length?(f=(T=+T)*T,p):Math.sqrt(f)},p}function KO(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Tse(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Xm(){}var rm=.7,Tb=1/rm,zf="\\s*([+-]?\\d+)\\s*",nm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",No="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Q9e=/^#([0-9a-f]{3,8})$/,J9e=new RegExp(`^rgb\\(${zf},${zf},${zf}\\)$`),eFe=new RegExp(`^rgb\\(${No},${No},${No}\\)$`),tFe=new RegExp(`^rgba\\(${zf},${zf},${zf},${nm}\\)$`),rFe=new RegExp(`^rgba\\(${No},${No},${No},${nm}\\)$`),nFe=new RegExp(`^hsl\\(${nm},${No},${No}\\)$`),aFe=new RegExp(`^hsla\\(${nm},${No},${No},${nm}\\)$`),CG={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};KO(Xm,am,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:TG,formatHex:TG,formatHex8:iFe,formatHsl:sFe,formatRgb:AG,toString:AG});function TG(){return this.rgb().formatHex()}function iFe(){return this.rgb().formatHex8()}function sFe(){return Ase(this).formatHsl()}function AG(){return this.rgb().formatRgb()}function am(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Q9e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?kG(t):r===3?new ri(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?a1(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?a1(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=J9e.exec(e))?new ri(t[1],t[2],t[3],1):(t=eFe.exec(e))?new ri(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tFe.exec(e))?a1(t[1],t[2],t[3],t[4]):(t=rFe.exec(e))?a1(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nFe.exec(e))?MG(t[1],t[2]/100,t[3]/100,1):(t=aFe.exec(e))?MG(t[1],t[2]/100,t[3]/100,t[4]):CG.hasOwnProperty(e)?kG(CG[e]):e==="transparent"?new ri(NaN,NaN,NaN,0):null}function kG(e){return new ri(e>>16&255,e>>8&255,e&255,1)}function a1(e,t,r,n){return n<=0&&(e=t=r=NaN),new ri(e,t,r,n)}function oFe(e){return e instanceof Xm||(e=am(e)),e?(e=e.rgb(),new ri(e.r,e.g,e.b,e.opacity)):new ri}function g6(e,t,r,n){return arguments.length===1?oFe(e):new ri(e,t,r,n??1)}function ri(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}KO(ri,g6,Tse(Xm,{brighter(e){return e=e==null?Tb:Math.pow(Tb,e),new ri(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?rm:Math.pow(rm,e),new ri(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ri($u(this.r),$u(this.g),$u(this.b),Ab(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:NG,formatHex:NG,formatHex8:lFe,formatRgb:RG,toString:RG}));function NG(){return`#${Lu(this.r)}${Lu(this.g)}${Lu(this.b)}`}function lFe(){return`#${Lu(this.r)}${Lu(this.g)}${Lu(this.b)}${Lu((isNaN(this.opacity)?1:this.opacity)*255)}`}function RG(){const e=Ab(this.opacity);return`${e===1?"rgb(":"rgba("}${$u(this.r)}, ${$u(this.g)}, ${$u(this.b)}${e===1?")":`, ${e})`}`}function Ab(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $u(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lu(e){return e=$u(e),(e<16?"0":"")+e.toString(16)}function MG(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Os(e,t,r,n)}function Ase(e){if(e instanceof Os)return new Os(e.h,e.s,e.l,e.opacity);if(e instanceof Xm||(e=am(e)),!e)return new Os;if(e instanceof Os)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),s=NaN,o=i-a,l=(i+a)/2;return o?(t===i?s=(r-n)/o+(r<n)*6:r===i?s=(n-t)/o+2:s=(t-r)/o+4,o/=l<.5?i+a:2-i-a,s*=60):o=l>0&&l<1?0:s,new Os(s,o,l,e.opacity)}function cFe(e,t,r,n){return arguments.length===1?Ase(e):new Os(e,t,r,n??1)}function Os(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}KO(Os,cFe,Tse(Xm,{brighter(e){return e=e==null?Tb:Math.pow(Tb,e),new Os(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?rm:Math.pow(rm,e),new Os(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,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new ri(K4(e>=240?e-240:e+120,a,n),K4(e,a,n),K4(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Os(DG(this.h),i1(this.s),i1(this.l),Ab(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=Ab(this.opacity);return`${e===1?"hsl(":"hsla("}${DG(this.h)}, ${i1(this.s)*100}%, ${i1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function DG(e){return e=(e||0)%360,e<0?e+360:e}function i1(e){return Math.max(0,Math.min(1,e||0))}function K4(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const kse=e=>()=>e;function uFe(e,t){return function(r){return e+r*t}}function dFe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function fFe(e){return(e=+e)==1?Nse:function(t,r){return r-t?dFe(t,r,e):kse(isNaN(t)?r:t)}}function Nse(e,t){var r=t-e;return r?uFe(e,r):kse(isNaN(e)?t:e)}const OG=(function e(t){var r=fFe(t);function n(a,i){var s=r((a=g6(a)).r,(i=g6(i)).r),o=r(a.g,i.g),l=r(a.b,i.b),c=Nse(a.opacity,i.opacity);return function(u){return a.r=s(u),a.g=o(u),a.b=l(u),a.opacity=c(u),a+""}}return n.gamma=e,n})(1);function Ec(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var v6=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,X4=new RegExp(v6.source,"g");function hFe(e){return function(){return e}}function pFe(e){return function(t){return e(t)+""}}function mFe(e,t){var r=v6.lastIndex=X4.lastIndex=0,n,a,i,s=-1,o=[],l=[];for(e=e+"",t=t+"";(n=v6.exec(e))&&(a=X4.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),o[s]?o[s]+=i:o[++s]=i),(n=n[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,l.push({i:s,x:Ec(n,a)})),r=X4.lastIndex;return r<t.length&&(i=t.slice(r),o[s]?o[s]+=i:o[++s]=i),o.length<2?l[0]?pFe(l[0].x):hFe(t):(t=l.length,function(c){for(var u=0,f;u<t;++u)o[(f=l[u]).i]=f.x(c);return o.join("")})}var IG=180/Math.PI,b6={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rse(e,t,r,n,a,i){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),e*n<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*IG,skewX:Math.atan(l)*IG,scaleX:s,scaleY:o}}var s1;function gFe(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?b6:Rse(t.a,t.b,t.c,t.d,t.e,t.f)}function vFe(e){return e==null||(s1||(s1=document.createElementNS("http://www.w3.org/2000/svg","g")),s1.setAttribute("transform",e),!(e=s1.transform.baseVal.consolidate()))?b6:(e=e.matrix,Rse(e.a,e.b,e.c,e.d,e.e,e.f))}function Mse(e,t,r,n){function a(c){return c.length?c.pop()+" ":""}function i(c,u,f,p,m,b){if(c!==f||u!==p){var v=m.push("translate(",null,t,null,r);b.push({i:v-4,x:Ec(c,f)},{i:v-2,x:Ec(u,p)})}else(f||p)&&m.push("translate("+f+t+p+r)}function s(c,u,f,p){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),p.push({i:f.push(a(f)+"rotate(",null,n)-2,x:Ec(c,u)})):u&&f.push(a(f)+"rotate("+u+n)}function o(c,u,f,p){c!==u?p.push({i:f.push(a(f)+"skewX(",null,n)-2,x:Ec(c,u)}):u&&f.push(a(f)+"skewX("+u+n)}function l(c,u,f,p,m,b){if(c!==f||u!==p){var v=m.push(a(m)+"scale(",null,",",null,")");b.push({i:v-4,x:Ec(c,f)},{i:v-2,x:Ec(u,p)})}else(f!==1||p!==1)&&m.push(a(m)+"scale("+f+","+p+")")}return function(c,u){var f=[],p=[];return c=e(c),u=e(u),i(c.translateX,c.translateY,u.translateX,u.translateY,f,p),s(c.rotate,u.rotate,f,p),o(c.skewX,u.skewX,f,p),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,f,p),c=u=null,function(m){for(var b=-1,v=p.length,y;++b<v;)f[(y=p[b]).i]=y.x(m);return f.join("")}}}var bFe=Mse(gFe,"px, ","px)","deg)"),xFe=Mse(vFe,", ",")",")"),yFe=1e-12;function LG(e){return((e=Math.exp(e))+1/e)/2}function _Fe(e){return((e=Math.exp(e))-1/e)/2}function wFe(e){return((e=Math.exp(2*e))-1)/(e+1)}const EFe=(function e(t,r,n){function a(i,s){var o=i[0],l=i[1],c=i[2],u=s[0],f=s[1],p=s[2],m=u-o,b=f-l,v=m*m+b*b,y,_;if(v<yFe)_=Math.log(p/c)/t,y=function(N){return[o+N*m,l+N*b,c*Math.exp(t*N*_)]};else{var S=Math.sqrt(v),C=(p*p-c*c+n*v)/(2*c*r*S),T=(p*p-c*c-n*v)/(2*p*r*S),A=Math.log(Math.sqrt(C*C+1)-C),k=Math.log(Math.sqrt(T*T+1)-T);_=(k-A)/t,y=function(N){var L=N*_,I=LG(A),P=c/(r*S)*(I*wFe(t*L+A)-_Fe(A));return[o+P*m,l+P*b,c*I/LG(t*L+A)]}}return y.duration=_*1e3*t/Math.SQRT2,y}return a.rho=function(i){var s=Math.max(.001,+i),o=s*s,l=o*o;return e(s,o,l)},a})(Math.SQRT2,2,4);var i0=0,ap=0,$h=0,Dse=1e3,kb,ip,Nb=0,Zu=0,Ux=0,im=typeof performance=="object"&&performance.now?performance:Date,Ose=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function XO(){return Zu||(Ose(SFe),Zu=im.now()+Ux)}function SFe(){Zu=0}function Rb(){this._call=this._time=this._next=null}Rb.prototype=Ise.prototype={constructor:Rb,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?XO():+r)+(t==null?0:+t),!this._next&&ip!==this&&(ip?ip._next=this:kb=this,ip=this),this._call=e,this._time=r,x6()},stop:function(){this._call&&(this._call=null,this._time=1/0,x6())}};function Ise(e,t,r){var n=new Rb;return n.restart(e,t,r),n}function CFe(){XO(),++i0;for(var e=kb,t;e;)(t=Zu-e._time)>=0&&e._call.call(void 0,t),e=e._next;--i0}function PG(){Zu=(Nb=im.now())+Ux,i0=ap=0;try{CFe()}finally{i0=0,AFe(),Zu=0}}function TFe(){var e=im.now(),t=e-Nb;t>Dse&&(Ux-=t,Nb=e)}function AFe(){for(var e,t=kb,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:kb=r);ip=e,x6(n)}function x6(e){if(!i0){ap&&(ap=clearTimeout(ap));var t=e-Zu;t>24?(e<1/0&&(ap=setTimeout(PG,e-im.now()-Ux)),$h&&($h=clearInterval($h))):($h||(Nb=im.now(),$h=setInterval(TFe,Dse)),i0=1,Ose(PG))}}function FG(e,t,r){var n=new Rb;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,r),n}var kFe=jx("start","end","cancel","interrupt"),NFe=[],Lse=0,BG=1,y6=2,Y1=3,zG=4,_6=5,Z1=6;function $x(e,t,r,n,a,i){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;RFe(e,r,{name:t,index:n,group:a,on:kFe,tween:NFe,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Lse})}function YO(e,t){var r=Qs(e,t);if(r.state>Lse)throw new Error("too late; already scheduled");return r}function zo(e,t){var r=Qs(e,t);if(r.state>Y1)throw new Error("too late; already running");return r}function Qs(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function RFe(e,t,r){var n=e.__transition,a;n[t]=r,r.timer=Ise(i,0,r.time);function i(c){r.state=BG,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var u,f,p,m;if(r.state!==BG)return l();for(u in n)if(m=n[u],m.name===r.name){if(m.state===Y1)return FG(s);m.state===zG?(m.state=Z1,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete n[u]):+u<t&&(m.state=Z1,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete n[u])}if(FG(function(){r.state===Y1&&(r.state=zG,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=y6,r.on.call("start",e,e.__data__,r.index,r.group),r.state===y6){for(r.state=Y1,a=new Array(p=r.tween.length),u=0,f=-1;u<p;++u)(m=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(a[++f]=m);a.length=f+1}}function o(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=_6,1),f=-1,p=a.length;++f<p;)a[f].call(e,u);r.state===_6&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Z1,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}function Q1(e,t){var r=e.__transition,n,a,i=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((n=r[s]).name!==t){i=!1;continue}a=n.state>y6&&n.state<_6,n.state=Z1,n.timer.stop(),n.on.call(a?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[s]}i&&delete e.__transition}}function MFe(e){return this.each(function(){Q1(this,e)})}function DFe(e,t){var r,n;return function(){var a=zo(this,e),i=a.tween;if(i!==r){n=r=i;for(var s=0,o=n.length;s<o;++s)if(n[s].name===t){n=n.slice(),n.splice(s,1);break}}a.tween=n}}function OFe(e,t,r){var n,a;if(typeof r!="function")throw new Error;return function(){var i=zo(this,e),s=i.tween;if(s!==n){a=(n=s).slice();for(var o={name:t,value:r},l=0,c=a.length;l<c;++l)if(a[l].name===t){a[l]=o;break}l===c&&a.push(o)}i.tween=a}}function IFe(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Qs(this.node(),r).tween,a=0,i=n.length,s;a<i;++a)if((s=n[a]).name===e)return s.value;return null}return this.each((t==null?DFe:OFe)(r,e,t))}function ZO(e,t,r){var n=e._id;return e.each(function(){var a=zo(this,n);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return Qs(a,n).value[t]}}function Pse(e,t){var r;return(typeof t=="number"?Ec:t instanceof am?OG:(r=am(t))?(t=r,OG):mFe)(e,t)}function LFe(e){return function(){this.removeAttribute(e)}}function PFe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function FFe(e,t,r){var n,a=r+"",i;return function(){var s=this.getAttribute(e);return s===a?null:s===n?i:i=t(n=s,r)}}function BFe(e,t,r){var n,a=r+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===a?null:s===n?i:i=t(n=s,r)}}function zFe(e,t,r){var n,a,i;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===n&&l===a?i:(a=l,i=t(n=s,o)))}}function jFe(e,t,r){var n,a,i;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===n&&l===a?i:(a=l,i=t(n=s,o)))}}function qFe(e,t){var r=qx(e),n=r==="transform"?xFe:Pse;return this.attrTween(e,typeof t=="function"?(r.local?jFe:zFe)(r,n,ZO(this,"attr."+e,t)):t==null?(r.local?PFe:LFe)(r):(r.local?BFe:FFe)(r,n,t))}function UFe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function $Fe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function HFe(e,t){var r,n;function a(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&$Fe(e,i)),r}return a._value=t,a}function GFe(e,t){var r,n;function a(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&UFe(e,i)),r}return a._value=t,a}function VFe(e,t){var r="attr."+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;var n=qx(e);return this.tween(r,(n.local?HFe:GFe)(n,t))}function WFe(e,t){return function(){YO(this,e).delay=+t.apply(this,arguments)}}function KFe(e,t){return t=+t,function(){YO(this,e).delay=t}}function XFe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?WFe:KFe)(t,e)):Qs(this.node(),t).delay}function YFe(e,t){return function(){zo(this,e).duration=+t.apply(this,arguments)}}function ZFe(e,t){return t=+t,function(){zo(this,e).duration=t}}function QFe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?YFe:ZFe)(t,e)):Qs(this.node(),t).duration}function JFe(e,t){if(typeof t!="function")throw new Error;return function(){zo(this,e).ease=t}}function eBe(e){var t=this._id;return arguments.length?this.each(JFe(t,e)):Qs(this.node(),t).ease}function tBe(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;zo(this,e).ease=r}}function rBe(e){if(typeof e!="function")throw new Error;return this.each(tBe(this._id,e))}function nBe(e){typeof e!="function"&&(e=pse(e));for(var t=this._groups,r=t.length,n=new Array(r),a=0;a<r;++a)for(var i=t[a],s=i.length,o=n[a]=[],l,c=0;c<s;++c)(l=i[c])&&e.call(l,l.__data__,c,i)&&o.push(l);return new Dl(n,this._parents,this._name,this._id)}function aBe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,a=r.length,i=Math.min(n,a),s=new Array(n),o=0;o<i;++o)for(var l=t[o],c=r[o],u=l.length,f=s[o]=new Array(u),p,m=0;m<u;++m)(p=l[m]||c[m])&&(f[m]=p);for(;o<n;++o)s[o]=t[o];return new Dl(s,this._parents,this._name,this._id)}function iBe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function sBe(e,t,r){var n,a,i=iBe(t)?YO:zo;return function(){var s=i(this,e),o=s.on;o!==n&&(a=(n=o).copy()).on(t,r),s.on=a}}function oBe(e,t){var r=this._id;return arguments.length<2?Qs(this.node(),r).on.on(e):this.each(sBe(r,e,t))}function lBe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function cBe(){return this.on("end.remove",lBe(this._id))}function uBe(e){var t=this._name,r=this._id;typeof e!="function"&&(e=VO(e));for(var n=this._groups,a=n.length,i=new Array(a),s=0;s<a;++s)for(var o=n[s],l=o.length,c=i[s]=new Array(l),u,f,p=0;p<l;++p)(u=o[p])&&(f=e.call(u,u.__data__,p,o))&&("__data__"in u&&(f.__data__=u.__data__),c[p]=f,$x(c[p],t,r,p,c,Qs(u,r)));return new Dl(i,this._parents,t,r)}function dBe(e){var t=this._name,r=this._id;typeof e!="function"&&(e=hse(e));for(var n=this._groups,a=n.length,i=[],s=[],o=0;o<a;++o)for(var l=n[o],c=l.length,u,f=0;f<c;++f)if(u=l[f]){for(var p=e.call(u,u.__data__,f,l),m,b=Qs(u,r),v=0,y=p.length;v<y;++v)(m=p[v])&&$x(m,t,r,v,p,b);i.push(p),s.push(u)}return new Dl(i,s,t,r)}var fBe=Km.prototype.constructor;function hBe(){return new fBe(this._groups,this._parents)}function pBe(e,t){var r,n,a;return function(){var i=a0(this,e),s=(this.style.removeProperty(e),a0(this,e));return i===s?null:i===r&&s===n?a:a=t(r=i,n=s)}}function Fse(e){return function(){this.style.removeProperty(e)}}function mBe(e,t,r){var n,a=r+"",i;return function(){var s=a0(this,e);return s===a?null:s===n?i:i=t(n=s,r)}}function gBe(e,t,r){var n,a,i;return function(){var s=a0(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),a0(this,e))),s===l?null:s===n&&l===a?i:(a=l,i=t(n=s,o))}}function vBe(e,t){var r,n,a,i="style."+t,s="end."+i,o;return function(){var l=zo(this,e),c=l.on,u=l.value[i]==null?o||(o=Fse(t)):void 0;(c!==r||a!==u)&&(n=(r=c).copy()).on(s,a=u),l.on=n}}function bBe(e,t,r){var n=(e+="")=="transform"?bFe:Pse;return t==null?this.styleTween(e,pBe(e,n)).on("end.style."+e,Fse(e)):typeof t=="function"?this.styleTween(e,gBe(e,n,ZO(this,"style."+e,t))).each(vBe(this._id,e)):this.styleTween(e,mBe(e,n,t),r).on("end.style."+e,null)}function xBe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function yBe(e,t,r){var n,a;function i(){var s=t.apply(this,arguments);return s!==a&&(n=(a=s)&&xBe(e,s,r)),n}return i._value=t,i}function _Be(e,t,r){var n="style."+(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;return this.tween(n,yBe(e,t,r??""))}function wBe(e){return function(){this.textContent=e}}function EBe(e){return function(){var t=e(this);this.textContent=t??""}}function SBe(e){return this.tween("text",typeof e=="function"?EBe(ZO(this,"text",e)):wBe(e==null?"":e+""))}function CBe(e){return function(t){this.textContent=e.call(this,t)}}function TBe(e){var t,r;function n(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&CBe(a)),t}return n._value=e,n}function ABe(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,TBe(e))}function kBe(){for(var e=this._name,t=this._id,r=Bse(),n=this._groups,a=n.length,i=0;i<a;++i)for(var s=n[i],o=s.length,l,c=0;c<o;++c)if(l=s[c]){var u=Qs(l,t);$x(l,e,r,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Dl(n,this._parents,e,r)}function NBe(){var e,t,r=this,n=r._id,a=r.size();return new Promise(function(i,s){var o={value:s},l={value:function(){--a===0&&i()}};r.each(function(){var c=zo(this,n),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),a===0&&i()})}var RBe=0;function Dl(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Bse(){return++RBe}var sl=Km.prototype;Dl.prototype={constructor:Dl,select:uBe,selectAll:dBe,selectChild:sl.selectChild,selectChildren:sl.selectChildren,filter:nBe,merge:aBe,selection:hBe,transition:kBe,call:sl.call,nodes:sl.nodes,node:sl.node,size:sl.size,empty:sl.empty,each:sl.each,on:oBe,attr:qFe,attrTween:VFe,style:bBe,styleTween:_Be,text:SBe,textTween:ABe,remove:cBe,tween:IFe,delay:XFe,duration:QFe,ease:eBe,easeVarying:rBe,end:NBe,[Symbol.iterator]:sl[Symbol.iterator]};function MBe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var DBe={time:null,delay:0,duration:250,ease:MBe};function OBe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function IBe(e){var t,r;e instanceof Dl?(t=e._id,e=e._name):(t=Bse(),(r=DBe).time=XO(),e=e==null?null:e+"");for(var n=this._groups,a=n.length,i=0;i<a;++i)for(var s=n[i],o=s.length,l,c=0;c<o;++c)(l=s[c])&&$x(l,e,t,c,s,r||OBe(l,t));return new Dl(n,this._parents,e,t)}Km.prototype.interrupt=MFe;Km.prototype.transition=IBe;const o1=e=>()=>e;function LBe(e,{sourceEvent:t,target:r,transform:n,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}function gl(e,t,r){this.k=e,this.x=t,this.y=r}gl.prototype={constructor:gl,scale:function(e){return e===1?this:new gl(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new gl(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+")"}};var Lc=new gl(1,0,0);gl.prototype;function Y4(e){e.stopImmediatePropagation()}function Hh(e){e.preventDefault(),e.stopImmediatePropagation()}function PBe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function FBe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function jG(){return this.__zoom||Lc}function BBe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function zBe(){return navigator.maxTouchPoints||"ontouchstart"in this}function jBe(e,t,r){var n=e.invertX(t[0][0])-r[0][0],a=e.invertX(t[1][0])-r[1][0],i=e.invertY(t[0][1])-r[0][1],s=e.invertY(t[1][1])-r[1][1];return e.translate(a>n?(n+a)/2:Math.min(0,n)||Math.max(0,a),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function qBe(){var e=PBe,t=FBe,r=jBe,n=BBe,a=zBe,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],o=250,l=EFe,c=jx("start","zoom","end"),u,f,p,m=500,b=150,v=0,y=10;function _(j){j.property("__zoom",jG).on("wheel.zoom",L,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",P).filter(a).on("touchstart.zoom",H).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",K).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(j,W,D,U){var Y=j.selection?j.selection():j;Y.property("__zoom",jG),j!==Y?A(j,W,D,U):Y.interrupt().each(function(){k(this,arguments).event(U).start().zoom(null,typeof W=="function"?W.apply(this,arguments):W).end()})},_.scaleBy=function(j,W,D,U){_.scaleTo(j,function(){var Y=this.__zoom.k,z=typeof W=="function"?W.apply(this,arguments):W;return Y*z},D,U)},_.scaleTo=function(j,W,D,U){_.transform(j,function(){var Y=t.apply(this,arguments),z=this.__zoom,M=D==null?T(Y):typeof D=="function"?D.apply(this,arguments):D,Q=z.invert(M),q=typeof W=="function"?W.apply(this,arguments):W;return r(C(S(z,q),M,Q),Y,s)},D,U)},_.translateBy=function(j,W,D,U){_.transform(j,function(){return r(this.__zoom.translate(typeof W=="function"?W.apply(this,arguments):W,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),s)},null,U)},_.translateTo=function(j,W,D,U,Y){_.transform(j,function(){var z=t.apply(this,arguments),M=this.__zoom,Q=U==null?T(z):typeof U=="function"?U.apply(this,arguments):U;return r(Lc.translate(Q[0],Q[1]).scale(M.k).translate(typeof W=="function"?-W.apply(this,arguments):-W,typeof D=="function"?-D.apply(this,arguments):-D),z,s)},U,Y)};function S(j,W){return W=Math.max(i[0],Math.min(i[1],W)),W===j.k?j:new gl(W,j.x,j.y)}function C(j,W,D){var U=W[0]-D[0]*j.k,Y=W[1]-D[1]*j.k;return U===j.x&&Y===j.y?j:new gl(j.k,U,Y)}function T(j){return[(+j[0][0]+ +j[1][0])/2,(+j[0][1]+ +j[1][1])/2]}function A(j,W,D,U){j.on("start.zoom",function(){k(this,arguments).event(U).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(U).end()}).tween("zoom",function(){var Y=this,z=arguments,M=k(Y,z).event(U),Q=t.apply(Y,z),q=D==null?T(Q):typeof D=="function"?D.apply(Y,z):D,F=Math.max(Q[1][0]-Q[0][0],Q[1][1]-Q[0][1]),V=Y.__zoom,Z=typeof W=="function"?W.apply(Y,z):W,ee=l(V.invert(q).concat(F/V.k),Z.invert(q).concat(F/Z.k));return function(te){if(te===1)te=Z;else{var oe=ee(te),pe=F/oe[2];te=new gl(pe,q[0]-oe[0]*pe,q[1]-oe[1]*pe)}M.zoom(null,te)}})}function k(j,W,D){return!D&&j.__zooming||new N(j,W)}function N(j,W){this.that=j,this.args=W,this.active=0,this.sourceEvent=null,this.extent=t.apply(j,W),this.taps=0}N.prototype={event:function(j){return j&&(this.sourceEvent=j),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(j,W){return this.mouse&&j!=="mouse"&&(this.mouse[1]=W.invert(this.mouse[0])),this.touch0&&j!=="touch"&&(this.touch0[1]=W.invert(this.touch0[0])),this.touch1&&j!=="touch"&&(this.touch1[1]=W.invert(this.touch1[0])),this.that.__zoom=W,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(j){var W=Ds(this.that).datum();c.call(j,this.that,new LBe(j,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:c}),W)}};function L(j,...W){if(!e.apply(this,arguments))return;var D=k(this,W).event(j),U=this.__zoom,Y=Math.max(i[0],Math.min(i[1],U.k*Math.pow(2,n.apply(this,arguments)))),z=go(j);if(D.wheel)(D.mouse[0][0]!==z[0]||D.mouse[0][1]!==z[1])&&(D.mouse[1]=U.invert(D.mouse[0]=z)),clearTimeout(D.wheel);else{if(U.k===Y)return;D.mouse=[z,U.invert(z)],Q1(this),D.start()}Hh(j),D.wheel=setTimeout(M,b),D.zoom("mouse",r(C(S(U,Y),D.mouse[0],D.mouse[1]),D.extent,s));function M(){D.wheel=null,D.end()}}function I(j,...W){if(p||!e.apply(this,arguments))return;var D=j.currentTarget,U=k(this,W,!0).event(j),Y=Ds(j.view).on("mousemove.zoom",q,!0).on("mouseup.zoom",F,!0),z=go(j,D),M=j.clientX,Q=j.clientY;Sse(j.view),Y4(j),U.mouse=[z,this.__zoom.invert(z)],Q1(this),U.start();function q(V){if(Hh(V),!U.moved){var Z=V.clientX-M,ee=V.clientY-Q;U.moved=Z*Z+ee*ee>v}U.event(V).zoom("mouse",r(C(U.that.__zoom,U.mouse[0]=go(V,D),U.mouse[1]),U.extent,s))}function F(V){Y.on("mousemove.zoom mouseup.zoom",null),Cse(V.view,U.moved),Hh(V),U.event(V).end()}}function P(j,...W){if(e.apply(this,arguments)){var D=this.__zoom,U=go(j.changedTouches?j.changedTouches[0]:j,this),Y=D.invert(U),z=D.k*(j.shiftKey?.5:2),M=r(C(S(D,z),U,Y),t.apply(this,W),s);Hh(j),o>0?Ds(this).transition().duration(o).call(A,M,U,j):Ds(this).call(_.transform,M,U,j)}}function H(j,...W){if(e.apply(this,arguments)){var D=j.touches,U=D.length,Y=k(this,W,j.changedTouches.length===U).event(j),z,M,Q,q;for(Y4(j),M=0;M<U;++M)Q=D[M],q=go(Q,this),q=[q,this.__zoom.invert(q),Q.identifier],Y.touch0?!Y.touch1&&Y.touch0[2]!==q[2]&&(Y.touch1=q,Y.taps=0):(Y.touch0=q,z=!0,Y.taps=1+!!u);u&&(u=clearTimeout(u)),z&&(Y.taps<2&&(f=q[0],u=setTimeout(function(){u=null},m)),Q1(this),Y.start())}}function B(j,...W){if(this.__zooming){var D=k(this,W).event(j),U=j.changedTouches,Y=U.length,z,M,Q,q;for(Hh(j),z=0;z<Y;++z)M=U[z],Q=go(M,this),D.touch0&&D.touch0[2]===M.identifier?D.touch0[0]=Q:D.touch1&&D.touch1[2]===M.identifier&&(D.touch1[0]=Q);if(M=D.that.__zoom,D.touch1){var F=D.touch0[0],V=D.touch0[1],Z=D.touch1[0],ee=D.touch1[1],te=(te=Z[0]-F[0])*te+(te=Z[1]-F[1])*te,oe=(oe=ee[0]-V[0])*oe+(oe=ee[1]-V[1])*oe;M=S(M,Math.sqrt(te/oe)),Q=[(F[0]+Z[0])/2,(F[1]+Z[1])/2],q=[(V[0]+ee[0])/2,(V[1]+ee[1])/2]}else if(D.touch0)Q=D.touch0[0],q=D.touch0[1];else return;D.zoom("touch",r(C(M,Q,q),D.extent,s))}}function K(j,...W){if(this.__zooming){var D=k(this,W).event(j),U=j.changedTouches,Y=U.length,z,M;for(Y4(j),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),z=0;z<Y;++z)M=U[z],D.touch0&&D.touch0[2]===M.identifier?delete D.touch0:D.touch1&&D.touch1[2]===M.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(M=go(M,this),Math.hypot(f[0]-M[0],f[1]-M[1])<y)){var Q=Ds(this).on("dblclick.zoom");Q&&Q.apply(this,arguments)}}}return _.wheelDelta=function(j){return arguments.length?(n=typeof j=="function"?j:o1(+j),_):n},_.filter=function(j){return arguments.length?(e=typeof j=="function"?j:o1(!!j),_):e},_.touchable=function(j){return arguments.length?(a=typeof j=="function"?j:o1(!!j),_):a},_.extent=function(j){return arguments.length?(t=typeof j=="function"?j:o1([[+j[0][0],+j[0][1]],[+j[1][0],+j[1][1]]]),_):t},_.scaleExtent=function(j){return arguments.length?(i[0]=+j[0],i[1]=+j[1],_):[i[0],i[1]]},_.translateExtent=function(j){return arguments.length?(s[0][0]=+j[0][0],s[1][0]=+j[1][0],s[0][1]=+j[0][1],s[1][1]=+j[1][1],_):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},_.constrain=function(j){return arguments.length?(r=j,_):r},_.duration=function(j){return arguments.length?(o=+j,_):o},_.interpolate=function(j){return arguments.length?(l=j,_):l},_.on=function(){var j=c.on.apply(c,arguments);return j===c?_:j},_.clickDistance=function(j){return arguments.length?(v=(j=+j)*j,_):Math.sqrt(v)},_.tapDistance=function(j){return arguments.length?(y=+j,_):y},_}const Hx=E.createContext(null),UBe=Hx.Provider,Ol={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},zse=Ol.error001();function mn(e,t){const r=E.useContext(Hx);if(r===null)throw new Error(zse);return dse(r,e,t)}const ra=()=>{const e=E.useContext(Hx);if(e===null)throw new Error(zse);return E.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},$Be=e=>e.userSelectionActive?"none":"all";function jse({position:e,children:t,className:r,style:n,...a}){const i=mn($Be),s=`${e}`.split("-");return ye.createElement("div",{className:di(["react-flow__panel",r,...s]),style:{...n,pointerEvents:i},...a},t)}function HBe({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:ye.createElement(jse,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},ye.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const GBe=({x:e,y:t,label:r,labelStyle:n={},labelShowBg:a=!0,labelBgStyle:i={},labelBgPadding:s=[2,4],labelBgBorderRadius:o=2,children:l,className:c,...u})=>{const f=E.useRef(null),[p,m]=E.useState({x:0,y:0,width:0,height:0}),b=di(["react-flow__edge-textwrapper",c]);return E.useEffect(()=>{if(f.current){const v=f.current.getBBox();m({x:v.x,y:v.y,width:v.width,height:v.height})}},[r]),typeof r>"u"||!r?null:ye.createElement("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:b,visibility:p.width?"visible":"hidden",...u},a&&ye.createElement("rect",{width:p.width+2*s[0],x:-s[0],y:-s[1],height:p.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:o,ry:o}),ye.createElement("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:f,style:n},r),l)};var VBe=E.memo(GBe);const QO=e=>({width:e.offsetWidth,height:e.offsetHeight}),s0=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),JO=(e={x:0,y:0},t)=>({x:s0(e.x,t[0][0],t[1][0]),y:s0(e.y,t[0][1],t[1][1])}),qG=(e,t,r)=>e<t?s0(Math.abs(e-t),1,50)/50:e>r?-s0(Math.abs(e-r),1,50)/50:0,qse=(e,t)=>{const r=qG(e.x,35,t.width-35)*20,n=qG(e.y,35,t.height-35)*20;return[r,n]},Use=e=>e.getRootNode?.()||window?.document,WBe=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),eI=({x:e,y:t,width:r,height:n})=>({x:e,y:t,x2:e+r,y2:t+n}),KBe=({x:e,y:t,x2:r,y2:n})=>({x:e,y:t,width:r-e,height:n-t}),UG=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),w6=(e,t)=>{const r=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),n=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(r*n)},XBe=e=>os(e.width)&&os(e.height)&&os(e.x)&&os(e.y),os=e=>!isNaN(e)&&isFinite(e),hn=Symbol.for("internals"),$se=["Enter"," ","Escape"],YBe=(e,t)=>{},ZBe=e=>"nativeEvent"in e;function E6(e){const r=(ZBe(e)?e.nativeEvent:e).composedPath?.()?.[0]||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r?.nodeName)||r?.hasAttribute("contenteditable")||!!r?.closest(".nokey")}const Hse=e=>"clientX"in e,Pc=(e,t)=>{const r=Hse(e),n=r?e.clientX:e.touches?.[0].clientX,a=r?e.clientY:e.touches?.[0].clientY;return{x:n-(t?.left??0),y:a-(t?.top??0)}},Mb=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0,Ym=({id:e,path:t,labelX:r,labelY:n,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,style:u,markerEnd:f,markerStart:p,interactionWidth:m=20})=>ye.createElement(ye.Fragment,null,ye.createElement("path",{id:e,style:u,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:p}),m&&ye.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:m,className:"react-flow__edge-interaction"}),a&&os(r)&&os(n)?ye.createElement(VBe,{x:r,y:n,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c}):null);Ym.displayName="BaseEdge";function Gh(e,t,r){return r===void 0?r:n=>{const a=t().edges.find(i=>i.id===e);a&&r(n,{...a})}}function Gse({sourceX:e,sourceY:t,targetX:r,targetY:n}){const a=Math.abs(r-e)/2,i=r<e?r+a:r-a,s=Math.abs(n-t)/2,o=n<t?n+s:n-s;return[i,o,a,s]}function Vse({sourceX:e,sourceY:t,targetX:r,targetY:n,sourceControlX:a,sourceControlY:i,targetControlX:s,targetControlY:o}){const l=e*.125+a*.375+s*.375+r*.125,c=t*.125+i*.375+o*.375+n*.125,u=Math.abs(l-e),f=Math.abs(c-t);return[l,c,u,f]}var Qu;(function(e){e.Strict="strict",e.Loose="loose"})(Qu||(Qu={}));var Pu;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Pu||(Pu={}));var sm;(function(e){e.Partial="partial",e.Full="full"})(sm||(sm={}));var Cc;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Cc||(Cc={}));var ba;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ba||(ba={}));var xt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(xt||(xt={}));function $G({pos:e,x1:t,y1:r,x2:n,y2:a}){return e===xt.Left||e===xt.Right?[.5*(t+n),r]:[t,.5*(r+a)]}function Wse({sourceX:e,sourceY:t,sourcePosition:r=xt.Bottom,targetX:n,targetY:a,targetPosition:i=xt.Top}){const[s,o]=$G({pos:r,x1:e,y1:t,x2:n,y2:a}),[l,c]=$G({pos:i,x1:n,y1:a,x2:e,y2:t}),[u,f,p,m]=Vse({sourceX:e,sourceY:t,targetX:n,targetY:a,sourceControlX:s,sourceControlY:o,targetControlX:l,targetControlY:c});return[`M${e},${t} C${s},${o} ${l},${c} ${n},${a}`,u,f,p,m]}const tI=E.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,sourcePosition:a=xt.Bottom,targetPosition:i=xt.Top,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:b,interactionWidth:v})=>{const[y,_,S]=Wse({sourceX:e,sourceY:t,sourcePosition:a,targetX:r,targetY:n,targetPosition:i});return ye.createElement(Ym,{path:y,labelX:_,labelY:S,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:b,interactionWidth:v})});tI.displayName="SimpleBezierEdge";const HG={[xt.Left]:{x:-1,y:0},[xt.Right]:{x:1,y:0},[xt.Top]:{x:0,y:-1},[xt.Bottom]:{x:0,y:1}},QBe=({source:e,sourcePosition:t=xt.Bottom,target:r})=>t===xt.Left||t===xt.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1},GG=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function JBe({source:e,sourcePosition:t=xt.Bottom,target:r,targetPosition:n=xt.Top,center:a,offset:i}){const s=HG[t],o=HG[n],l={x:e.x+s.x*i,y:e.y+s.y*i},c={x:r.x+o.x*i,y:r.y+o.y*i},u=QBe({source:l,sourcePosition:t,target:c}),f=u.x!==0?"x":"y",p=u[f];let m=[],b,v;const y={x:0,y:0},_={x:0,y:0},[S,C,T,A]=Gse({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(s[f]*o[f]===-1){b=a.x??S,v=a.y??C;const N=[{x:b,y:l.y},{x:b,y:c.y}],L=[{x:l.x,y:v},{x:c.x,y:v}];s[f]===p?m=f==="x"?N:L:m=f==="x"?L:N}else{const N=[{x:l.x,y:c.y}],L=[{x:c.x,y:l.y}];if(f==="x"?m=s.x===p?L:N:m=s.y===p?N:L,t===n){const K=Math.abs(e[f]-r[f]);if(K<=i){const j=Math.min(i-1,i-K);s[f]===p?y[f]=(l[f]>e[f]?-1:1)*j:_[f]=(c[f]>r[f]?-1:1)*j}}if(t!==n){const K=f==="x"?"y":"x",j=s[f]===o[K],W=l[K]>c[K],D=l[K]<c[K];(s[f]===1&&(!j&&W||j&&D)||s[f]!==1&&(!j&&D||j&&W))&&(m=f==="x"?N:L)}const I={x:l.x+y.x,y:l.y+y.y},P={x:c.x+_.x,y:c.y+_.y},H=Math.max(Math.abs(I.x-m[0].x),Math.abs(P.x-m[0].x)),B=Math.max(Math.abs(I.y-m[0].y),Math.abs(P.y-m[0].y));H>=B?(b=(I.x+P.x)/2,v=m[0].y):(b=m[0].x,v=(I.y+P.y)/2)}return[[e,{x:l.x+y.x,y:l.y+y.y},...m,{x:c.x+_.x,y:c.y+_.y},r],b,v,T,A]}function eze(e,t,r,n){const a=Math.min(GG(e,t)/2,GG(t,r)/2,n),{x:i,y:s}=t;if(e.x===i&&i===r.x||e.y===s&&s===r.y)return`L${i} ${s}`;if(e.y===s){const c=e.x<r.x?-1:1,u=e.y<r.y?1:-1;return`L ${i+a*c},${s}Q ${i},${s} ${i},${s+a*u}`}const o=e.x<r.x?1:-1,l=e.y<r.y?-1:1;return`L ${i},${s+a*l}Q ${i},${s} ${i+a*o},${s}`}function S6({sourceX:e,sourceY:t,sourcePosition:r=xt.Bottom,targetX:n,targetY:a,targetPosition:i=xt.Top,borderRadius:s=5,centerX:o,centerY:l,offset:c=20}){const[u,f,p,m,b]=JBe({source:{x:e,y:t},sourcePosition:r,target:{x:n,y:a},targetPosition:i,center:{x:o,y:l},offset:c});return[u.reduce((y,_,S)=>{let C="";return S>0&&S<u.length-1?C=eze(u[S-1],_,u[S+1],s):C=`${S===0?"M":"L"}${_.x} ${_.y}`,y+=C,y},""),f,p,m,b]}const Gx=E.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,style:u,sourcePosition:f=xt.Bottom,targetPosition:p=xt.Top,markerEnd:m,markerStart:b,pathOptions:v,interactionWidth:y})=>{const[_,S,C]=S6({sourceX:e,sourceY:t,sourcePosition:f,targetX:r,targetY:n,targetPosition:p,borderRadius:v?.borderRadius,offset:v?.offset});return ye.createElement(Ym,{path:_,labelX:S,labelY:C,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,style:u,markerEnd:m,markerStart:b,interactionWidth:y})});Gx.displayName="SmoothStepEdge";const rI=E.memo(e=>ye.createElement(Gx,{...e,pathOptions:E.useMemo(()=>({borderRadius:0,offset:e.pathOptions?.offset}),[e.pathOptions?.offset])}));rI.displayName="StepEdge";function tze({sourceX:e,sourceY:t,targetX:r,targetY:n}){const[a,i,s,o]=Gse({sourceX:e,sourceY:t,targetX:r,targetY:n});return[`M ${e},${t}L ${r},${n}`,a,i,s,o]}const nI=E.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,style:u,markerEnd:f,markerStart:p,interactionWidth:m})=>{const[b,v,y]=tze({sourceX:e,sourceY:t,targetX:r,targetY:n});return ye.createElement(Ym,{path:b,labelX:v,labelY:y,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,style:u,markerEnd:f,markerStart:p,interactionWidth:m})});nI.displayName="StraightEdge";function l1(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function VG({pos:e,x1:t,y1:r,x2:n,y2:a,c:i}){switch(e){case xt.Left:return[t-l1(t-n,i),r];case xt.Right:return[t+l1(n-t,i),r];case xt.Top:return[t,r-l1(r-a,i)];case xt.Bottom:return[t,r+l1(a-r,i)]}}function Kse({sourceX:e,sourceY:t,sourcePosition:r=xt.Bottom,targetX:n,targetY:a,targetPosition:i=xt.Top,curvature:s=.25}){const[o,l]=VG({pos:r,x1:e,y1:t,x2:n,y2:a,c:s}),[c,u]=VG({pos:i,x1:n,y1:a,x2:e,y2:t,c:s}),[f,p,m,b]=Vse({sourceX:e,sourceY:t,targetX:n,targetY:a,sourceControlX:o,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${o},${l} ${c},${u} ${n},${a}`,f,p,m,b]}const Db=E.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,sourcePosition:a=xt.Bottom,targetPosition:i=xt.Top,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:b,pathOptions:v,interactionWidth:y})=>{const[_,S,C]=Kse({sourceX:e,sourceY:t,sourcePosition:a,targetX:r,targetY:n,targetPosition:i,curvature:v?.curvature});return ye.createElement(Ym,{path:_,labelX:S,labelY:C,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:b,interactionWidth:y})});Db.displayName="BezierEdge";const aI=E.createContext(null),rze=aI.Provider;aI.Consumer;const nze=()=>E.useContext(aI),aze=e=>"id"in e&&"source"in e&&"target"in e,ize=({source:e,sourceHandle:t,target:r,targetHandle:n})=>`reactflow__edge-${e}${t||""}-${r}${n||""}`,C6=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(n=>`${n}=${e[n]}`).join("&")}`,sze=(e,t)=>t.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),oze=(e,t)=>{if(!e.source||!e.target)return t;let r;return aze(e)?r={...e}:r={...e,id:ize(e)},sze(r,t)?t:t.concat(r)},T6=({x:e,y:t},[r,n,a],i,[s,o])=>{const l={x:(e-r)/a,y:(t-n)/a};return i?{x:s*Math.round(l.x/s),y:o*Math.round(l.y/o)}:l},Xse=({x:e,y:t},[r,n,a])=>({x:e*a+r,y:t*a+n}),jf=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const r=(e.width??0)*t[0],n=(e.height??0)*t[1],a={x:e.position.x-r,y:e.position.y-n};return{...a,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-r,y:e.positionAbsolute.y-n}:a}},iI=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((n,a)=>{const{x:i,y:s}=jf(a,t).positionAbsolute;return WBe(n,eI({x:i,y:s,width:a.width||0,height:a.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return KBe(r)},Yse=(e,t,[r,n,a]=[0,0,1],i=!1,s=!1,o=[0,0])=>{const l={x:(t.x-r)/a,y:(t.y-n)/a,width:t.width/a,height:t.height/a},c=[];return e.forEach(u=>{const{width:f,height:p,selectable:m=!0,hidden:b=!1}=u;if(s&&!m||b)return!1;const{positionAbsolute:v}=jf(u,o),y={x:v.x,y:v.y,width:f||0,height:p||0},_=w6(l,y),S=typeof f>"u"||typeof p>"u"||f===null||p===null,C=i&&_>0,T=(f||0)*(p||0);(S||C||_>=T||u.dragging)&&c.push(u)}),c},Zse=(e,t)=>{const r=e.map(n=>n.id);return t.filter(n=>r.includes(n.source)||r.includes(n.target))},Qse=(e,t,r,n,a,i=.1)=>{const s=t/(e.width*(1+i)),o=r/(e.height*(1+i)),l=Math.min(s,o),c=s0(l,n,a),u=e.x+e.width/2,f=e.y+e.height/2,p=t/2-u*c,m=r/2-f*c;return{x:p,y:m,zoom:c}},Ru=(e,t=0)=>e.transition().duration(t);function WG(e,t,r,n){return(t[r]||[]).reduce((a,i)=>(`${e.id}-${i.id}-${r}`!==n&&a.push({id:i.id||null,type:r,nodeId:e.id,x:(e.positionAbsolute?.x??0)+i.x+i.width/2,y:(e.positionAbsolute?.y??0)+i.y+i.height/2}),a),[])}function lze(e,t,r,n,a,i){const{x:s,y:o}=Pc(e),c=t.elementsFromPoint(s,o).find(b=>b.classList.contains("react-flow__handle"));if(c){const b=c.getAttribute("data-nodeid");if(b){const v=sI(void 0,c),y=c.getAttribute("data-handleid"),_=i({nodeId:b,id:y,type:v});if(_){const S=a.find(C=>C.nodeId===b&&C.type===v&&C.id===y);return{handle:{id:y,type:v,nodeId:b,x:S?.x||r.x,y:S?.y||r.y},validHandleResult:_}}}}let u=[],f=1/0;if(a.forEach(b=>{const v=Math.sqrt((b.x-r.x)**2+(b.y-r.y)**2);if(v<=n){const y=i(b);v<=f&&(v<f?u=[{handle:b,validHandleResult:y}]:v===f&&u.push({handle:b,validHandleResult:y}),f=v)}}),!u.length)return{handle:null,validHandleResult:Jse()};if(u.length===1)return u[0];const p=u.some(({validHandleResult:b})=>b.isValid),m=u.some(({handle:b})=>b.type==="target");return u.find(({handle:b,validHandleResult:v})=>m?b.type==="target":p?v.isValid:!0)||u[0]}const cze={source:null,target:null,sourceHandle:null,targetHandle:null},Jse=()=>({handleDomNode:null,isValid:!1,connection:cze,endHandle:null});function eoe(e,t,r,n,a,i,s){const o=a==="target",l=s.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),c={...Jse(),handleDomNode:l};if(l){const u=sI(void 0,l),f=l.getAttribute("data-nodeid"),p=l.getAttribute("data-handleid"),m=l.classList.contains("connectable"),b=l.classList.contains("connectableend"),v={source:o?f:r,sourceHandle:o?p:n,target:o?r:f,targetHandle:o?n:p};c.connection=v,m&&b&&(t===Qu.Strict?o&&u==="source"||!o&&u==="target":f!==r||p!==n)&&(c.endHandle={nodeId:f,handleId:p,type:u},c.isValid=i(v))}return c}function uze({nodes:e,nodeId:t,handleId:r,handleType:n}){return e.reduce((a,i)=>{if(i[hn]){const{handleBounds:s}=i[hn];let o=[],l=[];s&&(o=WG(i,s,"source",`${t}-${r}-${n}`),l=WG(i,s,"target",`${t}-${r}-${n}`)),a.push(...o,...l)}return a},[])}function sI(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Z4(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function dze(e,t){let r=null;return t?r="valid":e&&!t&&(r="invalid"),r}function toe({event:e,handleId:t,nodeId:r,onConnect:n,isTarget:a,getState:i,setState:s,isValidConnection:o,edgeUpdaterType:l,onReconnectEnd:c}){const u=Use(e.target),{connectionMode:f,domNode:p,autoPanOnConnect:m,connectionRadius:b,onConnectStart:v,panBy:y,getNodes:_,cancelConnection:S}=i();let C=0,T;const{x:A,y:k}=Pc(e),N=u?.elementFromPoint(A,k),L=sI(l,N),I=p?.getBoundingClientRect();if(!I||!L)return;let P,H=Pc(e,I),B=!1,K=null,j=!1,W=null;const D=uze({nodes:_(),nodeId:r,handleId:t,handleType:L}),U=()=>{if(!m)return;const[M,Q]=qse(H,I);y({x:M,y:Q}),C=requestAnimationFrame(U)};s({connectionPosition:H,connectionStatus:null,connectionNodeId:r,connectionHandleId:t,connectionHandleType:L,connectionStartHandle:{nodeId:r,handleId:t,type:L},connectionEndHandle:null}),v?.(e,{nodeId:r,handleId:t,handleType:L});function Y(M){const{transform:Q}=i();H=Pc(M,I);const{handle:q,validHandleResult:F}=lze(M,u,T6(H,Q,!1,[1,1]),b,D,V=>eoe(V,f,r,t,a?"target":"source",o,u));if(T=q,B||(U(),B=!0),W=F.handleDomNode,K=F.connection,j=F.isValid,s({connectionPosition:T&&j?Xse({x:T.x,y:T.y},Q):H,connectionStatus:dze(!!T,j),connectionEndHandle:F.endHandle}),!T&&!j&&!W)return Z4(P);K.source!==K.target&&W&&(Z4(P),P=W,W.classList.add("connecting","react-flow__handle-connecting"),W.classList.toggle("valid",j),W.classList.toggle("react-flow__handle-valid",j))}function z(M){(T||W)&&K&&j&&n?.(K),i().onConnectEnd?.(M),l&&c?.(M),Z4(P),S(),cancelAnimationFrame(C),B=!1,j=!1,K=null,W=null,u.removeEventListener("mousemove",Y),u.removeEventListener("mouseup",z),u.removeEventListener("touchmove",Y),u.removeEventListener("touchend",z)}u.addEventListener("mousemove",Y),u.addEventListener("mouseup",z),u.addEventListener("touchmove",Y),u.addEventListener("touchend",z)}const KG=()=>!0,fze=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),hze=(e,t,r)=>n=>{const{connectionStartHandle:a,connectionEndHandle:i,connectionClickStartHandle:s}=n;return{connecting:a?.nodeId===e&&a?.handleId===t&&a?.type===r||i?.nodeId===e&&i?.handleId===t&&i?.type===r,clickConnecting:s?.nodeId===e&&s?.handleId===t&&s?.type===r}},roe=E.forwardRef(({type:e="source",position:t=xt.Top,isValidConnection:r,isConnectable:n=!0,isConnectableStart:a=!0,isConnectableEnd:i=!0,id:s,onConnect:o,children:l,className:c,onMouseDown:u,onTouchStart:f,...p},m)=>{const b=s||null,v=e==="target",y=ra(),_=nze(),{connectOnClick:S,noPanClassName:C}=mn(fze,li),{connecting:T,clickConnecting:A}=mn(hze(_,b,e),li);_||y.getState().onError?.("010",Ol.error010());const k=I=>{const{defaultEdgeOptions:P,onConnect:H,hasDefaultEdges:B}=y.getState(),K={...P,...I};if(B){const{edges:j,setEdges:W}=y.getState();W(oze(K,j))}H?.(K),o?.(K)},N=I=>{if(!_)return;const P=Hse(I);a&&(P&&I.button===0||!P)&&toe({event:I,handleId:b,nodeId:_,onConnect:k,isTarget:v,getState:y.getState,setState:y.setState,isValidConnection:r||y.getState().isValidConnection||KG}),P?u?.(I):f?.(I)},L=I=>{const{onClickConnectStart:P,onClickConnectEnd:H,connectionClickStartHandle:B,connectionMode:K,isValidConnection:j}=y.getState();if(!_||!B&&!a)return;if(!B){P?.(I,{nodeId:_,handleId:b,handleType:e}),y.setState({connectionClickStartHandle:{nodeId:_,type:e,handleId:b}});return}const W=Use(I.target),D=r||j||KG,{connection:U,isValid:Y}=eoe({nodeId:_,id:b,type:e},K,B.nodeId,B.handleId||null,B.type,D,W);Y&&k(U),H?.(I),y.setState({connectionClickStartHandle:null})};return ye.createElement("div",{"data-handleid":b,"data-nodeid":_,"data-handlepos":t,"data-id":`${_}-${b}-${e}`,className:di(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",C,c,{source:!v,target:v,connectable:n,connectablestart:a,connectableend:i,connecting:A,connectionindicator:n&&(a&&!T||i&&T)}]),onMouseDown:N,onTouchStart:N,onClick:S?L:void 0,ref:m,...p},l)});roe.displayName="Handle";var Ti=E.memo(roe);const noe=({data:e,isConnectable:t,targetPosition:r=xt.Top,sourcePosition:n=xt.Bottom})=>ye.createElement(ye.Fragment,null,ye.createElement(Ti,{type:"target",position:r,isConnectable:t}),e?.label,ye.createElement(Ti,{type:"source",position:n,isConnectable:t}));noe.displayName="DefaultNode";var A6=E.memo(noe);const aoe=({data:e,isConnectable:t,sourcePosition:r=xt.Bottom})=>ye.createElement(ye.Fragment,null,e?.label,ye.createElement(Ti,{type:"source",position:r,isConnectable:t}));aoe.displayName="InputNode";var ioe=E.memo(aoe);const soe=({data:e,isConnectable:t,targetPosition:r=xt.Top})=>ye.createElement(ye.Fragment,null,ye.createElement(Ti,{type:"target",position:r,isConnectable:t}),e?.label);soe.displayName="OutputNode";var ooe=E.memo(soe);const oI=()=>null;oI.displayName="GroupNode";const pze=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>({...t}))}),c1=e=>e.id;function mze(e,t){return li(e.selectedNodes.map(c1),t.selectedNodes.map(c1))&&li(e.selectedEdges.map(c1),t.selectedEdges.map(c1))}const loe=E.memo(({onSelectionChange:e})=>{const t=ra(),{selectedNodes:r,selectedEdges:n}=mn(pze,mze);return E.useEffect(()=>{const a={nodes:r,edges:n};e?.(a),t.getState().onSelectionChange.forEach(i=>i(a))},[r,n,e]),null});loe.displayName="SelectionListener";const gze=e=>!!e.onSelectionChange;function vze({onSelectionChange:e}){const t=mn(gze);return e||t?ye.createElement(loe,{onSelectionChange:e}):null}const bze=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function mf(e,t){E.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function sr(e,t,r){E.useEffect(()=>{typeof t<"u"&&r({[e]:t})},[t])}const xze=({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:a,onConnectStart:i,onConnectEnd:s,onClickConnectStart:o,onClickConnectEnd:l,nodesDraggable:c,nodesConnectable:u,nodesFocusable:f,edgesFocusable:p,edgesUpdatable:m,elevateNodesOnSelect:b,minZoom:v,maxZoom:y,nodeExtent:_,onNodesChange:S,onEdgesChange:C,elementsSelectable:T,connectionMode:A,snapGrid:k,snapToGrid:N,translateExtent:L,connectOnClick:I,defaultEdgeOptions:P,fitView:H,fitViewOptions:B,onNodesDelete:K,onEdgesDelete:j,onNodeDrag:W,onNodeDragStart:D,onNodeDragStop:U,onSelectionDrag:Y,onSelectionDragStart:z,onSelectionDragStop:M,noPanClassName:Q,nodeOrigin:q,rfId:F,autoPanOnConnect:V,autoPanOnNodeDrag:Z,onError:ee,connectionRadius:te,isValidConnection:oe,nodeDragThreshold:pe})=>{const{setNodes:he,setEdges:ke,setDefaultNodesAndEdges:se,setMinZoom:qe,setMaxZoom:$e,setTranslateExtent:Pe,setNodeExtent:Ce,reset:xe}=mn(bze,li),ve=ra();return E.useEffect(()=>{const Ne=n?.map(Ue=>({...Ue,...P}));return se(r,Ne),()=>{xe()}},[]),sr("defaultEdgeOptions",P,ve.setState),sr("connectionMode",A,ve.setState),sr("onConnect",a,ve.setState),sr("onConnectStart",i,ve.setState),sr("onConnectEnd",s,ve.setState),sr("onClickConnectStart",o,ve.setState),sr("onClickConnectEnd",l,ve.setState),sr("nodesDraggable",c,ve.setState),sr("nodesConnectable",u,ve.setState),sr("nodesFocusable",f,ve.setState),sr("edgesFocusable",p,ve.setState),sr("edgesUpdatable",m,ve.setState),sr("elementsSelectable",T,ve.setState),sr("elevateNodesOnSelect",b,ve.setState),sr("snapToGrid",N,ve.setState),sr("snapGrid",k,ve.setState),sr("onNodesChange",S,ve.setState),sr("onEdgesChange",C,ve.setState),sr("connectOnClick",I,ve.setState),sr("fitViewOnInit",H,ve.setState),sr("fitViewOnInitOptions",B,ve.setState),sr("onNodesDelete",K,ve.setState),sr("onEdgesDelete",j,ve.setState),sr("onNodeDrag",W,ve.setState),sr("onNodeDragStart",D,ve.setState),sr("onNodeDragStop",U,ve.setState),sr("onSelectionDrag",Y,ve.setState),sr("onSelectionDragStart",z,ve.setState),sr("onSelectionDragStop",M,ve.setState),sr("noPanClassName",Q,ve.setState),sr("nodeOrigin",q,ve.setState),sr("rfId",F,ve.setState),sr("autoPanOnConnect",V,ve.setState),sr("autoPanOnNodeDrag",Z,ve.setState),sr("onError",ee,ve.setState),sr("connectionRadius",te,ve.setState),sr("isValidConnection",oe,ve.setState),sr("nodeDragThreshold",pe,ve.setState),mf(e,he),mf(t,ke),mf(v,qe),mf(y,$e),mf(L,Pe),mf(_,Ce),null},XG={display:"none"},yze={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},coe="react-flow__node-desc",uoe="react-flow__edge-desc",_ze="react-flow__aria-live",wze=e=>e.ariaLiveMessage;function Eze({rfId:e}){const t=mn(wze);return ye.createElement("div",{id:`${_ze}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:yze},t)}function Sze({rfId:e,disableKeyboardA11y:t}){return ye.createElement(ye.Fragment,null,ye.createElement("div",{id:`${coe}-${e}`,style:XG},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),ye.createElement("div",{id:`${uoe}-${e}`,style:XG},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&ye.createElement(Eze,{rfId:e}))}var om=(e=null,t={actInsideInputWithModifier:!0})=>{const[r,n]=E.useState(!1),a=E.useRef(!1),i=E.useRef(new Set([])),[s,o]=E.useMemo(()=>{if(e!==null){const c=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.split("+")),u=c.reduce((f,p)=>f.concat(...p),[]);return[c,u]}return[[],[]]},[e]);return E.useEffect(()=>{const l=typeof document<"u"?document:null,c=t?.target||l;if(e!==null){const u=m=>{if(a.current=m.ctrlKey||m.metaKey||m.shiftKey,(!a.current||a.current&&!t.actInsideInputWithModifier)&&E6(m))return!1;const v=ZG(m.code,o);i.current.add(m[v]),YG(s,i.current,!1)&&(m.preventDefault(),n(!0))},f=m=>{if((!a.current||a.current&&!t.actInsideInputWithModifier)&&E6(m))return!1;const v=ZG(m.code,o);YG(s,i.current,!0)?(n(!1),i.current.clear()):i.current.delete(m[v]),m.key==="Meta"&&i.current.clear(),a.current=!1},p=()=>{i.current.clear(),n(!1)};return c?.addEventListener("keydown",u),c?.addEventListener("keyup",f),window.addEventListener("blur",p),()=>{c?.removeEventListener("keydown",u),c?.removeEventListener("keyup",f),window.removeEventListener("blur",p)}}},[e,n]),r};function YG(e,t,r){return e.filter(n=>r||n.length===t.size).some(n=>n.every(a=>t.has(a)))}function ZG(e,t){return t.includes(e)?"code":"key"}function doe(e,t,r,n){const a=e.parentNode||e.parentId;if(!a)return r;const i=t.get(a),s=jf(i,n);return doe(i,t,{x:(r.x??0)+s.x,y:(r.y??0)+s.y,z:(i[hn]?.z??0)>(r.z??0)?i[hn]?.z??0:r.z??0},n)}function foe(e,t,r){e.forEach(n=>{const a=n.parentNode||n.parentId;if(a&&!e.has(a))throw new Error(`Parent node ${a} not found`);if(a||r?.[n.id]){const{x:i,y:s,z:o}=doe(n,e,{...n.position,z:n[hn]?.z??0},t);n.positionAbsolute={x:i,y:s},n[hn].z=o,r?.[n.id]&&(n[hn].isParent=!0)}})}function Q4(e,t,r,n){const a=new Map,i={},s=n?1e3:0;return e.forEach(o=>{const l=(os(o.zIndex)?o.zIndex:0)+(o.selected?s:0),c=t.get(o.id),u={...o,positionAbsolute:{x:o.position.x,y:o.position.y}},f=o.parentNode||o.parentId;f&&(i[f]=!0);const p=c?.type&&c?.type!==o.type;Object.defineProperty(u,hn,{enumerable:!1,value:{handleBounds:p?void 0:c?.[hn]?.handleBounds,z:l}}),a.set(o.id,u)}),foe(a,r,i),a}function hoe(e,t={}){const{getNodes:r,width:n,height:a,minZoom:i,maxZoom:s,d3Zoom:o,d3Selection:l,fitViewOnInitDone:c,fitViewOnInit:u,nodeOrigin:f}=e(),p=t.initial&&!c&&u;if(o&&l&&(p||!t.initial)){const b=r().filter(y=>{const _=t.includeHiddenNodes?y.width&&y.height:!y.hidden;return t.nodes?.length?_&&t.nodes.some(S=>S.id===y.id):_}),v=b.every(y=>y.width&&y.height);if(b.length>0&&v){const y=iI(b,f),{x:_,y:S,zoom:C}=Qse(y,n,a,t.minZoom??i,t.maxZoom??s,t.padding??.1),T=Lc.translate(_,S).scale(C);return typeof t.duration=="number"&&t.duration>0?o.transform(Ru(l,t.duration),T):o.transform(l,T),!0}}return!1}function Cze(e,t){return e.forEach(r=>{const n=t.get(r.id);n&&t.set(n.id,{...n,[hn]:n[hn],selected:r.selected})}),new Map(t)}function Tze(e,t){return t.map(r=>{const n=e.find(a=>a.id===r.id);return n&&(r.selected=n.selected),r})}function u1({changedNodes:e,changedEdges:t,get:r,set:n}){const{nodeInternals:a,edges:i,onNodesChange:s,onEdgesChange:o,hasDefaultNodes:l,hasDefaultEdges:c}=r();e?.length&&(l&&n({nodeInternals:Cze(e,a)}),s?.(e)),t?.length&&(c&&n({edges:Tze(t,i)}),o?.(t))}const gf=()=>{},Aze={zoomIn:gf,zoomOut:gf,zoomTo:gf,getZoom:()=>1,setViewport:gf,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:gf,fitBounds:gf,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},kze=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),Nze=()=>{const e=ra(),{d3Zoom:t,d3Selection:r}=mn(kze,li);return E.useMemo(()=>r&&t?{zoomIn:a=>t.scaleBy(Ru(r,a?.duration),1.2),zoomOut:a=>t.scaleBy(Ru(r,a?.duration),1/1.2),zoomTo:(a,i)=>t.scaleTo(Ru(r,i?.duration),a),getZoom:()=>e.getState().transform[2],setViewport:(a,i)=>{const[s,o,l]=e.getState().transform,c=Lc.translate(a.x??s,a.y??o).scale(a.zoom??l);t.transform(Ru(r,i?.duration),c)},getViewport:()=>{const[a,i,s]=e.getState().transform;return{x:a,y:i,zoom:s}},fitView:a=>hoe(e.getState,a),setCenter:(a,i,s)=>{const{width:o,height:l,maxZoom:c}=e.getState(),u=typeof s?.zoom<"u"?s.zoom:c,f=o/2-a*u,p=l/2-i*u,m=Lc.translate(f,p).scale(u);t.transform(Ru(r,s?.duration),m)},fitBounds:(a,i)=>{const{width:s,height:o,minZoom:l,maxZoom:c}=e.getState(),{x:u,y:f,zoom:p}=Qse(a,s,o,l,c,i?.padding??.1),m=Lc.translate(u,f).scale(p);t.transform(Ru(r,i?.duration),m)},project:a=>{const{transform:i,snapToGrid:s,snapGrid:o}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),T6(a,i,s,o)},screenToFlowPosition:a=>{const{transform:i,snapToGrid:s,snapGrid:o,domNode:l}=e.getState();if(!l)return a;const{x:c,y:u}=l.getBoundingClientRect(),f={x:a.x-c,y:a.y-u};return T6(f,i,s,o)},flowToScreenPosition:a=>{const{transform:i,domNode:s}=e.getState();if(!s)return a;const{x:o,y:l}=s.getBoundingClientRect(),c=Xse(a,i);return{x:c.x+o,y:c.y+l}},viewportInitialized:!0}:Aze,[t,r])};function lI(){const e=Nze(),t=ra(),r=E.useCallback(()=>t.getState().getNodes().map(v=>({...v})),[]),n=E.useCallback(v=>t.getState().nodeInternals.get(v),[]),a=E.useCallback(()=>{const{edges:v=[]}=t.getState();return v.map(y=>({...y}))},[]),i=E.useCallback(v=>{const{edges:y=[]}=t.getState();return y.find(_=>_.id===v)},[]),s=E.useCallback(v=>{const{getNodes:y,setNodes:_,hasDefaultNodes:S,onNodesChange:C}=t.getState(),T=y(),A=typeof v=="function"?v(T):v;if(S)_(A);else if(C){const k=A.length===0?T.map(N=>({type:"remove",id:N.id})):A.map(N=>({item:N,type:"reset"}));C(k)}},[]),o=E.useCallback(v=>{const{edges:y=[],setEdges:_,hasDefaultEdges:S,onEdgesChange:C}=t.getState(),T=typeof v=="function"?v(y):v;if(S)_(T);else if(C){const A=T.length===0?y.map(k=>({type:"remove",id:k.id})):T.map(k=>({item:k,type:"reset"}));C(A)}},[]),l=E.useCallback(v=>{const y=Array.isArray(v)?v:[v],{getNodes:_,setNodes:S,hasDefaultNodes:C,onNodesChange:T}=t.getState();if(C){const k=[..._(),...y];S(k)}else if(T){const A=y.map(k=>({item:k,type:"add"}));T(A)}},[]),c=E.useCallback(v=>{const y=Array.isArray(v)?v:[v],{edges:_=[],setEdges:S,hasDefaultEdges:C,onEdgesChange:T}=t.getState();if(C)S([..._,...y]);else if(T){const A=y.map(k=>({item:k,type:"add"}));T(A)}},[]),u=E.useCallback(()=>{const{getNodes:v,edges:y=[],transform:_}=t.getState(),[S,C,T]=_;return{nodes:v().map(A=>({...A})),edges:y.map(A=>({...A})),viewport:{x:S,y:C,zoom:T}}},[]),f=E.useCallback(({nodes:v,edges:y})=>{const{nodeInternals:_,getNodes:S,edges:C,hasDefaultNodes:T,hasDefaultEdges:A,onNodesDelete:k,onEdgesDelete:N,onNodesChange:L,onEdgesChange:I}=t.getState(),P=(v||[]).map(W=>W.id),H=(y||[]).map(W=>W.id),B=S().reduce((W,D)=>{const U=D.parentNode||D.parentId,Y=!P.includes(D.id)&&U&&W.find(M=>M.id===U);return(typeof D.deletable=="boolean"?D.deletable:!0)&&(P.includes(D.id)||Y)&&W.push(D),W},[]),K=C.filter(W=>typeof W.deletable=="boolean"?W.deletable:!0),j=K.filter(W=>H.includes(W.id));if(B||j){const W=Zse(B,K),D=[...j,...W],U=D.reduce((Y,z)=>(Y.includes(z.id)||Y.push(z.id),Y),[]);if((A||T)&&(A&&t.setState({edges:C.filter(Y=>!U.includes(Y.id))}),T&&(B.forEach(Y=>{_.delete(Y.id)}),t.setState({nodeInternals:new Map(_)}))),U.length>0&&(N?.(D),I&&I(U.map(Y=>({id:Y,type:"remove"})))),B.length>0&&(k?.(B),L)){const Y=B.map(z=>({id:z.id,type:"remove"}));L(Y)}}},[]),p=E.useCallback(v=>{const y=XBe(v),_=y?null:t.getState().nodeInternals.get(v.id);return!y&&!_?[null,null,y]:[y?v:UG(_),_,y]},[]),m=E.useCallback((v,y=!0,_)=>{const[S,C,T]=p(v);return S?(_||t.getState().getNodes()).filter(A=>{if(!T&&(A.id===C.id||!A.positionAbsolute))return!1;const k=UG(A),N=w6(k,S);return y&&N>0||N>=S.width*S.height}):[]},[]),b=E.useCallback((v,y,_=!0)=>{const[S]=p(v);if(!S)return!1;const C=w6(S,y);return _&&C>0||C>=S.width*S.height},[]);return E.useMemo(()=>({...e,getNodes:r,getNode:n,getEdges:a,getEdge:i,setNodes:s,setEdges:o,addNodes:l,addEdges:c,toObject:u,deleteElements:f,getIntersectingNodes:m,isNodeIntersecting:b}),[e,r,n,a,i,s,o,l,c,u,f,m,b])}const Rze={actInsideInputWithModifier:!1};var Mze=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const r=ra(),{deleteElements:n}=lI(),a=om(e,Rze),i=om(t);E.useEffect(()=>{if(a){const{edges:s,getNodes:o}=r.getState(),l=o().filter(u=>u.selected),c=s.filter(u=>u.selected);n({nodes:l,edges:c}),r.setState({nodesSelectionActive:!1})}},[a]),E.useEffect(()=>{r.setState({multiSelectionActive:i})},[i])};function Dze(e){const t=ra();E.useEffect(()=>{let r;const n=()=>{if(!e.current)return;const a=QO(e.current);(a.height===0||a.width===0)&&t.getState().onError?.("004",Ol.error004()),t.setState({width:a.width||500,height:a.height||500})};return n(),window.addEventListener("resize",n),e.current&&(r=new ResizeObserver(()=>n()),r.observe(e.current)),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}},[])}const cI={position:"absolute",width:"100%",height:"100%",top:0,left:0},Oze=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,d1=e=>({x:e.x,y:e.y,zoom:e.k}),vf=(e,t)=>e.target.closest(`.${t}`),QG=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),JG=e=>{const t=e.ctrlKey&&Mb()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},Ize=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),Lze=({onMove:e,onMoveStart:t,onMoveEnd:r,onPaneContextMenu:n,zoomOnScroll:a=!0,zoomOnPinch:i=!0,panOnScroll:s=!1,panOnScrollSpeed:o=.5,panOnScrollMode:l=Pu.Free,zoomOnDoubleClick:c=!0,elementsSelectable:u,panOnDrag:f=!0,defaultViewport:p,translateExtent:m,minZoom:b,maxZoom:v,zoomActivationKeyCode:y,preventScrolling:_=!0,children:S,noWheelClassName:C,noPanClassName:T})=>{const A=E.useRef(),k=ra(),N=E.useRef(!1),L=E.useRef(!1),I=E.useRef(null),P=E.useRef({x:0,y:0,zoom:0}),{d3Zoom:H,d3Selection:B,d3ZoomHandler:K,userSelectionActive:j}=mn(Ize,li),W=om(y),D=E.useRef(0),U=E.useRef(!1),Y=E.useRef();return Dze(I),E.useEffect(()=>{if(I.current){const z=I.current.getBoundingClientRect(),M=qBe().scaleExtent([b,v]).translateExtent(m),Q=Ds(I.current).call(M),q=Lc.translate(p.x,p.y).scale(s0(p.zoom,b,v)),F=[[0,0],[z.width,z.height]],V=M.constrain()(q,F,m);M.transform(Q,V),M.wheelDelta(JG),k.setState({d3Zoom:M,d3Selection:Q,d3ZoomHandler:Q.on("wheel.zoom"),transform:[V.x,V.y,V.k],domNode:I.current.closest(".react-flow")})}},[]),E.useEffect(()=>{B&&H&&(s&&!W&&!j?B.on("wheel.zoom",z=>{if(vf(z,C))return!1;z.preventDefault(),z.stopImmediatePropagation();const M=B.property("__zoom").k||1;if(z.ctrlKey&&i){const oe=go(z),pe=JG(z),he=M*Math.pow(2,pe);H.scaleTo(B,he,oe,z);return}const Q=z.deltaMode===1?20:1;let q=l===Pu.Vertical?0:z.deltaX*Q,F=l===Pu.Horizontal?0:z.deltaY*Q;!Mb()&&z.shiftKey&&l!==Pu.Vertical&&(q=z.deltaY*Q,F=0),H.translateBy(B,-(q/M)*o,-(F/M)*o,{internal:!0});const V=d1(B.property("__zoom")),{onViewportChangeStart:Z,onViewportChange:ee,onViewportChangeEnd:te}=k.getState();clearTimeout(Y.current),U.current||(U.current=!0,t?.(z,V),Z?.(V)),U.current&&(e?.(z,V),ee?.(V),Y.current=setTimeout(()=>{r?.(z,V),te?.(V),U.current=!1},150))},{passive:!1}):typeof K<"u"&&B.on("wheel.zoom",function(z,M){if(!_&&z.type==="wheel"&&!z.ctrlKey||vf(z,C))return null;z.preventDefault(),K.call(this,z,M)},{passive:!1}))},[j,s,l,B,H,K,W,i,_,C,t,e,r]),E.useEffect(()=>{H&&H.on("start",z=>{if(!z.sourceEvent||z.sourceEvent.internal)return null;D.current=z.sourceEvent?.button;const{onViewportChangeStart:M}=k.getState(),Q=d1(z.transform);N.current=!0,P.current=Q,z.sourceEvent?.type==="mousedown"&&k.setState({paneDragging:!0}),M?.(Q),t?.(z.sourceEvent,Q)})},[H,t]),E.useEffect(()=>{H&&(j&&!N.current?H.on("zoom",null):j||H.on("zoom",z=>{const{onViewportChange:M}=k.getState();if(k.setState({transform:[z.transform.x,z.transform.y,z.transform.k]}),L.current=!!(n&&QG(f,D.current??0)),(e||M)&&!z.sourceEvent?.internal){const Q=d1(z.transform);M?.(Q),e?.(z.sourceEvent,Q)}}))},[j,H,e,f,n]),E.useEffect(()=>{H&&H.on("end",z=>{if(!z.sourceEvent||z.sourceEvent.internal)return null;const{onViewportChangeEnd:M}=k.getState();if(N.current=!1,k.setState({paneDragging:!1}),n&&QG(f,D.current??0)&&!L.current&&n(z.sourceEvent),L.current=!1,(r||M)&&Oze(P.current,z.transform)){const Q=d1(z.transform);P.current=Q,clearTimeout(A.current),A.current=setTimeout(()=>{M?.(Q),r?.(z.sourceEvent,Q)},s?150:0)}})},[H,s,f,r,n]),E.useEffect(()=>{H&&H.filter(z=>{const M=W||a,Q=i&&z.ctrlKey;if((f===!0||Array.isArray(f)&&f.includes(1))&&z.button===1&&z.type==="mousedown"&&(vf(z,"react-flow__node")||vf(z,"react-flow__edge")))return!0;if(!f&&!M&&!s&&!c&&!i||j||!c&&z.type==="dblclick"||vf(z,C)&&z.type==="wheel"||vf(z,T)&&(z.type!=="wheel"||s&&z.type==="wheel"&&!W)||!i&&z.ctrlKey&&z.type==="wheel"||!M&&!s&&!Q&&z.type==="wheel"||!f&&(z.type==="mousedown"||z.type==="touchstart")||Array.isArray(f)&&!f.includes(z.button)&&z.type==="mousedown")return!1;const q=Array.isArray(f)&&f.includes(z.button)||!z.button||z.button<=1;return(!z.ctrlKey||z.type==="wheel")&&q})},[j,H,a,i,s,c,f,u,W]),ye.createElement("div",{className:"react-flow__renderer",ref:I,style:cI},S)},Pze=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Fze(){const{userSelectionActive:e,userSelectionRect:t}=mn(Pze,li);return e&&t?ye.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function eV(e,t){const r=t.parentNode||t.parentId,n=e.find(a=>a.id===r);if(n){const a=t.position.x+t.width-n.width,i=t.position.y+t.height-n.height;if(a>0||i>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,a>0&&(n.style.width+=a),i>0&&(n.style.height+=i),t.position.x<0){const s=Math.abs(t.position.x);n.position.x=n.position.x-s,n.style.width+=s,t.position.x=0}if(t.position.y<0){const s=Math.abs(t.position.y);n.position.y=n.position.y-s,n.style.height+=s,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function Bze(e,t){if(e.some(n=>n.type==="reset"))return e.filter(n=>n.type==="reset").map(n=>n.item);const r=e.filter(n=>n.type==="add").map(n=>n.item);return t.reduce((n,a)=>{const i=e.filter(o=>o.id===a.id);if(i.length===0)return n.push(a),n;const s={...a};for(const o of i)if(o)switch(o.type){case"select":{s.selected=o.selected;break}case"position":{typeof o.position<"u"&&(s.position=o.position),typeof o.positionAbsolute<"u"&&(s.positionAbsolute=o.positionAbsolute),typeof o.dragging<"u"&&(s.dragging=o.dragging),s.expandParent&&eV(n,s);break}case"dimensions":{typeof o.dimensions<"u"&&(s.width=o.dimensions.width,s.height=o.dimensions.height),typeof o.updateStyle<"u"&&(s.style={...s.style||{},...o.dimensions}),typeof o.resizing=="boolean"&&(s.resizing=o.resizing),s.expandParent&&eV(n,s);break}case"remove":return n}return n.push(s),n},r)}function zze(e,t){return Bze(e,t)}const Sc=(e,t)=>({id:e,type:"select",selected:t});function kf(e,t){return e.reduce((r,n)=>{const a=t.includes(n.id);return!n.selected&&a?(n.selected=!0,r.push(Sc(n.id,!0))):n.selected&&!a&&(n.selected=!1,r.push(Sc(n.id,!1))),r},[])}const J4=(e,t)=>r=>{r.target===t.current&&e?.(r)},jze=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),poe=E.memo(({isSelecting:e,selectionMode:t=sm.Full,panOnDrag:r,onSelectionStart:n,onSelectionEnd:a,onPaneClick:i,onPaneContextMenu:s,onPaneScroll:o,onPaneMouseEnter:l,onPaneMouseMove:c,onPaneMouseLeave:u,children:f})=>{const p=E.useRef(null),m=ra(),b=E.useRef(0),v=E.useRef(0),y=E.useRef(),{userSelectionActive:_,elementsSelectable:S,dragging:C}=mn(jze,li),T=()=>{m.setState({userSelectionActive:!1,userSelectionRect:null}),b.current=0,v.current=0},A=K=>{i?.(K),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},k=K=>{if(Array.isArray(r)&&r?.includes(2)){K.preventDefault();return}s?.(K)},N=o?K=>o(K):void 0,L=K=>{const{resetSelectedElements:j,domNode:W}=m.getState();if(y.current=W?.getBoundingClientRect(),!S||!e||K.button!==0||K.target!==p.current||!y.current)return;const{x:D,y:U}=Pc(K,y.current);j(),m.setState({userSelectionRect:{width:0,height:0,startX:D,startY:U,x:D,y:U}}),n?.(K)},I=K=>{const{userSelectionRect:j,nodeInternals:W,edges:D,transform:U,onNodesChange:Y,onEdgesChange:z,nodeOrigin:M,getNodes:Q}=m.getState();if(!e||!y.current||!j)return;m.setState({userSelectionActive:!0,nodesSelectionActive:!1});const q=Pc(K,y.current),F=j.startX??0,V=j.startY??0,Z={...j,x:q.x<F?q.x:F,y:q.y<V?q.y:V,width:Math.abs(q.x-F),height:Math.abs(q.y-V)},ee=Q(),te=Yse(W,Z,U,t===sm.Partial,!0,M),oe=Zse(te,D).map(he=>he.id),pe=te.map(he=>he.id);if(b.current!==pe.length){b.current=pe.length;const he=kf(ee,pe);he.length&&Y?.(he)}if(v.current!==oe.length){v.current=oe.length;const he=kf(D,oe);he.length&&z?.(he)}m.setState({userSelectionRect:Z})},P=K=>{if(K.button!==0)return;const{userSelectionRect:j}=m.getState();!_&&j&&K.target===p.current&&A?.(K),m.setState({nodesSelectionActive:b.current>0}),T(),a?.(K)},H=K=>{_&&(m.setState({nodesSelectionActive:b.current>0}),a?.(K)),T()},B=S&&(e||_);return ye.createElement("div",{className:di(["react-flow__pane",{dragging:C,selection:e}]),onClick:B?void 0:J4(A,p),onContextMenu:J4(k,p),onWheel:J4(N,p),onMouseEnter:B?void 0:l,onMouseDown:B?L:void 0,onMouseMove:B?I:c,onMouseUp:B?P:void 0,onMouseLeave:B?H:u,ref:p,style:cI},f,ye.createElement(Fze,null))});poe.displayName="Pane";function moe(e,t){const r=e.parentNode||e.parentId;if(!r)return!1;const n=t.get(r);return n?n.selected?!0:moe(n,t):!1}function tV(e,t,r){let n=e;do{if(n?.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function qze(e,t,r,n){return Array.from(e.values()).filter(a=>(a.selected||a.id===n)&&(!a.parentNode||a.parentId||!moe(a,e))&&(a.draggable||t&&typeof a.draggable>"u")).map(a=>({id:a.id,position:a.position||{x:0,y:0},positionAbsolute:a.positionAbsolute||{x:0,y:0},distance:{x:r.x-(a.positionAbsolute?.x??0),y:r.y-(a.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:a.extent,parentNode:a.parentNode||a.parentId,parentId:a.parentNode||a.parentId,width:a.width,height:a.height,expandParent:a.expandParent}))}function Uze(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function goe(e,t,r,n,a=[0,0],i){const s=Uze(e,e.extent||n);let o=s;const l=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(l&&e.width&&e.height){const f=r.get(l),{x:p,y:m}=jf(f,a).positionAbsolute;o=f&&os(p)&&os(m)&&os(f.width)&&os(f.height)?[[p+e.width*a[0],m+e.height*a[1]],[p+f.width-e.width+e.width*a[0],m+f.height-e.height+e.height*a[1]]]:o}else i?.("005",Ol.error005()),o=s;else if(e.extent&&l&&e.extent!=="parent"){const f=r.get(l),{x:p,y:m}=jf(f,a).positionAbsolute;o=[[e.extent[0][0]+p,e.extent[0][1]+m],[e.extent[1][0]+p,e.extent[1][1]+m]]}let c={x:0,y:0};if(l){const f=r.get(l);c=jf(f,a).positionAbsolute}const u=o&&o!=="parent"?JO(t,o):t;return{position:{x:u.x-c.x,y:u.y-c.y},positionAbsolute:u}}function eA({nodeId:e,dragItems:t,nodeInternals:r}){const n=t.map(a=>({...r.get(a.id),position:a.position,positionAbsolute:a.positionAbsolute}));return[e?n.find(a=>a.id===e):n[0],n]}const rV=(e,t,r,n)=>{const a=t.querySelectorAll(e);if(!a||!a.length)return null;const i=Array.from(a),s=t.getBoundingClientRect(),o={x:s.width*n[0],y:s.height*n[1]};return i.map(l=>{const c=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(c.left-s.left-o.x)/r,y:(c.top-s.top-o.y)/r,...QO(l)}})};function Vh(e,t,r){return r===void 0?r:n=>{const a=t().nodeInternals.get(e);a&&r(n,{...a})}}function k6({id:e,store:t,unselect:r=!1,nodeRef:n}){const{addSelectedNodes:a,unselectNodesAndEdges:i,multiSelectionActive:s,nodeInternals:o,onError:l}=t.getState(),c=o.get(e);if(!c){l?.("012",Ol.error012(e));return}t.setState({nodesSelectionActive:!1}),c.selected?(r||c.selected&&s)&&(i({nodes:[c],edges:[]}),requestAnimationFrame(()=>n?.current?.blur())):a([e])}function $ze(){const e=ra();return E.useCallback(({sourceEvent:r})=>{const{transform:n,snapGrid:a,snapToGrid:i}=e.getState(),s=r.touches?r.touches[0].clientX:r.clientX,o=r.touches?r.touches[0].clientY:r.clientY,l={x:(s-n[0])/n[2],y:(o-n[1])/n[2]};return{xSnapped:i?a[0]*Math.round(l.x/a[0]):l.x,ySnapped:i?a[1]*Math.round(l.y/a[1]):l.y,...l}},[])}function tA(e){return(t,r,n)=>e?.(t,n)}function voe({nodeRef:e,disabled:t=!1,noDragClassName:r,handleSelector:n,nodeId:a,isSelectable:i,selectNodesOnDrag:s}){const o=ra(),[l,c]=E.useState(!1),u=E.useRef([]),f=E.useRef({x:null,y:null}),p=E.useRef(0),m=E.useRef(null),b=E.useRef({x:0,y:0}),v=E.useRef(null),y=E.useRef(!1),_=E.useRef(!1),S=E.useRef(!1),C=$ze();return E.useEffect(()=>{if(e?.current){const T=Ds(e.current),A=({x:L,y:I})=>{const{nodeInternals:P,onNodeDrag:H,onSelectionDrag:B,updateNodePositions:K,nodeExtent:j,snapGrid:W,snapToGrid:D,nodeOrigin:U,onError:Y}=o.getState();f.current={x:L,y:I};let z=!1,M={x:0,y:0,x2:0,y2:0};if(u.current.length>1&&j){const q=iI(u.current,U);M=eI(q)}if(u.current=u.current.map(q=>{const F={x:L-q.distance.x,y:I-q.distance.y};D&&(F.x=W[0]*Math.round(F.x/W[0]),F.y=W[1]*Math.round(F.y/W[1]));const V=[[j[0][0],j[0][1]],[j[1][0],j[1][1]]];u.current.length>1&&j&&!q.extent&&(V[0][0]=q.positionAbsolute.x-M.x+j[0][0],V[1][0]=q.positionAbsolute.x+(q.width??0)-M.x2+j[1][0],V[0][1]=q.positionAbsolute.y-M.y+j[0][1],V[1][1]=q.positionAbsolute.y+(q.height??0)-M.y2+j[1][1]);const Z=goe(q,F,P,V,U,Y);return z=z||q.position.x!==Z.position.x||q.position.y!==Z.position.y,q.position=Z.position,q.positionAbsolute=Z.positionAbsolute,q}),!z)return;K(u.current,!0,!0),c(!0);const Q=a?H:tA(B);if(Q&&v.current){const[q,F]=eA({nodeId:a,dragItems:u.current,nodeInternals:P});Q(v.current,q,F)}},k=()=>{if(!m.current)return;const[L,I]=qse(b.current,m.current);if(L!==0||I!==0){const{transform:P,panBy:H}=o.getState();f.current.x=(f.current.x??0)-L/P[2],f.current.y=(f.current.y??0)-I/P[2],H({x:L,y:I})&&A(f.current)}p.current=requestAnimationFrame(k)},N=L=>{const{nodeInternals:I,multiSelectionActive:P,nodesDraggable:H,unselectNodesAndEdges:B,onNodeDragStart:K,onSelectionDragStart:j}=o.getState();_.current=!0;const W=a?K:tA(j);(!s||!i)&&!P&&a&&(I.get(a)?.selected||B()),a&&i&&s&&k6({id:a,store:o,nodeRef:e});const D=C(L);if(f.current=D,u.current=qze(I,H,D,a),W&&u.current){const[U,Y]=eA({nodeId:a,dragItems:u.current,nodeInternals:I});W(L.sourceEvent,U,Y)}};if(t)T.on(".drag",null);else{const L=Z9e().on("start",I=>{const{domNode:P,nodeDragThreshold:H}=o.getState();H===0&&N(I),S.current=!1;const B=C(I);f.current=B,m.current=P?.getBoundingClientRect()||null,b.current=Pc(I.sourceEvent,m.current)}).on("drag",I=>{const P=C(I),{autoPanOnNodeDrag:H,nodeDragThreshold:B}=o.getState();if(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1&&(S.current=!0),!S.current){if(!y.current&&_.current&&H&&(y.current=!0,k()),!_.current){const K=P.xSnapped-(f?.current?.x??0),j=P.ySnapped-(f?.current?.y??0);Math.sqrt(K*K+j*j)>B&&N(I)}(f.current.x!==P.xSnapped||f.current.y!==P.ySnapped)&&u.current&&_.current&&(v.current=I.sourceEvent,b.current=Pc(I.sourceEvent,m.current),A(P))}}).on("end",I=>{if(!(!_.current||S.current)&&(c(!1),y.current=!1,_.current=!1,cancelAnimationFrame(p.current),u.current)){const{updateNodePositions:P,nodeInternals:H,onNodeDragStop:B,onSelectionDragStop:K}=o.getState(),j=a?B:tA(K);if(P(u.current,!1,!1),j){const[W,D]=eA({nodeId:a,dragItems:u.current,nodeInternals:H});j(I.sourceEvent,W,D)}}}).filter(I=>{const P=I.target;return!I.button&&(!r||!tV(P,`.${r}`,e))&&(!n||tV(P,n,e))});return T.call(L),()=>{T.on(".drag",null)}}}},[e,t,r,n,i,o,a,s,C]),l}function boe(){const e=ra();return E.useCallback(r=>{const{nodeInternals:n,nodeExtent:a,updateNodePositions:i,getNodes:s,snapToGrid:o,snapGrid:l,onError:c,nodesDraggable:u}=e.getState(),f=s().filter(S=>S.selected&&(S.draggable||u&&typeof S.draggable>"u")),p=o?l[0]:5,m=o?l[1]:5,b=r.isShiftPressed?4:1,v=r.x*p*b,y=r.y*m*b,_=f.map(S=>{if(S.positionAbsolute){const C={x:S.positionAbsolute.x+v,y:S.positionAbsolute.y+y};o&&(C.x=l[0]*Math.round(C.x/l[0]),C.y=l[1]*Math.round(C.y/l[1]));const{positionAbsolute:T,position:A}=goe(S,C,n,a,void 0,c);S.position=A,S.positionAbsolute=T}return S});i(_,!0,!1)},[])}const qf={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Wh=e=>{const t=({id:r,type:n,data:a,xPos:i,yPos:s,xPosOrigin:o,yPosOrigin:l,selected:c,onClick:u,onMouseEnter:f,onMouseMove:p,onMouseLeave:m,onContextMenu:b,onDoubleClick:v,style:y,className:_,isDraggable:S,isSelectable:C,isConnectable:T,isFocusable:A,selectNodesOnDrag:k,sourcePosition:N,targetPosition:L,hidden:I,resizeObserver:P,dragHandle:H,zIndex:B,isParent:K,noDragClassName:j,noPanClassName:W,initialized:D,disableKeyboardA11y:U,ariaLabel:Y,rfId:z,hasHandleBounds:M})=>{const Q=ra(),q=E.useRef(null),F=E.useRef(null),V=E.useRef(N),Z=E.useRef(L),ee=E.useRef(n),te=C||S||u||f||p||m,oe=boe(),pe=Vh(r,Q.getState,f),he=Vh(r,Q.getState,p),ke=Vh(r,Q.getState,m),se=Vh(r,Q.getState,b),qe=Vh(r,Q.getState,v),$e=xe=>{const{nodeDragThreshold:ve}=Q.getState();if(C&&(!k||!S||ve>0)&&k6({id:r,store:Q,nodeRef:q}),u){const Ne=Q.getState().nodeInternals.get(r);Ne&&u(xe,{...Ne})}},Pe=xe=>{if(!E6(xe)&&!U)if($se.includes(xe.key)&&C){const ve=xe.key==="Escape";k6({id:r,store:Q,unselect:ve,nodeRef:q})}else S&&c&&Object.prototype.hasOwnProperty.call(qf,xe.key)&&(Q.setState({ariaLiveMessage:`Moved selected node ${xe.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~s}`}),oe({x:qf[xe.key].x,y:qf[xe.key].y,isShiftPressed:xe.shiftKey}))};E.useEffect(()=>()=>{F.current&&(P?.unobserve(F.current),F.current=null)},[]),E.useEffect(()=>{if(q.current&&!I){const xe=q.current;(!D||!M||F.current!==xe)&&(F.current&&P?.unobserve(F.current),P?.observe(xe),F.current=xe)}},[I,D,M]),E.useEffect(()=>{const xe=ee.current!==n,ve=V.current!==N,Ne=Z.current!==L;q.current&&(xe||ve||Ne)&&(xe&&(ee.current=n),ve&&(V.current=N),Ne&&(Z.current=L),Q.getState().updateNodeDimensions([{id:r,nodeElement:q.current,forceUpdate:!0}]))},[r,n,N,L]);const Ce=voe({nodeRef:q,disabled:I||!S,noDragClassName:j,handleSelector:H,nodeId:r,isSelectable:C,selectNodesOnDrag:k});return I?null:ye.createElement("div",{className:di(["react-flow__node",`react-flow__node-${n}`,{[W]:S},_,{selected:c,selectable:C,parent:K,dragging:Ce}]),ref:q,style:{zIndex:B,transform:`translate(${o}px,${l}px)`,pointerEvents:te?"all":"none",visibility:D?"visible":"hidden",...y},"data-id":r,"data-testid":`rf__node-${r}`,onMouseEnter:pe,onMouseMove:he,onMouseLeave:ke,onContextMenu:se,onClick:$e,onDoubleClick:qe,onKeyDown:A?Pe:void 0,tabIndex:A?0:void 0,role:A?"button":void 0,"aria-describedby":U?void 0:`${coe}-${z}`,"aria-label":Y},ye.createElement(rze,{value:r},ye.createElement(e,{id:r,data:a,type:n,xPos:i,yPos:s,selected:c,isConnectable:T,sourcePosition:N,targetPosition:L,dragging:Ce,dragHandle:H,zIndex:B})))};return t.displayName="NodeWrapper",E.memo(t)};const Hze=e=>{const t=e.getNodes().filter(r=>r.selected);return{...iI(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function Gze({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:r}){const n=ra(),{width:a,height:i,x:s,y:o,transformString:l,userSelectionActive:c}=mn(Hze,li),u=boe(),f=E.useRef(null);if(E.useEffect(()=>{r||f.current?.focus({preventScroll:!0})},[r]),voe({nodeRef:f}),c||!a||!i)return null;const p=e?b=>{const v=n.getState().getNodes().filter(y=>y.selected);e(b,v)}:void 0,m=b=>{Object.prototype.hasOwnProperty.call(qf,b.key)&&u({x:qf[b.key].x,y:qf[b.key].y,isShiftPressed:b.shiftKey})};return ye.createElement("div",{className:di(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l}},ye.createElement("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:r?void 0:-1,onKeyDown:r?void 0:m,style:{width:a,height:i,top:o,left:s}}))}var Vze=E.memo(Gze);const Wze=e=>e.nodesSelectionActive,xoe=({children:e,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,deleteKeyCode:o,onMove:l,onMoveStart:c,onMoveEnd:u,selectionKeyCode:f,selectionOnDrag:p,selectionMode:m,onSelectionStart:b,onSelectionEnd:v,multiSelectionKeyCode:y,panActivationKeyCode:_,zoomActivationKeyCode:S,elementsSelectable:C,zoomOnScroll:T,zoomOnPinch:A,panOnScroll:k,panOnScrollSpeed:N,panOnScrollMode:L,zoomOnDoubleClick:I,panOnDrag:P,defaultViewport:H,translateExtent:B,minZoom:K,maxZoom:j,preventScrolling:W,onSelectionContextMenu:D,noWheelClassName:U,noPanClassName:Y,disableKeyboardA11y:z})=>{const M=mn(Wze),Q=om(f),q=om(_),F=q||P,V=q||k,Z=Q||p&&F!==!0;return Mze({deleteKeyCode:o,multiSelectionKeyCode:y}),ye.createElement(Lze,{onMove:l,onMoveStart:c,onMoveEnd:u,onPaneContextMenu:i,elementsSelectable:C,zoomOnScroll:T,zoomOnPinch:A,panOnScroll:V,panOnScrollSpeed:N,panOnScrollMode:L,zoomOnDoubleClick:I,panOnDrag:!Q&&F,defaultViewport:H,translateExtent:B,minZoom:K,maxZoom:j,zoomActivationKeyCode:S,preventScrolling:W,noWheelClassName:U,noPanClassName:Y},ye.createElement(poe,{onSelectionStart:b,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:F,isSelecting:!!Z,selectionMode:m},e,M&&ye.createElement(Vze,{onSelectionContextMenu:D,noPanClassName:Y,disableKeyboardA11y:z})))};xoe.displayName="FlowRenderer";var Kze=E.memo(xoe);function Xze(e){return mn(E.useCallback(r=>e?Yse(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):r.getNodes(),[e]))}function Yze(e){const t={input:Wh(e.input||ioe),default:Wh(e.default||A6),output:Wh(e.output||ooe),group:Wh(e.group||oI)},r={},n=Object.keys(e).filter(a=>!["input","default","output","group"].includes(a)).reduce((a,i)=>(a[i]=Wh(e[i]||A6),a),r);return{...t,...n}}const Zze=({x:e,y:t,width:r,height:n,origin:a})=>!r||!n?{x:e,y:t}:a[0]<0||a[1]<0||a[0]>1||a[1]>1?{x:e,y:t}:{x:e-r*a[0],y:t-n*a[1]},Qze=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),yoe=e=>{const{nodesDraggable:t,nodesConnectable:r,nodesFocusable:n,elementsSelectable:a,updateNodeDimensions:i,onError:s}=mn(Qze,li),o=Xze(e.onlyRenderVisibleElements),l=E.useRef(),c=E.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const u=new ResizeObserver(f=>{const p=f.map(m=>({id:m.target.getAttribute("data-id"),nodeElement:m.target,forceUpdate:!0}));i(p)});return l.current=u,u},[]);return E.useEffect(()=>()=>{l?.current?.disconnect()},[]),ye.createElement("div",{className:"react-flow__nodes",style:cI},o.map(u=>{let f=u.type||"default";e.nodeTypes[f]||(s?.("003",Ol.error003(f)),f="default");const p=e.nodeTypes[f]||e.nodeTypes.default,m=!!(u.draggable||t&&typeof u.draggable>"u"),b=!!(u.selectable||a&&typeof u.selectable>"u"),v=!!(u.connectable||r&&typeof u.connectable>"u"),y=!!(u.focusable||n&&typeof u.focusable>"u"),_=e.nodeExtent?JO(u.positionAbsolute,e.nodeExtent):u.positionAbsolute,S=_?.x??0,C=_?.y??0,T=Zze({x:S,y:C,width:u.width??0,height:u.height??0,origin:e.nodeOrigin});return ye.createElement(p,{key:u.id,id:u.id,className:u.className,style:u.style,type:f,data:u.data,sourcePosition:u.sourcePosition||xt.Bottom,targetPosition:u.targetPosition||xt.Top,hidden:u.hidden,xPos:S,yPos:C,xPosOrigin:T.x,yPosOrigin:T.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!u.selected,isDraggable:m,isSelectable:b,isConnectable:v,isFocusable:y,resizeObserver:c,dragHandle:u.dragHandle,zIndex:u[hn]?.z??0,isParent:!!u[hn]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!u.width&&!!u.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:u.ariaLabel,hasHandleBounds:!!u[hn]?.handleBounds})}))};yoe.displayName="NodeRenderer";var Jze=E.memo(yoe);const eje=(e,t,r)=>r===xt.Left?e-t:r===xt.Right?e+t:e,tje=(e,t,r)=>r===xt.Top?e-t:r===xt.Bottom?e+t:e,nV="react-flow__edgeupdater",aV=({position:e,centerX:t,centerY:r,radius:n=10,onMouseDown:a,onMouseEnter:i,onMouseOut:s,type:o})=>ye.createElement("circle",{onMouseDown:a,onMouseEnter:i,onMouseOut:s,className:di([nV,`${nV}-${o}`]),cx:eje(t,n,e),cy:tje(r,n,e),r:n,stroke:"transparent",fill:"transparent"}),rje=()=>!0;var bf=e=>{const t=({id:r,className:n,type:a,data:i,onClick:s,onEdgeDoubleClick:o,selected:l,animated:c,label:u,labelStyle:f,labelShowBg:p,labelBgStyle:m,labelBgPadding:b,labelBgBorderRadius:v,style:y,source:_,target:S,sourceX:C,sourceY:T,targetX:A,targetY:k,sourcePosition:N,targetPosition:L,elementsSelectable:I,hidden:P,sourceHandleId:H,targetHandleId:B,onContextMenu:K,onMouseEnter:j,onMouseMove:W,onMouseLeave:D,reconnectRadius:U,onReconnect:Y,onReconnectStart:z,onReconnectEnd:M,markerEnd:Q,markerStart:q,rfId:F,ariaLabel:V,isFocusable:Z,isReconnectable:ee,pathOptions:te,interactionWidth:oe,disableKeyboardA11y:pe})=>{const he=E.useRef(null),[ke,se]=E.useState(!1),[qe,$e]=E.useState(!1),Pe=ra(),Ce=E.useMemo(()=>`url('#${C6(q,F)}')`,[q,F]),xe=E.useMemo(()=>`url('#${C6(Q,F)}')`,[Q,F]);if(P)return null;const ve=bt=>{const{edges:et,addSelectedEdges:ft,unselectNodesAndEdges:zt,multiSelectionActive:Cr}=Pe.getState(),Xt=et.find($r=>$r.id===r);Xt&&(I&&(Pe.setState({nodesSelectionActive:!1}),Xt.selected&&Cr?(zt({nodes:[],edges:[Xt]}),he.current?.blur()):ft([r])),s&&s(bt,Xt))},Ne=Gh(r,Pe.getState,o),Ue=Gh(r,Pe.getState,K),Le=Gh(r,Pe.getState,j),Ye=Gh(r,Pe.getState,W),De=Gh(r,Pe.getState,D),Ve=(bt,et)=>{if(bt.button!==0)return;const{edges:ft,isValidConnection:zt}=Pe.getState(),Cr=et?S:_,Xt=(et?B:H)||null,$r=et?"target":"source",on=zt||rje,qi=et,qa=ft.find(tn=>tn.id===r);$e(!0),z?.(bt,qa,$r);const _s=tn=>{$e(!1),M?.(tn,qa,$r)};toe({event:bt,handleId:Xt,nodeId:Cr,onConnect:tn=>Y?.(qa,tn),isTarget:qi,getState:Pe.getState,setState:Pe.setState,isValidConnection:on,edgeUpdaterType:$r,onReconnectEnd:_s})},lt=bt=>Ve(bt,!0),Ee=bt=>Ve(bt,!1),Ae=()=>se(!0),Ze=()=>se(!1),rt=!I&&!s,at=bt=>{if(!pe&&$se.includes(bt.key)&&I){const{unselectNodesAndEdges:et,addSelectedEdges:ft,edges:zt}=Pe.getState();bt.key==="Escape"?(he.current?.blur(),et({edges:[zt.find(Xt=>Xt.id===r)]})):ft([r])}};return ye.createElement("g",{className:di(["react-flow__edge",`react-flow__edge-${a}`,n,{selected:l,animated:c,inactive:rt,updating:ke}]),onClick:ve,onDoubleClick:Ne,onContextMenu:Ue,onMouseEnter:Le,onMouseMove:Ye,onMouseLeave:De,onKeyDown:Z?at:void 0,tabIndex:Z?0:void 0,role:Z?"button":"img","data-testid":`rf__edge-${r}`,"aria-label":V===null?void 0:V||`Edge from ${_} to ${S}`,"aria-describedby":Z?`${uoe}-${F}`:void 0,ref:he},!qe&&ye.createElement(e,{id:r,source:_,target:S,selected:l,animated:c,label:u,labelStyle:f,labelShowBg:p,labelBgStyle:m,labelBgPadding:b,labelBgBorderRadius:v,data:i,style:y,sourceX:C,sourceY:T,targetX:A,targetY:k,sourcePosition:N,targetPosition:L,sourceHandleId:H,targetHandleId:B,markerStart:Ce,markerEnd:xe,pathOptions:te,interactionWidth:oe}),ee&&ye.createElement(ye.Fragment,null,(ee==="source"||ee===!0)&&ye.createElement(aV,{position:N,centerX:C,centerY:T,radius:U,onMouseDown:lt,onMouseEnter:Ae,onMouseOut:Ze,type:"source"}),(ee==="target"||ee===!0)&&ye.createElement(aV,{position:L,centerX:A,centerY:k,radius:U,onMouseDown:Ee,onMouseEnter:Ae,onMouseOut:Ze,type:"target"})))};return t.displayName="EdgeWrapper",E.memo(t)};function nje(e){const t={default:bf(e.default||Db),straight:bf(e.bezier||nI),step:bf(e.step||rI),smoothstep:bf(e.step||Gx),simplebezier:bf(e.simplebezier||tI)},r={},n=Object.keys(e).filter(a=>!["default","bezier"].includes(a)).reduce((a,i)=>(a[i]=bf(e[i]||Db),a),r);return{...t,...n}}function iV(e,t,r=null){const n=(r?.x||0)+t.x,a=(r?.y||0)+t.y,i=r?.width||t.width,s=r?.height||t.height;switch(e){case xt.Top:return{x:n+i/2,y:a};case xt.Right:return{x:n+i,y:a+s/2};case xt.Bottom:return{x:n+i/2,y:a+s};case xt.Left:return{x:n,y:a+s/2}}}function sV(e,t){return e?e.length===1||!t?e[0]:t&&e.find(r=>r.id===t)||null:null}const aje=(e,t,r,n,a,i)=>{const s=iV(r,e,t),o=iV(i,n,a);return{sourceX:s.x,sourceY:s.y,targetX:o.x,targetY:o.y}};function ije({sourcePos:e,targetPos:t,sourceWidth:r,sourceHeight:n,targetWidth:a,targetHeight:i,width:s,height:o,transform:l}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+r,t.x+a),y2:Math.max(e.y+n,t.y+i)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u=eI({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:s/l[2],height:o/l[2]}),f=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),p=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(f*p)>0}function oV(e){const t=e?.[hn]?.handleBounds||null,r=t&&e?.width&&e?.height&&typeof e?.positionAbsolute?.x<"u"&&typeof e?.positionAbsolute?.y<"u";return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!r]}const sje=[{level:0,isMaxLevel:!0,edges:[]}];function oje(e,t,r=!1){let n=-1;const a=e.reduce((s,o)=>{const l=os(o.zIndex);let c=l?o.zIndex:0;if(r){const u=t.get(o.target),f=t.get(o.source),p=o.selected||u?.selected||f?.selected,m=Math.max(f?.[hn]?.z||0,u?.[hn]?.z||0,1e3);c=(l?o.zIndex:0)+(p?m:0)}return s[c]?s[c].push(o):s[c]=[o],n=c>n?c:n,s},{}),i=Object.entries(a).map(([s,o])=>{const l=+s;return{edges:o,level:l,isMaxLevel:l===n}});return i.length===0?sje:i}function lje(e,t,r){const n=mn(E.useCallback(a=>e?a.edges.filter(i=>{const s=t.get(i.source),o=t.get(i.target);return s?.width&&s?.height&&o?.width&&o?.height&&ije({sourcePos:s.positionAbsolute||{x:0,y:0},targetPos:o.positionAbsolute||{x:0,y:0},sourceWidth:s.width,sourceHeight:s.height,targetWidth:o.width,targetHeight:o.height,width:a.width,height:a.height,transform:a.transform})}):a.edges,[e,t]));return oje(n,t,r)}const cje=({color:e="none",strokeWidth:t=1})=>ye.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),uje=({color:e="none",strokeWidth:t=1})=>ye.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),lV={[ba.Arrow]:cje,[ba.ArrowClosed]:uje};function dje(e){const t=ra();return E.useMemo(()=>Object.prototype.hasOwnProperty.call(lV,e)?lV[e]:(t.getState().onError?.("009",Ol.error009(e)),null),[e])}const fje=({id:e,type:t,color:r,width:n=12.5,height:a=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:o="auto-start-reverse"})=>{const l=dje(t);return l?ye.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${n}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:o,refX:"0",refY:"0"},ye.createElement(l,{color:r,strokeWidth:s})):null},hje=({defaultColor:e,rfId:t})=>r=>{const n=[];return r.edges.reduce((a,i)=>([i.markerStart,i.markerEnd].forEach(s=>{if(s&&typeof s=="object"){const o=C6(s,t);n.includes(o)||(a.push({id:o,color:s.color||e,...s}),n.push(o))}}),a),[]).sort((a,i)=>a.id.localeCompare(i.id))},_oe=({defaultColor:e,rfId:t})=>{const r=mn(E.useCallback(hje({defaultColor:e,rfId:t}),[e,t]),(n,a)=>!(n.length!==a.length||n.some((i,s)=>i.id!==a[s].id)));return ye.createElement("defs",null,r.map(n=>ye.createElement(fje,{id:n.id,key:n.id,type:n.type,color:n.color,width:n.width,height:n.height,markerUnits:n.markerUnits,strokeWidth:n.strokeWidth,orient:n.orient})))};_oe.displayName="MarkerDefinitions";var pje=E.memo(_oe);const mje=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),woe=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:r,rfId:n,edgeTypes:a,noPanClassName:i,onEdgeContextMenu:s,onEdgeMouseEnter:o,onEdgeMouseMove:l,onEdgeMouseLeave:c,onEdgeClick:u,onEdgeDoubleClick:f,onReconnect:p,onReconnectStart:m,onReconnectEnd:b,reconnectRadius:v,children:y,disableKeyboardA11y:_})=>{const{edgesFocusable:S,edgesUpdatable:C,elementsSelectable:T,width:A,height:k,connectionMode:N,nodeInternals:L,onError:I}=mn(mje,li),P=lje(t,L,r);return A?ye.createElement(ye.Fragment,null,P.map(({level:H,edges:B,isMaxLevel:K})=>ye.createElement("svg",{key:H,style:{zIndex:H},width:A,height:k,className:"react-flow__edges react-flow__container"},K&&ye.createElement(pje,{defaultColor:e,rfId:n}),ye.createElement("g",null,B.map(j=>{const[W,D,U]=oV(L.get(j.source)),[Y,z,M]=oV(L.get(j.target));if(!U||!M)return null;let Q=j.type||"default";a[Q]||(I?.("011",Ol.error011(Q)),Q="default");const q=a[Q]||a.default,F=N===Qu.Strict?z.target:(z.target??[]).concat(z.source??[]),V=sV(D.source,j.sourceHandle),Z=sV(F,j.targetHandle),ee=V?.position||xt.Bottom,te=Z?.position||xt.Top,oe=!!(j.focusable||S&&typeof j.focusable>"u"),pe=j.reconnectable||j.updatable,he=typeof p<"u"&&(pe||C&&typeof pe>"u");if(!V||!Z)return I?.("008",Ol.error008(V,j)),null;const{sourceX:ke,sourceY:se,targetX:qe,targetY:$e}=aje(W,V,ee,Y,Z,te);return ye.createElement(q,{key:j.id,id:j.id,className:di([j.className,i]),type:Q,data:j.data,selected:!!j.selected,animated:!!j.animated,hidden:!!j.hidden,label:j.label,labelStyle:j.labelStyle,labelShowBg:j.labelShowBg,labelBgStyle:j.labelBgStyle,labelBgPadding:j.labelBgPadding,labelBgBorderRadius:j.labelBgBorderRadius,style:j.style,source:j.source,target:j.target,sourceHandleId:j.sourceHandle,targetHandleId:j.targetHandle,markerEnd:j.markerEnd,markerStart:j.markerStart,sourceX:ke,sourceY:se,targetX:qe,targetY:$e,sourcePosition:ee,targetPosition:te,elementsSelectable:T,onContextMenu:s,onMouseEnter:o,onMouseMove:l,onMouseLeave:c,onClick:u,onEdgeDoubleClick:f,onReconnect:p,onReconnectStart:m,onReconnectEnd:b,reconnectRadius:v,rfId:n,ariaLabel:j.ariaLabel,isFocusable:oe,isReconnectable:he,pathOptions:"pathOptions"in j?j.pathOptions:void 0,interactionWidth:j.interactionWidth,disableKeyboardA11y:_})})))),y):null};woe.displayName="EdgeRenderer";var gje=E.memo(woe);const vje=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function bje({children:e}){const t=mn(vje);return ye.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function xje(e){const t=lI(),r=E.useRef(!1);E.useEffect(()=>{!r.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),r.current=!0)},[e,t.viewportInitialized])}const yje={[xt.Left]:xt.Right,[xt.Right]:xt.Left,[xt.Top]:xt.Bottom,[xt.Bottom]:xt.Top},Eoe=({nodeId:e,handleType:t,style:r,type:n=Cc.Bezier,CustomComponent:a,connectionStatus:i})=>{const{fromNode:s,handleId:o,toX:l,toY:c,connectionMode:u}=mn(E.useCallback(k=>({fromNode:k.nodeInternals.get(e),handleId:k.connectionHandleId,toX:(k.connectionPosition.x-k.transform[0])/k.transform[2],toY:(k.connectionPosition.y-k.transform[1])/k.transform[2],connectionMode:k.connectionMode}),[e]),li),f=s?.[hn]?.handleBounds;let p=f?.[t];if(u===Qu.Loose&&(p=p||f?.[t==="source"?"target":"source"]),!s||!p)return null;const m=o?p.find(k=>k.id===o):p[0],b=m?m.x+m.width/2:(s.width??0)/2,v=m?m.y+m.height/2:s.height??0,y=(s.positionAbsolute?.x??0)+b,_=(s.positionAbsolute?.y??0)+v,S=m?.position,C=S?yje[S]:null;if(!S||!C)return null;if(a)return ye.createElement(a,{connectionLineType:n,connectionLineStyle:r,fromNode:s,fromHandle:m,fromX:y,fromY:_,toX:l,toY:c,fromPosition:S,toPosition:C,connectionStatus:i});let T="";const A={sourceX:y,sourceY:_,sourcePosition:S,targetX:l,targetY:c,targetPosition:C};return n===Cc.Bezier?[T]=Kse(A):n===Cc.Step?[T]=S6({...A,borderRadius:0}):n===Cc.SmoothStep?[T]=S6(A):n===Cc.SimpleBezier?[T]=Wse(A):T=`M${y},${_} ${l},${c}`,ye.createElement("path",{d:T,fill:"none",className:"react-flow__connection-path",style:r})};Eoe.displayName="ConnectionLine";const _je=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function wje({containerStyle:e,style:t,type:r,component:n}){const{nodeId:a,handleType:i,nodesConnectable:s,width:o,height:l,connectionStatus:c}=mn(_je,li);return!(a&&i&&o&&s)?null:ye.createElement("svg",{style:e,width:o,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},ye.createElement("g",{className:di(["react-flow__connection",c])},ye.createElement(Eoe,{nodeId:a,handleType:i,style:t,type:r,CustomComponent:n,connectionStatus:c})))}function cV(e,t){return E.useRef(null),ra(),E.useMemo(()=>t(e),[e])}const Soe=({nodeTypes:e,edgeTypes:t,onMove:r,onMoveStart:n,onMoveEnd:a,onInit:i,onNodeClick:s,onEdgeClick:o,onNodeDoubleClick:l,onEdgeDoubleClick:c,onNodeMouseEnter:u,onNodeMouseMove:f,onNodeMouseLeave:p,onNodeContextMenu:m,onSelectionContextMenu:b,onSelectionStart:v,onSelectionEnd:y,connectionLineType:_,connectionLineStyle:S,connectionLineComponent:C,connectionLineContainerStyle:T,selectionKeyCode:A,selectionOnDrag:k,selectionMode:N,multiSelectionKeyCode:L,panActivationKeyCode:I,zoomActivationKeyCode:P,deleteKeyCode:H,onlyRenderVisibleElements:B,elementsSelectable:K,selectNodesOnDrag:j,defaultViewport:W,translateExtent:D,minZoom:U,maxZoom:Y,preventScrolling:z,defaultMarkerColor:M,zoomOnScroll:Q,zoomOnPinch:q,panOnScroll:F,panOnScrollSpeed:V,panOnScrollMode:Z,zoomOnDoubleClick:ee,panOnDrag:te,onPaneClick:oe,onPaneMouseEnter:pe,onPaneMouseMove:he,onPaneMouseLeave:ke,onPaneScroll:se,onPaneContextMenu:qe,onEdgeContextMenu:$e,onEdgeMouseEnter:Pe,onEdgeMouseMove:Ce,onEdgeMouseLeave:xe,onReconnect:ve,onReconnectStart:Ne,onReconnectEnd:Ue,reconnectRadius:Le,noDragClassName:Ye,noWheelClassName:De,noPanClassName:Ve,elevateEdgesOnSelect:lt,disableKeyboardA11y:Ee,nodeOrigin:Ae,nodeExtent:Ze,rfId:rt})=>{const at=cV(e,Yze),bt=cV(t,nje);return xje(i),ye.createElement(Kze,{onPaneClick:oe,onPaneMouseEnter:pe,onPaneMouseMove:he,onPaneMouseLeave:ke,onPaneContextMenu:qe,onPaneScroll:se,deleteKeyCode:H,selectionKeyCode:A,selectionOnDrag:k,selectionMode:N,onSelectionStart:v,onSelectionEnd:y,multiSelectionKeyCode:L,panActivationKeyCode:I,zoomActivationKeyCode:P,elementsSelectable:K,onMove:r,onMoveStart:n,onMoveEnd:a,zoomOnScroll:Q,zoomOnPinch:q,zoomOnDoubleClick:ee,panOnScroll:F,panOnScrollSpeed:V,panOnScrollMode:Z,panOnDrag:te,defaultViewport:W,translateExtent:D,minZoom:U,maxZoom:Y,onSelectionContextMenu:b,preventScrolling:z,noDragClassName:Ye,noWheelClassName:De,noPanClassName:Ve,disableKeyboardA11y:Ee},ye.createElement(bje,null,ye.createElement(gje,{edgeTypes:bt,onEdgeClick:o,onEdgeDoubleClick:c,onlyRenderVisibleElements:B,onEdgeContextMenu:$e,onEdgeMouseEnter:Pe,onEdgeMouseMove:Ce,onEdgeMouseLeave:xe,onReconnect:ve,onReconnectStart:Ne,onReconnectEnd:Ue,reconnectRadius:Le,defaultMarkerColor:M,noPanClassName:Ve,elevateEdgesOnSelect:!!lt,disableKeyboardA11y:Ee,rfId:rt},ye.createElement(wje,{style:S,type:_,component:C,containerStyle:T})),ye.createElement("div",{className:"react-flow__edgelabel-renderer"}),ye.createElement(Jze,{nodeTypes:at,onNodeClick:s,onNodeDoubleClick:l,onNodeMouseEnter:u,onNodeMouseMove:f,onNodeMouseLeave:p,onNodeContextMenu:m,selectNodesOnDrag:j,onlyRenderVisibleElements:B,noPanClassName:Ve,noDragClassName:Ye,disableKeyboardA11y:Ee,nodeOrigin:Ae,nodeExtent:Ze,rfId:rt})))};Soe.displayName="GraphView";var Eje=E.memo(Soe);const N6=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],xc={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:N6,nodeExtent:N6,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Qu.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:YBe,isValidConnection:void 0},Sje=()=>cPe((e,t)=>({...xc,setNodes:r=>{const{nodeInternals:n,nodeOrigin:a,elevateNodesOnSelect:i}=t();e({nodeInternals:Q4(r,n,a,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:r=>{const{defaultEdgeOptions:n={}}=t();e({edges:r.map(a=>({...n,...a}))})},setDefaultNodesAndEdges:(r,n)=>{const a=typeof r<"u",i=typeof n<"u",s=a?Q4(r,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:s,edges:i?n:[],hasDefaultNodes:a,hasDefaultEdges:i})},updateNodeDimensions:r=>{const{onNodesChange:n,nodeInternals:a,fitViewOnInit:i,fitViewOnInitDone:s,fitViewOnInitOptions:o,domNode:l,nodeOrigin:c}=t(),u=l?.querySelector(".react-flow__viewport");if(!u)return;const f=window.getComputedStyle(u),{m22:p}=new window.DOMMatrixReadOnly(f.transform),m=r.reduce((v,y)=>{const _=a.get(y.id);if(_?.hidden)a.set(_.id,{..._,[hn]:{..._[hn],handleBounds:void 0}});else if(_){const S=QO(y.nodeElement);!!(S.width&&S.height&&(_.width!==S.width||_.height!==S.height||y.forceUpdate))&&(a.set(_.id,{..._,[hn]:{..._[hn],handleBounds:{source:rV(".source",y.nodeElement,p,c),target:rV(".target",y.nodeElement,p,c)}},...S}),v.push({id:_.id,type:"dimensions",dimensions:S}))}return v},[]);foe(a,c);const b=s||i&&!s&&hoe(t,{initial:!0,...o});e({nodeInternals:new Map(a),fitViewOnInitDone:b}),m?.length>0&&n?.(m)},updateNodePositions:(r,n=!0,a=!1)=>{const{triggerNodeChanges:i}=t(),s=r.map(o=>{const l={id:o.id,type:"position",dragging:a};return n&&(l.positionAbsolute=o.positionAbsolute,l.position=o.position),l});i(s)},triggerNodeChanges:r=>{const{onNodesChange:n,nodeInternals:a,hasDefaultNodes:i,nodeOrigin:s,getNodes:o,elevateNodesOnSelect:l}=t();if(r?.length){if(i){const c=zze(r,o()),u=Q4(c,a,s,l);e({nodeInternals:u})}n?.(r)}},addSelectedNodes:r=>{const{multiSelectionActive:n,edges:a,getNodes:i}=t();let s,o=null;n?s=r.map(l=>Sc(l,!0)):(s=kf(i(),r),o=kf(a,[])),u1({changedNodes:s,changedEdges:o,get:t,set:e})},addSelectedEdges:r=>{const{multiSelectionActive:n,edges:a,getNodes:i}=t();let s,o=null;n?s=r.map(l=>Sc(l,!0)):(s=kf(a,r),o=kf(i(),[])),u1({changedNodes:o,changedEdges:s,get:t,set:e})},unselectNodesAndEdges:({nodes:r,edges:n}={})=>{const{edges:a,getNodes:i}=t(),s=r||i(),o=n||a,l=s.map(u=>(u.selected=!1,Sc(u.id,!1))),c=o.map(u=>Sc(u.id,!1));u1({changedNodes:l,changedEdges:c,get:t,set:e})},setMinZoom:r=>{const{d3Zoom:n,maxZoom:a}=t();n?.scaleExtent([r,a]),e({minZoom:r})},setMaxZoom:r=>{const{d3Zoom:n,minZoom:a}=t();n?.scaleExtent([a,r]),e({maxZoom:r})},setTranslateExtent:r=>{t().d3Zoom?.translateExtent(r),e({translateExtent:r})},resetSelectedElements:()=>{const{edges:r,getNodes:n}=t(),i=n().filter(o=>o.selected).map(o=>Sc(o.id,!1)),s=r.filter(o=>o.selected).map(o=>Sc(o.id,!1));u1({changedNodes:i,changedEdges:s,get:t,set:e})},setNodeExtent:r=>{const{nodeInternals:n}=t();n.forEach(a=>{a.positionAbsolute=JO(a.position,r)}),e({nodeExtent:r,nodeInternals:new Map(n)})},panBy:r=>{const{transform:n,width:a,height:i,d3Zoom:s,d3Selection:o,translateExtent:l}=t();if(!s||!o||!r.x&&!r.y)return!1;const c=Lc.translate(n[0]+r.x,n[1]+r.y).scale(n[2]),u=[[0,0],[a,i]],f=s?.constrain()(c,u,l);return s.transform(o,f),n[0]!==f.x||n[1]!==f.y||n[2]!==f.k},cancelConnection:()=>e({connectionNodeId:xc.connectionNodeId,connectionHandleId:xc.connectionHandleId,connectionHandleType:xc.connectionHandleType,connectionStatus:xc.connectionStatus,connectionStartHandle:xc.connectionStartHandle,connectionEndHandle:xc.connectionEndHandle}),reset:()=>e({...xc})}),Object.is),Coe=({children:e})=>{const t=E.useRef(null);return t.current||(t.current=Sje()),ye.createElement(UBe,{value:t.current},e)};Coe.displayName="ReactFlowProvider";const Toe=({children:e})=>E.useContext(Hx)?ye.createElement(ye.Fragment,null,e):ye.createElement(Coe,null,e);Toe.displayName="ReactFlowWrapper";const Cje={input:ioe,default:A6,output:ooe,group:oI},Tje={default:Db,straight:nI,step:rI,smoothstep:Gx,simplebezier:tI},Aje=[0,0],kje=[15,15],Nje={x:0,y:0,zoom:1},Rje={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},uI=E.forwardRef(({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,className:a,nodeTypes:i=Cje,edgeTypes:s=Tje,onNodeClick:o,onEdgeClick:l,onInit:c,onMove:u,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:b,onConnectEnd:v,onClickConnectStart:y,onClickConnectEnd:_,onNodeMouseEnter:S,onNodeMouseMove:C,onNodeMouseLeave:T,onNodeContextMenu:A,onNodeDoubleClick:k,onNodeDragStart:N,onNodeDrag:L,onNodeDragStop:I,onNodesDelete:P,onEdgesDelete:H,onSelectionChange:B,onSelectionDragStart:K,onSelectionDrag:j,onSelectionDragStop:W,onSelectionContextMenu:D,onSelectionStart:U,onSelectionEnd:Y,connectionMode:z=Qu.Strict,connectionLineType:M=Cc.Bezier,connectionLineStyle:Q,connectionLineComponent:q,connectionLineContainerStyle:F,deleteKeyCode:V="Backspace",selectionKeyCode:Z="Shift",selectionOnDrag:ee=!1,selectionMode:te=sm.Full,panActivationKeyCode:oe="Space",multiSelectionKeyCode:pe=Mb()?"Meta":"Control",zoomActivationKeyCode:he=Mb()?"Meta":"Control",snapToGrid:ke=!1,snapGrid:se=kje,onlyRenderVisibleElements:qe=!1,selectNodesOnDrag:$e=!0,nodesDraggable:Pe,nodesConnectable:Ce,nodesFocusable:xe,nodeOrigin:ve=Aje,edgesFocusable:Ne,edgesUpdatable:Ue,elementsSelectable:Le,defaultViewport:Ye=Nje,minZoom:De=.5,maxZoom:Ve=2,translateExtent:lt=N6,preventScrolling:Ee=!0,nodeExtent:Ae,defaultMarkerColor:Ze="#b1b1b7",zoomOnScroll:rt=!0,zoomOnPinch:at=!0,panOnScroll:bt=!1,panOnScrollSpeed:et=.5,panOnScrollMode:ft=Pu.Free,zoomOnDoubleClick:zt=!0,panOnDrag:Cr=!0,onPaneClick:Xt,onPaneMouseEnter:$r,onPaneMouseMove:on,onPaneMouseLeave:qi,onPaneScroll:qa,onPaneContextMenu:_s,children:Ua,onEdgeContextMenu:tn,onEdgeDoubleClick:Gl,onEdgeMouseEnter:Pt,onEdgeMouseMove:fr,onEdgeMouseLeave:wr,onEdgeUpdate:Wn,onEdgeUpdateStart:na,onEdgeUpdateEnd:vn,onReconnect:Dr,onReconnectStart:Er,onReconnectEnd:Bn,reconnectRadius:eu=10,edgeUpdaterRadius:z0=10,onNodesChange:ne,onEdgesChange:de,noDragClassName:le="nodrag",noWheelClassName:ce="nowheel",noPanClassName:ue="nopan",fitView:fe=!1,fitViewOptions:Oe,connectOnClick:Ge=!0,attributionPosition:Te,proOptions:Fe,defaultEdgeOptions:ze,elevateNodesOnSelect:Qe=!0,elevateEdgesOnSelect:ot=!1,disableKeyboardA11y:pt=!1,autoPanOnConnect:it=!0,autoPanOnNodeDrag:dt=!0,connectionRadius:Ht=20,isValidConnection:Ar,onError:kr,style:Or,id:Ui,nodeDragThreshold:eo,...$a},fi)=>{const ws=Ui||"1";return ye.createElement("div",{...$a,style:{...Or,...Rje},ref:fi,className:di(["react-flow",a]),"data-testid":"rf__wrapper",id:Ui},ye.createElement(Toe,null,ye.createElement(Eje,{onInit:c,onMove:u,onMoveStart:f,onMoveEnd:p,onNodeClick:o,onEdgeClick:l,onNodeMouseEnter:S,onNodeMouseMove:C,onNodeMouseLeave:T,onNodeContextMenu:A,onNodeDoubleClick:k,nodeTypes:i,edgeTypes:s,connectionLineType:M,connectionLineStyle:Q,connectionLineComponent:q,connectionLineContainerStyle:F,selectionKeyCode:Z,selectionOnDrag:ee,selectionMode:te,deleteKeyCode:V,multiSelectionKeyCode:pe,panActivationKeyCode:oe,zoomActivationKeyCode:he,onlyRenderVisibleElements:qe,selectNodesOnDrag:$e,defaultViewport:Ye,translateExtent:lt,minZoom:De,maxZoom:Ve,preventScrolling:Ee,zoomOnScroll:rt,zoomOnPinch:at,zoomOnDoubleClick:zt,panOnScroll:bt,panOnScrollSpeed:et,panOnScrollMode:ft,panOnDrag:Cr,onPaneClick:Xt,onPaneMouseEnter:$r,onPaneMouseMove:on,onPaneMouseLeave:qi,onPaneScroll:qa,onPaneContextMenu:_s,onSelectionContextMenu:D,onSelectionStart:U,onSelectionEnd:Y,onEdgeContextMenu:tn,onEdgeDoubleClick:Gl,onEdgeMouseEnter:Pt,onEdgeMouseMove:fr,onEdgeMouseLeave:wr,onReconnect:Dr??Wn,onReconnectStart:Er??na,onReconnectEnd:Bn??vn,reconnectRadius:eu??z0,defaultMarkerColor:Ze,noDragClassName:le,noWheelClassName:ce,noPanClassName:ue,elevateEdgesOnSelect:ot,rfId:ws,disableKeyboardA11y:pt,nodeOrigin:ve,nodeExtent:Ae}),ye.createElement(xze,{nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:m,onConnectStart:b,onConnectEnd:v,onClickConnectStart:y,onClickConnectEnd:_,nodesDraggable:Pe,nodesConnectable:Ce,nodesFocusable:xe,edgesFocusable:Ne,edgesUpdatable:Ue,elementsSelectable:Le,elevateNodesOnSelect:Qe,minZoom:De,maxZoom:Ve,nodeExtent:Ae,onNodesChange:ne,onEdgesChange:de,snapToGrid:ke,snapGrid:se,connectionMode:z,translateExtent:lt,connectOnClick:Ge,defaultEdgeOptions:ze,fitView:fe,fitViewOptions:Oe,onNodesDelete:P,onEdgesDelete:H,onNodeDragStart:N,onNodeDrag:L,onNodeDragStop:I,onSelectionDrag:j,onSelectionDragStart:K,onSelectionDragStop:W,noPanClassName:ue,nodeOrigin:ve,rfId:ws,autoPanOnConnect:it,autoPanOnNodeDrag:dt,onError:kr,connectionRadius:Ht,isValidConnection:Ar,nodeDragThreshold:eo}),ye.createElement(vze,{onSelectionChange:B}),Ua,ye.createElement(HBe,{proOptions:Fe,position:Te}),ye.createElement(Sze,{rfId:ws,disableKeyboardA11y:pt})))});uI.displayName="ReactFlow";function Mje(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,a]of e)if(!Object.is(a,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||!Object.is(e[n],t[n]))return!1;return!0}function Dje(){return ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},ye.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function Oje(){return ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},ye.createElement("path",{d:"M0 0h32v4.2H0z"}))}function Ije(){return ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},ye.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function Lje(){return ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},ye.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function Pje(){return ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},ye.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const sp=({children:e,className:t,...r})=>ye.createElement("button",{type:"button",className:di(["react-flow__controls-button",t]),...r},e);sp.displayName="ControlButton";const Fje=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),Aoe=({style:e,showZoom:t=!0,showFitView:r=!0,showInteractive:n=!0,fitViewOptions:a,onZoomIn:i,onZoomOut:s,onFitView:o,onInteractiveChange:l,className:c,children:u,position:f="bottom-left"})=>{const p=ra(),[m,b]=E.useState(!1),{isInteractive:v,minZoomReached:y,maxZoomReached:_}=mn(Fje,Mje),{zoomIn:S,zoomOut:C,fitView:T}=lI();if(E.useEffect(()=>{b(!0)},[]),!m)return null;const A=()=>{S(),i?.()},k=()=>{C(),s?.()},N=()=>{T(a),o?.()},L=()=>{p.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),l?.(!v)};return ye.createElement(jse,{className:di(["react-flow__controls",c]),position:f,style:e,"data-testid":"rf__controls"},t&&ye.createElement(ye.Fragment,null,ye.createElement(sp,{onClick:A,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:_},ye.createElement(Dje,null)),ye.createElement(sp,{onClick:k,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:y},ye.createElement(Oje,null))),r&&ye.createElement(sp,{className:"react-flow__controls-fitview",onClick:N,title:"fit view","aria-label":"fit view"},ye.createElement(Ije,null)),n&&ye.createElement(sp,{className:"react-flow__controls-interactive",onClick:L,title:"toggle interactivity","aria-label":"toggle interactivity"},v?ye.createElement(Pje,null):ye.createElement(Lje,null)),u)};Aoe.displayName="Controls";var koe=E.memo(Aoe);function dI(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var rA,uV;function Bje(){if(uV)return rA;uV=1;function e(){this.__data__=[],this.size=0}return rA=e,rA}var nA,dV;function R0(){if(dV)return nA;dV=1;function e(t,r){return t===r||t!==t&&r!==r}return nA=e,nA}var aA,fV;function Vx(){if(fV)return aA;fV=1;var e=R0();function t(r,n){for(var a=r.length;a--;)if(e(r[a][0],n))return a;return-1}return aA=t,aA}var iA,hV;function zje(){if(hV)return iA;hV=1;var e=Vx(),t=Array.prototype,r=t.splice;function n(a){var i=this.__data__,s=e(i,a);if(s<0)return!1;var o=i.length-1;return s==o?i.pop():r.call(i,s,1),--this.size,!0}return iA=n,iA}var sA,pV;function jje(){if(pV)return sA;pV=1;var e=Vx();function t(r){var n=this.__data__,a=e(n,r);return a<0?void 0:n[a][1]}return sA=t,sA}var oA,mV;function qje(){if(mV)return oA;mV=1;var e=Vx();function t(r){return e(this.__data__,r)>-1}return oA=t,oA}var lA,gV;function Uje(){if(gV)return lA;gV=1;var e=Vx();function t(r,n){var a=this.__data__,i=e(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return lA=t,lA}var cA,vV;function Wx(){if(vV)return cA;vV=1;var e=Bje(),t=zje(),r=jje(),n=qje(),a=Uje();function i(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var c=s[o];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,cA=i,cA}var uA,bV;function $je(){if(bV)return uA;bV=1;var e=Wx();function t(){this.__data__=new e,this.size=0}return uA=t,uA}var dA,xV;function Hje(){if(xV)return dA;xV=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return dA=e,dA}var fA,yV;function Gje(){if(yV)return fA;yV=1;function e(t){return this.__data__.get(t)}return fA=e,fA}var hA,_V;function Vje(){if(_V)return hA;_V=1;function e(t){return this.__data__.has(t)}return hA=e,hA}var pA,wV;function Noe(){if(wV)return pA;wV=1;var e=typeof Tv=="object"&&Tv&&Tv.Object===Object&&Tv;return pA=e,pA}var mA,EV;function Js(){if(EV)return mA;EV=1;var e=Noe(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return mA=r,mA}var gA,SV;function M0(){if(SV)return gA;SV=1;var e=Js(),t=e.Symbol;return gA=t,gA}var vA,CV;function Wje(){if(CV)return vA;CV=1;var e=M0(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function i(s){var o=r.call(s,a),l=s[a];try{s[a]=void 0;var c=!0}catch{}var u=n.call(s);return c&&(o?s[a]=l:delete s[a]),u}return vA=i,vA}var bA,TV;function Kje(){if(TV)return bA;TV=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return bA=r,bA}var xA,AV;function pd(){if(AV)return xA;AV=1;var e=M0(),t=Wje(),r=Kje(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function s(o){return o==null?o===void 0?a:n:i&&i in Object(o)?t(o):r(o)}return xA=s,xA}var yA,kV;function bs(){if(kV)return yA;kV=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return yA=e,yA}var _A,NV;function Zm(){if(NV)return _A;NV=1;var e=pd(),t=bs(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function s(o){if(!t(o))return!1;var l=e(o);return l==n||l==a||l==r||l==i}return _A=s,_A}var wA,RV;function Xje(){if(RV)return wA;RV=1;var e=Js(),t=e["__core-js_shared__"];return wA=t,wA}var EA,MV;function Yje(){if(MV)return EA;MV=1;var e=Xje(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return EA=r,EA}var SA,DV;function Roe(){if(DV)return SA;DV=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return SA=r,SA}var CA,OV;function Zje(){if(OV)return CA;OV=1;var e=Zm(),t=Yje(),r=bs(),n=Roe(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,o=Object.prototype,l=s.toString,c=o.hasOwnProperty,u=RegExp("^"+l.call(c).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!r(p)||t(p))return!1;var m=e(p)?u:i;return m.test(n(p))}return CA=f,CA}var TA,IV;function Qje(){if(IV)return TA;IV=1;function e(t,r){return t?.[r]}return TA=e,TA}var AA,LV;function md(){if(LV)return AA;LV=1;var e=Zje(),t=Qje();function r(n,a){var i=t(n,a);return e(i)?i:void 0}return AA=r,AA}var kA,PV;function fI(){if(PV)return kA;PV=1;var e=md(),t=Js(),r=e(t,"Map");return kA=r,kA}var NA,FV;function Kx(){if(FV)return NA;FV=1;var e=md(),t=e(Object,"create");return NA=t,NA}var RA,BV;function Jje(){if(BV)return RA;BV=1;var e=Kx();function t(){this.__data__=e?e(null):{},this.size=0}return RA=t,RA}var MA,zV;function eqe(){if(zV)return MA;zV=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return MA=e,MA}var DA,jV;function tqe(){if(jV)return DA;jV=1;var e=Kx(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var s=this.__data__;if(e){var o=s[i];return o===t?void 0:o}return n.call(s,i)?s[i]:void 0}return DA=a,DA}var OA,qV;function rqe(){if(qV)return OA;qV=1;var e=Kx(),t=Object.prototype,r=t.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:r.call(i,a)}return OA=n,OA}var IA,UV;function nqe(){if(UV)return IA;UV=1;var e=Kx(),t="__lodash_hash_undefined__";function r(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&a===void 0?t:a,this}return IA=r,IA}var LA,$V;function aqe(){if($V)return LA;$V=1;var e=Jje(),t=eqe(),r=tqe(),n=rqe(),a=nqe();function i(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var c=s[o];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,LA=i,LA}var PA,HV;function iqe(){if(HV)return PA;HV=1;var e=aqe(),t=Wx(),r=fI();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return PA=n,PA}var FA,GV;function sqe(){if(GV)return FA;GV=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return FA=e,FA}var BA,VV;function Xx(){if(VV)return BA;VV=1;var e=sqe();function t(r,n){var a=r.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return BA=t,BA}var zA,WV;function oqe(){if(WV)return zA;WV=1;var e=Xx();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return zA=t,zA}var jA,KV;function lqe(){if(KV)return jA;KV=1;var e=Xx();function t(r){return e(this,r).get(r)}return jA=t,jA}var qA,XV;function cqe(){if(XV)return qA;XV=1;var e=Xx();function t(r){return e(this,r).has(r)}return qA=t,qA}var UA,YV;function uqe(){if(YV)return UA;YV=1;var e=Xx();function t(r,n){var a=e(this,r),i=a.size;return a.set(r,n),this.size+=a.size==i?0:1,this}return UA=t,UA}var $A,ZV;function hI(){if(ZV)return $A;ZV=1;var e=iqe(),t=oqe(),r=lqe(),n=cqe(),a=uqe();function i(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var c=s[o];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,$A=i,$A}var HA,QV;function dqe(){if(QV)return HA;QV=1;var e=Wx(),t=fI(),r=hI(),n=200;function a(i,s){var o=this.__data__;if(o instanceof e){var l=o.__data__;if(!t||l.length<n-1)return l.push([i,s]),this.size=++o.size,this;o=this.__data__=new r(l)}return o.set(i,s),this.size=o.size,this}return HA=a,HA}var GA,JV;function Yx(){if(JV)return GA;JV=1;var e=Wx(),t=$je(),r=Hje(),n=Gje(),a=Vje(),i=dqe();function s(o){var l=this.__data__=new e(o);this.size=l.size}return s.prototype.clear=t,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=a,s.prototype.set=i,GA=s,GA}var VA,eW;function pI(){if(eW)return VA;eW=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a&&r(t[n],n,t)!==!1;);return t}return VA=e,VA}var WA,tW;function Moe(){if(tW)return WA;tW=1;var e=md(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return WA=t,WA}var KA,rW;function Zx(){if(rW)return KA;rW=1;var e=Moe();function t(r,n,a){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[n]=a}return KA=t,KA}var XA,nW;function Qx(){if(nW)return XA;nW=1;var e=Zx(),t=R0(),r=Object.prototype,n=r.hasOwnProperty;function a(i,s,o){var l=i[s];(!(n.call(i,s)&&t(l,o))||o===void 0&&!(s in i))&&e(i,s,o)}return XA=a,XA}var YA,aW;function Qm(){if(aW)return YA;aW=1;var e=Qx(),t=Zx();function r(n,a,i,s){var o=!i;i||(i={});for(var l=-1,c=a.length;++l<c;){var u=a[l],f=s?s(i[u],n[u],u,i,n):void 0;f===void 0&&(f=n[u]),o?t(i,u,f):e(i,u,f)}return i}return YA=r,YA}var ZA,iW;function fqe(){if(iW)return ZA;iW=1;function e(t,r){for(var n=-1,a=Array(t);++n<t;)a[n]=r(n);return a}return ZA=e,ZA}var QA,sW;function jo(){if(sW)return QA;sW=1;function e(t){return t!=null&&typeof t=="object"}return QA=e,QA}var JA,oW;function hqe(){if(oW)return JA;oW=1;var e=pd(),t=jo(),r="[object Arguments]";function n(a){return t(a)&&e(a)==r}return JA=n,JA}var ek,lW;function Jm(){if(lW)return ek;lW=1;var e=hqe(),t=jo(),r=Object.prototype,n=r.hasOwnProperty,a=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(s){return t(s)&&n.call(s,"callee")&&!a.call(s,"callee")};return ek=i,ek}var tk,cW;function Fn(){if(cW)return tk;cW=1;var e=Array.isArray;return tk=e,tk}var op={exports:{}},rk,uW;function pqe(){if(uW)return rk;uW=1;function e(){return!1}return rk=e,rk}op.exports;var dW;function D0(){return dW||(dW=1,(function(e,t){var r=Js(),n=pqe(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,o=s?r.Buffer:void 0,l=o?o.isBuffer:void 0,c=l||n;e.exports=c})(op,op.exports)),op.exports}var nk,fW;function Jx(){if(fW)return nk;fW=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,a){var i=typeof n;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<a}return nk=r,nk}var ak,hW;function mI(){if(hW)return ak;hW=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return ak=t,ak}var ik,pW;function mqe(){if(pW)return ik;pW=1;var e=pd(),t=mI(),r=jo(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",s="[object Date]",o="[object Error]",l="[object Function]",c="[object Map]",u="[object Number]",f="[object Object]",p="[object RegExp]",m="[object Set]",b="[object String]",v="[object WeakMap]",y="[object ArrayBuffer]",_="[object DataView]",S="[object Float32Array]",C="[object Float64Array]",T="[object Int8Array]",A="[object Int16Array]",k="[object Int32Array]",N="[object Uint8Array]",L="[object Uint8ClampedArray]",I="[object Uint16Array]",P="[object Uint32Array]",H={};H[S]=H[C]=H[T]=H[A]=H[k]=H[N]=H[L]=H[I]=H[P]=!0,H[n]=H[a]=H[y]=H[i]=H[_]=H[s]=H[o]=H[l]=H[c]=H[u]=H[f]=H[p]=H[m]=H[b]=H[v]=!1;function B(K){return r(K)&&t(K.length)&&!!H[e(K)]}return ik=B,ik}var sk,mW;function ey(){if(mW)return sk;mW=1;function e(t){return function(r){return t(r)}}return sk=e,sk}var lp={exports:{}};lp.exports;var gW;function gI(){return gW||(gW=1,(function(e,t){var r=Noe(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,o=(function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}})();e.exports=o})(lp,lp.exports)),lp.exports}var ok,vW;function eg(){if(vW)return ok;vW=1;var e=mqe(),t=ey(),r=gI(),n=r&&r.isTypedArray,a=n?t(n):e;return ok=a,ok}var lk,bW;function Doe(){if(bW)return lk;bW=1;var e=fqe(),t=Jm(),r=Fn(),n=D0(),a=Jx(),i=eg(),s=Object.prototype,o=s.hasOwnProperty;function l(c,u){var f=r(c),p=!f&&t(c),m=!f&&!p&&n(c),b=!f&&!p&&!m&&i(c),v=f||p||m||b,y=v?e(c.length,String):[],_=y.length;for(var S in c)(u||o.call(c,S))&&!(v&&(S=="length"||m&&(S=="offset"||S=="parent")||b&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||a(S,_)))&&y.push(S);return y}return lk=l,lk}var ck,xW;function ty(){if(xW)return ck;xW=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return ck=t,ck}var uk,yW;function Ooe(){if(yW)return uk;yW=1;function e(t,r){return function(n){return t(r(n))}}return uk=e,uk}var dk,_W;function gqe(){if(_W)return dk;_W=1;var e=Ooe(),t=e(Object.keys,Object);return dk=t,dk}var fk,wW;function vI(){if(wW)return fk;wW=1;var e=ty(),t=gqe(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!e(i))return t(i);var s=[];for(var o in Object(i))n.call(i,o)&&o!="constructor"&&s.push(o);return s}return fk=a,fk}var hk,EW;function Ul(){if(EW)return hk;EW=1;var e=Zm(),t=mI();function r(n){return n!=null&&t(n.length)&&!e(n)}return hk=r,hk}var pk,SW;function Qc(){if(SW)return pk;SW=1;var e=Doe(),t=vI(),r=Ul();function n(a){return r(a)?e(a):t(a)}return pk=n,pk}var mk,CW;function vqe(){if(CW)return mk;CW=1;var e=Qm(),t=Qc();function r(n,a){return n&&e(a,t(a),n)}return mk=r,mk}var gk,TW;function bqe(){if(TW)return gk;TW=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return gk=e,gk}var vk,AW;function xqe(){if(AW)return vk;AW=1;var e=bs(),t=ty(),r=bqe(),n=Object.prototype,a=n.hasOwnProperty;function i(s){if(!e(s))return r(s);var o=t(s),l=[];for(var c in s)c=="constructor"&&(o||!a.call(s,c))||l.push(c);return l}return vk=i,vk}var bk,kW;function gd(){if(kW)return bk;kW=1;var e=Doe(),t=xqe(),r=Ul();function n(a){return r(a)?e(a,!0):t(a)}return bk=n,bk}var xk,NW;function yqe(){if(NW)return xk;NW=1;var e=Qm(),t=gd();function r(n,a){return n&&e(a,t(a),n)}return xk=r,xk}var cp={exports:{}};cp.exports;var RW;function Ioe(){return RW||(RW=1,(function(e,t){var r=Js(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i?r.Buffer:void 0,o=s?s.allocUnsafe:void 0;function l(c,u){if(u)return c.slice();var f=c.length,p=o?o(f):new c.constructor(f);return c.copy(p),p}e.exports=l})(cp,cp.exports)),cp.exports}var yk,MW;function Loe(){if(MW)return yk;MW=1;function e(t,r){var n=-1,a=t.length;for(r||(r=Array(a));++n<a;)r[n]=t[n];return r}return yk=e,yk}var _k,DW;function Poe(){if(DW)return _k;DW=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=0,s=[];++n<a;){var o=t[n];r(o,n,t)&&(s[i++]=o)}return s}return _k=e,_k}var wk,OW;function Foe(){if(OW)return wk;OW=1;function e(){return[]}return wk=e,wk}var Ek,IW;function bI(){if(IW)return Ek;IW=1;var e=Poe(),t=Foe(),r=Object.prototype,n=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(s){return s==null?[]:(s=Object(s),e(a(s),function(o){return n.call(s,o)}))}:t;return Ek=i,Ek}var Sk,LW;function _qe(){if(LW)return Sk;LW=1;var e=Qm(),t=bI();function r(n,a){return e(n,t(n),a)}return Sk=r,Sk}var Ck,PW;function xI(){if(PW)return Ck;PW=1;function e(t,r){for(var n=-1,a=r.length,i=t.length;++n<a;)t[i+n]=r[n];return t}return Ck=e,Ck}var Tk,FW;function ry(){if(FW)return Tk;FW=1;var e=Ooe(),t=e(Object.getPrototypeOf,Object);return Tk=t,Tk}var Ak,BW;function Boe(){if(BW)return Ak;BW=1;var e=xI(),t=ry(),r=bI(),n=Foe(),a=Object.getOwnPropertySymbols,i=a?function(s){for(var o=[];s;)e(o,r(s)),s=t(s);return o}:n;return Ak=i,Ak}var kk,zW;function wqe(){if(zW)return kk;zW=1;var e=Qm(),t=Boe();function r(n,a){return e(n,t(n),a)}return kk=r,kk}var Nk,jW;function zoe(){if(jW)return Nk;jW=1;var e=xI(),t=Fn();function r(n,a,i){var s=a(n);return t(n)?s:e(s,i(n))}return Nk=r,Nk}var Rk,qW;function joe(){if(qW)return Rk;qW=1;var e=zoe(),t=bI(),r=Qc();function n(a){return e(a,r,t)}return Rk=n,Rk}var Mk,UW;function Eqe(){if(UW)return Mk;UW=1;var e=zoe(),t=Boe(),r=gd();function n(a){return e(a,r,t)}return Mk=n,Mk}var Dk,$W;function Sqe(){if($W)return Dk;$W=1;var e=md(),t=Js(),r=e(t,"DataView");return Dk=r,Dk}var Ok,HW;function Cqe(){if(HW)return Ok;HW=1;var e=md(),t=Js(),r=e(t,"Promise");return Ok=r,Ok}var Ik,GW;function qoe(){if(GW)return Ik;GW=1;var e=md(),t=Js(),r=e(t,"Set");return Ik=r,Ik}var Lk,VW;function Tqe(){if(VW)return Lk;VW=1;var e=md(),t=Js(),r=e(t,"WeakMap");return Lk=r,Lk}var Pk,WW;function O0(){if(WW)return Pk;WW=1;var e=Sqe(),t=fI(),r=Cqe(),n=qoe(),a=Tqe(),i=pd(),s=Roe(),o="[object Map]",l="[object Object]",c="[object Promise]",u="[object Set]",f="[object WeakMap]",p="[object DataView]",m=s(e),b=s(t),v=s(r),y=s(n),_=s(a),S=i;return(e&&S(new e(new ArrayBuffer(1)))!=p||t&&S(new t)!=o||r&&S(r.resolve())!=c||n&&S(new n)!=u||a&&S(new a)!=f)&&(S=function(C){var T=i(C),A=T==l?C.constructor:void 0,k=A?s(A):"";if(k)switch(k){case m:return p;case b:return o;case v:return c;case y:return u;case _:return f}return T}),Pk=S,Pk}var Fk,KW;function Aqe(){if(KW)return Fk;KW=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var a=n.length,i=new n.constructor(a);return a&&typeof n[0]=="string"&&t.call(n,"index")&&(i.index=n.index,i.input=n.input),i}return Fk=r,Fk}var Bk,XW;function Uoe(){if(XW)return Bk;XW=1;var e=Js(),t=e.Uint8Array;return Bk=t,Bk}var zk,YW;function yI(){if(YW)return zk;YW=1;var e=Uoe();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return zk=t,zk}var jk,ZW;function kqe(){if(ZW)return jk;ZW=1;var e=yI();function t(r,n){var a=n?e(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.byteLength)}return jk=t,jk}var qk,QW;function Nqe(){if(QW)return qk;QW=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return qk=t,qk}var Uk,JW;function Rqe(){if(JW)return Uk;JW=1;var e=M0(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(a){return r?Object(r.call(a)):{}}return Uk=n,Uk}var $k,eK;function $oe(){if(eK)return $k;eK=1;var e=yI();function t(r,n){var a=n?e(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.length)}return $k=t,$k}var Hk,tK;function Mqe(){if(tK)return Hk;tK=1;var e=yI(),t=kqe(),r=Nqe(),n=Rqe(),a=$oe(),i="[object Boolean]",s="[object Date]",o="[object Map]",l="[object Number]",c="[object RegExp]",u="[object Set]",f="[object String]",p="[object Symbol]",m="[object ArrayBuffer]",b="[object DataView]",v="[object Float32Array]",y="[object Float64Array]",_="[object Int8Array]",S="[object Int16Array]",C="[object Int32Array]",T="[object Uint8Array]",A="[object Uint8ClampedArray]",k="[object Uint16Array]",N="[object Uint32Array]";function L(I,P,H){var B=I.constructor;switch(P){case m:return e(I);case i:case s:return new B(+I);case b:return t(I,H);case v:case y:case _:case S:case C:case T:case A:case k:case N:return a(I,H);case o:return new B;case l:case f:return new B(I);case c:return r(I);case u:return new B;case p:return n(I)}}return Hk=L,Hk}var Gk,rK;function Hoe(){if(rK)return Gk;rK=1;var e=bs(),t=Object.create,r=(function(){function n(){}return function(a){if(!e(a))return{};if(t)return t(a);n.prototype=a;var i=new n;return n.prototype=void 0,i}})();return Gk=r,Gk}var Vk,nK;function Goe(){if(nK)return Vk;nK=1;var e=Hoe(),t=ry(),r=ty();function n(a){return typeof a.constructor=="function"&&!r(a)?e(t(a)):{}}return Vk=n,Vk}var Wk,aK;function Dqe(){if(aK)return Wk;aK=1;var e=O0(),t=jo(),r="[object Map]";function n(a){return t(a)&&e(a)==r}return Wk=n,Wk}var Kk,iK;function Oqe(){if(iK)return Kk;iK=1;var e=Dqe(),t=ey(),r=gI(),n=r&&r.isMap,a=n?t(n):e;return Kk=a,Kk}var Xk,sK;function Iqe(){if(sK)return Xk;sK=1;var e=O0(),t=jo(),r="[object Set]";function n(a){return t(a)&&e(a)==r}return Xk=n,Xk}var Yk,oK;function Lqe(){if(oK)return Yk;oK=1;var e=Iqe(),t=ey(),r=gI(),n=r&&r.isSet,a=n?t(n):e;return Yk=a,Yk}var Zk,lK;function Voe(){if(lK)return Zk;lK=1;var e=Yx(),t=pI(),r=Qx(),n=vqe(),a=yqe(),i=Ioe(),s=Loe(),o=_qe(),l=wqe(),c=joe(),u=Eqe(),f=O0(),p=Aqe(),m=Mqe(),b=Goe(),v=Fn(),y=D0(),_=Oqe(),S=bs(),C=Lqe(),T=Qc(),A=gd(),k=1,N=2,L=4,I="[object Arguments]",P="[object Array]",H="[object Boolean]",B="[object Date]",K="[object Error]",j="[object Function]",W="[object GeneratorFunction]",D="[object Map]",U="[object Number]",Y="[object Object]",z="[object RegExp]",M="[object Set]",Q="[object String]",q="[object Symbol]",F="[object WeakMap]",V="[object ArrayBuffer]",Z="[object DataView]",ee="[object Float32Array]",te="[object Float64Array]",oe="[object Int8Array]",pe="[object Int16Array]",he="[object Int32Array]",ke="[object Uint8Array]",se="[object Uint8ClampedArray]",qe="[object Uint16Array]",$e="[object Uint32Array]",Pe={};Pe[I]=Pe[P]=Pe[V]=Pe[Z]=Pe[H]=Pe[B]=Pe[ee]=Pe[te]=Pe[oe]=Pe[pe]=Pe[he]=Pe[D]=Pe[U]=Pe[Y]=Pe[z]=Pe[M]=Pe[Q]=Pe[q]=Pe[ke]=Pe[se]=Pe[qe]=Pe[$e]=!0,Pe[K]=Pe[j]=Pe[F]=!1;function Ce(xe,ve,Ne,Ue,Le,Ye){var De,Ve=ve&k,lt=ve&N,Ee=ve&L;if(Ne&&(De=Le?Ne(xe,Ue,Le,Ye):Ne(xe)),De!==void 0)return De;if(!S(xe))return xe;var Ae=v(xe);if(Ae){if(De=p(xe),!Ve)return s(xe,De)}else{var Ze=f(xe),rt=Ze==j||Ze==W;if(y(xe))return i(xe,Ve);if(Ze==Y||Ze==I||rt&&!Le){if(De=lt||rt?{}:b(xe),!Ve)return lt?l(xe,a(De,xe)):o(xe,n(De,xe))}else{if(!Pe[Ze])return Le?xe:{};De=m(xe,Ze,Ve)}}Ye||(Ye=new e);var at=Ye.get(xe);if(at)return at;Ye.set(xe,De),C(xe)?xe.forEach(function(ft){De.add(Ce(ft,ve,Ne,ft,xe,Ye))}):_(xe)&&xe.forEach(function(ft,zt){De.set(zt,Ce(ft,ve,Ne,zt,xe,Ye))});var bt=Ee?lt?u:c:lt?A:T,et=Ae?void 0:bt(xe);return t(et||xe,function(ft,zt){et&&(zt=ft,ft=xe[zt]),r(De,zt,Ce(ft,ve,Ne,zt,xe,Ye))}),De}return Zk=Ce,Zk}var Qk,cK;function Pqe(){if(cK)return Qk;cK=1;var e=Voe(),t=4;function r(n){return e(n,t)}return Qk=r,Qk}var Jk,uK;function _I(){if(uK)return Jk;uK=1;function e(t){return function(){return t}}return Jk=e,Jk}var eN,dK;function Fqe(){if(dK)return eN;dK=1;function e(t){return function(r,n,a){for(var i=-1,s=Object(r),o=a(r),l=o.length;l--;){var c=o[t?l:++i];if(n(s[c],c,s)===!1)break}return r}}return eN=e,eN}var tN,fK;function wI(){if(fK)return tN;fK=1;var e=Fqe(),t=e();return tN=t,tN}var rN,hK;function EI(){if(hK)return rN;hK=1;var e=wI(),t=Qc();function r(n,a){return n&&e(n,a,t)}return rN=r,rN}var nN,pK;function Bqe(){if(pK)return nN;pK=1;var e=Ul();function t(r,n){return function(a,i){if(a==null)return a;if(!e(a))return r(a,i);for(var s=a.length,o=n?s:-1,l=Object(a);(n?o--:++o<s)&&i(l[o],o,l)!==!1;);return a}}return nN=t,nN}var aN,mK;function ny(){if(mK)return aN;mK=1;var e=EI(),t=Bqe(),r=t(e);return aN=r,aN}var iN,gK;function vd(){if(gK)return iN;gK=1;function e(t){return t}return iN=e,iN}var sN,vK;function Woe(){if(vK)return sN;vK=1;var e=vd();function t(r){return typeof r=="function"?r:e}return sN=t,sN}var oN,bK;function Koe(){if(bK)return oN;bK=1;var e=pI(),t=ny(),r=Woe(),n=Fn();function a(i,s){var o=n(i)?e:t;return o(i,r(s))}return oN=a,oN}var lN,xK;function Xoe(){return xK||(xK=1,lN=Koe()),lN}var cN,yK;function zqe(){if(yK)return cN;yK=1;var e=ny();function t(r,n){var a=[];return e(r,function(i,s,o){n(i,s,o)&&a.push(i)}),a}return cN=t,cN}var uN,_K;function jqe(){if(_K)return uN;_K=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return uN=t,uN}var dN,wK;function qqe(){if(wK)return dN;wK=1;function e(t){return this.__data__.has(t)}return dN=e,dN}var fN,EK;function Yoe(){if(EK)return fN;EK=1;var e=hI(),t=jqe(),r=qqe();function n(a){var i=-1,s=a==null?0:a.length;for(this.__data__=new e;++i<s;)this.add(a[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,fN=n,fN}var hN,SK;function Uqe(){if(SK)return hN;SK=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(t[n],n,t))return!0;return!1}return hN=e,hN}var pN,CK;function Zoe(){if(CK)return pN;CK=1;function e(t,r){return t.has(r)}return pN=e,pN}var mN,TK;function Qoe(){if(TK)return mN;TK=1;var e=Yoe(),t=Uqe(),r=Zoe(),n=1,a=2;function i(s,o,l,c,u,f){var p=l&n,m=s.length,b=o.length;if(m!=b&&!(p&&b>m))return!1;var v=f.get(s),y=f.get(o);if(v&&y)return v==o&&y==s;var _=-1,S=!0,C=l&a?new e:void 0;for(f.set(s,o),f.set(o,s);++_<m;){var T=s[_],A=o[_];if(c)var k=p?c(A,T,_,o,s,f):c(T,A,_,s,o,f);if(k!==void 0){if(k)continue;S=!1;break}if(C){if(!t(o,function(N,L){if(!r(C,L)&&(T===N||u(T,N,l,c,f)))return C.push(L)})){S=!1;break}}else if(!(T===A||u(T,A,l,c,f))){S=!1;break}}return f.delete(s),f.delete(o),S}return mN=i,mN}var gN,AK;function $qe(){if(AK)return gN;AK=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a,i){n[++r]=[i,a]}),n}return gN=e,gN}var vN,kK;function SI(){if(kK)return vN;kK=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a){n[++r]=a}),n}return vN=e,vN}var bN,NK;function Hqe(){if(NK)return bN;NK=1;var e=M0(),t=Uoe(),r=R0(),n=Qoe(),a=$qe(),i=SI(),s=1,o=2,l="[object Boolean]",c="[object Date]",u="[object Error]",f="[object Map]",p="[object Number]",m="[object RegExp]",b="[object Set]",v="[object String]",y="[object Symbol]",_="[object ArrayBuffer]",S="[object DataView]",C=e?e.prototype:void 0,T=C?C.valueOf:void 0;function A(k,N,L,I,P,H,B){switch(L){case S:if(k.byteLength!=N.byteLength||k.byteOffset!=N.byteOffset)return!1;k=k.buffer,N=N.buffer;case _:return!(k.byteLength!=N.byteLength||!H(new t(k),new t(N)));case l:case c:case p:return r(+k,+N);case u:return k.name==N.name&&k.message==N.message;case m:case v:return k==N+"";case f:var K=a;case b:var j=I&s;if(K||(K=i),k.size!=N.size&&!j)return!1;var W=B.get(k);if(W)return W==N;I|=o,B.set(k,N);var D=n(K(k),K(N),I,P,H,B);return B.delete(k),D;case y:if(T)return T.call(k)==T.call(N)}return!1}return bN=A,bN}var xN,RK;function Gqe(){if(RK)return xN;RK=1;var e=joe(),t=1,r=Object.prototype,n=r.hasOwnProperty;function a(i,s,o,l,c,u){var f=o&t,p=e(i),m=p.length,b=e(s),v=b.length;if(m!=v&&!f)return!1;for(var y=m;y--;){var _=p[y];if(!(f?_ in s:n.call(s,_)))return!1}var S=u.get(i),C=u.get(s);if(S&&C)return S==s&&C==i;var T=!0;u.set(i,s),u.set(s,i);for(var A=f;++y<m;){_=p[y];var k=i[_],N=s[_];if(l)var L=f?l(N,k,_,s,i,u):l(k,N,_,i,s,u);if(!(L===void 0?k===N||c(k,N,o,l,u):L)){T=!1;break}A||(A=_=="constructor")}if(T&&!A){var I=i.constructor,P=s.constructor;I!=P&&"constructor"in i&&"constructor"in s&&!(typeof I=="function"&&I instanceof I&&typeof P=="function"&&P instanceof P)&&(T=!1)}return u.delete(i),u.delete(s),T}return xN=a,xN}var yN,MK;function Vqe(){if(MK)return yN;MK=1;var e=Yx(),t=Qoe(),r=Hqe(),n=Gqe(),a=O0(),i=Fn(),s=D0(),o=eg(),l=1,c="[object Arguments]",u="[object Array]",f="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function b(v,y,_,S,C,T){var A=i(v),k=i(y),N=A?u:a(v),L=k?u:a(y);N=N==c?f:N,L=L==c?f:L;var I=N==f,P=L==f,H=N==L;if(H&&s(v)){if(!s(y))return!1;A=!0,I=!1}if(H&&!I)return T||(T=new e),A||o(v)?t(v,y,_,S,C,T):r(v,y,N,_,S,C,T);if(!(_&l)){var B=I&&m.call(v,"__wrapped__"),K=P&&m.call(y,"__wrapped__");if(B||K){var j=B?v.value():v,W=K?y.value():y;return T||(T=new e),C(j,W,_,S,T)}}return H?(T||(T=new e),n(v,y,_,S,C,T)):!1}return yN=b,yN}var _N,DK;function Joe(){if(DK)return _N;DK=1;var e=Vqe(),t=jo();function r(n,a,i,s,o){return n===a?!0:n==null||a==null||!t(n)&&!t(a)?n!==n&&a!==a:e(n,a,i,s,r,o)}return _N=r,_N}var wN,OK;function Wqe(){if(OK)return wN;OK=1;var e=Yx(),t=Joe(),r=1,n=2;function a(i,s,o,l){var c=o.length,u=c,f=!l;if(i==null)return!u;for(i=Object(i);c--;){var p=o[c];if(f&&p[2]?p[1]!==i[p[0]]:!(p[0]in i))return!1}for(;++c<u;){p=o[c];var m=p[0],b=i[m],v=p[1];if(f&&p[2]){if(b===void 0&&!(m in i))return!1}else{var y=new e;if(l)var _=l(b,v,m,i,s,y);if(!(_===void 0?t(v,b,r|n,l,y):_))return!1}}return!0}return wN=a,wN}var EN,IK;function ele(){if(IK)return EN;IK=1;var e=bs();function t(r){return r===r&&!e(r)}return EN=t,EN}var SN,LK;function Kqe(){if(LK)return SN;LK=1;var e=ele(),t=Qc();function r(n){for(var a=t(n),i=a.length;i--;){var s=a[i],o=n[s];a[i]=[s,o,e(o)]}return a}return SN=r,SN}var CN,PK;function tle(){if(PK)return CN;PK=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return CN=e,CN}var TN,FK;function Xqe(){if(FK)return TN;FK=1;var e=Wqe(),t=Kqe(),r=tle();function n(a){var i=t(a);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(s){return s===a||e(s,a,i)}}return TN=n,TN}var AN,BK;function I0(){if(BK)return AN;BK=1;var e=pd(),t=jo(),r="[object Symbol]";function n(a){return typeof a=="symbol"||t(a)&&e(a)==r}return AN=n,AN}var kN,zK;function CI(){if(zK)return kN;zK=1;var e=Fn(),t=I0(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,s){if(e(i))return!1;var o=typeof i;return o=="number"||o=="symbol"||o=="boolean"||i==null||t(i)?!0:n.test(i)||!r.test(i)||s!=null&&i in Object(s)}return kN=a,kN}var NN,jK;function Yqe(){if(jK)return NN;jK=1;var e=hI(),t="Expected a function";function r(n,a){if(typeof n!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var i=function(){var s=arguments,o=a?a.apply(this,s):s[0],l=i.cache;if(l.has(o))return l.get(o);var c=n.apply(this,s);return i.cache=l.set(o,c)||l,c};return i.cache=new(r.Cache||e),i}return r.Cache=e,NN=r,NN}var RN,qK;function Zqe(){if(qK)return RN;qK=1;var e=Yqe(),t=500;function r(n){var a=e(n,function(s){return i.size===t&&i.clear(),s}),i=a.cache;return a}return RN=r,RN}var MN,UK;function Qqe(){if(UK)return MN;UK=1;var e=Zqe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(t,function(s,o,l,c){i.push(l?c.replace(r,"$1"):o||s)}),i});return MN=n,MN}var DN,$K;function ay(){if($K)return DN;$K=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=Array(a);++n<a;)i[n]=r(t[n],n,t);return i}return DN=e,DN}var ON,HK;function Jqe(){if(HK)return ON;HK=1;var e=M0(),t=ay(),r=Fn(),n=I0(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function s(o){if(typeof o=="string")return o;if(r(o))return t(o,s)+"";if(n(o))return i?i.call(o):"";var l=o+"";return l=="0"&&1/o==-1/0?"-0":l}return ON=s,ON}var IN,GK;function rle(){if(GK)return IN;GK=1;var e=Jqe();function t(r){return r==null?"":e(r)}return IN=t,IN}var LN,VK;function iy(){if(VK)return LN;VK=1;var e=Fn(),t=CI(),r=Qqe(),n=rle();function a(i,s){return e(i)?i:t(i,s)?[i]:r(n(i))}return LN=a,LN}var PN,WK;function tg(){if(WK)return PN;WK=1;var e=I0();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return PN=t,PN}var FN,KK;function sy(){if(KK)return FN;KK=1;var e=iy(),t=tg();function r(n,a){a=e(a,n);for(var i=0,s=a.length;n!=null&&i<s;)n=n[t(a[i++])];return i&&i==s?n:void 0}return FN=r,FN}var BN,XK;function eUe(){if(XK)return BN;XK=1;var e=sy();function t(r,n,a){var i=r==null?void 0:e(r,n);return i===void 0?a:i}return BN=t,BN}var zN,YK;function tUe(){if(YK)return zN;YK=1;function e(t,r){return t!=null&&r in Object(t)}return zN=e,zN}var jN,ZK;function nle(){if(ZK)return jN;ZK=1;var e=iy(),t=Jm(),r=Fn(),n=Jx(),a=mI(),i=tg();function s(o,l,c){l=e(l,o);for(var u=-1,f=l.length,p=!1;++u<f;){var m=i(l[u]);if(!(p=o!=null&&c(o,m)))break;o=o[m]}return p||++u!=f?p:(f=o==null?0:o.length,!!f&&a(f)&&n(m,f)&&(r(o)||t(o)))}return jN=s,jN}var qN,QK;function ale(){if(QK)return qN;QK=1;var e=tUe(),t=nle();function r(n,a){return n!=null&&t(n,a,e)}return qN=r,qN}var UN,JK;function rUe(){if(JK)return UN;JK=1;var e=Joe(),t=eUe(),r=ale(),n=CI(),a=ele(),i=tle(),s=tg(),o=1,l=2;function c(u,f){return n(u)&&a(f)?i(s(u),f):function(p){var m=t(p,u);return m===void 0&&m===f?r(p,u):e(f,m,o|l)}}return UN=c,UN}var $N,eX;function ile(){if(eX)return $N;eX=1;function e(t){return function(r){return r?.[t]}}return $N=e,$N}var HN,tX;function nUe(){if(tX)return HN;tX=1;var e=sy();function t(r){return function(n){return e(n,r)}}return HN=t,HN}var GN,rX;function aUe(){if(rX)return GN;rX=1;var e=ile(),t=nUe(),r=CI(),n=tg();function a(i){return r(i)?e(n(i)):t(i)}return GN=a,GN}var VN,nX;function $l(){if(nX)return VN;nX=1;var e=Xqe(),t=rUe(),r=vd(),n=Fn(),a=aUe();function i(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?t(s[0],s[1]):e(s):a(s)}return VN=i,VN}var WN,aX;function sle(){if(aX)return WN;aX=1;var e=Poe(),t=zqe(),r=$l(),n=Fn();function a(i,s){var o=n(i)?e:t;return o(i,r(s,3))}return WN=a,WN}var KN,iX;function iUe(){if(iX)return KN;iX=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,a){return n!=null&&t.call(n,a)}return KN=r,KN}var XN,sX;function ole(){if(sX)return XN;sX=1;var e=iUe(),t=nle();function r(n,a){return n!=null&&t(n,a,e)}return XN=r,XN}var YN,oX;function sUe(){if(oX)return YN;oX=1;var e=vI(),t=O0(),r=Jm(),n=Fn(),a=Ul(),i=D0(),s=ty(),o=eg(),l="[object Map]",c="[object Set]",u=Object.prototype,f=u.hasOwnProperty;function p(m){if(m==null)return!0;if(a(m)&&(n(m)||typeof m=="string"||typeof m.splice=="function"||i(m)||o(m)||r(m)))return!m.length;var b=t(m);if(b==l||b==c)return!m.size;if(s(m))return!e(m).length;for(var v in m)if(f.call(m,v))return!1;return!0}return YN=p,YN}var ZN,lX;function lle(){if(lX)return ZN;lX=1;function e(t){return t===void 0}return ZN=e,ZN}var QN,cX;function cle(){if(cX)return QN;cX=1;var e=ny(),t=Ul();function r(n,a){var i=-1,s=t(n)?Array(n.length):[];return e(n,function(o,l,c){s[++i]=a(o,l,c)}),s}return QN=r,QN}var JN,uX;function ule(){if(uX)return JN;uX=1;var e=ay(),t=$l(),r=cle(),n=Fn();function a(i,s){var o=n(i)?e:r;return o(i,t(s,3))}return JN=a,JN}var e3,dX;function oUe(){if(dX)return e3;dX=1;function e(t,r,n,a){var i=-1,s=t==null?0:t.length;for(a&&s&&(n=t[++i]);++i<s;)n=r(n,t[i],i,t);return n}return e3=e,e3}var t3,fX;function lUe(){if(fX)return t3;fX=1;function e(t,r,n,a,i){return i(t,function(s,o,l){n=a?(a=!1,s):r(n,s,o,l)}),n}return t3=e,t3}var r3,hX;function dle(){if(hX)return r3;hX=1;var e=oUe(),t=ny(),r=$l(),n=lUe(),a=Fn();function i(s,o,l){var c=a(s)?e:n,u=arguments.length<3;return c(s,r(o,4),l,u,t)}return r3=i,r3}var n3,pX;function cUe(){if(pX)return n3;pX=1;var e=pd(),t=Fn(),r=jo(),n="[object String]";function a(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==n}return n3=a,n3}var a3,mX;function uUe(){if(mX)return a3;mX=1;var e=ile(),t=e("length");return a3=t,a3}var i3,gX;function dUe(){if(gX)return i3;gX=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",s="\\u200d",o=RegExp("["+s+e+a+i+"]");function l(c){return o.test(c)}return i3=l,i3}var s3,vX;function fUe(){if(vX)return s3;vX=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",s="["+e+"]",o="["+a+"]",l="\\ud83c[\\udffb-\\udfff]",c="(?:"+o+"|"+l+")",u="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",b=c+"?",v="["+i+"]?",y="(?:"+m+"(?:"+[u,f,p].join("|")+")"+v+b+")*",_=v+b+y,S="(?:"+[u+o+"?",o,f,p,s].join("|")+")",C=RegExp(l+"(?="+l+")|"+S+_,"g");function T(A){for(var k=C.lastIndex=0;C.test(A);)++k;return k}return s3=T,s3}var o3,bX;function hUe(){if(bX)return o3;bX=1;var e=uUe(),t=dUe(),r=fUe();function n(a){return t(a)?r(a):e(a)}return o3=n,o3}var l3,xX;function pUe(){if(xX)return l3;xX=1;var e=vI(),t=O0(),r=Ul(),n=cUe(),a=hUe(),i="[object Map]",s="[object Set]";function o(l){if(l==null)return 0;if(r(l))return n(l)?a(l):l.length;var c=t(l);return c==i||c==s?l.size:e(l).length}return l3=o,l3}var c3,yX;function mUe(){if(yX)return c3;yX=1;var e=pI(),t=Hoe(),r=EI(),n=$l(),a=ry(),i=Fn(),s=D0(),o=Zm(),l=bs(),c=eg();function u(f,p,m){var b=i(f),v=b||s(f)||c(f);if(p=n(p,4),m==null){var y=f&&f.constructor;v?m=b?new y:[]:l(f)?m=o(y)?t(a(f)):{}:m={}}return(v?e:r)(f,function(_,S,C){return p(m,_,S,C)}),m}return c3=u,c3}var u3,_X;function gUe(){if(_X)return u3;_X=1;var e=M0(),t=Jm(),r=Fn(),n=e?e.isConcatSpreadable:void 0;function a(i){return r(i)||t(i)||!!(n&&i&&i[n])}return u3=a,u3}var d3,wX;function TI(){if(wX)return d3;wX=1;var e=xI(),t=gUe();function r(n,a,i,s,o){var l=-1,c=n.length;for(i||(i=t),o||(o=[]);++l<c;){var u=n[l];a>0&&i(u)?a>1?r(u,a-1,i,s,o):e(o,u):s||(o[o.length]=u)}return o}return d3=r,d3}var f3,EX;function vUe(){if(EX)return f3;EX=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return f3=e,f3}var h3,SX;function fle(){if(SX)return h3;SX=1;var e=vUe(),t=Math.max;function r(n,a,i){return a=t(a===void 0?n.length-1:a,0),function(){for(var s=arguments,o=-1,l=t(s.length-a,0),c=Array(l);++o<l;)c[o]=s[a+o];o=-1;for(var u=Array(a+1);++o<a;)u[o]=s[o];return u[a]=i(c),e(n,this,u)}}return h3=r,h3}var p3,CX;function bUe(){if(CX)return p3;CX=1;var e=_I(),t=Moe(),r=vd(),n=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return p3=n,p3}var m3,TX;function xUe(){if(TX)return m3;TX=1;var e=800,t=16,r=Date.now;function n(a){var i=0,s=0;return function(){var o=r(),l=t-(o-s);if(s=o,l>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return m3=n,m3}var g3,AX;function hle(){if(AX)return g3;AX=1;var e=bUe(),t=xUe(),r=t(e);return g3=r,g3}var v3,kX;function oy(){if(kX)return v3;kX=1;var e=vd(),t=fle(),r=hle();function n(a,i){return r(t(a,i,e),a+"")}return v3=n,v3}var b3,NX;function ple(){if(NX)return b3;NX=1;function e(t,r,n,a){for(var i=t.length,s=n+(a?1:-1);a?s--:++s<i;)if(r(t[s],s,t))return s;return-1}return b3=e,b3}var x3,RX;function yUe(){if(RX)return x3;RX=1;function e(t){return t!==t}return x3=e,x3}var y3,MX;function _Ue(){if(MX)return y3;MX=1;function e(t,r,n){for(var a=n-1,i=t.length;++a<i;)if(t[a]===r)return a;return-1}return y3=e,y3}var _3,DX;function wUe(){if(DX)return _3;DX=1;var e=ple(),t=yUe(),r=_Ue();function n(a,i,s){return i===i?r(a,i,s):e(a,t,s)}return _3=n,_3}var w3,OX;function EUe(){if(OX)return w3;OX=1;var e=wUe();function t(r,n){var a=r==null?0:r.length;return!!a&&e(r,n,0)>-1}return w3=t,w3}var E3,IX;function SUe(){if(IX)return E3;IX=1;function e(t,r,n){for(var a=-1,i=t==null?0:t.length;++a<i;)if(n(r,t[a]))return!0;return!1}return E3=e,E3}var S3,LX;function CUe(){if(LX)return S3;LX=1;function e(){}return S3=e,S3}var C3,PX;function TUe(){if(PX)return C3;PX=1;var e=qoe(),t=CUe(),r=SI(),n=1/0,a=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return C3=a,C3}var T3,FX;function AUe(){if(FX)return T3;FX=1;var e=Yoe(),t=EUe(),r=SUe(),n=Zoe(),a=TUe(),i=SI(),s=200;function o(l,c,u){var f=-1,p=t,m=l.length,b=!0,v=[],y=v;if(u)b=!1,p=r;else if(m>=s){var _=c?null:a(l);if(_)return i(_);b=!1,p=n,y=new e}else y=c?[]:v;e:for(;++f<m;){var S=l[f],C=c?c(S):S;if(S=u||S!==0?S:0,b&&C===C){for(var T=y.length;T--;)if(y[T]===C)continue e;c&&y.push(C),v.push(S)}else p(y,C,u)||(y!==v&&y.push(C),v.push(S))}return v}return T3=o,T3}var A3,BX;function mle(){if(BX)return A3;BX=1;var e=Ul(),t=jo();function r(n){return t(n)&&e(n)}return A3=r,A3}var k3,zX;function kUe(){if(zX)return k3;zX=1;var e=TI(),t=oy(),r=AUe(),n=mle(),a=t(function(i){return r(e(i,1,n,!0))});return k3=a,k3}var N3,jX;function NUe(){if(jX)return N3;jX=1;var e=ay();function t(r,n){return e(n,function(a){return r[a]})}return N3=t,N3}var R3,qX;function gle(){if(qX)return R3;qX=1;var e=NUe(),t=Qc();function r(n){return n==null?[]:e(n,t(n))}return R3=r,R3}var M3,UX;function xs(){if(UX)return M3;UX=1;var e;if(typeof dI=="function")try{e={clone:Pqe(),constant:_I(),each:Xoe(),filter:sle(),has:ole(),isArray:Fn(),isEmpty:sUe(),isFunction:Zm(),isUndefined:lle(),keys:Qc(),map:ule(),reduce:dle(),size:pUe(),transform:mUe(),union:kUe(),values:gle()}}catch{}return e||(e=window._),M3=e,M3}var D3,$X;function AI(){if($X)return D3;$X=1;var e=xs();D3=a;var t="\0",r="\0",n="";function a(u){this._isDirected=e.has(u,"directed")?u.directed:!0,this._isMultigraph=e.has(u,"multigraph")?u.multigraph:!1,this._isCompound=e.has(u,"compound")?u.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(u){return this._label=u,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultNodeLabelFn=u,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return e.keys(this._nodes)},a.prototype.sources=function(){var u=this;return e.filter(this.nodes(),function(f){return e.isEmpty(u._in[f])})},a.prototype.sinks=function(){var u=this;return e.filter(this.nodes(),function(f){return e.isEmpty(u._out[f])})},a.prototype.setNodes=function(u,f){var p=arguments,m=this;return e.each(u,function(b){p.length>1?m.setNode(b,f):m.setNode(b)}),this},a.prototype.setNode=function(u,f){return e.has(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=f),this):(this._nodes[u]=arguments.length>1?f:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=r,this._children[u]={},this._children[r][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)},a.prototype.node=function(u){return this._nodes[u]},a.prototype.hasNode=function(u){return e.has(this._nodes,u)},a.prototype.removeNode=function(u){var f=this;if(e.has(this._nodes,u)){var p=function(m){f.removeEdge(f._edgeObjs[m])};delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],e.each(this.children(u),function(m){f.setParent(m)}),delete this._children[u]),e.each(e.keys(this._in[u]),p),delete this._in[u],delete this._preds[u],e.each(e.keys(this._out[u]),p),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this},a.prototype.setParent=function(u,f){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(f))f=r;else{f+="";for(var p=f;!e.isUndefined(p);p=this.parent(p))if(p===u)throw new Error("Setting "+f+" as parent of "+u+" would create a cycle");this.setNode(f)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=f,this._children[f][u]=!0,this},a.prototype._removeFromParentsChildList=function(u){delete this._children[this._parent[u]][u]},a.prototype.parent=function(u){if(this._isCompound){var f=this._parent[u];if(f!==r)return f}},a.prototype.children=function(u){if(e.isUndefined(u)&&(u=r),this._isCompound){var f=this._children[u];if(f)return e.keys(f)}else{if(u===r)return this.nodes();if(this.hasNode(u))return[]}},a.prototype.predecessors=function(u){var f=this._preds[u];if(f)return e.keys(f)},a.prototype.successors=function(u){var f=this._sucs[u];if(f)return e.keys(f)},a.prototype.neighbors=function(u){var f=this.predecessors(u);if(f)return e.union(f,this.successors(u))},a.prototype.isLeaf=function(u){var f;return this.isDirected()?f=this.successors(u):f=this.neighbors(u),f.length===0},a.prototype.filterNodes=function(u){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var p=this;e.each(this._nodes,function(v,y){u(y)&&f.setNode(y,v)}),e.each(this._edgeObjs,function(v){f.hasNode(v.v)&&f.hasNode(v.w)&&f.setEdge(v,p.edge(v))});var m={};function b(v){var y=p.parent(v);return y===void 0||f.hasNode(y)?(m[v]=y,y):y in m?m[y]:b(y)}return this._isCompound&&e.each(f.nodes(),function(v){f.setParent(v,b(v))}),f},a.prototype.setDefaultEdgeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultEdgeLabelFn=u,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return e.values(this._edgeObjs)},a.prototype.setPath=function(u,f){var p=this,m=arguments;return e.reduce(u,function(b,v){return m.length>1?p.setEdge(b,v,f):p.setEdge(b,v),v}),this},a.prototype.setEdge=function(){var u,f,p,m,b=!1,v=arguments[0];typeof v=="object"&&v!==null&&"v"in v?(u=v.v,f=v.w,p=v.name,arguments.length===2&&(m=arguments[1],b=!0)):(u=v,f=arguments[1],p=arguments[3],arguments.length>2&&(m=arguments[2],b=!0)),u=""+u,f=""+f,e.isUndefined(p)||(p=""+p);var y=o(this._isDirected,u,f,p);if(e.has(this._edgeLabels,y))return b&&(this._edgeLabels[y]=m),this;if(!e.isUndefined(p)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(f),this._edgeLabels[y]=b?m:this._defaultEdgeLabelFn(u,f,p);var _=l(this._isDirected,u,f,p);return u=_.v,f=_.w,Object.freeze(_),this._edgeObjs[y]=_,i(this._preds[f],u),i(this._sucs[u],f),this._in[f][y]=_,this._out[u][y]=_,this._edgeCount++,this},a.prototype.edge=function(u,f,p){var m=arguments.length===1?c(this._isDirected,arguments[0]):o(this._isDirected,u,f,p);return this._edgeLabels[m]},a.prototype.hasEdge=function(u,f,p){var m=arguments.length===1?c(this._isDirected,arguments[0]):o(this._isDirected,u,f,p);return e.has(this._edgeLabels,m)},a.prototype.removeEdge=function(u,f,p){var m=arguments.length===1?c(this._isDirected,arguments[0]):o(this._isDirected,u,f,p),b=this._edgeObjs[m];return b&&(u=b.v,f=b.w,delete this._edgeLabels[m],delete this._edgeObjs[m],s(this._preds[f],u),s(this._sucs[u],f),delete this._in[f][m],delete this._out[u][m],this._edgeCount--),this},a.prototype.inEdges=function(u,f){var p=this._in[u];if(p){var m=e.values(p);return f?e.filter(m,function(b){return b.v===f}):m}},a.prototype.outEdges=function(u,f){var p=this._out[u];if(p){var m=e.values(p);return f?e.filter(m,function(b){return b.w===f}):m}},a.prototype.nodeEdges=function(u,f){var p=this.inEdges(u,f);if(p)return p.concat(this.outEdges(u,f))};function i(u,f){u[f]?u[f]++:u[f]=1}function s(u,f){--u[f]||delete u[f]}function o(u,f,p,m){var b=""+f,v=""+p;if(!u&&b>v){var y=b;b=v,v=y}return b+n+v+n+(e.isUndefined(m)?t:m)}function l(u,f,p,m){var b=""+f,v=""+p;if(!u&&b>v){var y=b;b=v,v=y}var _={v:b,w:v};return m&&(_.name=m),_}function c(u,f){return o(u,f.v,f.w,f.name)}return D3}var O3,HX;function RUe(){return HX||(HX=1,O3="2.1.8"),O3}var I3,GX;function MUe(){return GX||(GX=1,I3={Graph:AI(),version:RUe()}),I3}var L3,VX;function DUe(){if(VX)return L3;VX=1;var e=xs(),t=AI();L3={write:r,read:i};function r(s){var o={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:n(s),edges:a(s)};return e.isUndefined(s.graph())||(o.value=e.clone(s.graph())),o}function n(s){return e.map(s.nodes(),function(o){var l=s.node(o),c=s.parent(o),u={v:o};return e.isUndefined(l)||(u.value=l),e.isUndefined(c)||(u.parent=c),u})}function a(s){return e.map(s.edges(),function(o){var l=s.edge(o),c={v:o.v,w:o.w};return e.isUndefined(o.name)||(c.name=o.name),e.isUndefined(l)||(c.value=l),c})}function i(s){var o=new t(s.options).setGraph(s.value);return e.each(s.nodes,function(l){o.setNode(l.v,l.value),l.parent&&o.setParent(l.v,l.parent)}),e.each(s.edges,function(l){o.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),o}return L3}var P3,WX;function OUe(){if(WX)return P3;WX=1;var e=xs();P3=t;function t(r){var n={},a=[],i;function s(o){e.has(n,o)||(n[o]=!0,i.push(o),e.each(r.successors(o),s),e.each(r.predecessors(o),s))}return e.each(r.nodes(),function(o){i=[],s(o),i.length&&a.push(i)}),a}return P3}var F3,KX;function vle(){if(KX)return F3;KX=1;var e=xs();F3=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(r){return r.key})},t.prototype.has=function(r){return e.has(this._keyIndices,r)},t.prototype.priority=function(r){var n=this._keyIndices[r];if(n!==void 0)return this._arr[n].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(r,n){var a=this._keyIndices;if(r=String(r),!e.has(a,r)){var i=this._arr,s=i.length;return a[r]=s,i.push({key:r,priority:n}),this._decrease(s),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},t.prototype.decrease=function(r,n){var a=this._keyIndices[r];if(n>this._arr[a].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[a].priority+" New: "+n);this._arr[a].priority=n,this._decrease(a)},t.prototype._heapify=function(r){var n=this._arr,a=2*r,i=a+1,s=r;a<n.length&&(s=n[a].priority<n[s].priority?a:s,i<n.length&&(s=n[i].priority<n[s].priority?i:s),s!==r&&(this._swap(r,s),this._heapify(s)))},t.prototype._decrease=function(r){for(var n=this._arr,a=n[r].priority,i;r!==0&&(i=r>>1,!(n[i].priority<a));)this._swap(r,i),r=i},t.prototype._swap=function(r,n){var a=this._arr,i=this._keyIndices,s=a[r],o=a[n];a[r]=o,a[n]=s,i[o.key]=r,i[s.key]=n},F3}var B3,XX;function ble(){if(XX)return B3;XX=1;var e=xs(),t=vle();B3=n;var r=e.constant(1);function n(i,s,o,l){return a(i,String(s),o||r,l||function(c){return i.outEdges(c)})}function a(i,s,o,l){var c={},u=new t,f,p,m=function(b){var v=b.v!==f?b.v:b.w,y=c[v],_=o(b),S=p.distance+_;if(_<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+b+" Weight: "+_);S<y.distance&&(y.distance=S,y.predecessor=f,u.decrease(v,S))};for(i.nodes().forEach(function(b){var v=b===s?0:Number.POSITIVE_INFINITY;c[b]={distance:v},u.add(b,v)});u.size()>0&&(f=u.removeMin(),p=c[f],p.distance!==Number.POSITIVE_INFINITY);)l(f).forEach(m);return c}return B3}var z3,YX;function IUe(){if(YX)return z3;YX=1;var e=ble(),t=xs();z3=r;function r(n,a,i){return t.transform(n.nodes(),function(s,o){s[o]=e(n,o,a,i)},{})}return z3}var j3,ZX;function xle(){if(ZX)return j3;ZX=1;var e=xs();j3=t;function t(r){var n=0,a=[],i={},s=[];function o(l){var c=i[l]={onStack:!0,lowlink:n,index:n++};if(a.push(l),r.successors(l).forEach(function(p){e.has(i,p)?i[p].onStack&&(c.lowlink=Math.min(c.lowlink,i[p].index)):(o(p),c.lowlink=Math.min(c.lowlink,i[p].lowlink))}),c.lowlink===c.index){var u=[],f;do f=a.pop(),i[f].onStack=!1,u.push(f);while(l!==f);s.push(u)}}return r.nodes().forEach(function(l){e.has(i,l)||o(l)}),s}return j3}var q3,QX;function LUe(){if(QX)return q3;QX=1;var e=xs(),t=xle();q3=r;function r(n){return e.filter(t(n),function(a){return a.length>1||a.length===1&&n.hasEdge(a[0],a[0])})}return q3}var U3,JX;function PUe(){if(JX)return U3;JX=1;var e=xs();U3=r;var t=e.constant(1);function r(a,i,s){return n(a,i||t,s||function(o){return a.outEdges(o)})}function n(a,i,s){var o={},l=a.nodes();return l.forEach(function(c){o[c]={},o[c][c]={distance:0},l.forEach(function(u){c!==u&&(o[c][u]={distance:Number.POSITIVE_INFINITY})}),s(c).forEach(function(u){var f=u.v===c?u.w:u.v,p=i(u);o[c][f]={distance:p,predecessor:c}})}),l.forEach(function(c){var u=o[c];l.forEach(function(f){var p=o[f];l.forEach(function(m){var b=p[c],v=u[m],y=p[m],_=b.distance+v.distance;_<y.distance&&(y.distance=_,y.predecessor=v.predecessor)})})}),o}return U3}var $3,eY;function yle(){if(eY)return $3;eY=1;var e=xs();$3=t,t.CycleException=r;function t(n){var a={},i={},s=[];function o(l){if(e.has(i,l))throw new r;e.has(a,l)||(i[l]=!0,a[l]=!0,e.each(n.predecessors(l),o),delete i[l],s.push(l))}if(e.each(n.sinks(),o),e.size(a)!==n.nodeCount())throw new r;return s}function r(){}return r.prototype=new Error,$3}var H3,tY;function FUe(){if(tY)return H3;tY=1;var e=yle();H3=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return H3}var G3,rY;function _le(){if(rY)return G3;rY=1;var e=xs();G3=t;function t(n,a,i){e.isArray(a)||(a=[a]);var s=(n.isDirected()?n.successors:n.neighbors).bind(n),o=[],l={};return e.each(a,function(c){if(!n.hasNode(c))throw new Error("Graph does not have node: "+c);r(n,c,i==="post",l,s,o)}),o}function r(n,a,i,s,o,l){e.has(s,a)||(s[a]=!0,i||l.push(a),e.each(o(a),function(c){r(n,c,i,s,o,l)}),i&&l.push(a))}return G3}var V3,nY;function BUe(){if(nY)return V3;nY=1;var e=_le();V3=t;function t(r,n){return e(r,n,"post")}return V3}var W3,aY;function zUe(){if(aY)return W3;aY=1;var e=_le();W3=t;function t(r,n){return e(r,n,"pre")}return W3}var K3,iY;function jUe(){if(iY)return K3;iY=1;var e=xs(),t=AI(),r=vle();K3=n;function n(a,i){var s=new t,o={},l=new r,c;function u(p){var m=p.v===c?p.w:p.v,b=l.priority(m);if(b!==void 0){var v=i(p);v<b&&(o[m]=c,l.decrease(m,v))}}if(a.nodeCount()===0)return s;e.each(a.nodes(),function(p){l.add(p,Number.POSITIVE_INFINITY),s.setNode(p)}),l.decrease(a.nodes()[0],0);for(var f=!1;l.size()>0;){if(c=l.removeMin(),e.has(o,c))s.setEdge(c,o[c]);else{if(f)throw new Error("Input graph is not connected: "+a);f=!0}a.nodeEdges(c).forEach(u)}return s}return K3}var X3,sY;function qUe(){return sY||(sY=1,X3={components:OUe(),dijkstra:ble(),dijkstraAll:IUe(),findCycles:LUe(),floydWarshall:PUe(),isAcyclic:FUe(),postorder:BUe(),preorder:zUe(),prim:jUe(),tarjan:xle(),topsort:yle()}),X3}var Y3,oY;function UUe(){if(oY)return Y3;oY=1;var e=MUe();return Y3={Graph:e.Graph,json:DUe(),alg:qUe(),version:e.version},Y3}var Z3,lY;function Hs(){if(lY)return Z3;lY=1;var e;if(typeof dI=="function")try{e=UUe()}catch{}return e||(e=window.graphlib),Z3=e,Z3}var Q3,cY;function $Ue(){if(cY)return Q3;cY=1;var e=Voe(),t=1,r=4;function n(a){return e(a,t|r)}return Q3=n,Q3}var J3,uY;function ly(){if(uY)return J3;uY=1;var e=R0(),t=Ul(),r=Jx(),n=bs();function a(i,s,o){if(!n(o))return!1;var l=typeof s;return(l=="number"?t(o)&&r(s,o.length):l=="string"&&s in o)?e(o[s],i):!1}return J3=a,J3}var eR,dY;function HUe(){if(dY)return eR;dY=1;var e=oy(),t=R0(),r=ly(),n=gd(),a=Object.prototype,i=a.hasOwnProperty,s=e(function(o,l){o=Object(o);var c=-1,u=l.length,f=u>2?l[2]:void 0;for(f&&r(l[0],l[1],f)&&(u=1);++c<u;)for(var p=l[c],m=n(p),b=-1,v=m.length;++b<v;){var y=m[b],_=o[y];(_===void 0||t(_,a[y])&&!i.call(o,y))&&(o[y]=p[y])}return o});return eR=s,eR}var tR,fY;function GUe(){if(fY)return tR;fY=1;var e=$l(),t=Ul(),r=Qc();function n(a){return function(i,s,o){var l=Object(i);if(!t(i)){var c=e(s,3);i=r(i),s=function(f){return c(l[f],f,l)}}var u=a(i,s,o);return u>-1?l[c?i[u]:u]:void 0}}return tR=n,tR}var rR,hY;function VUe(){if(hY)return rR;hY=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return rR=t,rR}var nR,pY;function WUe(){if(pY)return nR;pY=1;var e=VUe(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return nR=r,nR}var aR,mY;function KUe(){if(mY)return aR;mY=1;var e=WUe(),t=bs(),r=I0(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function l(c){if(typeof c=="number")return c;if(r(c))return n;if(t(c)){var u=typeof c.valueOf=="function"?c.valueOf():c;c=t(u)?u+"":u}if(typeof c!="string")return c===0?c:+c;c=e(c);var f=i.test(c);return f||s.test(c)?o(c.slice(2),f?2:8):a.test(c)?n:+c}return aR=l,aR}var iR,gY;function wle(){if(gY)return iR;gY=1;var e=KUe(),t=1/0,r=17976931348623157e292;function n(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var i=a<0?-1:1;return i*r}return a===a?a:0}return iR=n,iR}var sR,vY;function XUe(){if(vY)return sR;vY=1;var e=wle();function t(r){var n=e(r),a=n%1;return n===n?a?n-a:n:0}return sR=t,sR}var oR,bY;function YUe(){if(bY)return oR;bY=1;var e=ple(),t=$l(),r=XUe(),n=Math.max;function a(i,s,o){var l=i==null?0:i.length;if(!l)return-1;var c=o==null?0:r(o);return c<0&&(c=n(l+c,0)),e(i,t(s,3),c)}return oR=a,oR}var lR,xY;function ZUe(){if(xY)return lR;xY=1;var e=GUe(),t=YUe(),r=e(t);return lR=r,lR}var cR,yY;function Ele(){if(yY)return cR;yY=1;var e=TI();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return cR=t,cR}var uR,_Y;function QUe(){if(_Y)return uR;_Y=1;var e=wI(),t=Woe(),r=gd();function n(a,i){return a==null?a:e(a,t(i),r)}return uR=n,uR}var dR,wY;function JUe(){if(wY)return dR;wY=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return dR=e,dR}var fR,EY;function e$e(){if(EY)return fR;EY=1;var e=Zx(),t=EI(),r=$l();function n(a,i){var s={};return i=r(i,3),t(a,function(o,l,c){e(s,l,i(o,l,c))}),s}return fR=n,fR}var hR,SY;function kI(){if(SY)return hR;SY=1;var e=I0();function t(r,n,a){for(var i=-1,s=r.length;++i<s;){var o=r[i],l=n(o);if(l!=null&&(c===void 0?l===l&&!e(l):a(l,c)))var c=l,u=o}return u}return hR=t,hR}var pR,CY;function t$e(){if(CY)return pR;CY=1;function e(t,r){return t>r}return pR=e,pR}var mR,TY;function r$e(){if(TY)return mR;TY=1;var e=kI(),t=t$e(),r=vd();function n(a){return a&&a.length?e(a,r,t):void 0}return mR=n,mR}var gR,AY;function Sle(){if(AY)return gR;AY=1;var e=Zx(),t=R0();function r(n,a,i){(i!==void 0&&!t(n[a],i)||i===void 0&&!(a in n))&&e(n,a,i)}return gR=r,gR}var vR,kY;function n$e(){if(kY)return vR;kY=1;var e=pd(),t=ry(),r=jo(),n="[object Object]",a=Function.prototype,i=Object.prototype,s=a.toString,o=i.hasOwnProperty,l=s.call(Object);function c(u){if(!r(u)||e(u)!=n)return!1;var f=t(u);if(f===null)return!0;var p=o.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&s.call(p)==l}return vR=c,vR}var bR,NY;function Cle(){if(NY)return bR;NY=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return bR=e,bR}var xR,RY;function a$e(){if(RY)return xR;RY=1;var e=Qm(),t=gd();function r(n){return e(n,t(n))}return xR=r,xR}var yR,MY;function i$e(){if(MY)return yR;MY=1;var e=Sle(),t=Ioe(),r=$oe(),n=Loe(),a=Goe(),i=Jm(),s=Fn(),o=mle(),l=D0(),c=Zm(),u=bs(),f=n$e(),p=eg(),m=Cle(),b=a$e();function v(y,_,S,C,T,A,k){var N=m(y,S),L=m(_,S),I=k.get(L);if(I){e(y,S,I);return}var P=A?A(N,L,S+"",y,_,k):void 0,H=P===void 0;if(H){var B=s(L),K=!B&&l(L),j=!B&&!K&&p(L);P=L,B||K||j?s(N)?P=N:o(N)?P=n(N):K?(H=!1,P=t(L,!0)):j?(H=!1,P=r(L,!0)):P=[]:f(L)||i(L)?(P=N,i(N)?P=b(N):(!u(N)||c(N))&&(P=a(L))):H=!1}H&&(k.set(L,P),T(P,L,C,A,k),k.delete(L)),e(y,S,P)}return yR=v,yR}var _R,DY;function s$e(){if(DY)return _R;DY=1;var e=Yx(),t=Sle(),r=wI(),n=i$e(),a=bs(),i=gd(),s=Cle();function o(l,c,u,f,p){l!==c&&r(c,function(m,b){if(p||(p=new e),a(m))n(l,c,b,u,o,f,p);else{var v=f?f(s(l,b),m,b+"",l,c,p):void 0;v===void 0&&(v=m),t(l,b,v)}},i)}return _R=o,_R}var wR,OY;function o$e(){if(OY)return wR;OY=1;var e=oy(),t=ly();function r(n){return e(function(a,i){var s=-1,o=i.length,l=o>1?i[o-1]:void 0,c=o>2?i[2]:void 0;for(l=n.length>3&&typeof l=="function"?(o--,l):void 0,c&&t(i[0],i[1],c)&&(l=o<3?void 0:l,o=1),a=Object(a);++s<o;){var u=i[s];u&&n(a,u,s,l)}return a})}return wR=r,wR}var ER,IY;function l$e(){if(IY)return ER;IY=1;var e=s$e(),t=o$e(),r=t(function(n,a,i){e(n,a,i)});return ER=r,ER}var SR,LY;function Tle(){if(LY)return SR;LY=1;function e(t,r){return t<r}return SR=e,SR}var CR,PY;function c$e(){if(PY)return CR;PY=1;var e=kI(),t=Tle(),r=vd();function n(a){return a&&a.length?e(a,r,t):void 0}return CR=n,CR}var TR,FY;function u$e(){if(FY)return TR;FY=1;var e=kI(),t=$l(),r=Tle();function n(a,i){return a&&a.length?e(a,t(i,2),r):void 0}return TR=n,TR}var AR,BY;function d$e(){if(BY)return AR;BY=1;var e=Js(),t=function(){return e.Date.now()};return AR=t,AR}var kR,zY;function f$e(){if(zY)return kR;zY=1;var e=Qx(),t=iy(),r=Jx(),n=bs(),a=tg();function i(s,o,l,c){if(!n(s))return s;o=t(o,s);for(var u=-1,f=o.length,p=f-1,m=s;m!=null&&++u<f;){var b=a(o[u]),v=l;if(b==="__proto__"||b==="constructor"||b==="prototype")return s;if(u!=p){var y=m[b];v=c?c(y,b,m):void 0,v===void 0&&(v=n(y)?y:r(o[u+1])?[]:{})}e(m,b,v),m=m[b]}return s}return kR=i,kR}var NR,jY;function h$e(){if(jY)return NR;jY=1;var e=sy(),t=f$e(),r=iy();function n(a,i,s){for(var o=-1,l=i.length,c={};++o<l;){var u=i[o],f=e(a,u);s(f,u)&&t(c,r(u,a),f)}return c}return NR=n,NR}var RR,qY;function p$e(){if(qY)return RR;qY=1;var e=h$e(),t=ale();function r(n,a){return e(n,a,function(i,s){return t(n,s)})}return RR=r,RR}var MR,UY;function m$e(){if(UY)return MR;UY=1;var e=Ele(),t=fle(),r=hle();function n(a){return r(t(a,void 0,e),a+"")}return MR=n,MR}var DR,$Y;function g$e(){if($Y)return DR;$Y=1;var e=p$e(),t=m$e(),r=t(function(n,a){return n==null?{}:e(n,a)});return DR=r,DR}var OR,HY;function v$e(){if(HY)return OR;HY=1;var e=Math.ceil,t=Math.max;function r(n,a,i,s){for(var o=-1,l=t(e((a-n)/(i||1)),0),c=Array(l);l--;)c[s?l:++o]=n,n+=i;return c}return OR=r,OR}var IR,GY;function b$e(){if(GY)return IR;GY=1;var e=v$e(),t=ly(),r=wle();function n(a){return function(i,s,o){return o&&typeof o!="number"&&t(i,s,o)&&(s=o=void 0),i=r(i),s===void 0?(s=i,i=0):s=r(s),o=o===void 0?i<s?1:-1:r(o),e(i,s,o,a)}}return IR=n,IR}var LR,VY;function x$e(){if(VY)return LR;VY=1;var e=b$e(),t=e();return LR=t,LR}var PR,WY;function y$e(){if(WY)return PR;WY=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return PR=e,PR}var FR,KY;function _$e(){if(KY)return FR;KY=1;var e=I0();function t(r,n){if(r!==n){var a=r!==void 0,i=r===null,s=r===r,o=e(r),l=n!==void 0,c=n===null,u=n===n,f=e(n);if(!c&&!f&&!o&&r>n||o&&l&&u&&!c&&!f||i&&l&&u||!a&&u||!s)return 1;if(!i&&!o&&!f&&r<n||f&&a&&s&&!i&&!o||c&&a&&s||!l&&s||!u)return-1}return 0}return FR=t,FR}var BR,XY;function w$e(){if(XY)return BR;XY=1;var e=_$e();function t(r,n,a){for(var i=-1,s=r.criteria,o=n.criteria,l=s.length,c=a.length;++i<l;){var u=e(s[i],o[i]);if(u){if(i>=c)return u;var f=a[i];return u*(f=="desc"?-1:1)}}return r.index-n.index}return BR=t,BR}var zR,YY;function E$e(){if(YY)return zR;YY=1;var e=ay(),t=sy(),r=$l(),n=cle(),a=y$e(),i=ey(),s=w$e(),o=vd(),l=Fn();function c(u,f,p){f.length?f=e(f,function(v){return l(v)?function(y){return t(y,v.length===1?v[0]:v)}:v}):f=[o];var m=-1;f=e(f,i(r));var b=n(u,function(v,y,_){var S=e(f,function(C){return C(v)});return{criteria:S,index:++m,value:v}});return a(b,function(v,y){return s(v,y,p)})}return zR=c,zR}var jR,ZY;function S$e(){if(ZY)return jR;ZY=1;var e=TI(),t=E$e(),r=oy(),n=ly(),a=r(function(i,s){if(i==null)return[];var o=s.length;return o>1&&n(i,s[0],s[1])?s=[]:o>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),t(i,e(s,1),[])});return jR=a,jR}var qR,QY;function C$e(){if(QY)return qR;QY=1;var e=rle(),t=0;function r(n){var a=++t;return e(n)+a}return qR=r,qR}var UR,JY;function T$e(){if(JY)return UR;JY=1;function e(t,r,n){for(var a=-1,i=t.length,s=r.length,o={};++a<i;){var l=a<s?r[a]:void 0;n(o,t[a],l)}return o}return UR=e,UR}var $R,eZ;function A$e(){if(eZ)return $R;eZ=1;var e=Qx(),t=T$e();function r(n,a){return t(n||[],a||[],e)}return $R=r,$R}var HR,tZ;function en(){if(tZ)return HR;tZ=1;var e;if(typeof dI=="function")try{e={cloneDeep:$Ue(),constant:_I(),defaults:HUe(),each:Xoe(),filter:sle(),find:ZUe(),flatten:Ele(),forEach:Koe(),forIn:QUe(),has:ole(),isUndefined:lle(),last:JUe(),map:ule(),mapValues:e$e(),max:r$e(),merge:l$e(),min:c$e(),minBy:u$e(),now:d$e(),pick:g$e(),range:x$e(),reduce:dle(),sortBy:S$e(),uniqueId:C$e(),values:gle(),zipObject:A$e()}}catch{}return e||(e=window._),HR=e,HR}var GR,rZ;function k$e(){if(rZ)return GR;rZ=1,GR=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,a=n._prev;if(a!==n)return t(a),a},e.prototype.enqueue=function(n){var a=this._sentinel;n._prev&&n._next&&t(n),n._next=a._next,a._next._prev=n,a._next=n,n._prev=a},e.prototype.toString=function(){for(var n=[],a=this._sentinel,i=a._prev;i!==a;)n.push(JSON.stringify(i,r)),i=i._prev;return"["+n.join(", ")+"]"};function t(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function r(n,a){if(n!=="_next"&&n!=="_prev")return a}return GR}var VR,nZ;function N$e(){if(nZ)return VR;nZ=1;var e=en(),t=Hs().Graph,r=k$e();VR=a;var n=e.constant(1);function a(c,u){if(c.nodeCount()<=1)return[];var f=o(c,u||n),p=i(f.graph,f.buckets,f.zeroIdx);return e.flatten(e.map(p,function(m){return c.outEdges(m.v,m.w)}),!0)}function i(c,u,f){for(var p=[],m=u[u.length-1],b=u[0],v;c.nodeCount();){for(;v=b.dequeue();)s(c,u,f,v);for(;v=m.dequeue();)s(c,u,f,v);if(c.nodeCount()){for(var y=u.length-2;y>0;--y)if(v=u[y].dequeue(),v){p=p.concat(s(c,u,f,v,!0));break}}}return p}function s(c,u,f,p,m){var b=m?[]:void 0;return e.forEach(c.inEdges(p.v),function(v){var y=c.edge(v),_=c.node(v.v);m&&b.push({v:v.v,w:v.w}),_.out-=y,l(u,f,_)}),e.forEach(c.outEdges(p.v),function(v){var y=c.edge(v),_=v.w,S=c.node(_);S.in-=y,l(u,f,S)}),c.removeNode(p.v),b}function o(c,u){var f=new t,p=0,m=0;e.forEach(c.nodes(),function(y){f.setNode(y,{v:y,in:0,out:0})}),e.forEach(c.edges(),function(y){var _=f.edge(y.v,y.w)||0,S=u(y),C=_+S;f.setEdge(y.v,y.w,C),m=Math.max(m,f.node(y.v).out+=S),p=Math.max(p,f.node(y.w).in+=S)});var b=e.range(m+p+3).map(function(){return new r}),v=p+1;return e.forEach(f.nodes(),function(y){l(b,v,f.node(y))}),{graph:f,buckets:b,zeroIdx:v}}function l(c,u,f){f.out?f.in?c[f.out-f.in+u].enqueue(f):c[c.length-1].enqueue(f):c[0].enqueue(f)}return VR}var WR,aZ;function R$e(){if(aZ)return WR;aZ=1;var e=en(),t=N$e();WR={run:r,undo:a};function r(i){var s=i.graph().acyclicer==="greedy"?t(i,o(i)):n(i);e.forEach(s,function(l){var c=i.edge(l);i.removeEdge(l),c.forwardName=l.name,c.reversed=!0,i.setEdge(l.w,l.v,c,e.uniqueId("rev"))});function o(l){return function(c){return l.edge(c).weight}}}function n(i){var s=[],o={},l={};function c(u){e.has(l,u)||(l[u]=!0,o[u]=!0,e.forEach(i.outEdges(u),function(f){e.has(o,f.w)?s.push(f):c(f.w)}),delete o[u])}return e.forEach(i.nodes(),c),s}function a(i){e.forEach(i.edges(),function(s){var o=i.edge(s);if(o.reversed){i.removeEdge(s);var l=o.forwardName;delete o.reversed,delete o.forwardName,i.setEdge(s.w,s.v,o,l)}})}return WR}var KR,iZ;function ii(){if(iZ)return KR;iZ=1;var e=en(),t=Hs().Graph;KR={addDummyNode:r,simplify:n,asNonCompoundGraph:a,successorWeights:i,predecessorWeights:s,intersectRect:o,buildLayerMatrix:l,normalizeRanks:c,removeEmptyRanks:u,addBorderNode:f,maxRank:p,partition:m,time:b,notime:v};function r(y,_,S,C){var T;do T=e.uniqueId(C);while(y.hasNode(T));return S.dummy=_,y.setNode(T,S),T}function n(y){var _=new t().setGraph(y.graph());return e.forEach(y.nodes(),function(S){_.setNode(S,y.node(S))}),e.forEach(y.edges(),function(S){var C=_.edge(S.v,S.w)||{weight:0,minlen:1},T=y.edge(S);_.setEdge(S.v,S.w,{weight:C.weight+T.weight,minlen:Math.max(C.minlen,T.minlen)})}),_}function a(y){var _=new t({multigraph:y.isMultigraph()}).setGraph(y.graph());return e.forEach(y.nodes(),function(S){y.children(S).length||_.setNode(S,y.node(S))}),e.forEach(y.edges(),function(S){_.setEdge(S,y.edge(S))}),_}function i(y){var _=e.map(y.nodes(),function(S){var C={};return e.forEach(y.outEdges(S),function(T){C[T.w]=(C[T.w]||0)+y.edge(T).weight}),C});return e.zipObject(y.nodes(),_)}function s(y){var _=e.map(y.nodes(),function(S){var C={};return e.forEach(y.inEdges(S),function(T){C[T.v]=(C[T.v]||0)+y.edge(T).weight}),C});return e.zipObject(y.nodes(),_)}function o(y,_){var S=y.x,C=y.y,T=_.x-S,A=_.y-C,k=y.width/2,N=y.height/2;if(!T&&!A)throw new Error("Not possible to find intersection inside of the rectangle");var L,I;return Math.abs(A)*k>Math.abs(T)*N?(A<0&&(N=-N),L=N*T/A,I=N):(T<0&&(k=-k),L=k,I=k*A/T),{x:S+L,y:C+I}}function l(y){var _=e.map(e.range(p(y)+1),function(){return[]});return e.forEach(y.nodes(),function(S){var C=y.node(S),T=C.rank;e.isUndefined(T)||(_[T][C.order]=S)}),_}function c(y){var _=e.min(e.map(y.nodes(),function(S){return y.node(S).rank}));e.forEach(y.nodes(),function(S){var C=y.node(S);e.has(C,"rank")&&(C.rank-=_)})}function u(y){var _=e.min(e.map(y.nodes(),function(A){return y.node(A).rank})),S=[];e.forEach(y.nodes(),function(A){var k=y.node(A).rank-_;S[k]||(S[k]=[]),S[k].push(A)});var C=0,T=y.graph().nodeRankFactor;e.forEach(S,function(A,k){e.isUndefined(A)&&k%T!==0?--C:C&&e.forEach(A,function(N){y.node(N).rank+=C})})}function f(y,_,S,C){var T={width:0,height:0};return arguments.length>=4&&(T.rank=S,T.order=C),r(y,"border",T,_)}function p(y){return e.max(e.map(y.nodes(),function(_){var S=y.node(_).rank;if(!e.isUndefined(S))return S}))}function m(y,_){var S={lhs:[],rhs:[]};return e.forEach(y,function(C){_(C)?S.lhs.push(C):S.rhs.push(C)}),S}function b(y,_){var S=e.now();try{return _()}finally{console.log(y+" time: "+(e.now()-S)+"ms")}}function v(y,_){return _()}return KR}var XR,sZ;function M$e(){if(sZ)return XR;sZ=1;var e=en(),t=ii();XR={run:r,undo:a};function r(i){i.graph().dummyChains=[],e.forEach(i.edges(),function(s){n(i,s)})}function n(i,s){var o=s.v,l=i.node(o).rank,c=s.w,u=i.node(c).rank,f=s.name,p=i.edge(s),m=p.labelRank;if(u!==l+1){i.removeEdge(s);var b,v,y;for(y=0,++l;l<u;++y,++l)p.points=[],v={width:0,height:0,edgeLabel:p,edgeObj:s,rank:l},b=t.addDummyNode(i,"edge",v,"_d"),l===m&&(v.width=p.width,v.height=p.height,v.dummy="edge-label",v.labelpos=p.labelpos),i.setEdge(o,b,{weight:p.weight},f),y===0&&i.graph().dummyChains.push(b),o=b;i.setEdge(o,c,{weight:p.weight},f)}}function a(i){e.forEach(i.graph().dummyChains,function(s){var o=i.node(s),l=o.edgeLabel,c;for(i.setEdge(o.edgeObj,l);o.dummy;)c=i.successors(s)[0],i.removeNode(s),l.points.push({x:o.x,y:o.y}),o.dummy==="edge-label"&&(l.x=o.x,l.y=o.y,l.width=o.width,l.height=o.height),s=c,o=i.node(s)})}return XR}var YR,oZ;function Ob(){if(oZ)return YR;oZ=1;var e=en();YR={longestPath:t,slack:r};function t(n){var a={};function i(s){var o=n.node(s);if(e.has(a,s))return o.rank;a[s]=!0;var l=e.min(e.map(n.outEdges(s),function(c){return i(c.w)-n.edge(c).minlen}));return(l===Number.POSITIVE_INFINITY||l===void 0||l===null)&&(l=0),o.rank=l}e.forEach(n.sources(),i)}function r(n,a){return n.node(a.w).rank-n.node(a.v).rank-n.edge(a).minlen}return YR}var ZR,lZ;function Ale(){if(lZ)return ZR;lZ=1;var e=en(),t=Hs().Graph,r=Ob().slack;ZR=n;function n(o){var l=new t({directed:!1}),c=o.nodes()[0],u=o.nodeCount();l.setNode(c,{});for(var f,p;a(l,o)<u;)f=i(l,o),p=l.hasNode(f.v)?r(o,f):-r(o,f),s(l,o,p);return l}function a(o,l){function c(u){e.forEach(l.nodeEdges(u),function(f){var p=f.v,m=u===p?f.w:p;!o.hasNode(m)&&!r(l,f)&&(o.setNode(m,{}),o.setEdge(u,m,{}),c(m))})}return e.forEach(o.nodes(),c),o.nodeCount()}function i(o,l){return e.minBy(l.edges(),function(c){if(o.hasNode(c.v)!==o.hasNode(c.w))return r(l,c)})}function s(o,l,c){e.forEach(o.nodes(),function(u){l.node(u).rank+=c})}return ZR}var QR,cZ;function D$e(){if(cZ)return QR;cZ=1;var e=en(),t=Ale(),r=Ob().slack,n=Ob().longestPath,a=Hs().alg.preorder,i=Hs().alg.postorder,s=ii().simplify;QR=o,o.initLowLimValues=f,o.initCutValues=l,o.calcCutValue=u,o.leaveEdge=m,o.enterEdge=b,o.exchangeEdges=v;function o(C){C=s(C),n(C);var T=t(C);f(T),l(T,C);for(var A,k;A=m(T);)k=b(T,C,A),v(T,C,A,k)}function l(C,T){var A=i(C,C.nodes());A=A.slice(0,A.length-1),e.forEach(A,function(k){c(C,T,k)})}function c(C,T,A){var k=C.node(A),N=k.parent;C.edge(A,N).cutvalue=u(C,T,A)}function u(C,T,A){var k=C.node(A),N=k.parent,L=!0,I=T.edge(A,N),P=0;return I||(L=!1,I=T.edge(N,A)),P=I.weight,e.forEach(T.nodeEdges(A),function(H){var B=H.v===A,K=B?H.w:H.v;if(K!==N){var j=B===L,W=T.edge(H).weight;if(P+=j?W:-W,_(C,A,K)){var D=C.edge(A,K).cutvalue;P+=j?-D:D}}}),P}function f(C,T){arguments.length<2&&(T=C.nodes()[0]),p(C,{},1,T)}function p(C,T,A,k,N){var L=A,I=C.node(k);return T[k]=!0,e.forEach(C.neighbors(k),function(P){e.has(T,P)||(A=p(C,T,A,P,k))}),I.low=L,I.lim=A++,N?I.parent=N:delete I.parent,A}function m(C){return e.find(C.edges(),function(T){return C.edge(T).cutvalue<0})}function b(C,T,A){var k=A.v,N=A.w;T.hasEdge(k,N)||(k=A.w,N=A.v);var L=C.node(k),I=C.node(N),P=L,H=!1;L.lim>I.lim&&(P=I,H=!0);var B=e.filter(T.edges(),function(K){return H===S(C,C.node(K.v),P)&&H!==S(C,C.node(K.w),P)});return e.minBy(B,function(K){return r(T,K)})}function v(C,T,A,k){var N=A.v,L=A.w;C.removeEdge(N,L),C.setEdge(k.v,k.w,{}),f(C),l(C,T),y(C,T)}function y(C,T){var A=e.find(C.nodes(),function(N){return!T.node(N).parent}),k=a(C,A);k=k.slice(1),e.forEach(k,function(N){var L=C.node(N).parent,I=T.edge(N,L),P=!1;I||(I=T.edge(L,N),P=!0),T.node(N).rank=T.node(L).rank+(P?I.minlen:-I.minlen)})}function _(C,T,A){return C.hasEdge(T,A)}function S(C,T,A){return A.low<=T.lim&&T.lim<=A.lim}return QR}var JR,uZ;function O$e(){if(uZ)return JR;uZ=1;var e=Ob(),t=e.longestPath,r=Ale(),n=D$e();JR=a;function a(l){switch(l.graph().ranker){case"network-simplex":o(l);break;case"tight-tree":s(l);break;case"longest-path":i(l);break;default:o(l)}}var i=t;function s(l){t(l),r(l)}function o(l){n(l)}return JR}var eM,dZ;function I$e(){if(dZ)return eM;dZ=1;var e=en();eM=t;function t(a){var i=n(a);e.forEach(a.graph().dummyChains,function(s){for(var o=a.node(s),l=o.edgeObj,c=r(a,i,l.v,l.w),u=c.path,f=c.lca,p=0,m=u[p],b=!0;s!==l.w;){if(o=a.node(s),b){for(;(m=u[p])!==f&&a.node(m).maxRank<o.rank;)p++;m===f&&(b=!1)}if(!b){for(;p<u.length-1&&a.node(m=u[p+1]).minRank<=o.rank;)p++;m=u[p]}a.setParent(s,m),s=a.successors(s)[0]}})}function r(a,i,s,o){var l=[],c=[],u=Math.min(i[s].low,i[o].low),f=Math.max(i[s].lim,i[o].lim),p,m;p=s;do p=a.parent(p),l.push(p);while(p&&(i[p].low>u||f>i[p].lim));for(m=p,p=o;(p=a.parent(p))!==m;)c.push(p);return{path:l.concat(c.reverse()),lca:m}}function n(a){var i={},s=0;function o(l){var c=s;e.forEach(a.children(l),o),i[l]={low:c,lim:s++}}return e.forEach(a.children(),o),i}return eM}var tM,fZ;function L$e(){if(fZ)return tM;fZ=1;var e=en(),t=ii();tM={run:r,cleanup:s};function r(o){var l=t.addDummyNode(o,"root",{},"_root"),c=a(o),u=e.max(e.values(c))-1,f=2*u+1;o.graph().nestingRoot=l,e.forEach(o.edges(),function(m){o.edge(m).minlen*=f});var p=i(o)+1;e.forEach(o.children(),function(m){n(o,l,f,p,u,c,m)}),o.graph().nodeRankFactor=f}function n(o,l,c,u,f,p,m){var b=o.children(m);if(!b.length){m!==l&&o.setEdge(l,m,{weight:0,minlen:c});return}var v=t.addBorderNode(o,"_bt"),y=t.addBorderNode(o,"_bb"),_=o.node(m);o.setParent(v,m),_.borderTop=v,o.setParent(y,m),_.borderBottom=y,e.forEach(b,function(S){n(o,l,c,u,f,p,S);var C=o.node(S),T=C.borderTop?C.borderTop:S,A=C.borderBottom?C.borderBottom:S,k=C.borderTop?u:2*u,N=T!==A?1:f-p[m]+1;o.setEdge(v,T,{weight:k,minlen:N,nestingEdge:!0}),o.setEdge(A,y,{weight:k,minlen:N,nestingEdge:!0})}),o.parent(m)||o.setEdge(l,v,{weight:0,minlen:f+p[m]})}function a(o){var l={};function c(u,f){var p=o.children(u);p&&p.length&&e.forEach(p,function(m){c(m,f+1)}),l[u]=f}return e.forEach(o.children(),function(u){c(u,1)}),l}function i(o){return e.reduce(o.edges(),function(l,c){return l+o.edge(c).weight},0)}function s(o){var l=o.graph();o.removeNode(l.nestingRoot),delete l.nestingRoot,e.forEach(o.edges(),function(c){var u=o.edge(c);u.nestingEdge&&o.removeEdge(c)})}return tM}var rM,hZ;function P$e(){if(hZ)return rM;hZ=1;var e=en(),t=ii();rM=r;function r(a){function i(s){var o=a.children(s),l=a.node(s);if(o.length&&e.forEach(o,i),e.has(l,"minRank")){l.borderLeft=[],l.borderRight=[];for(var c=l.minRank,u=l.maxRank+1;c<u;++c)n(a,"borderLeft","_bl",s,l,c),n(a,"borderRight","_br",s,l,c)}}e.forEach(a.children(),i)}function n(a,i,s,o,l,c){var u={width:0,height:0,rank:c,borderType:i},f=l[i][c-1],p=t.addDummyNode(a,"border",u,s);l[i][c]=p,a.setParent(p,o),f&&a.setEdge(f,p,{weight:1})}return rM}var nM,pZ;function F$e(){if(pZ)return nM;pZ=1;var e=en();nM={adjust:t,undo:r};function t(c){var u=c.graph().rankdir.toLowerCase();(u==="lr"||u==="rl")&&n(c)}function r(c){var u=c.graph().rankdir.toLowerCase();(u==="bt"||u==="rl")&&i(c),(u==="lr"||u==="rl")&&(o(c),n(c))}function n(c){e.forEach(c.nodes(),function(u){a(c.node(u))}),e.forEach(c.edges(),function(u){a(c.edge(u))})}function a(c){var u=c.width;c.width=c.height,c.height=u}function i(c){e.forEach(c.nodes(),function(u){s(c.node(u))}),e.forEach(c.edges(),function(u){var f=c.edge(u);e.forEach(f.points,s),e.has(f,"y")&&s(f)})}function s(c){c.y=-c.y}function o(c){e.forEach(c.nodes(),function(u){l(c.node(u))}),e.forEach(c.edges(),function(u){var f=c.edge(u);e.forEach(f.points,l),e.has(f,"x")&&l(f)})}function l(c){var u=c.x;c.x=c.y,c.y=u}return nM}var aM,mZ;function B$e(){if(mZ)return aM;mZ=1;var e=en();aM=t;function t(r){var n={},a=e.filter(r.nodes(),function(c){return!r.children(c).length}),i=e.max(e.map(a,function(c){return r.node(c).rank})),s=e.map(e.range(i+1),function(){return[]});function o(c){if(!e.has(n,c)){n[c]=!0;var u=r.node(c);s[u.rank].push(c),e.forEach(r.successors(c),o)}}var l=e.sortBy(a,function(c){return r.node(c).rank});return e.forEach(l,o),s}return aM}var iM,gZ;function z$e(){if(gZ)return iM;gZ=1;var e=en();iM=t;function t(n,a){for(var i=0,s=1;s<a.length;++s)i+=r(n,a[s-1],a[s]);return i}function r(n,a,i){for(var s=e.zipObject(i,e.map(i,function(p,m){return m})),o=e.flatten(e.map(a,function(p){return e.sortBy(e.map(n.outEdges(p),function(m){return{pos:s[m.w],weight:n.edge(m).weight}}),"pos")}),!0),l=1;l<i.length;)l<<=1;var c=2*l-1;l-=1;var u=e.map(new Array(c),function(){return 0}),f=0;return e.forEach(o.forEach(function(p){var m=p.pos+l;u[m]+=p.weight;for(var b=0;m>0;)m%2&&(b+=u[m+1]),m=m-1>>1,u[m]+=p.weight;f+=p.weight*b})),f}return iM}var sM,vZ;function j$e(){if(vZ)return sM;vZ=1;var e=en();sM=t;function t(r,n){return e.map(n,function(a){var i=r.inEdges(a);if(i.length){var s=e.reduce(i,function(o,l){var c=r.edge(l),u=r.node(l.v);return{sum:o.sum+c.weight*u.order,weight:o.weight+c.weight}},{sum:0,weight:0});return{v:a,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:a}})}return sM}var oM,bZ;function q$e(){if(bZ)return oM;bZ=1;var e=en();oM=t;function t(a,i){var s={};e.forEach(a,function(l,c){var u=s[l.v]={indegree:0,in:[],out:[],vs:[l.v],i:c};e.isUndefined(l.barycenter)||(u.barycenter=l.barycenter,u.weight=l.weight)}),e.forEach(i.edges(),function(l){var c=s[l.v],u=s[l.w];!e.isUndefined(c)&&!e.isUndefined(u)&&(u.indegree++,c.out.push(s[l.w]))});var o=e.filter(s,function(l){return!l.indegree});return r(o)}function r(a){var i=[];function s(c){return function(u){u.merged||(e.isUndefined(u.barycenter)||e.isUndefined(c.barycenter)||u.barycenter>=c.barycenter)&&n(c,u)}}function o(c){return function(u){u.in.push(c),--u.indegree===0&&a.push(u)}}for(;a.length;){var l=a.pop();i.push(l),e.forEach(l.in.reverse(),s(l)),e.forEach(l.out,o(l))}return e.map(e.filter(i,function(c){return!c.merged}),function(c){return e.pick(c,["vs","i","barycenter","weight"])})}function n(a,i){var s=0,o=0;a.weight&&(s+=a.barycenter*a.weight,o+=a.weight),i.weight&&(s+=i.barycenter*i.weight,o+=i.weight),a.vs=i.vs.concat(a.vs),a.barycenter=s/o,a.weight=o,a.i=Math.min(i.i,a.i),i.merged=!0}return oM}var lM,xZ;function U$e(){if(xZ)return lM;xZ=1;var e=en(),t=ii();lM=r;function r(i,s){var o=t.partition(i,function(v){return e.has(v,"barycenter")}),l=o.lhs,c=e.sortBy(o.rhs,function(v){return-v.i}),u=[],f=0,p=0,m=0;l.sort(a(!!s)),m=n(u,c,m),e.forEach(l,function(v){m+=v.vs.length,u.push(v.vs),f+=v.barycenter*v.weight,p+=v.weight,m=n(u,c,m)});var b={vs:e.flatten(u,!0)};return p&&(b.barycenter=f/p,b.weight=p),b}function n(i,s,o){for(var l;s.length&&(l=e.last(s)).i<=o;)s.pop(),i.push(l.vs),o++;return o}function a(i){return function(s,o){return s.barycenter<o.barycenter?-1:s.barycenter>o.barycenter?1:i?o.i-s.i:s.i-o.i}}return lM}var cM,yZ;function $$e(){if(yZ)return cM;yZ=1;var e=en(),t=j$e(),r=q$e(),n=U$e();cM=a;function a(o,l,c,u){var f=o.children(l),p=o.node(l),m=p?p.borderLeft:void 0,b=p?p.borderRight:void 0,v={};m&&(f=e.filter(f,function(A){return A!==m&&A!==b}));var y=t(o,f);e.forEach(y,function(A){if(o.children(A.v).length){var k=a(o,A.v,c,u);v[A.v]=k,e.has(k,"barycenter")&&s(A,k)}});var _=r(y,c);i(_,v);var S=n(_,u);if(m&&(S.vs=e.flatten([m,S.vs,b],!0),o.predecessors(m).length)){var C=o.node(o.predecessors(m)[0]),T=o.node(o.predecessors(b)[0]);e.has(S,"barycenter")||(S.barycenter=0,S.weight=0),S.barycenter=(S.barycenter*S.weight+C.order+T.order)/(S.weight+2),S.weight+=2}return S}function i(o,l){e.forEach(o,function(c){c.vs=e.flatten(c.vs.map(function(u){return l[u]?l[u].vs:u}),!0)})}function s(o,l){e.isUndefined(o.barycenter)?(o.barycenter=l.barycenter,o.weight=l.weight):(o.barycenter=(o.barycenter*o.weight+l.barycenter*l.weight)/(o.weight+l.weight),o.weight+=l.weight)}return cM}var uM,_Z;function H$e(){if(_Z)return uM;_Z=1;var e=en(),t=Hs().Graph;uM=r;function r(a,i,s){var o=n(a),l=new t({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(c){return a.node(c)});return e.forEach(a.nodes(),function(c){var u=a.node(c),f=a.parent(c);(u.rank===i||u.minRank<=i&&i<=u.maxRank)&&(l.setNode(c),l.setParent(c,f||o),e.forEach(a[s](c),function(p){var m=p.v===c?p.w:p.v,b=l.edge(m,c),v=e.isUndefined(b)?0:b.weight;l.setEdge(m,c,{weight:a.edge(p).weight+v})}),e.has(u,"minRank")&&l.setNode(c,{borderLeft:u.borderLeft[i],borderRight:u.borderRight[i]}))}),l}function n(a){for(var i;a.hasNode(i=e.uniqueId("_root")););return i}return uM}var dM,wZ;function G$e(){if(wZ)return dM;wZ=1;var e=en();dM=t;function t(r,n,a){var i={},s;e.forEach(a,function(o){for(var l=r.parent(o),c,u;l;){if(c=r.parent(l),c?(u=i[c],i[c]=l):(u=s,s=l),u&&u!==l){n.setEdge(u,l);return}l=c}})}return dM}var fM,EZ;function V$e(){if(EZ)return fM;EZ=1;var e=en(),t=B$e(),r=z$e(),n=$$e(),a=H$e(),i=G$e(),s=Hs().Graph,o=ii();fM=l;function l(p){var m=o.maxRank(p),b=c(p,e.range(1,m+1),"inEdges"),v=c(p,e.range(m-1,-1,-1),"outEdges"),y=t(p);f(p,y);for(var _=Number.POSITIVE_INFINITY,S,C=0,T=0;T<4;++C,++T){u(C%2?b:v,C%4>=2),y=o.buildLayerMatrix(p);var A=r(p,y);A<_&&(T=0,S=e.cloneDeep(y),_=A)}f(p,S)}function c(p,m,b){return e.map(m,function(v){return a(p,v,b)})}function u(p,m){var b=new s;e.forEach(p,function(v){var y=v.graph().root,_=n(v,y,b,m);e.forEach(_.vs,function(S,C){v.node(S).order=C}),i(v,b,_.vs)})}function f(p,m){e.forEach(m,function(b){e.forEach(b,function(v,y){p.node(v).order=y})})}return fM}var hM,SZ;function W$e(){if(SZ)return hM;SZ=1;var e=en(),t=Hs().Graph,r=ii();hM={positionX:b,findType1Conflicts:n,findType2Conflicts:a,addConflict:s,hasConflict:o,verticalAlignment:l,horizontalCompaction:c,alignCoordinates:p,findSmallestWidthAlignment:f,balance:m};function n(_,S){var C={};function T(A,k){var N=0,L=0,I=A.length,P=e.last(k);return e.forEach(k,function(H,B){var K=i(_,H),j=K?_.node(K).order:I;(K||H===P)&&(e.forEach(k.slice(L,B+1),function(W){e.forEach(_.predecessors(W),function(D){var U=_.node(D),Y=U.order;(Y<N||j<Y)&&!(U.dummy&&_.node(W).dummy)&&s(C,D,W)})}),L=B+1,N=j)}),k}return e.reduce(S,T),C}function a(_,S){var C={};function T(k,N,L,I,P){var H;e.forEach(e.range(N,L),function(B){H=k[B],_.node(H).dummy&&e.forEach(_.predecessors(H),function(K){var j=_.node(K);j.dummy&&(j.order<I||j.order>P)&&s(C,K,H)})})}function A(k,N){var L=-1,I,P=0;return e.forEach(N,function(H,B){if(_.node(H).dummy==="border"){var K=_.predecessors(H);K.length&&(I=_.node(K[0]).order,T(N,P,B,L,I),P=B,L=I)}T(N,P,N.length,I,k.length)}),N}return e.reduce(S,A),C}function i(_,S){if(_.node(S).dummy)return e.find(_.predecessors(S),function(C){return _.node(C).dummy})}function s(_,S,C){if(S>C){var T=S;S=C,C=T}var A=_[S];A||(_[S]=A={}),A[C]=!0}function o(_,S,C){if(S>C){var T=S;S=C,C=T}return e.has(_[S],C)}function l(_,S,C,T){var A={},k={},N={};return e.forEach(S,function(L){e.forEach(L,function(I,P){A[I]=I,k[I]=I,N[I]=P})}),e.forEach(S,function(L){var I=-1;e.forEach(L,function(P){var H=T(P);if(H.length){H=e.sortBy(H,function(D){return N[D]});for(var B=(H.length-1)/2,K=Math.floor(B),j=Math.ceil(B);K<=j;++K){var W=H[K];k[P]===P&&I<N[W]&&!o(C,P,W)&&(k[W]=P,k[P]=A[P]=A[W],I=N[W])}}})}),{root:A,align:k}}function c(_,S,C,T,A){var k={},N=u(_,S,C,A),L=A?"borderLeft":"borderRight";function I(B,K){for(var j=N.nodes(),W=j.pop(),D={};W;)D[W]?B(W):(D[W]=!0,j.push(W),j=j.concat(K(W))),W=j.pop()}function P(B){k[B]=N.inEdges(B).reduce(function(K,j){return Math.max(K,k[j.v]+N.edge(j))},0)}function H(B){var K=N.outEdges(B).reduce(function(W,D){return Math.min(W,k[D.w]-N.edge(D))},Number.POSITIVE_INFINITY),j=_.node(B);K!==Number.POSITIVE_INFINITY&&j.borderType!==L&&(k[B]=Math.max(k[B],K))}return I(P,N.predecessors.bind(N)),I(H,N.successors.bind(N)),e.forEach(T,function(B){k[B]=k[C[B]]}),k}function u(_,S,C,T){var A=new t,k=_.graph(),N=v(k.nodesep,k.edgesep,T);return e.forEach(S,function(L){var I;e.forEach(L,function(P){var H=C[P];if(A.setNode(H),I){var B=C[I],K=A.edge(B,H);A.setEdge(B,H,Math.max(N(_,P,I),K||0))}I=P})}),A}function f(_,S){return e.minBy(e.values(S),function(C){var T=Number.NEGATIVE_INFINITY,A=Number.POSITIVE_INFINITY;return e.forIn(C,function(k,N){var L=y(_,N)/2;T=Math.max(k+L,T),A=Math.min(k-L,A)}),T-A})}function p(_,S){var C=e.values(S),T=e.min(C),A=e.max(C);e.forEach(["u","d"],function(k){e.forEach(["l","r"],function(N){var L=k+N,I=_[L],P;if(I!==S){var H=e.values(I);P=N==="l"?T-e.min(H):A-e.max(H),P&&(_[L]=e.mapValues(I,function(B){return B+P}))}})})}function m(_,S){return e.mapValues(_.ul,function(C,T){if(S)return _[S.toLowerCase()][T];var A=e.sortBy(e.map(_,T));return(A[1]+A[2])/2})}function b(_){var S=r.buildLayerMatrix(_),C=e.merge(n(_,S),a(_,S)),T={},A;e.forEach(["u","d"],function(N){A=N==="u"?S:e.values(S).reverse(),e.forEach(["l","r"],function(L){L==="r"&&(A=e.map(A,function(B){return e.values(B).reverse()}));var I=(N==="u"?_.predecessors:_.successors).bind(_),P=l(_,A,C,I),H=c(_,A,P.root,P.align,L==="r");L==="r"&&(H=e.mapValues(H,function(B){return-B})),T[N+L]=H})});var k=f(_,T);return p(T,k),m(T,_.graph().align)}function v(_,S,C){return function(T,A,k){var N=T.node(A),L=T.node(k),I=0,P;if(I+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":P=-N.width/2;break;case"r":P=N.width/2;break}if(P&&(I+=C?P:-P),P=0,I+=(N.dummy?S:_)/2,I+=(L.dummy?S:_)/2,I+=L.width/2,e.has(L,"labelpos"))switch(L.labelpos.toLowerCase()){case"l":P=L.width/2;break;case"r":P=-L.width/2;break}return P&&(I+=C?P:-P),P=0,I}}function y(_,S){return _.node(S).width}return hM}var pM,CZ;function K$e(){if(CZ)return pM;CZ=1;var e=en(),t=ii(),r=W$e().positionX;pM=n;function n(i){i=t.asNonCompoundGraph(i),a(i),e.forEach(r(i),function(s,o){i.node(o).x=s})}function a(i){var s=t.buildLayerMatrix(i),o=i.graph().ranksep,l=0;e.forEach(s,function(c){var u=e.max(e.map(c,function(f){return i.node(f).height}));e.forEach(c,function(f){i.node(f).y=l+u/2}),l+=u+o})}return pM}var mM,TZ;function X$e(){if(TZ)return mM;TZ=1;var e=en(),t=R$e(),r=M$e(),n=O$e(),a=ii().normalizeRanks,i=I$e(),s=ii().removeEmptyRanks,o=L$e(),l=P$e(),c=F$e(),u=V$e(),f=K$e(),p=ii(),m=Hs().Graph;mM=b;function b(V,Z){var ee=Z&&Z.debugTiming?p.time:p.notime;ee("layout",function(){var te=ee("  buildLayoutGraph",function(){return I(V)});ee("  runLayout",function(){v(te,ee)}),ee("  updateInputGraph",function(){y(V,te)})})}function v(V,Z){Z("    makeSpaceForEdgeLabels",function(){P(V)}),Z("    removeSelfEdges",function(){z(V)}),Z("    acyclic",function(){t.run(V)}),Z("    nestingGraph.run",function(){o.run(V)}),Z("    rank",function(){n(p.asNonCompoundGraph(V))}),Z("    injectEdgeLabelProxies",function(){H(V)}),Z("    removeEmptyRanks",function(){s(V)}),Z("    nestingGraph.cleanup",function(){o.cleanup(V)}),Z("    normalizeRanks",function(){a(V)}),Z("    assignRankMinMax",function(){B(V)}),Z("    removeEdgeLabelProxies",function(){K(V)}),Z("    normalize.run",function(){r.run(V)}),Z("    parentDummyChains",function(){i(V)}),Z("    addBorderSegments",function(){l(V)}),Z("    order",function(){u(V)}),Z("    insertSelfEdges",function(){M(V)}),Z("    adjustCoordinateSystem",function(){c.adjust(V)}),Z("    position",function(){f(V)}),Z("    positionSelfEdges",function(){Q(V)}),Z("    removeBorderNodes",function(){Y(V)}),Z("    normalize.undo",function(){r.undo(V)}),Z("    fixupEdgeLabelCoords",function(){D(V)}),Z("    undoCoordinateSystem",function(){c.undo(V)}),Z("    translateGraph",function(){j(V)}),Z("    assignNodeIntersects",function(){W(V)}),Z("    reversePoints",function(){U(V)}),Z("    acyclic.undo",function(){t.undo(V)})}function y(V,Z){e.forEach(V.nodes(),function(ee){var te=V.node(ee),oe=Z.node(ee);te&&(te.x=oe.x,te.y=oe.y,Z.children(ee).length&&(te.width=oe.width,te.height=oe.height))}),e.forEach(V.edges(),function(ee){var te=V.edge(ee),oe=Z.edge(ee);te.points=oe.points,e.has(oe,"x")&&(te.x=oe.x,te.y=oe.y)}),V.graph().width=Z.graph().width,V.graph().height=Z.graph().height}var _=["nodesep","edgesep","ranksep","marginx","marginy"],S={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},C=["acyclicer","ranker","rankdir","align"],T=["width","height"],A={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L=["labelpos"];function I(V){var Z=new m({multigraph:!0,compound:!0}),ee=F(V.graph());return Z.setGraph(e.merge({},S,q(ee,_),e.pick(ee,C))),e.forEach(V.nodes(),function(te){var oe=F(V.node(te));Z.setNode(te,e.defaults(q(oe,T),A)),Z.setParent(te,V.parent(te))}),e.forEach(V.edges(),function(te){var oe=F(V.edge(te));Z.setEdge(te,e.merge({},N,q(oe,k),e.pick(oe,L)))}),Z}function P(V){var Z=V.graph();Z.ranksep/=2,e.forEach(V.edges(),function(ee){var te=V.edge(ee);te.minlen*=2,te.labelpos.toLowerCase()!=="c"&&(Z.rankdir==="TB"||Z.rankdir==="BT"?te.width+=te.labeloffset:te.height+=te.labeloffset)})}function H(V){e.forEach(V.edges(),function(Z){var ee=V.edge(Z);if(ee.width&&ee.height){var te=V.node(Z.v),oe=V.node(Z.w),pe={rank:(oe.rank-te.rank)/2+te.rank,e:Z};p.addDummyNode(V,"edge-proxy",pe,"_ep")}})}function B(V){var Z=0;e.forEach(V.nodes(),function(ee){var te=V.node(ee);te.borderTop&&(te.minRank=V.node(te.borderTop).rank,te.maxRank=V.node(te.borderBottom).rank,Z=e.max(Z,te.maxRank))}),V.graph().maxRank=Z}function K(V){e.forEach(V.nodes(),function(Z){var ee=V.node(Z);ee.dummy==="edge-proxy"&&(V.edge(ee.e).labelRank=ee.rank,V.removeNode(Z))})}function j(V){var Z=Number.POSITIVE_INFINITY,ee=0,te=Number.POSITIVE_INFINITY,oe=0,pe=V.graph(),he=pe.marginx||0,ke=pe.marginy||0;function se(qe){var $e=qe.x,Pe=qe.y,Ce=qe.width,xe=qe.height;Z=Math.min(Z,$e-Ce/2),ee=Math.max(ee,$e+Ce/2),te=Math.min(te,Pe-xe/2),oe=Math.max(oe,Pe+xe/2)}e.forEach(V.nodes(),function(qe){se(V.node(qe))}),e.forEach(V.edges(),function(qe){var $e=V.edge(qe);e.has($e,"x")&&se($e)}),Z-=he,te-=ke,e.forEach(V.nodes(),function(qe){var $e=V.node(qe);$e.x-=Z,$e.y-=te}),e.forEach(V.edges(),function(qe){var $e=V.edge(qe);e.forEach($e.points,function(Pe){Pe.x-=Z,Pe.y-=te}),e.has($e,"x")&&($e.x-=Z),e.has($e,"y")&&($e.y-=te)}),pe.width=ee-Z+he,pe.height=oe-te+ke}function W(V){e.forEach(V.edges(),function(Z){var ee=V.edge(Z),te=V.node(Z.v),oe=V.node(Z.w),pe,he;ee.points?(pe=ee.points[0],he=ee.points[ee.points.length-1]):(ee.points=[],pe=oe,he=te),ee.points.unshift(p.intersectRect(te,pe)),ee.points.push(p.intersectRect(oe,he))})}function D(V){e.forEach(V.edges(),function(Z){var ee=V.edge(Z);if(e.has(ee,"x"))switch((ee.labelpos==="l"||ee.labelpos==="r")&&(ee.width-=ee.labeloffset),ee.labelpos){case"l":ee.x-=ee.width/2+ee.labeloffset;break;case"r":ee.x+=ee.width/2+ee.labeloffset;break}})}function U(V){e.forEach(V.edges(),function(Z){var ee=V.edge(Z);ee.reversed&&ee.points.reverse()})}function Y(V){e.forEach(V.nodes(),function(Z){if(V.children(Z).length){var ee=V.node(Z),te=V.node(ee.borderTop),oe=V.node(ee.borderBottom),pe=V.node(e.last(ee.borderLeft)),he=V.node(e.last(ee.borderRight));ee.width=Math.abs(he.x-pe.x),ee.height=Math.abs(oe.y-te.y),ee.x=pe.x+ee.width/2,ee.y=te.y+ee.height/2}}),e.forEach(V.nodes(),function(Z){V.node(Z).dummy==="border"&&V.removeNode(Z)})}function z(V){e.forEach(V.edges(),function(Z){if(Z.v===Z.w){var ee=V.node(Z.v);ee.selfEdges||(ee.selfEdges=[]),ee.selfEdges.push({e:Z,label:V.edge(Z)}),V.removeEdge(Z)}})}function M(V){var Z=p.buildLayerMatrix(V);e.forEach(Z,function(ee){var te=0;e.forEach(ee,function(oe,pe){var he=V.node(oe);he.order=pe+te,e.forEach(he.selfEdges,function(ke){p.addDummyNode(V,"selfedge",{width:ke.label.width,height:ke.label.height,rank:he.rank,order:pe+ ++te,e:ke.e,label:ke.label},"_se")}),delete he.selfEdges})})}function Q(V){e.forEach(V.nodes(),function(Z){var ee=V.node(Z);if(ee.dummy==="selfedge"){var te=V.node(ee.e.v),oe=te.x+te.width/2,pe=te.y,he=ee.x-oe,ke=te.height/2;V.setEdge(ee.e,ee.label),V.removeNode(Z),ee.label.points=[{x:oe+2*he/3,y:pe-ke},{x:oe+5*he/6,y:pe-ke},{x:oe+he,y:pe},{x:oe+5*he/6,y:pe+ke},{x:oe+2*he/3,y:pe+ke}],ee.label.x=ee.x,ee.label.y=ee.y}})}function q(V,Z){return e.mapValues(e.pick(V,Z),Number)}function F(V){var Z={};return e.forEach(V,function(ee,te){Z[te.toLowerCase()]=ee}),Z}return mM}var gM,AZ;function Y$e(){if(AZ)return gM;AZ=1;var e=en(),t=ii(),r=Hs().Graph;gM={debugOrdering:n};function n(a){var i=t.buildLayerMatrix(a),s=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(a.nodes(),function(o){s.setNode(o,{label:o}),s.setParent(o,"layer"+a.node(o).rank)}),e.forEach(a.edges(),function(o){s.setEdge(o.v,o.w,{},o.name)}),e.forEach(i,function(o,l){var c="layer"+l;s.setNode(c,{rank:"same"}),e.reduce(o,function(u,f){return s.setEdge(u,f,{style:"invis"}),f})}),s}return gM}var vM,kZ;function Z$e(){return kZ||(kZ=1,vM="0.8.5"),vM}var bM,NZ;function Q$e(){return NZ||(NZ=1,bM={graphlib:Hs(),layout:X$e(),debug:Y$e(),util:{time:ii().time,notime:ii().notime},version:Z$e()}),bM}var J$e=Q$e();const Ib=Fl(J$e),RZ=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,MZ=v0,eHe=(e,t)=>r=>{var n;if(t?.variants==null)return MZ(e,r?.class,r?.className);const{variants:a,defaultVariants:i}=t,s=Object.keys(a).map(c=>{const u=r?.[c],f=i?.[c];if(u===null)return null;const p=RZ(u)||RZ(f);return a[c][p]}),o=r&&Object.entries(r).reduce((c,u)=>{let[f,p]=u;return p===void 0||(c[f]=p),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:f,className:p,...m}=u;return Object.entries(m).every(b=>{let[v,y]=b;return Array.isArray(y)?y.includes({...i,...o}[v]):{...i,...o}[v]===y})?[...c,f,p]:c},[]);return MZ(e,s,l,r?.class,r?.className)},tHe=eHe("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function DZ({className:e,variant:t,...r}){return g.jsx("div",{className:ut(tHe({variant:t}),e),...r})}const rHe=({data:e,selected:t})=>{const{label:r,icon:n,status:a,description:i,isMain:s,agentId:o}=e,l=()=>{const u="rounded-lg border-2 transition-all duration-200 shadow-sm";return s?`${u}  p-4 min-w-34 bg-white border-gray-200 shadow-lg`:`${u} ${{active:"bg-white border-gray-100 shadow-md","coming-soon":"bg-gray-50 border-gray-200",empty:"bg-white border-gray-200",loading:"bg-blue-50 border-blue-200"}[a||"active"]} ${t?"ring-2 ring-blue-500 ring-offset-2":""}`},c=()=>{if(n)return n;const u=a==="coming-soon";return{"AI Model":g.jsx("div",{className:"flex justify-center items-center w-12 h-12 bg-gray-100 rounded-full",children:g.jsx(N_e,{className:`w-6 h-6 ${u?"text-gray-400":"text-gray-600"}`})}),"Knowledge Base":g.jsx("div",{className:"flex justify-center items-center w-12 h-12 bg-green-100 rounded-full",children:g.jsx(Z2e,{className:`w-6 h-6 ${u?"text-gray-400":"text-green-600"}`})}),"Domain Knowledge":g.jsx("div",{className:"flex justify-center items-center w-12 h-12 bg-orange-100 rounded-full",children:g.jsx(xre,{className:`w-6 h-6 ${u?"text-gray-400":"text-orange-600"}`})}),Documents:g.jsx("div",{className:"flex justify-center items-center w-12 h-12 bg-blue-100 rounded-full",children:g.jsx(m2e,{className:`w-6 h-6 ${u?"text-gray-400":"text-blue-600"}`})}),Workflows:g.jsx("div",{className:"flex justify-center items-center w-12 h-12 bg-gray-100 rounded-full",children:g.jsx(G2e,{className:`w-6 h-6 ${u?"text-gray-400":"text-purple-600"}`})}),Tools:g.jsx("div",{className:"flex justify-center items-center w-12 h-12 bg-gray-100 rounded-full",children:g.jsx(Are,{className:`w-6 h-6 ${u?"text-gray-400":"text-orange-600"}`})})}[r]||g.jsx("div",{className:"flex justify-center items-center w-6 h-6 bg-gray-100 rounded-full",children:g.jsx("div",{className:`w-6 h-6 ${u?"text-gray-400":"text-gray-600"}`})})};return s?g.jsxs("div",{className:l(),children:[g.jsx(Ti,{type:"target",position:xt.Left,id:"left",className:"w-3 h-3 bg-white border-2 border-gray-300",style:{left:"-6px",top:"50%",transform:"translateY(-50%)",position:"absolute"}}),g.jsx(Ti,{type:"source",position:xt.Bottom,className:"w-3 h-3 bg-white border-2 border-gray-300",style:{bottom:"-6px",left:"50%",transform:"translateX(-50%)",position:"absolute"}}),g.jsx(Ti,{type:"source",position:xt.Right,id:"right",className:"w-3 h-3 bg-white border-2 border-gray-300",style:{right:"-6px",top:"50%",transform:"translateY(-50%)",position:"absolute"}}),g.jsxs("div",{className:"flex flex-col  justify-center items-center h-full text-gray-900",children:[g.jsx("div",{className:"flex overflow-hidden justify-center items-center mb-1 w-16 h-16 bg-gray-100 rounded-full",children:g.jsx("img",{src:$s(o||0),alt:`${r} avatar`,className:"object-cover w-full h-full rounded-full",onError:u=>{const f=u.target;f.style.display="none";const p=f.parentElement;p&&(p.className="flex justify-center items-center w-12 h-12 text-lg font-bold text-gray-600 bg-gray-200 rounded-full",p.innerHTML=`<span className="font-bold text-gray-600">${r[0]||"A"}</span>`)}})}),g.jsx("div",{className:"text-md mt-2 font-bold leading-tight text-center text-gray-900",children:r})]})]}):g.jsxs("div",{className:`relative ${l()} min-w-[200px] max-w-[250px]`,children:[g.jsx(Ti,{type:"target",position:xt.Top,className:"w-3 h-3 bg-white border-2 border-gray-300",style:{top:"-6px",left:"50%",transform:"translateX(-50%)",position:"absolute"}}),g.jsx(Ti,{type:"source",position:xt.Bottom,className:"w-3 h-3 bg-white border-2 border-gray-300",style:{bottom:"-6px",left:"50%",transform:"translateX(-50%)",position:"absolute"}}),g.jsx(Ti,{type:"source",position:xt.Right,id:"right",className:"w-3 h-3 bg-white border-2 border-gray-300",style:{right:"-6px",top:"50%",transform:"translateY(-50%)",position:"absolute"}}),g.jsx(Ti,{type:"target",position:xt.Left,id:"left",className:"w-3 h-3 bg-white border-2 border-gray-300",style:{left:"-6px",top:"50%",transform:"translateY(-50%)",position:"absolute"}}),g.jsx("div",{className:"p-4",children:g.jsxs("div",{className:"flex gap-3 items-center",children:[c(),g.jsxs("div",{className:"flex-1",children:[g.jsx("div",{className:"font-semibold text-gray-900 text-md",children:r}),i&&g.jsx("div",{className:"text-sm text-gray-500",children:i}),a==="coming-soon"&&g.jsx(DZ,{variant:"secondary",className:"mt-1 bg-blue-50",children:"Coming soon"}),a==="loading"&&g.jsx(DZ,{variant:"secondary",className:"mt-1 bg-blue-100 text-blue-700",children:g.jsxs("div",{className:"flex gap-1 items-center",children:[g.jsx("div",{className:"w-2 h-2 rounded-full border border-blue-500 animate-spin border-t-transparent"}),"Processing..."]})})]})]})})]})},NI=Ys((e,t)=>({documents:[],selectedDocument:null,isLoading:!1,isCreating:!1,isUpdating:!1,isDeleting:!1,isUploading:!1,isDownloading:!1,error:null,total:0,skip:0,limit:100,uploadProgress:0,fetchDocuments:async r=>{console.log("🌐 Document store: fetchDocuments called with filters:",r),e({isLoading:!0,error:null});try{const n=await gt.getDocuments(r);console.log("📥 Document store: Received documents from API:",{count:n?.length||0,filters:r,documents:n?.map(a=>({id:a.id,name:a.original_filename,agent_id:a.agent_id}))}),e({documents:n,isLoading:!1,skip:r?.skip||0,limit:r?.limit||100,total:n.length}),console.log("✅ Document store: Documents updated successfully")}catch(n){const a=n instanceof Error?n.message:"Failed to fetch documents";console.error("❌ Document store: Error fetching documents:",n),e({documents:[],isLoading:!1,error:a})}},fetchDocument:async r=>{e({isLoading:!0,error:null});try{const n=await gt.getDocument(r);e({selectedDocument:n,isLoading:!1})}catch(n){const a=n instanceof Error?n.message:"Failed to fetch document";e({selectedDocument:null,isLoading:!1,error:a})}},uploadDocument:async r=>{e({isUploading:!0,uploadProgress:0,error:null});try{const n=await gt.uploadDocument(r);e(a=>({documents:[...a.documents,n],isUploading:!1,uploadProgress:100}))}catch(n){const a=n instanceof Error?n.message:"Failed to upload document";e({isUploading:!1,uploadProgress:0,error:a})}},updateDocument:async(r,n)=>{e({isUpdating:!0,error:null});try{const a=await gt.updateDocument(r,n);e(i=>({documents:i.documents.map(s=>s.id===r?a:s),selectedDocument:i.selectedDocument?.id===r?a:i.selectedDocument,isUpdating:!1}))}catch(a){const i=a instanceof Error?a.message:"Failed to update document";e({isUpdating:!1,error:i})}},deleteDocument:async r=>{e({isDeleting:!0,error:null});try{await gt.deleteDocument(r),e(n=>({documents:n.documents.filter(a=>a.id!==r),selectedDocument:n.selectedDocument?.id===r?null:n.selectedDocument,isDeleting:!1}))}catch(n){const a=n instanceof Error?n.message:"Failed to delete document";e({isDeleting:!1,error:a})}},downloadDocument:async r=>{e({isDownloading:!0,error:null});try{const n=await gt.downloadDocument(r),a=window.URL.createObjectURL(n),i=document.createElement("a");i.href=a;const s=t().selectedDocument||t().documents.find(o=>o.id===r);i.download=s?.original_filename||"document",document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(a),e({isDownloading:!1})}catch(n){const a=n instanceof Error?n.message:"Failed to download document";e({isDownloading:!1,error:a})}},setSelectedDocument:r=>{e({selectedDocument:r})},setUploadProgress:r=>{e({uploadProgress:r})},clearError:()=>{e({error:null})},reset:()=>{e({documents:[],selectedDocument:null,isLoading:!1,isCreating:!1,isUpdating:!1,isDeleting:!1,isUploading:!1,isDownloading:!1,error:null,total:0,skip:0,limit:100,uploadProgress:0})}})),OZ=250,IZ=100,f1=96;function nHe(e,t,r="TB"){const n=new Ib.graphlib.Graph;return n.setDefaultEdgeLabel(()=>({})),n.setGraph({rankdir:r,nodesep:90,ranksep:80,marginx:60,marginy:40}),e.forEach(a=>{const i=a.data?.isMain,s=i?f1:OZ,o=i?f1:IZ;n.setNode(a.id,{width:s,height:o})}),t.forEach(a=>{n.setEdge(a.source,a.target)}),Ib.layout(n),e.map(a=>{const i=n.node(a.id),s=a.data?.isMain,o=s?f1:OZ,l=s?f1:IZ;return a.id==="ai-model"?a.position={x:i.x-o/2-320,y:74}:a.id==="agent"?a.position={x:i.x-o/2,y:50}:a.id==="knowledge-base"?a.position={x:i.x-o/2-150,y:i.y-l/2-60}:a.id==="tools"?a.position={x:i.x-o/2+150,y:i.y-l/2-60}:a.position={x:i.x-o/2,y:i.y-l/2},a})}const aHe=({agent:e,className:t=""})=>{const{domainKnowledge:r,knowledgeStatus:n,setCurrentAgent:a}=tO(),{documents:i,isLoading:s,fetchDocuments:o}=NI();E.useEffect(()=>{e?.id?a(e.id):a(null)},[e?.id,a]),E.useEffect(()=>{e?.id&&o({agent_id:parseInt(e.id.toString())})},[e?.id,o]);const l=E.useMemo(()=>{if(!e)return{agent:{name:"Agent"},components:{aiModel:{name:"GPT4o",status:"active"},knowledgeBase:{domainKnowledge:{count:0,status:"empty"},documents:{count:0,status:"empty"},workflows:{status:"coming-soon"}},tools:{status:"coming-soon"}}};const p=n?.topics?.length||0,b=(n?.topics?.filter(_=>_.status==="in_progress").length||0)>0,y=i.filter(_=>_.agent_id?.toString()===e.id.toString()).length;return{agent:{name:e.name||"Agent",model:e.config?.model||"GPT4o",domain:e.config?.domain,topic:e.config?.topic},components:{aiModel:{name:e.config?.model||"GPT4o",status:"active"},knowledgeBase:{domainKnowledge:{count:p,status:b?"loading":p>0?"active":"empty"},documents:{count:y,status:s?"loading":y>0?"active":"empty"},workflows:{status:"coming-soon"}},tools:{status:"coming-soon"}}}},[e,r,n,i,s]),{nodes:c,edges:u}=E.useMemo(()=>{const p=[],m=[],y=(n?.topics?.filter(S=>S.status==="in_progress").length||0)>0||s;return p.push({id:"agent",type:"agentChart",data:{label:l.agent.name,isMain:!0,agentId:e?.id},position:{x:0,y:0}}),p.push({id:"ai-model",type:"agentChart",data:{label:"AI Model",description:l.components.aiModel.name,status:l.components.aiModel.status,isMain:!1},position:{x:0,y:0}}),p.push({id:"knowledge-base",type:"agentChart",data:{label:"Knowledge Base",status:y?"loading":"active"},position:{x:0,y:0}}),p.push({id:"tools",type:"agentChart",data:{label:"Tools",status:l.components.tools.status},position:{x:0,y:0}}),p.push({id:"domain-knowledge",type:"agentChart",data:{label:"Domain Knowledge",count:l.components.knowledgeBase.domainKnowledge.count,status:l.components.knowledgeBase.domainKnowledge.status,description:`${l.components.knowledgeBase.domainKnowledge.count} items`},position:{x:0,y:0}}),p.push({id:"documents",type:"agentChart",data:{label:"Documents",count:l.components.knowledgeBase.documents.count,status:l.components.knowledgeBase.documents.status,description:`${l.components.knowledgeBase.documents.count} ${l.components.knowledgeBase.documents.count===1?"document":"documents"}`},position:{x:0,y:0}}),p.push({id:"workflows",type:"agentChart",data:{label:"Workflows",status:l.components.knowledgeBase.workflows.status},position:{x:0,y:0}}),m.push({id:"e-ai-model-agent",source:"ai-model",target:"agent",sourceHandle:"right",targetHandle:"left",style:{stroke:"#6b7280",strokeWidth:2}}),m.push({id:"e-agent-knowledge-base",source:"agent",target:"knowledge-base",markerEnd:{type:ba.ArrowClosed},style:{stroke:"#6b7280",strokeWidth:2}}),m.push({id:"e-agent-tools",source:"agent",target:"tools",markerEnd:{type:ba.ArrowClosed},style:{stroke:"#6b7280",strokeWidth:2}}),m.push({id:"e-knowledge-base-domain-knowledge",source:"knowledge-base",target:"domain-knowledge",markerEnd:{type:ba.ArrowClosed},style:{stroke:"#6b7280",strokeWidth:1}}),m.push({id:"e-knowledge-base-documents",source:"knowledge-base",target:"documents",markerEnd:{type:ba.ArrowClosed},style:{stroke:"#6b7280",strokeWidth:1}}),m.push({id:"e-knowledge-base-workflows",source:"knowledge-base",target:"workflows",markerEnd:{type:ba.ArrowClosed},style:{stroke:"#6b7280",strokeWidth:1}}),{nodes:nHe(p,m,"TB"),edges:m}},[l,e?.id,n,s]),f=E.useMemo(()=>({agentChart:rHe}),[]);return e?g.jsxs("div",{className:`h-[100%] min-h-140 w-full ${t}`,children:[g.jsx("style",{children:`
          /* Hide ONLY the connection handles (black dots) - keep edges/lines visible */
          .agent-overview-flow .react-flow__handle {
            opacity: 0 !important;
            pointer-events: none !important;
          }
        `}),g.jsx(uI,{nodes:c,edges:u,nodeTypes:f,fitView:!0,fitViewOptions:{padding:.2},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},className:"bg-gray-50 agent-overview-flow",defaultViewport:{x:0,y:0,zoom:1},children:g.jsx(koe,{})})]}):g.jsx("div",{className:`flex justify-center items-center h-64 bg-gray-50 rounded-lg border border-gray-200 ${t}`,children:g.jsx("div",{className:"text-gray-500",children:"No agent selected"})})},iHe=({navigate:e})=>{const t=Ii(T=>T.selectedAgent),{updateAgent:r,deleteAgent:n,isDeleting:a}=Ii(),[i,s]=E.useState(!1),[o,l]=E.useState(t?.name||""),[c,u]=E.useState(!1),[f,p]=E.useState(!1),m=()=>{s(!0),l(t?.name||"")},b=async()=>{if(!(!t||!o.trim())){u(!0);try{await r(t.id,{...t,name:o.trim()}),s(!1)}catch(T){console.error("Failed to update agent name:",T),l(t.name)}finally{u(!1)}}},v=()=>{s(!1),l(t?.name||"")},y=async()=>{if(t)try{await n(t.id),p(!1)}catch(T){console.error("Failed to delete agent:",T)}},_=()=>{e("/agents?tab=my")},S=()=>{p(!0)},C=()=>{p(!1)};return E.useEffect(()=>{l(t?.name||"")},[t?.name]),g.jsxs("div",{className:"flex flex-col gap-8 h-full md:flex-row",children:[g.jsxs("div",{className:"flex flex-col flex-1 gap-4 p-6 h-full bg-white",children:[g.jsxs("div",{className:"flex gap-3 justify-between items-center",children:[g.jsx("div",{className:"flex overflow-hidden justify-center items-center w-16 h-16 rounded-full",children:g.jsx("img",{src:$s(t?.id||0),alt:`${t?.name||"Agent"} avatar`,className:"object-cover w-full h-full",onError:T=>{const A=T.target;A.style.display="none";const k=A.parentElement;k&&(k.className="flex justify-center items-center w-12 h-12 text-lg font-bold text-white bg-gradient-to-br from-pink-400 to-purple-400 rounded-full",k.innerHTML=`<span className="text-white">${t?.name?.[0]||"A"}</span>`)}})}),g.jsx("div",{className:"flex",children:g.jsxs(mt,{variant:"outline",className:"w-fit",onClick:S,children:[g.jsx(kre,{className:"size-4",strokeWidth:2}),"Delete Agent"]})})]}),g.jsxs("div",{className:"flex flex-col gap-2 p-4 text-sm rounded-lg border border-gray-200 group",children:[g.jsxs("div",{className:"flex items-center text-sm text-gray-700",children:[g.jsx("div",{className:"text-gray-600 min-w-30",children:"Agent name:"}),i?g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsx(Bl,{value:o,onChange:T=>l(T.target.value),className:"w-48 text-lg font-semibold text-gray-900",onKeyDown:T=>{T.key==="Enter"?b():T.key==="Escape"&&v()},autoFocus:!0,size:"sm"}),g.jsx(mt,{size:"sm",variant:"ghost",onClick:b,disabled:c,className:"",children:g.jsx(I5,{className:"w-4 h-4 text-green-600",strokeWidth:1.5})}),g.jsx(mt,{size:"sm",variant:"ghost",onClick:v,disabled:c,className:"",children:g.jsx(db,{className:"w-4 h-4 text-red-600",strokeWidth:1.5})})]}):g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsx("div",{className:"text-lg font-semibold text-gray-900",children:t?.name??"-"}),g.jsxs(To,{children:[g.jsx(Ao,{asChild:!0,children:g.jsx(mt,{size:"sm",variant:"ghost",onClick:m,className:"p-1 w-8 h-8 rounded-full border border-gray-200",children:g.jsx(Nwe,{className:"w-4 h-4 text-gray-500",strokeWidth:2})})}),g.jsx(ko,{children:g.jsx("p",{children:"Edit"})})]})]})]}),g.jsxs("div",{className:"flex items-center text-sm text-gray-700",children:[g.jsx("div",{className:"text-gray-600 min-w-30",children:"Role:"}),g.jsx("div",{className:"font-medium text-gray-900",children:t?.config?.role??"-"})]}),g.jsxs("div",{className:"flex items-center text-sm text-gray-700",children:[g.jsx("div",{className:"text-gray-600 min-w-30",children:"Domain:"}),g.jsx("div",{className:"font-medium text-gray-900",children:t?.config?.domain??"-"})]}),g.jsxs("div",{className:"flex items-start text-sm text-gray-700",children:[g.jsx("div",{className:"text-gray-600 min-w-30",children:"Tasks:"}),g.jsx("div",{className:"font-medium text-gray-900 capitalize",children:(()=>{const T=t?.config?.skills||[],A=t?.config?.tasks||[],k=t?.config?.task?[t.config.task]:[],N=[...T,...A,...k],L=Array.from(new Set(N.filter(Boolean)));return L.length>0?L.join(", "):"-"})()})]})]}),g.jsxs("div",{className:"flex flex-col gap-2 h-[80%]",children:[g.jsx("div",{className:"flex gap-2 items-center"}),g.jsx("div",{className:"h-[100%] rounded-lg border border-gray-200 overflow-hidden",children:g.jsx(aHe,{agent:t})})]})]}),g.jsx(Hne,{isOpen:f,onClose:C,onConfirm:y,onSuccess:_,isDeleting:a,agentName:t?.name})]})},xf={EXPERIENTIAL:"experiential",PRIO_KNOWLEDGE:"prio_knowledge",PLAN:"plan",INTERVIEW:"interview",MCP:"mcp",KNOWLEDGE_BASE:"knowledge_base"},sHe="/static/files-icon/folder.svg",oHe="/static/files-icon/file-pdf.svg",LZ="/static/files-icon/file-docx.svg",xM="/static/files-icon/file-csv.svg",lHe="/static/files-icon/file-txt.svg",yM="/static/files-icon/file-image.svg",PZ="/static/files-icon/file-code.svg",_M={folder:sHe,pdf:oHe,doc:LZ,docx:LZ,csv:xM,xlsx:xM,xls:xM,txt:lHe,png:yM,jpeg:yM,jpg:yM,json:PZ,html:PZ},Ju=({resource:e,ext:t,width:r,height:n,className:a})=>{if(e?.resource_type===xf.PLAN)return g.jsx(VF,{className:"text-green-600",width:20,height:20,strokeWidth:2});if(e?.resource_type===xf.INTERVIEW)return g.jsx(xSe,{className:"text-yellow-500",width:20,height:20});if(e?.resource_type===xf.PRIO_KNOWLEDGE)return g.jsx(VEe,{className:"text-blue-600",width:20,height:20});if(e?.resource_type===xf.EXPERIENTIAL)return g.jsx(VF,{className:"text-brand-600",width:20,height:20,strokeWidth:2});if(e?.resource_type===xf.MCP)return g.jsx(Cve,{className:"text-brand-700",width:20,height:20,strokeWidth:2});if(e?.resource_type===xf.KNOWLEDGE_BASE)return g.jsx(CSe,{className:"text-[#F79009]",strokeWidth:2,width:20,height:20});if(e?.resource_type==="file"||t){let i=t||e?.name.split(".").pop()?.toLowerCase()||"";i==="vnd.openxmlformats-officedocument.wordprocessingml.document"&&(i="docx");const s=_M[i?.toLowerCase?.()];return s?g.jsx("div",{className:ut("flex w-[20px] h-[20px]",a),children:g.jsx("img",{src:s,alt:s,width:r||20,height:n||20,className:i.match(/png|jpeg|jpg/)?"text-brand-600":""})}):g.jsx("img",{src:_M.folder,alt:"Folder icon",className:"size-5"})}return e?.resource_type==="database"?g.jsx(rwe,{className:"text-blue-600",width:20,height:20,strokeWidth:2}):g.jsx("img",{src:_M.folder,alt:"Folder icon"})},cHe="0.5s",uHe="cubic-bezier(.43,.08,.45,.97)",kle=`all ${cHe} ${uHe}`,dHe=`
  .custom-node {
    transition: ${kle};
  }

  .custom-node.selected {
    transform: scale(1.02) !important;
    z-index: 10 !important;
    animation: selectedPulse 2s ease-in-out infinite;
  }

  @keyframes selectedPulse {
    0%, 100% {
      box-shadow: 0 0 0 1px #333, 0 4px 12px rgba(59, 130, 246, 0.1);
    }
    50% {
      box-shadow: 0 0 0 1px #333, 0 4px 16px rgba(59, 130, 246, 0.1);
    }
  }
`;if(typeof document<"u"){const e=document.createElement("style");e.textContent=dHe,document.head.appendChild(e)}const fHe=e=>{switch(console.log("🧠 status: ",e),e){case"in_progress":return g.jsx(Jf,{className:"animate-spin"});case"success":return"";case"failed":return g.jsx(db,{});default:return""}},hHe=({data:e,isSelected:t,onNodeClick:r})=>{const n=E.useRef(null),[,a]=E.useState(null),i=e,s=i.knowledgeStatus,o=i.isLeafNode,l=i.hasChildren,c=i.isExpanded;E.useEffect(()=>{if(t&&n.current){const p=n.current.getBoundingClientRect();a({x:p.left,y:p.bottom+5})}},[t]);const u=()=>{const p=["custom-node"];return t&&p.push("selected"),p.join(" ")},f=()=>{const p={padding:16,borderRadius:8,width:280,textAlign:"left",wordBreak:"break-word",whiteSpace:"pre-line",overflowWrap:"break-word",display:"flex",position:"relative",cursor:l?"pointer":"default",transition:kle,transform:"scale(1)",opacity:1},m=t?{border:"none",transform:"scale(1.02)",zIndex:10}:{};if(!o)return{...p,...m,background:"#F6FAFF",border:"1px solid #aac5e6",fontWeight:l?"bold":"normal"};switch(s?.status){case"in_progress":return{...p,...m,background:"#E1EBFE",border:"2px solid #aac5e6"};case"success":return{...p,...m,background:"#E1EBFE",border:"2px solid #aac5e6"};case"failed":return{...p,...m,background:"#E1EBFE",border:"2px solid #EF4444"};default:return{...p,...m,background:"#E1EBFE"}}};return g.jsxs("div",{ref:n,className:u(),style:f(),onClick:r,children:[g.jsxs("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[g.jsx("span",{style:{textAlign:"left",flex:1},children:i.label}),g.jsxs("div",{style:{display:"flex",alignItems:"center",marginLeft:8},children:[l&&g.jsx("span",{style:{fontSize:"16px"},children:c?"":g.jsx(O2e,{})}),o&&s&&g.jsx("span",{style:{fontSize:"16px"},children:fHe(s.status)})]})]}),g.jsx(Ti,{type:"target",position:xt.Left,style:{background:"#F6FAFF",border:"1px solid #E0E0E0"}}),g.jsx(Ti,{type:"source",position:xt.Right,style:{background:"#F6FAFF",border:"1px solid #E0E0E0"}})]})},pHe=({isOpen:e,onClose:t,topicPath:r,content:n,loading:a,error:i})=>{const{closeChatSidebar:s}=ud();if(E.useEffect(()=>{e&&s()},[e,s]),console.log({content:n}),!e)return null;const o=p=>{const m=p.split(" - ");return m[m.length-1]||p},l=()=>!n?.questions_by_topics||!n?.answers_by_topics?null:Object.keys(n.questions_by_topics).map(m=>{const b=n.questions_by_topics[m]||[],v=n.answers_by_topics[m]||"",y=m.replace(/_/g," ").replace(/\b\w/g,_=>_.toUpperCase());return g.jsxs("div",{className:"mb-8",children:[g.jsxs("h4",{className:"flex gap-2 items-center pb-2 mb-4 text-sm font-semibold text-gray-700 border-b border-gray-200",children:[g.jsx(wz,{size:16}),y]}),b.length>0&&g.jsxs("div",{className:"mb-4",children:[g.jsx("h5",{className:"mb-2 text-xs font-medium tracking-wide text-gray-600 uppercase",children:"Research Questions"}),g.jsx("ul",{className:"mb-4 ml-8 space-y-2",children:b.map((_,S)=>g.jsx("li",{className:"text-sm list-disc text-gray-700 rounded-md",children:_},S))})]}),v&&g.jsxs("div",{className:"space-y-4",children:[g.jsx("h5",{className:"mb-2 text-xs font-medium tracking-wide text-gray-600 uppercase",children:"Generated Knowledge"}),g.jsx("div",{className:"py-2 pl-4 bg-white",children:g.jsx("div",{className:"max-w-none leading-relaxed text-gray-700 prose prose-sm",children:Array.isArray(v)?g.jsx("ul",{className:"pl-5 list-disc",children:v.map((_,S)=>g.jsx("li",{children:g.jsx(V1,{children:_})},S))}):g.jsx(V1,{children:v})})})]})]},m)}),c=()=>!n?.user_instructions||n.user_instructions.length===0?null:g.jsxs("div",{className:"mb-6",children:[g.jsxs("h4",{className:"flex gap-2 items-center mb-3 text-sm font-semibold text-gray-700",children:[g.jsx(iAe,{size:16}),"User Instructions"]}),g.jsx("div",{className:"space-y-2",children:n.user_instructions.map((p,m)=>g.jsx("div",{className:"p-3 text-sm text-blue-700 bg-blue-50 rounded-md border-l-4 border-blue-200",children:g.jsx("div",{className:"max-w-none prose prose-sm",children:g.jsx(V1,{children:p})})},m))})]}),u=()=>n?g.jsxs("div",{className:"p-4 mb-6 bg-gray-50 rounded-lg",children:[g.jsxs("h4",{className:"flex gap-2 items-center mb-3 text-sm font-semibold text-gray-700",children:[g.jsx(tAe,{size:16}),"Generation Details"]}),g.jsxs("div",{className:"grid grid-cols-2 gap-3 text-xs",children:[g.jsxs("div",{children:[g.jsx("span",{className:"text-gray-500",children:"Confidence:"}),g.jsxs("div",{className:"font-medium text-gray-700",children:[n.final_confidence,"%"]})]}),g.jsxs("div",{children:[g.jsx("span",{className:"text-gray-500",children:"Questions:"}),g.jsx("div",{className:"font-medium text-gray-700",children:n.total_questions})]}),g.jsxs("div",{children:[g.jsx("span",{className:"text-gray-500",children:"Iterations:"}),g.jsx("div",{className:"font-medium text-gray-700",children:n.iterations_used})]})]})]}):null,f=()=>g.jsx("div",{className:"mb-6",children:g.jsx("div",{className:"p-4 bg-gray-50 rounded-lg border",children:g.jsx("pre",{className:"overflow-x-auto text-xs text-gray-700 whitespace-pre-wrap",children:JSON.stringify(n,null,2)})})});return g.jsxs("div",{className:"flex fixed inset-0 z-50",children:[g.jsx("div",{className:"flex-1",onClick:t}),g.jsxs("div",{className:"flex flex-col max-h-full bg-white border-l border-gray-200 shadow-xl w-200",children:[g.jsxs("div",{className:"flex justify-between items-center px-4 py-2 bg-gray-50 border-b border-gray-200",children:[g.jsx("div",{className:"flex-1 min-w-0",children:g.jsx("h3",{className:"text-lg font-semibold text-gray-900 truncate",children:o(r)})}),g.jsx("button",{onClick:t,className:"p-2 ml-3 rounded-full transition-colors hover:bg-gray-200",children:g.jsx(jm,{size:20,className:"text-gray-500"})})]}),g.jsxs("div",{className:"overflow-y-auto flex-1 p-4 custom-scrollbar",children:[a&&g.jsxs("div",{className:"flex justify-center items-center py-8",children:[g.jsx("div",{className:"w-8 h-8 rounded-full border-b-2 border-blue-600 animate-spin"}),g.jsx("span",{className:"ml-3 text-gray-600",children:"Loading knowledge..."})]}),i&&g.jsx("div",{className:"p-4 bg-red-50 rounded-lg border border-red-200",children:g.jsx("p",{className:"text-sm text-red-700",children:i})}),!a&&!i&&!n&&g.jsxs("div",{className:"py-8 text-center",children:[g.jsx(wz,{size:48,className:"mx-auto mb-4 text-gray-300"}),g.jsx("p",{className:"text-gray-500",children:"No knowledge content available"})]}),!a&&!i&&n&&g.jsxs("div",{className:"space-y-6",children:[n.structured_data&&f(),!n.structured_data&&g.jsxs(g.Fragment,{children:[c(),l(),u()]})]})]})]})]})},R6="0.5s",M6="cubic-bezier(.43,.08,.45,.97)",as=`all ${R6} ${M6}`,mHe=`
  .react-flow__node {
    /* Only transition opacity and non-transform properties to avoid zoom lag */
    transition: opacity ${R6} ${M6} !important;
  }

  .react-flow__node-enter {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }

  .react-flow__node-enter-active {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  .react-flow__node-exit {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  .react-flow__node-exit-active {
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
  }

  /* Edge animations - optimized for performance */
  .react-flow__edge {
    /* Only transition opacity to avoid interfering with zoom */
    transition: opacity ${R6} ${M6} !important;
  }

  .react-flow__edge-path {
    /* Don't transition edge paths during zoom operations */
  }

  /* Animate edges when they appear - using data attributes for better targeting */
  .react-flow__edge[data-edge-new="true"],
  .react-flow__edges g[data-edge-new="true"] {
    opacity: 0 !important;
    animation: edgeAppear 0.8s cubic-bezier(.43,.08,.45,.97) forwards !important;
  }

  .react-flow__edge[data-edge-new="true"] .react-flow__edge-path,
  .react-flow__edges g[data-edge-new="true"] .react-flow__edge-path {
    stroke-dasharray: 1000 !important;
    stroke-dashoffset: 1000 !important;
    animation: edgePathAppear 0.8s cubic-bezier(.43,.08,.45,.97) forwards !important;
  }

  /* Also target edge paths directly with data attribute */
  .react-flow__edge-path[data-edge-new="true"] {
    stroke-dasharray: 1000 !important;
    stroke-dashoffset: 1000 !important;
    animation: edgePathAppear 0.8s cubic-bezier(.43,.08,.45,.97) forwards !important;
  }

  /* Additional targeting for ReactFlow's edge structure */
  .react-flow__edges g[data-edge-new="true"] .react-flow__edge-path {
    stroke-dasharray: 1000 !important;
    stroke-dashoffset: 1000 !important;
    animation: edgePathAppear 0.8s cubic-bezier(.43,.08,.45,.97) forwards !important;
  }

  /* Keyframe animations for edges */
  @keyframes edgeAppear {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes edgePathAppear {
    from {
      stroke-dashoffset: 1000;
    }
    to {
      stroke-dashoffset: 0;
    }
  }

  /* Ensure edges are visible during transitions */
  .react-flow__edge.selected .react-flow__edge-path {
    stroke-width: 3;
  }

  .react-flow__edge:hover .react-flow__edge-path {
    stroke-width: 2;
  }

  /* Smooth viewport transitions */
  .react-flow {
    transition: ${as} !important;
  }

  .react-flow__viewport {
    /* No transitions on viewport to avoid zoom lag */
  }

  /* Remove transitions from zoom-sensitive elements to improve performance */
  .react-flow__transformationpane {
    /* No transitions on transformation pane to avoid zoom lag */
  }
`;if(typeof document<"u"){const e=document.createElement("style");e.textContent=mHe,document.head.appendChild(e)}const wM=[{id:"1",type:"custom",data:{label:"Finance"},position:{x:0,y:0}},{id:"2",type:"custom",data:{label:"Market Analysis"},position:{x:0,y:0}},{id:"3",type:"custom",data:{label:"Investment Strategy"},position:{x:0,y:0}},{id:"4",type:"custom",data:{label:"Risk Management"},position:{x:0,y:0}},{id:"5",type:"custom",data:{label:"Financial Planning"},position:{x:0,y:0}},{id:"6",type:"custom",data:{label:"Corporate"},position:{x:0,y:0}},{id:"7",type:"custom",data:{label:"Compliance"},position:{x:0,y:0}}],yf=[{id:"e1-2",source:"1",target:"2",markerEnd:{type:ba.ArrowClosed},type:"default",style:{stroke:"#6b7280",strokeWidth:1,transition:as,opacity:1},animated:!1},{id:"e2-3",source:"2",target:"3",markerEnd:{type:ba.ArrowClosed},type:"default",style:{stroke:"#6b7280",strokeWidth:1,transition:as,opacity:1},animated:!1},{id:"e3-4",source:"3",target:"4",markerEnd:{type:ba.ArrowClosed},type:"default",style:{stroke:"#6b7280",strokeWidth:1,transition:as,opacity:1},animated:!1},{id:"e1-5",source:"1",target:"5",markerEnd:{type:ba.ArrowClosed},type:"default",style:{stroke:"#6b7280",strokeWidth:1,transition:as,opacity:1},animated:!1},{id:"e1-6",source:"1",target:"6",markerEnd:{type:ba.ArrowClosed},type:"default",style:{stroke:"#6b7280",strokeWidth:1,transition:as,opacity:1},animated:!1},{id:"e1-7",source:"1",target:"7",markerEnd:{type:ba.ArrowClosed},type:"default",style:{stroke:"#6b7280",strokeWidth:1,transition:as,opacity:1},animated:!1}],FZ=220,BZ=80;function yc(e,t,r="LR"){const n=new Ib.graphlib.Graph;return n.setDefaultEdgeLabel(()=>({})),n.setGraph({rankdir:r,nodesep:60,ranksep:120}),e.forEach(a=>{n.setNode(a.id,{width:FZ,height:BZ})}),t.forEach(a=>{n.setEdge(a.source,a.target)}),Ib.layout(n),e.map(a=>{const i=n.node(a.id);return a.position={x:i.x-FZ/2,y:i.y-BZ/2},a.targetPosition=r==="LR"?xt.Left:xt.Top,a.sourcePosition=r==="LR"?xt.Right:xt.Bottom,a})}const gHe=({agentId:e})=>{const{domainKnowledge:t,knowledgeStatus:r,isLoading:n,error:a,setCurrentAgent:i}=tO(),[s,o]=E.useState([]),[l,c]=E.useState([]),[u,f]=E.useState(null),[p,m]=E.useState(new Set),[b]=E.useState(!1),[v,y]=E.useState(null);E.useEffect(()=>{y(a)},[a]);const[_]=E.useState({}),[S,C]=E.useState(!1),[T,A]=E.useState(""),[k,N]=E.useState(null),[L,I]=E.useState(!1),[P,H]=E.useState(null),[B,K]=E.useState(""),[j,W]=E.useState(!1),D=E.useRef(null),U=E.useRef(new Set),Y=E.useRef(void 0),z=E.useRef(null),M=E.useRef([]),Q=E.useRef(new Set),q=E.useCallback(()=>{z.current&&M.current.length>0&&setTimeout(()=>{const Ce=z.current;Ce&&Ce.fitView({padding:.2,includeHiddenNodes:!1,minZoom:.1,maxZoom:2,duration:300})},100)},[]),F=E.useCallback((Ce,xe)=>{W(!0),setTimeout(()=>{o(Ce),c(xe),setTimeout(()=>{q(),W(!1)},300)},50)},[q]);E.useEffect(()=>{M.current=s},[s]),E.useEffect(()=>{s.length>0&&q()},[s,q]),E.useEffect(()=>{if(l.length>0){const Ce=new Set(l.map(Ne=>Ne.id)),xe=Q.current,ve=[...Ce].filter(Ne=>!xe.has(Ne));ve.length>0&&setTimeout(()=>{ve.forEach(Ne=>{let Ue=null;const Le=document.querySelector(".react-flow__edges");if(Le&&(Ue=Le.querySelector(`g[data-id="${Ne}"]`)),Ue||(Ue=document.querySelector(`[data-id="${Ne}"]`)),!Ue&&Le){const Ye=Le.querySelectorAll("g");for(const De of Ye)if(De.getAttribute("data-id")===Ne){Ue=De;break}}if(Ue){Ue.setAttribute("data-edge-new","true");const Ye=Ue.querySelector(".react-flow__edge-path");Ye&&Ye.setAttribute("data-edge-new","true"),setTimeout(()=>{Ue?.removeAttribute("data-edge-new"),Ye&&Ye.removeAttribute("data-edge-new")},800)}else setTimeout(()=>{const Ye=document.querySelector(`[data-id="${Ne}"]`)||document.querySelector(".react-flow__edges")?.querySelector(`g[data-id="${Ne}"]`);if(Ye){Ye.setAttribute("data-edge-new","true");const De=Ye.querySelector(".react-flow__edge-path");De&&De.setAttribute("data-edge-new","true"),setTimeout(()=>{Ye.removeAttribute("data-edge-new"),De&&De.removeAttribute("data-edge-new")},800)}},200)})},150),Q.current=Ce}},[l]),E.useEffect(()=>{U.current=p},[p]),E.useEffect(()=>{e&&e!==Y.current?(m(new Set),U.current=new Set,Y.current=e):e&&(Y.current=e)},[e]);const V={custom:Ce=>g.jsx(hHe,{...Ce,isSelected:u===Ce.id,onNodeClick:xe=>oe(xe,Ce),children:Pe($e(Ce))})},Z=(Ce,xe)=>xe.trim()?Ce.toLowerCase().includes(xe.toLowerCase().trim()):!0,ee=(Ce,xe)=>Z(Ce.topic,xe)?!0:Ce.children?Ce.children.some(ve=>ee(ve,xe)):!1,te=(Ce,xe,ve,Ne)=>{const Ue=[],Le=[],Ye=Ve=>{if(!xe||!xe.topics)return null;console.log("🔍 Looking for knowledge status for nodePath:",Ve),console.log("📋 Available status topics:",xe.topics.map(Ae=>({path:Ae.path,status:Ae.status})));const lt=xe.topics.find(Ae=>Ae.path===Ve);if(lt)return console.log("✅ Found exact match for:",Ve),lt;const Ee=Ve.split(" - ");for(const Ae of xe.topics){const Ze=Ae.path.split(" - ");if(Ee.length>0&&Ze.length>0){const bt=Ee[Ee.length-1],et=Ze[Ze.length-1];if(bt===et&&Ze.every(ft=>Ee.includes(ft)))return console.log("✅ Found match with Strategy 1 for:",Ve,"->",Ae.path),Ae}if(Ee.length>0&&Ze.length>=Ee.length){const bt=Ee.join(" - ");if(Ae.path.includes(bt))return console.log("✅ Found match with Strategy 2 for:",Ve,"->",Ae.path),Ae}if(Ze.length>0&&Ee.length>=Ze.length){const bt=Ze.join(" - ");if(Ve.includes(bt))return console.log("✅ Found match with Strategy 3 for:",Ve,"->",Ae.path),Ae}const rt=Ve.toLowerCase(),at=Ae.path.toLowerCase();if(rt===at)return console.log("✅ Found match with Strategy 4 for:",Ve,"->",Ae.path),Ae}return console.log("❌ No match found for:",Ve),null},De=(Ve,lt,Ee=[],Ae=0)=>{const Ze=[...Ee,Ve.topic],rt=Ze.join("/"),bt=(Ae===0?[Ve.topic]:Ze.slice(1)).join(" - "),et=!Ve.children||Ve.children.length===0,ft=Ve.children&&Ve.children.length>0,zt=et?Ye(bt):null,Cr=(()=>{const Xt=Ae===0||!lt||!ve||ve.has(lt);if(!Ne||!Ne.trim())return Xt;const $r=Z(Ve.topic,Ne),on=ee(Ve,Ne);return Xt&&($r||on)})();return Cr&&(Ue.push({id:rt,type:"custom",data:{label:Ve.topic,knowledgeStatus:zt,isLeafNode:et,hasChildren:ft,nodePath:bt,isExpanded:ve?.has(rt)||!1},position:{x:0,y:0}}),lt&&Le.push({id:`e${lt}-${rt}`,source:lt,target:rt,markerEnd:{type:ba.ArrowClosed},type:"default",style:{stroke:"#6b7280",strokeWidth:1,transition:as,opacity:1},animated:!1,data:{isNew:!0}})),Cr&&Ve.children&&Ve.children.forEach(Xt=>De(Xt,rt,Ze,Ae+1)),rt};return Ce.root&&De(Ce.root),{nodes:Ue,edges:Le}};E.useEffect(()=>{if(!e){const Ce=yc(wM,yf,"LR");o(Ce),c(yf);return}},[e]),E.useEffect(()=>{if(e)i(e);else{i(null);const Ce=yc(wM,yf,"LR");o(Ce),c(yf)}},[e,i]),E.useEffect(()=>{if(!t||!r){if(!e){const Ce=yc(wM,yf,"LR");o(Ce),c(yf)}return}if(t.message)o([]),c([]),y(t.message);else if(t.root){const Ce=U.current.size>0?U.current:new Set([t.root.topic]);U.current.size===0&&m(Ce);const{nodes:xe,edges:ve}=te(t,r,Ce,B),Ne=yc(xe,ve,"LR");o(Ne),c(ve),y(null)}},[t,r,B]),E.useEffect(()=>{function Ce(xe){D.current&&!D.current.contains(xe.target)&&f(null)}return u?document.addEventListener("mousedown",Ce):document.removeEventListener("mousedown",Ce),()=>{document.removeEventListener("mousedown",Ce)}},[u]);const oe=async(Ce,xe)=>{Ce.stopPropagation();const ve=xe.data;if(f(xe.id),ve.isLeafNode){const Ne=ve.nodePath;if(ve.knowledgeStatus&&ve.knowledgeStatus.status==="success"){C(!0),A(Ne),I(!0),H(null),N(null);try{const Ue=await gt.getTopicKnowledgeContent(e,Ne);Ue.success?N(Ue.content):H(Ue.message||"Failed to load knowledge content")}catch(Ue){console.error("Error fetching knowledge content:",Ue),H(Ue.message||"Failed to load knowledge content")}finally{I(!1)}}else{const Ue=ve.knowledgeStatus?.status||"pending";let Le="";switch(Ue){case"pending":Le=`Knowledge for "${ve.label}" is not generated yet. Click "Generate Contextual Knowledge" to start generation.`;break;case"in_progress":Le=`Knowledge for "${ve.label}" is currently being generated. Please wait...`;break;case"failed":Le=`Knowledge generation failed for "${ve.label}". Please try regenerating.`;break;default:Le=`Knowledge for "${ve.label}" is not available yet.`}Fr.info(Le,{duration:5e3})}return}if(ve.hasChildren){const Ne=new Set(p);if(p.has(xe.id)){const Ue=Le=>{Ne.delete(Le),s.forEach(Ye=>{Ye.id!==Le&&Ye.id.startsWith(Le+"/")&&Ue(Ye.id)})};Ue(xe.id)}else Ne.add(xe.id);if(m(Ne),t&&r){const{nodes:Ue,edges:Le}=te(t,r,Ne,B),Ye=yc(Ue,Le,"LR");F(Ye,Le)}}},pe=()=>{S||f(null)},he=Ce=>{if(K(Ce),Ce.trim()&&t){const xe=new Set,ve=(Ne,Ue=[],Le=0)=>{const Ye=[...Ue,Ne.topic],De=Ye.join("/");ee(Ne,Ce)&&(xe.add(De),Ne.children&&Ne.children.forEach(Ve=>ve(Ve,Ye,Le+1)))};t.root&&(ve(t.root),m(new Set([...p,...xe])))}if(t&&r){const{nodes:xe,edges:ve}=te(t,r,U.current,Ce),Ne=yc(xe,ve,"LR");o(Ne),c(ve)}},ke=()=>{if(!t||!t.root)return;const Ce=new Set,xe=(Le,Ye=[])=>{const De=[...Ye,Le.topic],Ve=De.join("/");Ce.add(Ve),Le.children&&Le.children.forEach(lt=>xe(lt,De))};xe(t.root),m(Ce);const{nodes:ve,edges:Ne}=te(t,r,Ce,B),Ue=yc(ve,Ne,"LR");o(Ue),c(Ne)},se=()=>{if(!t||!t.root)return;const Ce=new Set([t.root.topic]);m(Ce);const{nodes:xe,edges:ve}=te(t,r,Ce,B),Ne=yc(xe,ve,"LR");o(Ne),c(ve)},qe=()=>{if(!r||!r.topics)return{total:0,completed:0,inProgress:0,failed:0,pending:0};const Ce=r.topics.length,xe=r.topics.filter(Le=>Le.status==="success").length,ve=r.topics.filter(Le=>Le.status==="in_progress").length,Ne=r.topics.filter(Le=>Le.status==="failed").length,Ue=r.topics.filter(Le=>Le.status==="pending").length;return{total:Ce,completed:xe,inProgress:ve,failed:Ne,pending:Ue}},$e=Ce=>_[Ce.id]||_[Ce.data?.path]||_[Ce.data?.topic_id],Pe=Ce=>Ce==="in_progress"?g.jsx("span",{title:"Generating...",className:"ml-2 animate-spin",children:"⏳"}):Ce==="success"?g.jsx("span",{title:"Done",className:"ml-2 text-green-600",children:"✔️"}):Ce==="failed"?g.jsx("span",{title:"Failed",className:"ml-2 text-red-600",children:"❌"}):null;return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex flex-col gap-4 w-full h-full bg-white",style:{position:"relative"},ref:D,children:[(n||b)&&g.jsx("div",{className:"absolute top-0 right-0 left-0 z-30 transform",style:{transition:as},children:g.jsx("div",{className:"flex justify-center items-center py-2 bg-blue-50 border-b border-blue-200 shadow-sm animate-pulse",children:g.jsxs("div",{className:"flex gap-2 items-center text-blue-700",children:[g.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-blue-300 animate-spin border-t-blue-600"}),g.jsx("span",{className:"text-sm font-medium",children:n?"Refreshing knowledge tree...":"Updating knowledge tree..."})]})})}),e&&g.jsx("div",{className:`absolute left-4 right-4 z-20 ${n||b?"top-16":"top-4"}`,children:g.jsxs("div",{className:"flex gap-3 justify-between items-center",children:[g.jsx("div",{className:"flex flex-1 gap-3 items-center",children:g.jsxs("div",{className:"relative flex-1 max-w-md",children:[g.jsx("div",{className:"absolute left-3 top-1/2 text-gray-400 transform -translate-y-1/2",children:g.jsx(ub,{width:16,height:16})}),g.jsx("input",{type:"text",placeholder:"Search topic",value:B,onChange:Ce=>he(Ce.target.value),className:"py-2 pr-3 pl-10 w-full text-sm rounded-md border border-gray-300 focus:outline-none focus:ring-1"}),B&&g.jsx("button",{onClick:()=>he(""),className:"absolute right-2 top-1/2 text-gray-400 transform -translate-y-1/2 hover:text-gray-600",children:"✕"})]})}),g.jsxs("div",{className:"flex gap-3 items-center",children:[r&&r.topics&&r.topics.length>0&&g.jsxs("div",{className:"text-sm font-medium text-gray-500",children:[qe().total," items"]}),(()=>{const Ce=p.size>1;return g.jsxs("button",{onClick:Ce?se:ke,disabled:!t,className:"flex gap-1 items-center px-3 py-2 text-xs text-gray-600 bg-gray-50 rounded-md border border-gray-200 hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed",style:{transition:as},title:Ce?"Collapse All":"Expand All",children:[Ce?g.jsx(_re,{className:"w-4 h-4"}):g.jsx(Ere,{className:"w-4 h-4"}),Ce?"Collapse All":"Expand All"]})})()]})]})}),g.jsx("div",{className:`h-full ${e?n||b?"pt-32":"pt-20":""}`,style:{transition:as},children:s.length>0?g.jsx("div",{className:"h-full rounded-lg",children:g.jsx(uI,{nodes:s,edges:l,nodeTypes:V,fitView:!0,fitViewOptions:{padding:.2,includeHiddenNodes:!1,minZoom:.1,maxZoom:2},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0},onNodeClick:oe,onPaneClick:pe,onInit:Ce=>{z.current=Ce},defaultViewport:{x:0,y:0,zoom:1},minZoom:.1,maxZoom:2,zoomOnScroll:!0,panOnScroll:!1,zoomOnPinch:!0,panOnDrag:!0,attributionPosition:"bottom-left",snapToGrid:!1,deleteKeyCode:null,selectionKeyCode:null,className:`${j?"opacity-95":"opacity-100"}`,children:g.jsx(koe,{})})}):g.jsx("div",{className:"flex flex-col gap-4 justify-center items-center h-full",style:{transition:as},children:n?g.jsxs("div",{className:"text-center text-gray-500",children:[g.jsx("div",{className:"text-lg font-medium",children:"Initializing Domain Knowledge"}),g.jsx("div",{className:"text-sm",children:"Please wait while we load your agent's knowledge structure..."})]}):v?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"text-center text-gray-500",children:[g.jsx("div",{className:"text-lg font-medium",children:"No Domain Knowledge"}),g.jsx("div",{className:"text-sm",children:v})]}),g.jsx("div",{className:"max-w-md text-xs text-center text-gray-400",children:"Chat with Dana to add missing knowledge"})]}):g.jsx(g.Fragment,{children:g.jsxs("div",{className:"flex flex-col text-center item-center",children:[g.jsx("div",{className:"flex justify-center items-center pb-4 text-gray-400",children:g.jsx(ub,{className:"w-10 h-10"})}),g.jsx("div",{className:"text-lg font-semibold text-gray-500",children:"Keyword not found"}),g.jsx("div",{className:"text-sm text-gray-500",children:"Chat with Dana to add missing knowledge"})]})})})})]}),g.jsx(pHe,{isOpen:S,onClose:()=>{C(!1),f(null)},topicPath:T,content:k,loading:L,error:P})]})},zZ=()=>{const{agent_id:e}=gs(),t=Ii(n=>n.selectedAgent),r=e||t?.id;return g.jsx("div",{style:{width:"100%",height:"100%"},children:g.jsx(gHe,{agentId:r})})};/**
   * table-core
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   */function Mc(e,t){return typeof e=="function"?e(t):e}function Bi(e,t){return r=>{t.setState(n=>({...n,[e]:Mc(r,n[e])}))}}function cy(e){return e instanceof Function}function vHe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function bHe(e,t){const r=[],n=a=>{a.forEach(i=>{r.push(i);const s=t(i);s!=null&&s.length&&n(s)})};return n(e),r}function Mt(e,t,r){let n=[],a;return i=>{let s;r.key&&r.debug&&(s=Date.now());const o=e(i);if(!(o.length!==n.length||o.some((u,f)=>n[f]!==u)))return a;n=o;let c;if(r.key&&r.debug&&(c=Date.now()),a=t(...o),r==null||r.onChange==null||r.onChange(a),r.key&&r.debug&&r!=null&&r.debug()){const u=Math.round((Date.now()-s)*100)/100,f=Math.round((Date.now()-c)*100)/100,p=f/16,m=(b,v)=>{for(b=String(b);b.length<v;)b=" "+b;return b};console.info(`%c⏱ ${m(f,5)} /${m(u,5)} ms`,`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,r?.key)}return a}}function Dt(e,t,r,n){return{debug:()=>{var a;return(a=e?.debugAll)!=null?a:e[t]},key:!1,onChange:n}}function xHe(e,t,r,n){const a=()=>{var s;return(s=i.getValue())!=null?s:e.options.renderFallbackValue},i={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(n),renderValue:a,getContext:Mt(()=>[e,r,t,i],(s,o,l,c)=>({table:s,column:o,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),Dt(e.options,"debugCells"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,r,t,e)},{}),i}function yHe(e,t,r,n){var a,i;const o={...e._getDefaultColumnDef(),...t},l=o.accessorKey;let c=(a=(i=o.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?a:typeof o.header=="string"?o.header:void 0,u;if(o.accessorFn?u=o.accessorFn:l&&(l.includes(".")?u=p=>{let m=p;for(const v of l.split(".")){var b;m=(b=m)==null?void 0:b[v]}return m}:u=p=>p[o.accessorKey]),!c)throw new Error;let f={id:`${String(c)}`,accessorFn:u,parent:n,depth:r,columnDef:o,columns:[],getFlatColumns:Mt(()=>[!0],()=>{var p;return[f,...(p=f.columns)==null?void 0:p.flatMap(m=>m.getFlatColumns())]},Dt(e.options,"debugColumns")),getLeafColumns:Mt(()=>[e._getOrderColumnsFn()],p=>{var m;if((m=f.columns)!=null&&m.length){let b=f.columns.flatMap(v=>v.getLeafColumns());return p(b)}return[f]},Dt(e.options,"debugColumns"))};for(const p of e._features)p.createColumn==null||p.createColumn(f,e);return f}const ha="debugHeaders";function jZ(e,t,r){var n;let i={id:(n=r.id)!=null?n:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],o=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(o),s.push(l)};return o(i),s},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(i,e)}),i}const _He={createTable:e=>{e.getHeaderGroups=Mt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,a)=>{var i,s;const o=(i=n?.map(f=>r.find(p=>p.id===f)).filter(Boolean))!=null?i:[],l=(s=a?.map(f=>r.find(p=>p.id===f)).filter(Boolean))!=null?s:[],c=r.filter(f=>!(n!=null&&n.includes(f.id))&&!(a!=null&&a.includes(f.id)));return h1(t,[...o,...c,...l],e)},Dt(e.options,ha)),e.getCenterHeaderGroups=Mt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,a)=>(r=r.filter(i=>!(n!=null&&n.includes(i.id))&&!(a!=null&&a.includes(i.id))),h1(t,r,e,"center")),Dt(e.options,ha)),e.getLeftHeaderGroups=Mt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,n)=>{var a;const i=(a=n?.map(s=>r.find(o=>o.id===s)).filter(Boolean))!=null?a:[];return h1(t,i,e,"left")},Dt(e.options,ha)),e.getRightHeaderGroups=Mt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,n)=>{var a;const i=(a=n?.map(s=>r.find(o=>o.id===s)).filter(Boolean))!=null?a:[];return h1(t,i,e,"right")},Dt(e.options,ha)),e.getFooterGroups=Mt(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Dt(e.options,ha)),e.getLeftFooterGroups=Mt(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Dt(e.options,ha)),e.getCenterFooterGroups=Mt(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Dt(e.options,ha)),e.getRightFooterGroups=Mt(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Dt(e.options,ha)),e.getFlatHeaders=Mt(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),Dt(e.options,ha)),e.getLeftFlatHeaders=Mt(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),Dt(e.options,ha)),e.getCenterFlatHeaders=Mt(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),Dt(e.options,ha)),e.getRightFlatHeaders=Mt(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),Dt(e.options,ha)),e.getCenterLeafHeaders=Mt(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Dt(e.options,ha)),e.getLeftLeafHeaders=Mt(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Dt(e.options,ha)),e.getRightLeafHeaders=Mt(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Dt(e.options,ha)),e.getLeafHeaders=Mt(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,n)=>{var a,i,s,o,l,c;return[...(a=(i=t[0])==null?void 0:i.headers)!=null?a:[],...(s=(o=r[0])==null?void 0:o.headers)!=null?s:[],...(l=(c=n[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},Dt(e.options,ha))}};function h1(e,t,r,n){var a,i;let s=0;const o=function(p,m){m===void 0&&(m=1),s=Math.max(s,m),p.filter(b=>b.getIsVisible()).forEach(b=>{var v;(v=b.columns)!=null&&v.length&&o(b.columns,m+1)},0)};o(e);let l=[];const c=(p,m)=>{const b={depth:m,id:[n,`${m}`].filter(Boolean).join("_"),headers:[]},v=[];p.forEach(y=>{const _=[...v].reverse()[0],S=y.column.depth===b.depth;let C,T=!1;if(S&&y.column.parent?C=y.column.parent:(C=y.column,T=!0),_&&_?.column===C)_.subHeaders.push(y);else{const A=jZ(r,C,{id:[n,m,C.id,y?.id].filter(Boolean).join("_"),isPlaceholder:T,placeholderId:T?`${v.filter(k=>k.column===C).length}`:void 0,depth:m,index:v.length});A.subHeaders.push(y),v.push(A)}b.headers.push(y),y.headerGroup=b}),l.push(b),m>0&&c(v,m-1)},u=t.map((p,m)=>jZ(r,p,{depth:s,index:m}));c(u,s-1),l.reverse();const f=p=>p.filter(b=>b.column.getIsVisible()).map(b=>{let v=0,y=0,_=[0];b.subHeaders&&b.subHeaders.length?(_=[],f(b.subHeaders).forEach(C=>{let{colSpan:T,rowSpan:A}=C;v+=T,_.push(A)})):v=1;const S=Math.min(..._);return y=y+S,b.colSpan=v,b.rowSpan=y,{colSpan:v,rowSpan:y}});return f((a=(i=l[0])==null?void 0:i.headers)!=null?a:[]),l}const RI=(e,t,r,n,a,i,s)=>{let o={id:t,index:n,original:r,depth:a,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(o._valuesCache.hasOwnProperty(l))return o._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return o._valuesCache[l]=c.accessorFn(o.original,n),o._valuesCache[l]},getUniqueValues:l=>{if(o._uniqueValuesCache.hasOwnProperty(l))return o._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(o._uniqueValuesCache[l]=c.columnDef.getUniqueValues(o.original,n),o._uniqueValuesCache[l]):(o._uniqueValuesCache[l]=[o.getValue(l)],o._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=o.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>bHe(o.subRows,l=>l.subRows),getParentRow:()=>o.parentId?e.getRow(o.parentId,!0):void 0,getParentRows:()=>{let l=[],c=o;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:Mt(()=>[e.getAllLeafColumns()],l=>l.map(c=>xHe(e,o,c,c.id)),Dt(e.options,"debugRows")),_getAllCellsByColumnId:Mt(()=>[o.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),Dt(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(o,e)}return o},wHe={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()}}},Nle=(e,t,r)=>{var n,a;const i=r==null||(n=r.toString())==null?void 0:n.toLowerCase();return!!(!((a=e.getValue(t))==null||(a=a.toString())==null||(a=a.toLowerCase())==null)&&a.includes(i))};Nle.autoRemove=e=>Bs(e);const Rle=(e,t,r)=>{var n;return!!(!((n=e.getValue(t))==null||(n=n.toString())==null)&&n.includes(r))};Rle.autoRemove=e=>Bs(e);const Mle=(e,t,r)=>{var n;return((n=e.getValue(t))==null||(n=n.toString())==null?void 0:n.toLowerCase())===r?.toLowerCase()};Mle.autoRemove=e=>Bs(e);const Dle=(e,t,r)=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(r)};Dle.autoRemove=e=>Bs(e);const Ole=(e,t,r)=>!r.some(n=>{var a;return!((a=e.getValue(t))!=null&&a.includes(n))});Ole.autoRemove=e=>Bs(e)||!(e!=null&&e.length);const Ile=(e,t,r)=>r.some(n=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(n)});Ile.autoRemove=e=>Bs(e)||!(e!=null&&e.length);const Lle=(e,t,r)=>e.getValue(t)===r;Lle.autoRemove=e=>Bs(e);const Ple=(e,t,r)=>e.getValue(t)==r;Ple.autoRemove=e=>Bs(e);const MI=(e,t,r)=>{let[n,a]=r;const i=e.getValue(t);return i>=n&&i<=a};MI.resolveFilterValue=e=>{let[t,r]=e,n=typeof t!="number"?parseFloat(t):t,a=typeof r!="number"?parseFloat(r):r,i=t===null||Number.isNaN(n)?-1/0:n,s=r===null||Number.isNaN(a)?1/0:a;if(i>s){const o=i;i=s,s=o}return[i,s]};MI.autoRemove=e=>Bs(e)||Bs(e[0])&&Bs(e[1]);const fl={includesString:Nle,includesStringSensitive:Rle,equalsString:Mle,arrIncludes:Dle,arrIncludesAll:Ole,arrIncludesSome:Ile,equals:Lle,weakEquals:Ple,inNumberRange:MI};function Bs(e){return e==null||e===""}const EHe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Bi("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const r=t.getCoreRowModel().flatRows[0],n=r?.getValue(e.id);return typeof n=="string"?fl.includesString:typeof n=="number"?fl.inNumberRange:typeof n=="boolean"||n!==null&&typeof n=="object"?fl.equals:Array.isArray(n)?fl.arrIncludes:fl.weakEquals},e.getFilterFn=()=>{var r,n;return cy(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(r=(n=t.options.filterFns)==null?void 0:n[e.columnDef.filterFn])!=null?r:fl[e.columnDef.filterFn]},e.getCanFilter=()=>{var r,n,a;return((r=e.columnDef.enableColumnFilter)!=null?r:!0)&&((n=t.options.enableColumnFilters)!=null?n:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var r;return(r=t.getState().columnFilters)==null||(r=r.find(n=>n.id===e.id))==null?void 0:r.value},e.getFilterIndex=()=>{var r,n;return(r=(n=t.getState().columnFilters)==null?void 0:n.findIndex(a=>a.id===e.id))!=null?r:-1},e.setFilterValue=r=>{t.setColumnFilters(n=>{const a=e.getFilterFn(),i=n?.find(u=>u.id===e.id),s=Mc(r,i?i.value:void 0);if(qZ(a,s,e)){var o;return(o=n?.filter(u=>u.id!==e.id))!=null?o:[]}const l={id:e.id,value:s};if(i){var c;return(c=n?.map(u=>u.id===e.id?l:u))!=null?c:[]}return n!=null&&n.length?[...n,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const r=e.getAllLeafColumns(),n=a=>{var i;return(i=Mc(t,a))==null?void 0:i.filter(s=>{const o=r.find(l=>l.id===s.id);if(o){const l=o.getFilterFn();if(qZ(l,s.value,o))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(n)},e.resetColumnFilters=t=>{var r,n;e.setColumnFilters(t?[]:(r=(n=e.initialState)==null?void 0:n.columnFilters)!=null?r:[])},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 qZ(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}const SHe=(e,t,r)=>r.reduce((n,a)=>{const i=a.getValue(e);return n+(typeof i=="number"?i:0)},0),CHe=(e,t,r)=>{let n;return r.forEach(a=>{const i=a.getValue(e);i!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}),n},THe=(e,t,r)=>{let n;return r.forEach(a=>{const i=a.getValue(e);i!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}),n},AHe=(e,t,r)=>{let n,a;return r.forEach(i=>{const s=i.getValue(e);s!=null&&(n===void 0?s>=s&&(n=a=s):(n>s&&(n=s),a<s&&(a=s)))}),[n,a]},kHe=(e,t)=>{let r=0,n=0;if(t.forEach(a=>{let i=a.getValue(e);i!=null&&(i=+i)>=i&&(++r,n+=i)}),r)return n/r},NHe=(e,t)=>{if(!t.length)return;const r=t.map(i=>i.getValue(e));if(!vHe(r))return;if(r.length===1)return r[0];const n=Math.floor(r.length/2),a=r.sort((i,s)=>i-s);return r.length%2!==0?a[n]:(a[n-1]+a[n])/2},RHe=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),MHe=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,DHe=(e,t)=>t.length,EM={sum:SHe,min:CHe,max:THe,extent:AHe,mean:kHe,median:NHe,unique:RHe,uniqueCount:MHe,count:DHe},OHe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,r;return(t=(r=e.getValue())==null||r.toString==null?void 0:r.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Bi("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(r=>r!=null&&r.includes(e.id)?r.filter(n=>n!==e.id):[...r??[],e.id])},e.getCanGroup=()=>{var r,n;return((r=e.columnDef.enableGrouping)!=null?r:!0)&&((n=t.options.enableGrouping)!=null?n:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.includes(e.id)},e.getGroupedIndex=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const r=e.getCanGroup();return()=>{r&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const r=t.getCoreRowModel().flatRows[0],n=r?.getValue(e.id);if(typeof n=="number")return EM.sum;if(Object.prototype.toString.call(n)==="[object Date]")return EM.extent},e.getAggregationFn=()=>{var r,n;if(!e)throw new Error;return cy(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(r=(n=t.options.aggregationFns)==null?void 0:n[e.columnDef.aggregationFn])!=null?r:EM[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var r,n;e.setGrouping(t?[]:(r=(n=e.initialState)==null?void 0:n.grouping)!=null?r:[])},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=r=>{if(e._groupingValuesCache.hasOwnProperty(r))return e._groupingValuesCache[r];const n=t.getColumn(r);return n!=null&&n.columnDef.getGroupingValue?(e._groupingValuesCache[r]=n.columnDef.getGroupingValue(e.original),e._groupingValuesCache[r]):e.getValue(r)},e._groupingValuesCache={}},createCell:(e,t,r,n)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===r.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var a;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((a=r.subRows)!=null&&a.length)}}};function IHe(e,t,r){if(!(t!=null&&t.length)||!r)return e;const n=e.filter(i=>!t.includes(i.id));return r==="remove"?n:[...t.map(i=>e.find(s=>s.id===i)).filter(Boolean),...n]}const LHe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Bi("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Mt(r=>[kp(t,r)],r=>r.findIndex(n=>n.id===e.id),Dt(t.options,"debugColumns")),e.getIsFirstColumn=r=>{var n;return((n=kp(t,r)[0])==null?void 0:n.id)===e.id},e.getIsLastColumn=r=>{var n;const a=kp(t,r);return((n=a[a.length-1])==null?void 0:n.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var r;e.setColumnOrder(t?[]:(r=e.initialState.columnOrder)!=null?r:[])},e._getOrderColumnsFn=Mt(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,r,n)=>a=>{let i=[];if(!(t!=null&&t.length))i=a;else{const s=[...t],o=[...a];for(;o.length&&s.length;){const l=s.shift(),c=o.findIndex(u=>u.id===l);c>-1&&i.push(o.splice(c,1)[0])}i=[...i,...o]}return IHe(i,r,n)},Dt(e.options,"debugTable"))}},SM=()=>({left:[],right:[]}),PHe={getInitialState:e=>({columnPinning:SM(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Bi("columnPinning",e)}),createColumn:(e,t)=>{e.pin=r=>{const n=e.getLeafColumns().map(a=>a.id).filter(Boolean);t.setColumnPinning(a=>{var i,s;if(r==="right"){var o,l;return{left:((o=a?.left)!=null?o:[]).filter(f=>!(n!=null&&n.includes(f))),right:[...((l=a?.right)!=null?l:[]).filter(f=>!(n!=null&&n.includes(f))),...n]}}if(r==="left"){var c,u;return{left:[...((c=a?.left)!=null?c:[]).filter(f=>!(n!=null&&n.includes(f))),...n],right:((u=a?.right)!=null?u:[]).filter(f=>!(n!=null&&n.includes(f)))}}return{left:((i=a?.left)!=null?i:[]).filter(f=>!(n!=null&&n.includes(f))),right:((s=a?.right)!=null?s:[]).filter(f=>!(n!=null&&n.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(n=>{var a,i,s;return((a=n.columnDef.enablePinning)!=null?a:!0)&&((i=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const r=e.getLeafColumns().map(o=>o.id),{left:n,right:a}=t.getState().columnPinning,i=r.some(o=>n?.includes(o)),s=r.some(o=>a?.includes(o));return i?"left":s?"right":!1},e.getPinnedIndex=()=>{var r,n;const a=e.getIsPinned();return a?(r=(n=t.getState().columnPinning)==null||(n=n[a])==null?void 0:n.indexOf(e.id))!=null?r:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Mt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(r,n,a)=>{const i=[...n??[],...a??[]];return r.filter(s=>!i.includes(s.column.id))},Dt(t.options,"debugRows")),e.getLeftVisibleCells=Mt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(r,n)=>(n??[]).map(i=>r.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),Dt(t.options,"debugRows")),e.getRightVisibleCells=Mt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(r,n)=>(n??[]).map(i=>r.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),Dt(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var r,n;return e.setColumnPinning(t?SM():(r=(n=e.initialState)==null?void 0:n.columnPinning)!=null?r:SM())},e.getIsSomeColumnsPinned=t=>{var r;const n=e.getState().columnPinning;if(!t){var a,i;return!!((a=n.left)!=null&&a.length||(i=n.right)!=null&&i.length)}return!!((r=n[t])!=null&&r.length)},e.getLeftLeafColumns=Mt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,r)=>(r??[]).map(n=>t.find(a=>a.id===n)).filter(Boolean),Dt(e.options,"debugColumns")),e.getRightLeafColumns=Mt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,r)=>(r??[]).map(n=>t.find(a=>a.id===n)).filter(Boolean),Dt(e.options,"debugColumns")),e.getCenterLeafColumns=Mt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n)=>{const a=[...r??[],...n??[]];return t.filter(i=>!a.includes(i.id))},Dt(e.options,"debugColumns"))}};function FHe(e){return e||(typeof document<"u"?document:null)}const p1={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},CM=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),BHe={getDefaultColumnDef:()=>p1,getInitialState:e=>({columnSizing:{},columnSizingInfo:CM(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Bi("columnSizing",e),onColumnSizingInfoChange:Bi("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var r,n,a;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((r=e.columnDef.minSize)!=null?r:p1.minSize,(n=i??e.columnDef.size)!=null?n:p1.size),(a=e.columnDef.maxSize)!=null?a:p1.maxSize)},e.getStart=Mt(r=>[r,kp(t,r),t.getState().columnSizing],(r,n)=>n.slice(0,e.getIndex(r)).reduce((a,i)=>a+i.getSize(),0),Dt(t.options,"debugColumns")),e.getAfter=Mt(r=>[r,kp(t,r),t.getState().columnSizing],(r,n)=>n.slice(e.getIndex(r)+1).reduce((a,i)=>a+i.getSize(),0),Dt(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(r=>{let{[e.id]:n,...a}=r;return a})},e.getCanResize=()=>{var r,n;return((r=e.columnDef.enableResizing)!=null?r:!0)&&((n=t.options.enableColumnResizing)!=null?n:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let r=0;const n=a=>{if(a.subHeaders.length)a.subHeaders.forEach(n);else{var i;r+=(i=a.column.getSize())!=null?i:0}};return n(e),r},e.getStart=()=>{if(e.index>0){const r=e.headerGroup.headers[e.index-1];return r.getStart()+r.getSize()}return 0},e.getResizeHandler=r=>{const n=t.getColumn(e.column.id),a=n?.getCanResize();return i=>{if(!n||!a||(i.persist==null||i.persist(),TM(i)&&i.touches&&i.touches.length>1))return;const s=e.getSize(),o=e?e.getLeafHeaders().map(_=>[_.column.id,_.column.getSize()]):[[n.id,n.getSize()]],l=TM(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(_,S)=>{typeof S=="number"&&(t.setColumnSizingInfo(C=>{var T,A;const k=t.options.columnResizeDirection==="rtl"?-1:1,N=(S-((T=C?.startOffset)!=null?T:0))*k,L=Math.max(N/((A=C?.startSize)!=null?A:0),-.999999);return C.columnSizingStart.forEach(I=>{let[P,H]=I;c[P]=Math.round(Math.max(H+H*L,0)*100)/100}),{...C,deltaOffset:N,deltaPercentage:L}}),(t.options.columnResizeMode==="onChange"||_==="end")&&t.setColumnSizing(C=>({...C,...c})))},f=_=>u("move",_),p=_=>{u("end",_),t.setColumnSizingInfo(S=>({...S,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=FHe(r),b={moveHandler:_=>f(_.clientX),upHandler:_=>{m?.removeEventListener("mousemove",b.moveHandler),m?.removeEventListener("mouseup",b.upHandler),p(_.clientX)}},v={moveHandler:_=>(_.cancelable&&(_.preventDefault(),_.stopPropagation()),f(_.touches[0].clientX),!1),upHandler:_=>{var S;m?.removeEventListener("touchmove",v.moveHandler),m?.removeEventListener("touchend",v.upHandler),_.cancelable&&(_.preventDefault(),_.stopPropagation()),p((S=_.touches[0])==null?void 0:S.clientX)}},y=zHe()?{passive:!1}:!1;TM(i)?(m?.addEventListener("touchmove",v.moveHandler,y),m?.addEventListener("touchend",v.upHandler,y)):(m?.addEventListener("mousemove",b.moveHandler,y),m?.addEventListener("mouseup",b.upHandler,y)),t.setColumnSizingInfo(_=>({..._,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:o,isResizingColumn:n.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 r;e.setColumnSizing(t?{}:(r=e.initialState.columnSizing)!=null?r:{})},e.resetHeaderSizeInfo=t=>{var r;e.setColumnSizingInfo(t?CM():(r=e.initialState.columnSizingInfo)!=null?r:CM())},e.getTotalSize=()=>{var t,r;return(t=(r=e.getHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,r;return(t=(r=e.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,r;return(t=(r=e.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,r;return(t=(r=e.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0}}};let m1=null;function zHe(){if(typeof m1=="boolean")return m1;let e=!1;try{const t={get passive(){return e=!0,!1}},r=()=>{};window.addEventListener("test",r,t),window.removeEventListener("test",r)}catch{e=!1}return m1=e,m1}function TM(e){return e.type==="touchstart"}const jHe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Bi("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=r=>{e.getCanHide()&&t.setColumnVisibility(n=>({...n,[e.id]:r??!e.getIsVisible()}))},e.getIsVisible=()=>{var r,n;const a=e.columns;return(r=a.length?a.some(i=>i.getIsVisible()):(n=t.getState().columnVisibility)==null?void 0:n[e.id])!=null?r:!0},e.getCanHide=()=>{var r,n;return((r=e.columnDef.enableHiding)!=null?r:!0)&&((n=t.options.enableHiding)!=null?n:!0)},e.getToggleVisibilityHandler=()=>r=>{e.toggleVisibility==null||e.toggleVisibility(r.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Mt(()=>[e.getAllCells(),t.getState().columnVisibility],r=>r.filter(n=>n.column.getIsVisible()),Dt(t.options,"debugRows")),e.getVisibleCells=Mt(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,n,a)=>[...r,...n,...a],Dt(t.options,"debugRows"))},createTable:e=>{const t=(r,n)=>Mt(()=>[n(),n().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),Dt(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=r=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(r),e.resetColumnVisibility=r=>{var n;e.setColumnVisibility(r?{}:(n=e.initialState.columnVisibility)!=null?n:{})},e.toggleAllColumnsVisible=r=>{var n;r=(n=r)!=null?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((a,i)=>({...a,[i.id]:r||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>r=>{var n;e.toggleAllColumnsVisible((n=r.target)==null?void 0:n.checked)}}};function kp(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const qHe={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()}}},UHe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Bi("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var r;const n=(r=e.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[t.id])==null?void 0:r.getValue();return typeof n=="string"||typeof n=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var r,n,a,i;return((r=e.columnDef.enableGlobalFilter)!=null?r:!0)&&((n=t.options.enableGlobalFilter)!=null?n:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>fl.includesString,e.getGlobalFilterFn=()=>{var t,r;const{globalFilterFn:n}=e.options;return cy(n)?n:n==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[n])!=null?t:fl[n]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},$He={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Bi("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,r=!1;e._autoResetExpanded=()=>{var n,a;if(!t){e._queue(()=>{t=!0});return}if((n=(a=e.options.autoResetAll)!=null?a:e.options.autoResetExpanded)!=null?n:!e.options.manualExpanding){if(r)return;r=!0,e._queue(()=>{e.resetExpanded(),r=!1})}},e.setExpanded=n=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(n),e.toggleAllRowsExpanded=n=>{n??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=n=>{var a,i;e.setExpanded(n?{}:(a=(i=e.initialState)==null?void 0:i.expanded)!=null?a:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(n=>n.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>n=>{n.persist==null||n.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const n=e.getState().expanded;return n===!0||Object.values(n).some(Boolean)},e.getIsAllRowsExpanded=()=>{const n=e.getState().expanded;return typeof n=="boolean"?n===!0:!(!Object.keys(n).length||e.getRowModel().flatRows.some(a=>!a.getIsExpanded()))},e.getExpandedDepth=()=>{let n=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const s=i.split(".");n=Math.max(n,s.length)}),n},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=r=>{t.setExpanded(n=>{var a;const i=n===!0?!0:!!(n!=null&&n[e.id]);let s={};if(n===!0?Object.keys(t.getRowModel().rowsById).forEach(o=>{s[o]=!0}):s=n,r=(a=r)!=null?a:!i,!i&&r)return{...s,[e.id]:!0};if(i&&!r){const{[e.id]:o,...l}=s;return l}return n})},e.getIsExpanded=()=>{var r;const n=t.getState().expanded;return!!((r=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?r:n===!0||n?.[e.id])},e.getCanExpand=()=>{var r,n,a;return(r=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?r:((n=t.options.enableExpanding)!=null?n:!0)&&!!((a=e.subRows)!=null&&a.length)},e.getIsAllParentsExpanded=()=>{let r=!0,n=e;for(;r&&n.parentId;)n=t.getRow(n.parentId,!0),r=n.getIsExpanded();return r},e.getToggleExpandedHandler=()=>{const r=e.getCanExpand();return()=>{r&&e.toggleExpanded()}}}},D6=0,O6=10,AM=()=>({pageIndex:D6,pageSize:O6}),HHe={getInitialState:e=>({...e,pagination:{...AM(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Bi("pagination",e)}),createTable:e=>{let t=!1,r=!1;e._autoResetPageIndex=()=>{var n,a;if(!t){e._queue(()=>{t=!0});return}if((n=(a=e.options.autoResetAll)!=null?a:e.options.autoResetPageIndex)!=null?n:!e.options.manualPagination){if(r)return;r=!0,e._queue(()=>{e.resetPageIndex(),r=!1})}},e.setPagination=n=>{const a=i=>Mc(n,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=n=>{var a;e.setPagination(n?AM():(a=e.initialState.pagination)!=null?a:AM())},e.setPageIndex=n=>{e.setPagination(a=>{let i=Mc(n,a.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,s)),{...a,pageIndex:i}})},e.resetPageIndex=n=>{var a,i;e.setPageIndex(n?D6:(a=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?a:D6)},e.resetPageSize=n=>{var a,i;e.setPageSize(n?O6:(a=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?a:O6)},e.setPageSize=n=>{e.setPagination(a=>{const i=Math.max(1,Mc(n,a.pageSize)),s=a.pageSize*a.pageIndex,o=Math.floor(s/i);return{...a,pageIndex:o,pageSize:i}})},e.setPageCount=n=>e.setPagination(a=>{var i;let s=Mc(n,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...a,pageCount:s}}),e.getPageOptions=Mt(()=>[e.getPageCount()],n=>{let a=[];return n&&n>0&&(a=[...new Array(n)].fill(null).map((i,s)=>s)),a},Dt(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:n}=e.getState().pagination,a=e.getPageCount();return a===-1?!0:a===0?!1:n<a-1},e.previousPage=()=>e.setPageIndex(n=>n-1),e.nextPage=()=>e.setPageIndex(n=>n+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 n;return(n=e.options.pageCount)!=null?n:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var n;return(n=e.options.rowCount)!=null?n:e.getPrePaginationRowModel().rows.length}}},kM=()=>({top:[],bottom:[]}),GHe={getInitialState:e=>({rowPinning:kM(),...e}),getDefaultOptions:e=>({onRowPinningChange:Bi("rowPinning",e)}),createRow:(e,t)=>{e.pin=(r,n,a)=>{const i=n?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],s=a?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],o=new Set([...s,e.id,...i]);t.setRowPinning(l=>{var c,u;if(r==="bottom"){var f,p;return{top:((f=l?.top)!=null?f:[]).filter(v=>!(o!=null&&o.has(v))),bottom:[...((p=l?.bottom)!=null?p:[]).filter(v=>!(o!=null&&o.has(v))),...Array.from(o)]}}if(r==="top"){var m,b;return{top:[...((m=l?.top)!=null?m:[]).filter(v=>!(o!=null&&o.has(v))),...Array.from(o)],bottom:((b=l?.bottom)!=null?b:[]).filter(v=>!(o!=null&&o.has(v)))}}return{top:((c=l?.top)!=null?c:[]).filter(v=>!(o!=null&&o.has(v))),bottom:((u=l?.bottom)!=null?u:[]).filter(v=>!(o!=null&&o.has(v)))}})},e.getCanPin=()=>{var r;const{enableRowPinning:n,enablePinning:a}=t.options;return typeof n=="function"?n(e):(r=n??a)!=null?r:!0},e.getIsPinned=()=>{const r=[e.id],{top:n,bottom:a}=t.getState().rowPinning,i=r.some(o=>n?.includes(o)),s=r.some(o=>a?.includes(o));return i?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var r,n;const a=e.getIsPinned();if(!a)return-1;const i=(r=a==="top"?t.getTopRows():t.getBottomRows())==null?void 0:r.map(s=>{let{id:o}=s;return o});return(n=i?.indexOf(e.id))!=null?n:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var r,n;return e.setRowPinning(t?kM():(r=(n=e.initialState)==null?void 0:n.rowPinning)!=null?r:kM())},e.getIsSomeRowsPinned=t=>{var r;const n=e.getState().rowPinning;if(!t){var a,i;return!!((a=n.top)!=null&&a.length||(i=n.bottom)!=null&&i.length)}return!!((r=n[t])!=null&&r.length)},e._getPinnedRows=(t,r,n)=>{var a;return((a=e.options.keepPinnedRows)==null||a?(r??[]).map(s=>{const o=e.getRow(s,!0);return o.getIsAllParentsExpanded()?o:null}):(r??[]).map(s=>t.find(o=>o.id===s))).filter(Boolean).map(s=>({...s,position:n}))},e.getTopRows=Mt(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,r)=>e._getPinnedRows(t,r,"top"),Dt(e.options,"debugRows")),e.getBottomRows=Mt(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,r)=>e._getPinnedRows(t,r,"bottom"),Dt(e.options,"debugRows")),e.getCenterRows=Mt(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,r,n)=>{const a=new Set([...r??[],...n??[]]);return t.filter(i=>!a.has(i.id))},Dt(e.options,"debugRows"))}},VHe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Bi("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 r;return e.setRowSelection(t?{}:(r=e.initialState.rowSelection)!=null?r:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(r=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const n={...r},a=e.getPreGroupedRowModel().flatRows;return t?a.forEach(i=>{i.getCanSelect()&&(n[i.id]=!0)}):a.forEach(i=>{delete n[i.id]}),n})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(r=>{const n=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),a={...r};return e.getRowModel().rows.forEach(i=>{I6(a,i.id,n,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Mt(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,r)=>Object.keys(t).length?NM(e,r):{rows:[],flatRows:[],rowsById:{}},Dt(e.options,"debugTable")),e.getFilteredSelectedRowModel=Mt(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?NM(e,r):{rows:[],flatRows:[],rowsById:{}},Dt(e.options,"debugTable")),e.getGroupedSelectedRowModel=Mt(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?NM(e,r):{rows:[],flatRows:[],rowsById:{}},Dt(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:r}=e.getState();let n=!!(t.length&&Object.keys(r).length);return n&&t.some(a=>a.getCanSelect()&&!r[a.id])&&(n=!1),n},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(a=>a.getCanSelect()),{rowSelection:r}=e.getState();let n=!!t.length;return n&&t.some(a=>!r[a.id])&&(n=!1),n},e.getIsSomeRowsSelected=()=>{var t;const r=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return r>0&&r<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(r,n)=>{const a=e.getIsSelected();t.setRowSelection(i=>{var s;if(r=typeof r<"u"?r:!a,e.getCanSelect()&&a===r)return i;const o={...i};return I6(o,e.id,r,(s=n?.selectChildren)!=null?s:!0,t),o})},e.getIsSelected=()=>{const{rowSelection:r}=t.getState();return DI(e,r)},e.getIsSomeSelected=()=>{const{rowSelection:r}=t.getState();return L6(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:r}=t.getState();return L6(e,r)==="all"},e.getCanSelect=()=>{var r;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(r=t.options.enableRowSelection)!=null?r:!0},e.getCanSelectSubRows=()=>{var r;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(r=t.options.enableSubRowSelection)!=null?r:!0},e.getCanMultiSelect=()=>{var r;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(r=t.options.enableMultiRowSelection)!=null?r:!0},e.getToggleSelectedHandler=()=>{const r=e.getCanSelect();return n=>{var a;r&&e.toggleSelected((a=n.target)==null?void 0:a.checked)}}}},I6=(e,t,r,n,a)=>{var i;const s=a.getRow(t,!0);r?(s.getCanMultiSelect()||Object.keys(e).forEach(o=>delete e[o]),s.getCanSelect()&&(e[t]=!0)):delete e[t],n&&(i=s.subRows)!=null&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(o=>I6(e,o.id,r,n,a))};function NM(e,t){const r=e.getState().rowSelection,n=[],a={},i=function(s,o){return s.map(l=>{var c;const u=DI(l,r);if(u&&(n.push(l),a[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),u)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:n,rowsById:a}}function DI(e,t){var r;return(r=t[e.id])!=null?r:!1}function L6(e,t,r){var n;if(!((n=e.subRows)!=null&&n.length))return!1;let a=!0,i=!1;return e.subRows.forEach(s=>{if(!(i&&!a)&&(s.getCanSelect()&&(DI(s,t)?i=!0:a=!1),s.subRows&&s.subRows.length)){const o=L6(s,t);o==="all"?i=!0:(o==="some"&&(i=!0),a=!1)}}),a?"all":i?"some":!1}const P6=/([0-9]+)/gm,WHe=(e,t,r)=>Fle(Vc(e.getValue(r)).toLowerCase(),Vc(t.getValue(r)).toLowerCase()),KHe=(e,t,r)=>Fle(Vc(e.getValue(r)),Vc(t.getValue(r))),XHe=(e,t,r)=>OI(Vc(e.getValue(r)).toLowerCase(),Vc(t.getValue(r)).toLowerCase()),YHe=(e,t,r)=>OI(Vc(e.getValue(r)),Vc(t.getValue(r))),ZHe=(e,t,r)=>{const n=e.getValue(r),a=t.getValue(r);return n>a?1:n<a?-1:0},QHe=(e,t,r)=>OI(e.getValue(r),t.getValue(r));function OI(e,t){return e===t?0:e>t?1:-1}function Vc(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Fle(e,t){const r=e.split(P6).filter(Boolean),n=t.split(P6).filter(Boolean);for(;r.length&&n.length;){const a=r.shift(),i=n.shift(),s=parseInt(a,10),o=parseInt(i,10),l=[s,o].sort();if(isNaN(l[0])){if(a>i)return 1;if(i>a)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>o)return 1;if(o>s)return-1}return r.length-n.length}const Kh={alphanumeric:WHe,alphanumericCaseSensitive:KHe,text:XHe,textCaseSensitive:YHe,datetime:ZHe,basic:QHe},JHe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Bi("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const r=t.getFilteredRowModel().flatRows.slice(10);let n=!1;for(const a of r){const i=a?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return Kh.datetime;if(typeof i=="string"&&(n=!0,i.split(P6).length>1))return Kh.alphanumeric}return n?Kh.text:Kh.basic},e.getAutoSortDir=()=>{const r=t.getFilteredRowModel().flatRows[0];return typeof r?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var r,n;if(!e)throw new Error;return cy(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(r=(n=t.options.sortingFns)==null?void 0:n[e.columnDef.sortingFn])!=null?r:Kh[e.columnDef.sortingFn]},e.toggleSorting=(r,n)=>{const a=e.getNextSortingOrder(),i=typeof r<"u"&&r!==null;t.setSorting(s=>{const o=s?.find(m=>m.id===e.id),l=s?.findIndex(m=>m.id===e.id);let c=[],u,f=i?r:a==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&n?o?u="toggle":u="add":s!=null&&s.length&&l!==s.length-1?u="replace":o?u="toggle":u="replace",u==="toggle"&&(i||a||(u="remove")),u==="add"){var p;c=[...s,{id:e.id,desc:f}],c.splice(0,c.length-((p=t.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=s.map(m=>m.id===e.id?{...m,desc:f}:m):u==="remove"?c=s.filter(m=>m.id!==e.id):c=[{id:e.id,desc:f}];return c})},e.getFirstSortDir=()=>{var r,n;return((r=(n=e.columnDef.sortDescFirst)!=null?n:t.options.sortDescFirst)!=null?r:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=r=>{var n,a;const i=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==i&&((n=t.options.enableSortingRemoval)==null||n)&&(!(r&&(a=t.options.enableMultiRemove)!=null)||a)?!1:s==="desc"?"asc":"desc":i},e.getCanSort=()=>{var r,n;return((r=e.columnDef.enableSorting)!=null?r:!0)&&((n=t.options.enableSorting)!=null?n:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var r,n;return(r=(n=e.columnDef.enableMultiSort)!=null?n:t.options.enableMultiSort)!=null?r:!!e.accessorFn},e.getIsSorted=()=>{var r;const n=(r=t.getState().sorting)==null?void 0:r.find(a=>a.id===e.id);return n?n.desc?"desc":"asc":!1},e.getSortIndex=()=>{var r,n;return(r=(n=t.getState().sorting)==null?void 0:n.findIndex(a=>a.id===e.id))!=null?r:-1},e.clearSorting=()=>{t.setSorting(r=>r!=null&&r.length?r.filter(n=>n.id!==e.id):[])},e.getToggleSortingHandler=()=>{const r=e.getCanSort();return n=>{r&&(n.persist==null||n.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(n):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var r,n;e.setSorting(t?[]:(r=(n=e.initialState)==null?void 0:n.sorting)!=null?r:[])},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())}},eGe=[_He,jHe,LHe,PHe,wHe,EHe,qHe,UHe,JHe,OHe,$He,HHe,GHe,VHe,BHe];function tGe(e){var t,r;const n=[...eGe,...(t=e._features)!=null?t:[]];let a={_features:n};const i=a._features.reduce((p,m)=>Object.assign(p,m.getDefaultOptions==null?void 0:m.getDefaultOptions(a)),{}),s=p=>a.options.mergeOptions?a.options.mergeOptions(i,p):{...i,...p};let l={...{},...(r=e.initialState)!=null?r:{}};a._features.forEach(p=>{var m;l=(m=p.getInitialState==null?void 0:p.getInitialState(l))!=null?m:l});const c=[];let u=!1;const f={_features:n,options:{...i,...e},initialState:l,_queue:p=>{c.push(p),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{a.setState(a.initialState)},setOptions:p=>{const m=Mc(p,a.options);a.options=s(m)},getState:()=>a.options.state,setState:p=>{a.options.onStateChange==null||a.options.onStateChange(p)},_getRowId:(p,m,b)=>{var v;return(v=a.options.getRowId==null?void 0:a.options.getRowId(p,m,b))!=null?v:`${b?[b.id,m].join("."):m}`},getCoreRowModel:()=>(a._getCoreRowModel||(a._getCoreRowModel=a.options.getCoreRowModel(a)),a._getCoreRowModel()),getRowModel:()=>a.getPaginationRowModel(),getRow:(p,m)=>{let b=(m?a.getPrePaginationRowModel():a.getRowModel()).rowsById[p];if(!b&&(b=a.getCoreRowModel().rowsById[p],!b))throw new Error;return b},_getDefaultColumnDef:Mt(()=>[a.options.defaultColumn],p=>{var m;return p=(m=p)!=null?m:{},{header:b=>{const v=b.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:b=>{var v,y;return(v=(y=b.renderValue())==null||y.toString==null?void 0:y.toString())!=null?v:null},...a._features.reduce((b,v)=>Object.assign(b,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...p}},Dt(e,"debugColumns")),_getColumnDefs:()=>a.options.columns,getAllColumns:Mt(()=>[a._getColumnDefs()],p=>{const m=function(b,v,y){return y===void 0&&(y=0),b.map(_=>{const S=yHe(a,_,y,v),C=_;return S.columns=C.columns?m(C.columns,S,y+1):[],S})};return m(p)},Dt(e,"debugColumns")),getAllFlatColumns:Mt(()=>[a.getAllColumns()],p=>p.flatMap(m=>m.getFlatColumns()),Dt(e,"debugColumns")),_getAllFlatColumnsById:Mt(()=>[a.getAllFlatColumns()],p=>p.reduce((m,b)=>(m[b.id]=b,m),{}),Dt(e,"debugColumns")),getAllLeafColumns:Mt(()=>[a.getAllColumns(),a._getOrderColumnsFn()],(p,m)=>{let b=p.flatMap(v=>v.getLeafColumns());return m(b)},Dt(e,"debugColumns")),getColumn:p=>a._getAllFlatColumnsById()[p]};Object.assign(a,f);for(let p=0;p<a._features.length;p++){const m=a._features[p];m==null||m.createTable==null||m.createTable(a)}return a}function rGe(){return e=>Mt(()=>[e.options.data],t=>{const r={rows:[],flatRows:[],rowsById:{}},n=function(a,i,s){i===void 0&&(i=0);const o=[];for(let c=0;c<a.length;c++){const u=RI(e,e._getRowId(a[c],c,s),a[c],c,i,void 0,s?.id);if(r.flatRows.push(u),r.rowsById[u.id]=u,o.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(a[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=n(u.originalSubRows,i+1,u))}}return o};return r.rows=n(t),r},Dt(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function nGe(e){const t=[],r=n=>{var a;t.push(n),(a=n.subRows)!=null&&a.length&&n.getIsExpanded()&&n.subRows.forEach(r)};return e.rows.forEach(r),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function Ble(e,t,r){return r.options.filterFromLeafRows?aGe(e,t,r):iGe(e,t,r)}function aGe(e,t,r){var n;const a=[],i={},s=(n=r.options.maxLeafRowFilterDepth)!=null?n:100,o=function(l,c){c===void 0&&(c=0);const u=[];for(let p=0;p<l.length;p++){var f;let m=l[p];const b=RI(r,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(b.columnFilters=m.columnFilters,(f=m.subRows)!=null&&f.length&&c<s){if(b.subRows=o(m.subRows,c+1),m=b,t(m)&&!b.subRows.length){u.push(m),i[m.id]=m,a.push(m);continue}if(t(m)||b.subRows.length){u.push(m),i[m.id]=m,a.push(m);continue}}else m=b,t(m)&&(u.push(m),i[m.id]=m,a.push(m))}return u};return{rows:o(e),flatRows:a,rowsById:i}}function iGe(e,t,r){var n;const a=[],i={},s=(n=r.options.maxLeafRowFilterDepth)!=null?n:100,o=function(l,c){c===void 0&&(c=0);const u=[];for(let p=0;p<l.length;p++){let m=l[p];if(t(m)){var f;if((f=m.subRows)!=null&&f.length&&c<s){const v=RI(r,m.id,m.original,m.index,m.depth,void 0,m.parentId);v.subRows=o(m.subRows,c+1),m=v}u.push(m),a.push(m),i[m.id]=m}}return u};return{rows:o(e),flatRows:a,rowsById:i}}function sGe(){return(e,t)=>Mt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(r,n,a)=>{if(!r.rows.length||!(n!=null&&n.length)&&!a)return r;const i=[...n.map(o=>o.id).filter(o=>o!==t),a?"__global__":void 0].filter(Boolean),s=o=>{for(let l=0;l<i.length;l++)if(o.columnFilters[i[l]]===!1)return!1;return!0};return Ble(r.rows,s,e)},Dt(e.options,"debugTable"))}function oGe(){return(e,t)=>Mt(()=>{var r;return[(r=e.getColumn(t))==null?void 0:r.getFacetedRowModel()]},r=>{if(!r)return new Map;let n=new Map;for(let i=0;i<r.flatRows.length;i++){const s=r.flatRows[i].getUniqueValues(t);for(let o=0;o<s.length;o++){const l=s[o];if(n.has(l)){var a;n.set(l,((a=n.get(l))!=null?a:0)+1)}else n.set(l,1)}}return n},Dt(e.options,"debugTable"))}function lGe(){return e=>Mt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,r,n)=>{if(!t.rows.length||!(r!=null&&r.length)&&!n){for(let p=0;p<t.flatRows.length;p++)t.flatRows[p].columnFilters={},t.flatRows[p].columnFiltersMeta={};return t}const a=[],i=[];(r??[]).forEach(p=>{var m;const b=e.getColumn(p.id);if(!b)return;const v=b.getFilterFn();v&&a.push({id:p.id,filterFn:v,resolvedValue:(m=v.resolveFilterValue==null?void 0:v.resolveFilterValue(p.value))!=null?m:p.value})});const s=(r??[]).map(p=>p.id),o=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(p=>p.getCanGlobalFilter());n&&o&&l.length&&(s.push("__global__"),l.forEach(p=>{var m;i.push({id:p.id,filterFn:o,resolvedValue:(m=o.resolveFilterValue==null?void 0:o.resolveFilterValue(n))!=null?m:n})}));let c,u;for(let p=0;p<t.flatRows.length;p++){const m=t.flatRows[p];if(m.columnFilters={},a.length)for(let b=0;b<a.length;b++){c=a[b];const v=c.id;m.columnFilters[v]=c.filterFn(m,v,c.resolvedValue,y=>{m.columnFiltersMeta[v]=y})}if(i.length){for(let b=0;b<i.length;b++){u=i[b];const v=u.id;if(u.filterFn(m,v,u.resolvedValue,y=>{m.columnFiltersMeta[v]=y})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const f=p=>{for(let m=0;m<s.length;m++)if(p.columnFilters[s[m]]===!1)return!1;return!0};return Ble(t.rows,f,e)},Dt(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function cGe(e){return t=>Mt(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(r,n)=>{if(!n.rows.length)return n;const{pageSize:a,pageIndex:i}=r;let{rows:s,flatRows:o,rowsById:l}=n;const c=a*i,u=c+a;s=s.slice(c,u);let f;t.options.paginateExpandedRows?f={rows:s,flatRows:o,rowsById:l}:f=nGe({rows:s,flatRows:o,rowsById:l}),f.flatRows=[];const p=m=>{f.flatRows.push(m),m.subRows.length&&m.subRows.forEach(p)};return f.rows.forEach(p),f},Dt(t.options,"debugTable"))}function uGe(){return e=>Mt(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,r)=>{if(!r.rows.length||!(t!=null&&t.length))return r;const n=e.getState().sorting,a=[],i=n.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),s={};i.forEach(l=>{const c=e.getColumn(l.id);c&&(s[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const o=l=>{const c=l.map(u=>({...u}));return c.sort((u,f)=>{for(let m=0;m<i.length;m+=1){var p;const b=i[m],v=s[b.id],y=v.sortUndefined,_=(p=b?.desc)!=null?p:!1;let S=0;if(y){const C=u.getValue(b.id),T=f.getValue(b.id),A=C===void 0,k=T===void 0;if(A||k){if(y==="first")return A?-1:1;if(y==="last")return A?1:-1;S=A&&k?0:A?y:-y}}if(S===0&&(S=v.sortingFn(u,f,b.id)),S!==0)return _&&(S*=-1),v.invertSorting&&(S*=-1),S}return u.index-f.index}),c.forEach(u=>{var f;a.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=o(u.subRows))}),c};return{rows:o(r.rows),flatRows:a,rowsById:r.rowsById}},Dt(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
   * react-table
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   */function UZ(e,t){return e?dGe(e)?E.createElement(e,t):e:null}function dGe(e){return fGe(e)||typeof e=="function"||hGe(e)}function fGe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function hGe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function pGe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=E.useState(()=>({current:tGe(t)})),[n,a]=E.useState(()=>r.current.initialState);return r.current.setOptions(i=>({...i,...e,state:{...n,...e.state},onStateChange:s=>{a(s),e.onStateChange==null||e.onStateChange(s)}})),r.current}const zle=E.forwardRef(({className:e,...t},r)=>g.jsx("div",{className:"overflow-auto relative w-full rounded-lg scrollbar-hide",children:g.jsx("table",{ref:r,className:ut("w-full text-sm rounded-lg caption-bottom",e),...t})}));zle.displayName="Table";const jle=E.forwardRef(({className:e,...t},r)=>g.jsx("thead",{ref:r,className:ut("[&_tr]:border-b",e),...t}));jle.displayName="TableHeader";const qle=E.forwardRef(({className:e,...t},r)=>g.jsx("tbody",{ref:r,className:ut("[&_tr:last-child]:border-0",e),...t}));qle.displayName="TableBody";const mGe=E.forwardRef(({className:e,...t},r)=>g.jsx("tfoot",{ref:r,className:ut("border-t bg-gray-50 font-medium [&>tr]:last:border-b-0",e),...t}));mGe.displayName="TableFooter";const up=E.forwardRef(({className:e,...t},r)=>g.jsx("tr",{ref:r,className:ut("border-b border-gray-200 hover:bg-gray-50 data-[state=selected]:bg-gray-50 last:border-b-0 [&:last-child_td:first-child]:rounded-bl-lg [&:last-child_td:last-child]:rounded-br-lg [&:first-child_td:first-child]:rounded-tl-lg [&:first-child_td:last-child]:rounded-tr-lg",e),...t}));up.displayName="TableRow";const Ule=E.forwardRef(({className:e,...t},r)=>g.jsx("th",{ref:r,className:ut("h-10 px-6 text-left align-middle font-medium text-gray-600 [&>[role=checkbox]]:translate-y-[2px] first:rounded-tl-lg last:rounded-tr-lg",e),...t}));Ule.displayName="TableHead";const J1=E.forwardRef(({className:e,...t},r)=>g.jsx("td",{ref:r,className:ut("py-4 px-6 align-middle [&>[role=checkbox]]:translate-y-[2px]",e),...t}));J1.displayName="TableCell";const gGe=E.forwardRef(({className:e,...t},r)=>g.jsx("caption",{ref:r,className:ut("mt-4 text-sm text-gray-600",e),...t}));gGe.displayName="TableCaption";function vGe({table:e}){const t=e.getPageCount(),r=e.getState().pagination.pageIndex,n=e.getState().pagination.pageSize,a=e.getFilteredRowModel().rows.length;return console.log("📄 Pagination Debug:",{pageCount:t,currentPage:r,pageSize:n,totalRows:a,canPreviousPage:e.getCanPreviousPage(),canNextPage:e.getCanNextPage()}),t<=1?null:g.jsx("div",{className:"flex overflow-auto justify-between items-center w-full",children:g.jsxs("div",{className:"flex justify-between items-center w-full",children:[g.jsxs("div",{className:"text-sm text-gray-600",children:["Showing ",r*n+1," to"," ",Math.min((r+1)*n,a)," of ",a," results"]}),g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsxs(mt,{size:"default",variant:"outline",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:["Previous",g.jsx(mx,{className:"w-4 h-4"})]}),g.jsx("div",{className:"flex gap-2 justify-center items-center text-sm font-medium text-gray-600",children:Array.from({length:e.getPageCount()},(i,s)=>{const o=e.getState().pagination.pageIndex;return s===0||s===e.getPageCount()-1||s>=o-2&&s<=o+2||Math.abs(s-o)<=1?g.jsx("span",{className:`cursor-pointer rounded w-10 h-10 flex items-center justify-center ${o===s?"bg-gray-50 text-gray-900":"text-gray-600"}`,onClick:()=>e.setPageIndex(s),children:s+1},s):s===1||s===e.getPageCount()-2?g.jsx("span",{className:"px-2",children:"..."},s):null})}),g.jsxs(mt,{variant:"secondary",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),size:"default",children:["Next",g.jsx(bre,{className:"w-4 h-4"})]})]})]})})}function bGe({columns:e,data:t,loading:r=!0,handleRowClick:n,is_border:a=!0,defaultSorting:i=[]}){const[s,o]=E.useState({}),[l,c]=E.useState([]),[u,f]=E.useState(i),[p,m]=E.useState({pageIndex:0,pageSize:10}),b=pGe({data:t,columns:e,state:{sorting:u,columnVisibility:s,columnFilters:l,pagination:p},onSortingChange:f,onColumnFiltersChange:c,onColumnVisibilityChange:o,onPaginationChange:m,getCoreRowModel:rGe(),getFilteredRowModel:lGe(),getPaginationRowModel:cGe(),getSortedRowModel:uGe(),getFacetedRowModel:sGe(),getFacetedUniqueValues:oGe()});return g.jsxs("div",{className:"flex flex-col h-full max-h-full rounded-lg border",children:[g.jsx("div",{className:ut("flex flex-1 overflow-auto bg-background scrollbar-hide rounded-t-lg min-h-0",a&&""),children:g.jsxs(zle,{children:[g.jsx(jle,{className:"sticky top-0 bg-gray-50 rounded-t-lg z-10",children:b.getHeaderGroups().map(v=>g.jsx(up,{children:v.headers.map(y=>g.jsx(Ule,{colSpan:y.colSpan,children:y.isPlaceholder?null:UZ(y.column.columnDef.header,y.getContext())},y.id))},v.id))}),g.jsx(qle,{className:"cursor-pointer",children:r?g.jsx(up,{children:g.jsx(J1,{colSpan:e.length,className:"h-24 text-center text-semibold! text-gray-900!",children:g.jsx("div",{className:"flex justify-center items-center w-full",children:g.jsx(jc,{className:"animate-spin text-brand-700",size:30})})})}):b.getRowModel().rows?.length?b.getRowModel().rows.map(v=>g.jsx(up,{"data-state":v.getIsSelected()&&"selected",className:"group",children:v.getVisibleCells().map(y=>g.jsx(J1,{onClick:()=>n&&n(v),children:UZ(y.column.columnDef.cell,y.getContext())},y.id))},v.id)):g.jsx(up,{children:g.jsx(J1,{colSpan:e.length,className:"h-24 text-center text-semibold! text-gray-900!",children:g.jsx("span",{className:"font-semibold! text-gray-700!",children:"No data"})})})})]})}),g.jsx("div",{className:"flex items-center p-3 border-t bg-gray-50 rounded-b-lg flex-shrink-0",children:g.jsx(vGe,{table:b})})]})}function dp({column:e,title:t,className:r}){return e.getCanSort()?g.jsxs("div",{className:ut("flex items-center space-x-2 h-full text-xs font-medium text-gray-600 cursor-pointer",r),children:[t.toUpperCase(),e.getIsSorted()==="desc"?g.jsx(Iee,{onClick:()=>e.toggleSorting(!1),className:"text-gray-600",size:16}):e.getIsSorted()==="asc"?g.jsx(kge,{onClick:()=>e.toggleSorting(!0),className:"text-gray-600",size:16}):g.jsx(hve,{onClick:()=>e.toggleSorting(!0),className:"text-gray-600",size:16})]}):g.jsx("div",{className:ut("flex items-center py-2 space-x-2 text-xs font-medium text-gray-600",r),children:t.toUpperCase()})}function xGe(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var uy="Checkbox",[yGe,Ost]=zl(uy),[_Ge,II]=yGe(uy);function wGe(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:a,disabled:i,form:s,name:o,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:f}=e,[p,m]=y0({prop:r,defaultProp:a??!1,onChange:l,caller:uy}),[b,v]=E.useState(null),[y,_]=E.useState(null),S=E.useRef(!1),C=b?!!s||!!b.closest("form"):!0,T={checked:p,disabled:i,setChecked:m,control:b,setControl:v,name:o,form:s,value:u,hasConsumerStoppedPropagationRef:S,required:c,defaultChecked:Fc(a)?!1:a,isFormControl:C,bubbleInput:y,setBubbleInput:_};return g.jsx(_Ge,{scope:t,...T,children:EGe(f)?f(T):n})}var $le="CheckboxTrigger",Hle=E.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},a)=>{const{control:i,value:s,disabled:o,checked:l,required:c,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:m,bubbleInput:b}=II($le,e),v=pn(a,u),y=E.useRef(l);return E.useEffect(()=>{const _=i?.form;if(_){const S=()=>f(y.current);return _.addEventListener("reset",S),()=>_.removeEventListener("reset",S)}},[i,f]),g.jsx(Mr.button,{type:"button",role:"checkbox","aria-checked":Fc(l)?"mixed":l,"aria-required":c,"data-state":Xle(l),"data-disabled":o?"":void 0,disabled:o,value:s,...n,ref:v,onKeyDown:$t(t,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:$t(r,_=>{f(S=>Fc(S)?!0:!S),b&&m&&(p.current=_.isPropagationStopped(),p.current||_.stopPropagation())})})});Hle.displayName=$le;var LI=E.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:a,defaultChecked:i,required:s,disabled:o,value:l,onCheckedChange:c,form:u,...f}=e;return g.jsx(wGe,{__scopeCheckbox:r,checked:a,defaultChecked:i,disabled:o,required:s,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:p})=>g.jsxs(g.Fragment,{children:[g.jsx(Hle,{...f,ref:t,__scopeCheckbox:r}),p&&g.jsx(Kle,{__scopeCheckbox:r})]})})});LI.displayName=uy;var Gle="CheckboxIndicator",Vle=E.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...a}=e,i=II(Gle,r);return g.jsx(vs,{present:n||Fc(i.checked)||i.checked===!0,children:g.jsx(Mr.span,{"data-state":Xle(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});Vle.displayName=Gle;var Wle="CheckboxBubbleInput",Kle=E.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:s,required:o,disabled:l,name:c,value:u,form:f,bubbleInput:p,setBubbleInput:m}=II(Wle,e),b=pn(r,m),v=xGe(i),y=Wte(n);E.useEffect(()=>{const S=p;if(!S)return;const C=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(C,"checked").set,k=!a.current;if(v!==i&&A){const N=new Event("click",{bubbles:k});S.indeterminate=Fc(i),A.call(S,Fc(i)?!1:i),S.dispatchEvent(N)}},[p,v,i,a]);const _=E.useRef(Fc(i)?!1:i);return g.jsx(Mr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??_.current,required:o,disabled:l,name:c,value:u,form:f,...t,tabIndex:-1,ref:b,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Kle.displayName=Wle;function EGe(e){return typeof e=="function"}function Fc(e){return e==="indeterminate"}function Xle(e){return Fc(e)?"indeterminate":e?"checked":"unchecked"}const Np=E.forwardRef(({className:e,...t},r)=>g.jsx(LI,{ref:r,className:ut("peer size-5 shrink-0 rounded-sm border border-brand 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-brand-600 data-[state=checked]:text-white",e),...t,children:g.jsx(Vle,{className:ut("flex items-center justify-center text-current"),children:g.jsx(rAe,{className:"h-4 w-4"})})}));Np.displayName=LI.displayName;const SGe=e=>({id:`topic-${e.id}`,name:e.name,type:"folder",itemCount:0,lastModified:new Date(e.updated_at),path:`/topics/${e.id}`,topicId:e.id}),CGe=e=>({id:`doc-${e.id}`,name:e.original_filename,type:"file",size:e.file_size,extension:e.original_filename.split(".").pop()?.toLowerCase()||"unknown",lastModified:new Date(e.updated_at),path:`http://localhost:8080/api/documents/${e.id}/download`,topicId:e.topic_id||void 0}),TGe=e=>{if(e===0)return"0 Bytes";const t=1024,r=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,n)).toFixed(2))+" "+r[n]},AGe=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),Yle=()=>[{accessorKey:"name",header:({column:e})=>g.jsx(dp,{column:e,title:"Name"}),cell:({row:e})=>{const t=e.original;return g.jsxs("div",{className:"grid grid-cols-[max-content_1fr] gap-2",children:[g.jsx(Ju,{ext:t.type==="file"?t.extension:void 0}),g.jsx("div",{className:"flex flex-col truncate",children:g.jsx("span",{className:"font-medium text-gray-900",children:t.name})})]})}},{accessorKey:"type",header:({column:e})=>g.jsx(dp,{column:e,title:"Type"}),cell:({row:e})=>{const t=e.original;return g.jsx("div",{className:"flex items-center",children:g.jsx("span",{className:ut("px-2 py-1 text-xs font-medium rounded-full",t.type==="folder"?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800"),children:t.type==="folder"?"Topic":t.extension.toUpperCase()})})}},{accessorKey:"size",header:({column:e})=>g.jsx(dp,{column:e,title:"Size"}),cell:({row:e})=>{const t=e.original;return t.type==="folder"?g.jsxs("span",{className:"text-gray-500",children:[t.itemCount," items"]}):g.jsx("span",{className:"text-gray-900",children:TGe(t.size)})}},{accessorKey:"lastModified",header:({column:e})=>g.jsx(dp,{column:e,title:"Last Modified"}),cell:({row:e})=>g.jsx("span",{className:"text-gray-600",children:AGe(e.original.lastModified.toISOString())})}],kGe=(e,t,r,n)=>[{id:"select",header:()=>g.jsx(Np,{checked:r.length>0?r.every(a=>e.includes(a.id))?!0:r.some(a=>e.includes(a.id))?"indeterminate":!1:!1,onCheckedChange:a=>{if(a){const i=r.map(s=>s.id);t(Array.from(new Set([...e,...i])))}else{const i=r.map(s=>s.id);t(e.filter(s=>!i.includes(s)))}}}),cell:({row:a})=>{const i=a.original;if(i.type==="folder"&&n){const s=i.topicId;if(s){const l=n.filter(f=>f.type==="file"&&f.topicId===s).map(f=>f.id),c=l.length>0&&l.every(f=>e.includes(f)),u=l.some(f=>e.includes(f));return g.jsx("div",{onClick:f=>f.stopPropagation(),children:g.jsx(Np,{checked:c?!0:u?"indeterminate":!1,onCheckedChange:f=>{if(f){const p=Array.from(new Set([...e,...l]));t(p)}else{const p=e.filter(m=>!l.includes(m));t(p)}}})})}}return g.jsx("div",{onClick:s=>s.stopPropagation(),children:g.jsx(Np,{checked:e.includes(i.id),onCheckedChange:s=>{t(s?[...e,i.id]:e.filter(o=>o!==i.id))}})})}},...Yle()],NGe=(e,t,r,n)=>[...Yle(),{id:"actions",header:({column:a})=>g.jsx(dp,{column:a,title:"Actions"}),cell:({row:a})=>{const i=a.original;return g.jsxs(Fm,{children:[g.jsx(Bm,{asChild:!0,children:g.jsx(mt,{variant:"ghost",className:"p-0 w-8 h-8",children:g.jsx(Lee,{className:"w-4 h-4"})})}),g.jsxs(zm,{align:"end",children:[g.jsxs(is,{onClick:s=>{s.stopPropagation(),e(i)},children:[g.jsx(Bee,{className:"mr-2 w-4 h-4"}),"View"]}),i.type==="file"&&n&&g.jsxs(is,{onClick:s=>{s.stopPropagation(),n(i)},children:[g.jsx(Pee,{className:"mr-2 w-4 h-4"}),"Download"]}),g.jsxs(is,{disabled:i.type==="file"&&i.extension.toLowerCase()==="pdf",onClick:s=>{s.stopPropagation(),!(i.type==="file"&&i.extension.toLowerCase()==="pdf")&&t(i)},children:[g.jsx(Fee,{className:"mr-2 w-4 h-4"}),"Edit"]}),g.jsxs(is,{className:"text-red-600",onClick:s=>{s.stopPropagation(),r(i)},children:[g.jsx(qee,{className:"mr-2 w-4 h-4"}),"Delete"]})]})]})}}];function Zle({data:e,loading:t=!1,mode:r,selectedIds:n=[],onSelectionChange:a,onRowClick:i,onViewItem:s,onEditItem:o,onDeleteItem:l,onDownloadItem:c,allLibraryItems:u}){const f=ye.useMemo(()=>r==="selection"?kGe(n,a||(()=>{}),e,u):NGe(s||(()=>{}),o||(()=>{}),l||(()=>{}),c),[r,n,a,e,u,s,o,l,c]);return g.jsx(bGe,{columns:f,data:e,loading:t,handleRowClick:i?p=>i(p.original):void 0})}function RGe({isOpen:e,onClose:t,onConfirm:r,currentAgentId:n}){const[a,i]=E.useState(""),[s,o]=E.useState([]),[l,c]=E.useState(!1),[u,f]=E.useState([]),[p,m]=E.useState(!1),[b,v]=E.useState(null),[y,_]=E.useState([]),[S,C]=E.useState(!1),[T,A]=E.useState(1),[k]=E.useState(10),N=async()=>{console.log("🔍 Fetching current agent details..."),C(!0);try{const Q=(await gt.getAgent(parseInt(n))).config?.associated_documents||[];console.log("📋 Current agent associated documents:",Q),_(Q)}catch(M){console.error("❌ Failed to fetch current agent details:",M),_([])}finally{C(!1)}},L=async()=>{console.log("🔍 Fetching library documents..."),m(!0),v(null);try{const M=await gt.getDocuments();console.log("📚 Library documents fetched:",{count:M?.length||0,documents:M?.map(Q=>({id:Q.id,name:Q.original_filename,agent_id:Q.agent_id}))}),f(M||[])}catch(M){console.error("❌ Failed to fetch library documents:",M),v(M instanceof Error?M.message:"Failed to fetch library documents"),f([])}finally{m(!1)}};E.useEffect(()=>{e&&(console.log("🔍 Modal opened, fetching data..."),console.log("🔍 Current agent ID:",n),N(),L())},[e,n]),E.useEffect(()=>{if(y.length>0&&u.length>0){const M=y.map(Q=>Q.toString());console.log("✅ Setting pre-selected files:",M),o(M)}},[y,u]);const I=E.useMemo(()=>{console.log("🔍 Filtering available documents:",{totalDocuments:u?.length||0,currentAgentId:n,searchTerm:a,associatedDocuments:y});const M=u.filter(Q=>!(a&&!Q.original_filename.toLowerCase().includes(a.toLowerCase())));return console.log("✅ Available documents after filtering:",{count:M.length,documents:M.map(Q=>({id:Q.id,name:Q.original_filename,agent_id:Q.agent_id,isAssociated:y.includes(Q.id)}))}),M},[u,n,a,y]),P=Math.ceil(I.length/k),H=(T-1)*k,B=H+k,K=I.slice(H,B);console.log("🔢 Pagination debug:",{availableDocumentsLength:I.length,itemsPerPage:k,totalPages:P,currentPage:T,startIndex:H,endIndex:B,paginatedDocumentsLength:K.length,shouldShowPagination:P>1}),E.useEffect(()=>{A(1)},[a]);const j=M=>{A(Math.max(1,Math.min(M,P)))},W=()=>{T<P&&A(T+1)},D=()=>{T>1&&A(T-1)},U=(M,Q)=>{o(Q?q=>[...q,M]:q=>q.filter(F=>F!==M))},Y=async()=>{if(s.length===0){Fr.error("Please select at least one file");return}c(!0);try{r(s)}catch(M){console.error("Error adding files:",M),Fr.error("Failed to add files to agent")}finally{c(!1)}},z=()=>{o([]),i(""),t()};return g.jsx(si,{open:e,onOpenChange:z,children:g.jsxs(oi,{className:"!max-w-[880px]  gap-4 overflow-hidden",children:[g.jsx(Pi,{className:"",children:g.jsx(ds,{className:"flex justify-between",children:g.jsx("span",{children:"Add Files from Library"})})}),g.jsxs("div",{className:"flex overflow-y-auto flex-col space-y-4 max-h-full",children:[g.jsx("div",{className:"flex flex-shrink-0 items-center space-x-4",children:g.jsxs("div",{className:"relative flex-1",children:[g.jsx(ub,{className:"absolute left-3 top-1/2 w-4 h-4 text-gray-400 transform -translate-y-1/2"}),g.jsx(Bl,{placeholder:"Search files...",value:a,onChange:M=>i(M.target.value),className:"pl-10"})]})}),g.jsx("div",{className:"h-[520px] overflow-y-auto border rounded-lg",children:p||S?g.jsx("div",{className:"flex justify-center text-gray-500",children:g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("div",{className:"w-4 h-4 rounded-full border-b-2 border-blue-600 animate-spin"}),g.jsx("span",{children:"Loading..."})]})}):b?g.jsx("div",{className:"flex justify-center items-center text-red-500",children:g.jsxs("div",{className:"text-center",children:[g.jsx("div",{className:"font-medium",children:"Error loading documents"}),g.jsx("div",{className:"text-sm text-red-400",children:b}),g.jsx(mt,{variant:"outline",size:"sm",onClick:L,className:"mt-2",children:"Retry"})]})}):I.length===0?g.jsx("div",{className:"flex justify-center items-center h-32 text-gray-500",children:a?"No files match your search":"No files available to add"}):g.jsx("div",{className:"divide-y",children:K.map(M=>g.jsxs("div",{className:"flex items-center p-3 space-x-3 hover:bg-gray-50",children:[g.jsx(Np,{checked:s.includes(M.id.toString()),onCheckedChange:Q=>U(M.id.toString(),Q)}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"flex items-center text-sm font-medium truncate",children:M.original_filename}),g.jsx("div",{className:"text-xs text-gray-500",children:M.file_size?`${(M.file_size/1024).toFixed(1)} KB`:"Unknown size"})]})]},M.id))})}),P>1&&g.jsxs("div",{className:"flex flex-shrink-0 justify-between items-center pt-2",children:[g.jsxs("div",{className:"text-sm text-gray-500",children:["Showing ",H+1,"-",Math.min(B,I.length)," of"," ",I.length," files"]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(mt,{variant:"outline",size:"sm",onClick:D,disabled:T===1,className:"p-0 w-8 h-8",children:g.jsx(mx,{className:"w-4 h-4"})}),g.jsx("div",{className:"flex items-center space-x-1",children:Array.from({length:Math.min(5,P)},(M,Q)=>{let q;return P<=5||T<=3?q=Q+1:T>=P-2?q=P-4+Q:q=T-2+Q,g.jsx(mt,{variant:T===q?"secondary":"outline",size:"sm",onClick:()=>j(q),className:`w-8 h-8 p-0 ${T===q?"bg-gray-100 hover:bg-gray-100 text-gray-900 border-gray-300":""}`,children:q},q)})}),g.jsx(mt,{variant:"outline",size:"sm",onClick:W,disabled:T===P,className:"p-0 w-8 h-8",children:g.jsx(bre,{className:"w-4 h-4"})})]})]}),g.jsxs("div",{className:"flex flex-shrink-0 items-center pt-4 mt-auto border-t",children:[g.jsx("span",{}),g.jsxs("div",{className:"flex justify-end space-x-2 w-full",children:[g.jsx(mt,{variant:"outline",onClick:z,children:"Cancel"}),g.jsx(mt,{onClick:Y,disabled:s.length===0||l,children:l?"Adding...":`Add ${s.length} File(s)`})]})]})]})]})})}Ys(e=>({isHealthy:!1,isApiAvailable:!1,healthData:null,rootInfo:null,isLoadingHealth:!1,isLoadingRootInfo:!1,error:null,checkHealth:async()=>{e({isLoadingHealth:!0,error:null});try{const t=await gt.checkHealth(),r=t.status==="healthy";e({isHealthy:r,healthData:t,isLoadingHealth:!1})}catch(t){e({isHealthy:!1,healthData:null,isLoadingHealth:!1,error:t})}},getRootInfo:async()=>{e({isLoadingRootInfo:!0,error:null});try{const t=await gt.getRootInfo();e({rootInfo:t,isLoadingRootInfo:!1})}catch(t){e({rootInfo:null,isLoadingRootInfo:!1,error:t})}},checkApiAvailability:async()=>{try{const t=await gt.isApiAvailable();e({isApiAvailable:t})}catch{e({isApiAvailable:!1})}},clearError:()=>{e({error:null})},reset:()=>{e({isHealthy:!1,isApiAvailable:!1,healthData:null,rootInfo:null,isLoadingHealth:!1,isLoadingRootInfo:!1,error:null})}}));Ys(e=>({currentConfig:null,availableDomains:[],selectedDomain:null,isLoadingConfig:!1,isLoadingDomains:!1,isConfiguring:!1,error:null,configurePoet:async t=>{e({isConfiguring:!0,error:null});try{const r=await gt.configurePoet(t);e({currentConfig:r,isConfiguring:!1})}catch(r){e({currentConfig:null,isConfiguring:!1,error:r})}},getDomains:async()=>{e({isLoadingDomains:!0,error:null});try{const t=await gt.getPoetDomains();e({availableDomains:t.domains,isLoadingDomains:!1})}catch(t){e({availableDomains:[],isLoadingDomains:!1,error:t})}},setSelectedDomain:t=>{e({selectedDomain:t})},clearError:()=>{e({error:null})},reset:()=>{e({currentConfig:null,availableDomains:[],selectedDomain:null,isLoadingConfig:!1,isLoadingDomains:!1,isConfiguring:!1,error:null})}}));const MGe=Ys(e=>({topics:[],selectedTopic:null,isLoading:!1,isCreating:!1,isUpdating:!1,isDeleting:!1,error:null,total:0,skip:0,limit:100,fetchTopics:async t=>{e({isLoading:!0,error:null});try{const r=await gt.getTopics(t);e({topics:r,isLoading:!1,skip:t?.skip||0,limit:t?.limit||100,total:r.length})}catch(r){const n=r instanceof Error?r.message:"Failed to fetch topics";e({topics:[],isLoading:!1,error:n})}},fetchTopic:async t=>{e({isLoading:!0,error:null});try{const r=await gt.getTopic(t);e({selectedTopic:r,isLoading:!1})}catch(r){const n=r instanceof Error?r.message:"Failed to fetch topic";e({selectedTopic:null,isLoading:!1,error:n})}},createTopic:async t=>{e({isCreating:!0,error:null});try{const r=await gt.createTopic(t);e(n=>({topics:[...n.topics,r],isCreating:!1}))}catch(r){const n=r instanceof Error?r.message:"Failed to create topic";e({isCreating:!1,error:n})}},updateTopic:async(t,r)=>{e({isUpdating:!0,error:null});try{const n=await gt.updateTopic(t,r);e(a=>({topics:a.topics.map(i=>i.id===t?n:i),selectedTopic:a.selectedTopic?.id===t?n:a.selectedTopic,isUpdating:!1}))}catch(n){const a=n instanceof Error?n.message:"Failed to update topic";e({isUpdating:!1,error:a})}},deleteTopic:async(t,r=!1)=>{e({isDeleting:!0,error:null});try{await gt.deleteTopic(t,r),e(n=>({topics:n.topics.filter(a=>a.id!==t),selectedTopic:n.selectedTopic?.id===t?null:n.selectedTopic,isDeleting:!1}))}catch(n){console.log("Delete topic error:",n);const a=n?.message||"Failed to delete topic";if(n?.status===400&&a.includes("associated documents")&&!r){console.log("Topic has associated documents, retrying with force=true");try{await gt.deleteTopic(t,!0),e(s=>({topics:s.topics.filter(o=>o.id!==t),selectedTopic:s.selectedTopic?.id===t?null:s.selectedTopic,isDeleting:!1}));return}catch(s){const o=s?.message||"Failed to delete topic";throw e({isDeleting:!1,error:o}),s}}throw e({isDeleting:!1,error:a}),n}},setSelectedTopic:t=>{e({selectedTopic:t})},clearError:()=>{e({error:null})},reset:()=>{e({topics:[],selectedTopic:null,isLoading:!1,isCreating:!1,isUpdating:!1,isDeleting:!1,error:null,total:0,skip:0,limit:100})}})),DGe=()=>{const{fetchTopics:e,fetchTopic:t,createTopic:r,updateTopic:n,deleteTopic:a,topics:i,selectedTopic:s,isLoading:o,isCreating:l,isUpdating:c,isDeleting:u,error:f,setSelectedTopic:p,clearError:m}=MGe(),{addNotification:b}=ud();return{fetchTopics:e,fetchTopic:t,createTopic:async S=>{try{await r(S),b({type:"success",title:"Topic Created",message:"Topic created successfully",duration:3e3})}catch{b({type:"error",title:"Creation Failed",message:"Failed to create topic",duration:5e3})}},updateTopic:async(S,C)=>{try{await n(S,C),b({type:"success",title:"Topic Updated",message:"Topic updated successfully",duration:3e3})}catch{b({type:"error",title:"Update Failed",message:"Failed to update topic",duration:5e3})}},deleteTopic:async S=>{try{await a(S),b({type:"success",title:"Topic Deleted",message:"Topic deleted successfully",duration:3e3})}catch{b({type:"error",title:"Deletion Failed",message:"Failed to delete topic",duration:5e3})}},topics:i,selectedTopic:s,isLoading:o,isCreating:l,isUpdating:c,isDeleting:u,error:f,setSelectedTopic:p,clearError:m}},OGe=()=>{const{fetchDocuments:e,fetchDocument:t,uploadDocument:r,updateDocument:n,deleteDocument:a,downloadDocument:i,documents:s,selectedDocument:o,isLoading:l,isUploading:c,isUpdating:u,isDeleting:f,isDownloading:p,error:m,uploadProgress:b,setSelectedDocument:v,setUploadProgress:y,clearError:_}=NI(),{addNotification:S}=ud();return{fetchDocuments:e,fetchDocument:t,uploadDocument:async N=>{try{await r(N),S({type:"success",title:"Document Uploaded",message:"Document uploaded successfully",duration:3e3})}catch{S({type:"error",title:"Upload Failed",message:"Failed to upload document",duration:5e3})}},updateDocument:async(N,L)=>{try{await n(N,L),S({type:"success",title:"Document Updated",message:"Document updated successfully",duration:3e3})}catch{S({type:"error",title:"Update Failed",message:"Failed to update document",duration:5e3})}},deleteDocument:async N=>{try{await a(N),S({type:"success",title:"Document Deleted",message:"Document deleted successfully",duration:3e3})}catch{S({type:"error",title:"Deletion Failed",message:"Failed to delete document",duration:5e3})}},downloadDocument:async N=>{try{await i(N),S({type:"success",title:"Document Downloaded",message:"Document downloaded successfully",duration:2e3})}catch{S({type:"error",title:"Download Failed",message:"Failed to download document",duration:5e3})}},documents:s,selectedDocument:o,isLoading:l,isUploading:c,isUpdating:u,isDeleting:f,isDownloading:p,error:m,uploadProgress:b,setSelectedDocument:v,setUploadProgress:y,clearError:_}};function IGe(){const[e,t]=E.useState("/"),[r,n]=E.useState(),a=E.useMemo(()=>{if(e==="/")return[{id:"root",name:"Library",path:"/",type:"root"}];const u=e.split("/").filter(Boolean),f=[{id:"root",name:"Library",path:"/",type:"root"}];let p="";return u.forEach((m,b)=>{p+=`/${m}`,f.push({id:`folder-${b}`,name:m,path:p,type:"folder"})}),f},[e]),i=E.useMemo(()=>({currentPath:e,breadcrumbs:a,currentFolderId:r,isInFolder:e!=="/"}),[e,a,r]),s=E.useCallback(u=>{console.log("🚀 Navigating to folder:",u),t(u.path),n(u.id)},[]),o=E.useCallback(u=>{if(t(u),u==="/")n(void 0);else{const f=u.split("/").filter(Boolean);f.length>0&&n(`topic-${f[f.length-1]}`)}},[]),l=E.useCallback(()=>{t("/"),n(void 0)},[]),c=E.useCallback(u=>{if(console.log("🔍 getItemsInCurrentFolder called:",{currentPath:e,currentFolderId:r,allItemsCount:u.length}),e==="/"){const f=u.filter(p=>p.type==="folder"?!0:!p.topicId);return console.log("📁 Root level items:",f.length),f}if(r){const f=r.replace("topic-",""),p=u.filter(m=>m.type==="folder"?!1:m.topicId===parseInt(f));return console.log("📂 Folder items for topic",f,":",p.length),p}return console.log("❌ No folder ID found, returning empty array"),[]},[e,r]);return{folderState:i,navigateToFolder:s,navigateToPath:o,navigateToRoot:l,getItemsInCurrentFolder:c}}function Qle({isOpen:e,onClose:t,onConfirm:r,title:n,description:a,confirmText:i="Confirm",cancelText:s="Cancel",variant:o="default"}){const l=()=>{r(),t()};return g.jsx(si,{open:e,onOpenChange:t,children:g.jsxs(oi,{children:[g.jsxs(Pi,{children:[g.jsx(ds,{children:n}),g.jsx(e0,{children:a})]}),g.jsxs(C0,{children:[g.jsx(mt,{variant:"outline",onClick:t,children:s}),g.jsx(mt,{onClick:l,variant:o==="destructive"?"destructive":"default",children:i})]})]})})}const Ra=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),F6=[.001,0,0,.001,0,0],RM=1.35,wi={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},_o={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Jle="pdfjs_internal_editor_",Gt={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,SIGNATURE:101},mr={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35,DRAW_STEP:41},ece={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},ma={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},Rp={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},_n={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},Sf={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},rg={ERRORS:0,WARNINGS:1,INFOS:5},lm={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},g1={moveTo:0,lineTo:1,curveTo:2,closePath:3},tce={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let dy=rg.WARNINGS;function LGe(e){Number.isInteger(e)&&(dy=e)}function PGe(){return dy}function fy(e){dy>=rg.INFOS&&console.log(`Info: ${e}`)}function Kt(e){dy>=rg.WARNINGS&&console.log(`Warning: ${e}`)}function Br(e){throw new Error(e)}function Ln(e,t){e||Br(t)}function FGe(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function PI(e,t=null,r=null){if(!e)return null;if(r&&typeof e=="string"&&(r.addDefaultProtocol&&e.startsWith("www.")&&e.match(/\./g)?.length>=2&&(e=`http://${e}`),r.tryConvertEncoding))try{e=UGe(e)}catch{}const n=t?URL.parse(e,t):URL.parse(e);return FGe(n)?n:null}function FI(e,t,r=!1){const n=URL.parse(e);return n?(n.hash=t,n.href):r&&PI(e,"http://example.com")?e.split("#",1)[0]+`${t?`#${t}`:""}`:""}function dr(e,t,r,n=!1){return Object.defineProperty(e,t,{value:r,enumerable:!n,configurable:!0,writable:!1}),r}const bd=(function(){function t(r,n){this.message=r,this.name=n}return t.prototype=new Error,t.constructor=t,t})();class $Z extends bd{constructor(t,r){super(t,"PasswordException"),this.code=r}}class MM extends bd{constructor(t,r){super(t,"UnknownErrorException"),this.details=r}}class Lb extends bd{constructor(t){super(t,"InvalidPDFException")}}class cm extends bd{constructor(t,r,n){super(t,"ResponseException"),this.status=r,this.missing=n}}class BGe extends bd{constructor(t){super(t,"FormatError")}}class Il extends bd{constructor(t){super(t,"AbortException")}}function rce(e){(typeof e!="object"||e?.length===void 0)&&Br("Invalid argument for bytesToString");const t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);const n=[];for(let a=0;a<t;a+=r){const i=Math.min(a+r,t),s=e.subarray(a,i);n.push(String.fromCharCode.apply(null,s))}return n.join("")}function ng(e){typeof e!="string"&&Br("Invalid argument for stringToBytes");const t=e.length,r=new Uint8Array(t);for(let n=0;n<t;++n)r[n]=e.charCodeAt(n)&255;return r}function zGe(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function jGe(){const e=new Uint8Array(4);return e[0]=1,new Uint32Array(e.buffer,0,1)[0]===1}function qGe(){try{return new Function(""),!0}catch{return!1}}class ea{static get isLittleEndian(){return dr(this,"isLittleEndian",jGe())}static get isEvalSupported(){return dr(this,"isEvalSupported",qGe())}static get isOffscreenCanvasSupported(){return dr(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return dr(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){const{platform:t,userAgent:r}=navigator;return dr(this,"platform",{isAndroid:r.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:r.includes("Firefox")})}static get isCSSRoundSupported(){return dr(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const DM=Array.from(Array(256).keys(),e=>e.toString(16).padStart(2,"0"));class kt{static makeHexColor(t,r,n){return`#${DM[t]}${DM[r]}${DM[n]}`}static scaleMinMax(t,r){let n;t[0]?(t[0]<0&&(n=r[0],r[0]=r[2],r[2]=n),r[0]*=t[0],r[2]*=t[0],t[3]<0&&(n=r[1],r[1]=r[3],r[3]=n),r[1]*=t[3],r[3]*=t[3]):(n=r[0],r[0]=r[1],r[1]=n,n=r[2],r[2]=r[3],r[3]=n,t[1]<0&&(n=r[1],r[1]=r[3],r[3]=n),r[1]*=t[1],r[3]*=t[1],t[2]<0&&(n=r[0],r[0]=r[2],r[2]=n),r[0]*=t[2],r[2]*=t[2]),r[0]+=t[4],r[1]+=t[5],r[2]+=t[4],r[3]+=t[5]}static transform(t,r){return[t[0]*r[0]+t[2]*r[1],t[1]*r[0]+t[3]*r[1],t[0]*r[2]+t[2]*r[3],t[1]*r[2]+t[3]*r[3],t[0]*r[4]+t[2]*r[5]+t[4],t[1]*r[4]+t[3]*r[5]+t[5]]}static applyTransform(t,r,n=0){const a=t[n],i=t[n+1];t[n]=a*r[0]+i*r[2]+r[4],t[n+1]=a*r[1]+i*r[3]+r[5]}static applyTransformToBezier(t,r,n=0){const a=r[0],i=r[1],s=r[2],o=r[3],l=r[4],c=r[5];for(let u=0;u<6;u+=2){const f=t[n+u],p=t[n+u+1];t[n+u]=f*a+p*s+l,t[n+u+1]=f*i+p*o+c}}static applyInverseTransform(t,r){const n=t[0],a=t[1],i=r[0]*r[3]-r[1]*r[2];t[0]=(n*r[3]-a*r[2]+r[2]*r[5]-r[4]*r[3])/i,t[1]=(-n*r[1]+a*r[0]+r[4]*r[1]-r[5]*r[0])/i}static axialAlignedBoundingBox(t,r,n){const a=r[0],i=r[1],s=r[2],o=r[3],l=r[4],c=r[5],u=t[0],f=t[1],p=t[2],m=t[3];let b=a*u+l,v=b,y=a*p+l,_=y,S=o*f+c,C=S,T=o*m+c,A=T;if(i!==0||s!==0){const k=i*u,N=i*p,L=s*f,I=s*m;b+=L,_+=L,y+=I,v+=I,S+=k,A+=k,T+=N,C+=N}n[0]=Math.min(n[0],b,y,v,_),n[1]=Math.min(n[1],S,T,C,A),n[2]=Math.max(n[2],b,y,v,_),n[3]=Math.max(n[3],S,T,C,A)}static inverseTransform(t){const r=t[0]*t[3]-t[1]*t[2];return[t[3]/r,-t[1]/r,-t[2]/r,t[0]/r,(t[2]*t[5]-t[4]*t[3])/r,(t[4]*t[1]-t[5]*t[0])/r]}static singularValueDecompose2dScale(t,r){const n=t[0],a=t[1],i=t[2],s=t[3],o=n**2+a**2,l=n*i+a*s,c=i**2+s**2,u=(o+c)/2,f=Math.sqrt(u**2-(o*c-l**2));r[0]=Math.sqrt(u+f||1),r[1]=Math.sqrt(u-f||1)}static normalizeRect(t){const r=t.slice(0);return t[0]>t[2]&&(r[0]=t[2],r[2]=t[0]),t[1]>t[3]&&(r[1]=t[3],r[3]=t[1]),r}static intersect(t,r){const n=Math.max(Math.min(t[0],t[2]),Math.min(r[0],r[2])),a=Math.min(Math.max(t[0],t[2]),Math.max(r[0],r[2]));if(n>a)return null;const i=Math.max(Math.min(t[1],t[3]),Math.min(r[1],r[3])),s=Math.min(Math.max(t[1],t[3]),Math.max(r[1],r[3]));return i>s?null:[n,i,a,s]}static pointBoundingBox(t,r,n){n[0]=Math.min(n[0],t),n[1]=Math.min(n[1],r),n[2]=Math.max(n[2],t),n[3]=Math.max(n[3],r)}static rectBoundingBox(t,r,n,a,i){i[0]=Math.min(i[0],t,n),i[1]=Math.min(i[1],r,a),i[2]=Math.max(i[2],t,n),i[3]=Math.max(i[3],r,a)}static#e(t,r,n,a,i,s,o,l,c,u){if(c<=0||c>=1)return;const f=1-c,p=c*c,m=p*c,b=f*(f*(f*t+3*c*r)+3*p*n)+m*a,v=f*(f*(f*i+3*c*s)+3*p*o)+m*l;u[0]=Math.min(u[0],b),u[1]=Math.min(u[1],v),u[2]=Math.max(u[2],b),u[3]=Math.max(u[3],v)}static#t(t,r,n,a,i,s,o,l,c,u,f,p){if(Math.abs(c)<1e-12){Math.abs(u)>=1e-12&&this.#e(t,r,n,a,i,s,o,l,-f/u,p);return}const m=u**2-4*f*c;if(m<0)return;const b=Math.sqrt(m),v=2*c;this.#e(t,r,n,a,i,s,o,l,(-u+b)/v,p),this.#e(t,r,n,a,i,s,o,l,(-u-b)/v,p)}static bezierBoundingBox(t,r,n,a,i,s,o,l,c){c[0]=Math.min(c[0],t,o),c[1]=Math.min(c[1],r,l),c[2]=Math.max(c[2],t,o),c[3]=Math.max(c[3],r,l),this.#t(t,n,i,o,r,a,s,l,3*(-t+3*(n-i)+o),6*(t-2*n+i),3*(n-t),c),this.#t(t,n,i,o,r,a,s,l,3*(-r+3*(a-s)+l),6*(r-2*a+s),3*(a-r),c)}}function UGe(e){return decodeURIComponent(escape(e))}let OM=null,HZ=null;function nce(e){return OM||(OM=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,HZ=new Map([["ﬅ","ſt"]])),e.replaceAll(OM,(t,r,n)=>r?r.normalize("NFKC"):HZ.get(n))}function BI(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=new Uint8Array(32);return crypto.getRandomValues(e),rce(e)}const zI="pdfjs_internal_id_";function $Ge(e,t,r){if(!Array.isArray(r)||r.length<2)return!1;const[n,a,...i]=r;if(!e(n)&&!Number.isInteger(n)||!t(a))return!1;const s=i.length;let o=!0;switch(a.name){case"XYZ":if(s<2||s>3)return!1;break;case"Fit":case"FitB":return s===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(s>1)return!1;break;case"FitR":if(s!==4)return!1;o=!1;break;default:return!1}for(const l of i)if(!(typeof l=="number"||o&&l===null))return!1;return!0}function ga(e,t,r){return Math.min(Math.max(e,t),r)}function ace(e){return Uint8Array.prototype.toBase64?e.toBase64():btoa(rce(e))}function HGe(e){return Uint8Array.fromBase64?Uint8Array.fromBase64(e):ng(atob(e))}typeof Promise.try!="function"&&(Promise.try=function(e,...t){return new Promise(r=>{r(e(...t))})});typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(e){return e.reduce((t,r)=>t+r,0)});const ul="http://www.w3.org/2000/svg";class ed{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}async function L0(e,t="text"){if(fp(e,document.baseURI)){const r=await fetch(e);if(!r.ok)throw new Error(r.statusText);switch(t){case"arraybuffer":return r.arrayBuffer();case"blob":return r.blob();case"json":return r.json()}return r.text()}return new Promise((r,n)=>{const a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType=t,a.onreadystatechange=()=>{if(a.readyState===XMLHttpRequest.DONE){if(a.status===200||a.status===0){switch(t){case"arraybuffer":case"blob":case"json":r(a.response);return}r(a.responseText);return}n(new Error(a.statusText))}},a.send(null)})}class ag{constructor({viewBox:t,userUnit:r,scale:n,rotation:a,offsetX:i=0,offsetY:s=0,dontFlip:o=!1}){this.viewBox=t,this.userUnit=r,this.scale=n,this.rotation=a,this.offsetX=i,this.offsetY=s,n*=r;const l=(t[2]+t[0])/2,c=(t[3]+t[1])/2;let u,f,p,m;switch(a%=360,a<0&&(a+=360),a){case 180:u=-1,f=0,p=0,m=1;break;case 90:u=0,f=1,p=1,m=0;break;case 270:u=0,f=-1,p=-1,m=0;break;case 0:u=1,f=0,p=0,m=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(p=-p,m=-m);let b,v,y,_;u===0?(b=Math.abs(c-t[1])*n+i,v=Math.abs(l-t[0])*n+s,y=(t[3]-t[1])*n,_=(t[2]-t[0])*n):(b=Math.abs(l-t[0])*n+i,v=Math.abs(c-t[1])*n+s,y=(t[2]-t[0])*n,_=(t[3]-t[1])*n),this.transform=[u*n,f*n,p*n,m*n,b-u*n*l-p*n*c,v-f*n*l-m*n*c],this.width=y,this.height=_}get rawDims(){const t=this.viewBox;return dr(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:r=this.rotation,offsetX:n=this.offsetX,offsetY:a=this.offsetY,dontFlip:i=!1}={}){return new ag({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:r,offsetX:n,offsetY:a,dontFlip:i})}convertToViewportPoint(t,r){const n=[t,r];return kt.applyTransform(n,this.transform),n}convertToViewportRectangle(t){const r=[t[0],t[1]];kt.applyTransform(r,this.transform);const n=[t[2],t[3]];return kt.applyTransform(n,this.transform),[r[0],r[1],n[0],n[1]]}convertToPdfPoint(t,r){const n=[t,r];return kt.applyInverseTransform(n,this.transform),n}}class hy extends bd{constructor(t,r=0){super(t,"RenderingCancelledException"),this.extraDelay=r}}function ig(e){const t=e.length;let r=0;for(;r<t&&e[r].trim()==="";)r++;return e.substring(r,r+5).toLowerCase()==="data:"}function py(e){return typeof e=="string"&&/\.pdf$/i.test(e)}function ice(e){return[e]=e.split(/[#?]/,1),e.substring(e.lastIndexOf("/")+1)}function sce(e,t="document.pdf"){if(typeof e!="string")return t;if(ig(e))return Kt('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const n=(o=>{try{return new URL(o)}catch{try{return new URL(decodeURIComponent(o))}catch{try{return new URL(o,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(o),"https://foo.bar")}catch{return null}}}}})(e);if(!n)return t;const a=o=>{try{let l=decodeURIComponent(o);return l.includes("/")?(l=l.split("/").at(-1),l.test(/^\.pdf$/i)?l:o):l}catch{return o}},i=/\.pdf$/i,s=n.pathname.split("/").at(-1);if(i.test(s))return a(s);if(n.searchParams.size>0){const o=Array.from(n.searchParams.values()).reverse();for(const c of o)if(i.test(c))return a(c);const l=Array.from(n.searchParams.keys()).reverse();for(const c of l)if(i.test(c))return a(c)}if(n.hash){const l=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(n.hash);if(l)return a(l[0])}return t}class GZ{started=Object.create(null);times=[];time(t){t in this.started&&Kt(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||Kt(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let r=0;for(const{name:n}of this.times)r=Math.max(n.length,r);for(const{name:n,start:a,end:i}of this.times)t.push(`${n.padEnd(r)} ${i-a}ms
`);return t.join("")}}function fp(e,t){const r=t?URL.parse(e,t):URL.parse(e);return r?.protocol==="http:"||r?.protocol==="https:"}function ps(e){e.preventDefault()}function En(e){e.preventDefault(),e.stopPropagation()}function GGe(e){console.log("Deprecated API usage: "+e)}class jI{static#e;static toDateObject(t){if(!t||typeof t!="string")return null;this.#e||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const r=this.#e.exec(t);if(!r)return null;const n=parseInt(r[1],10);let a=parseInt(r[2],10);a=a>=1&&a<=12?a-1:0;let i=parseInt(r[3],10);i=i>=1&&i<=31?i:1;let s=parseInt(r[4],10);s=s>=0&&s<=23?s:0;let o=parseInt(r[5],10);o=o>=0&&o<=59?o:0;let l=parseInt(r[6],10);l=l>=0&&l<=59?l:0;const c=r[7]||"Z";let u=parseInt(r[8],10);u=u>=0&&u<=23?u:0;let f=parseInt(r[9],10)||0;return f=f>=0&&f<=59?f:0,c==="-"?(s+=u,o+=f):c==="+"&&(s-=u,o-=f),new Date(Date.UTC(n,a,i,s,o,l))}}function oce(e,{scale:t=1,rotation:r=0}){const{width:n,height:a}=e.attributes.style,i=[0,0,parseInt(n),parseInt(a)];return new ag({viewBox:i,userUnit:1,scale:t,rotation:r})}function qI(e){if(e.startsWith("#")){const t=parseInt(e.slice(1),16);return[(t&16711680)>>16,(t&65280)>>8,t&255]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map(t=>parseInt(t)):e.startsWith("rgba(")?e.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):(Kt(`Not a valid color format: "${e}"`),[0,0,0])}function VGe(e){const t=document.createElement("span");t.style.visibility="hidden",t.style.colorScheme="only light",document.body.append(t);for(const r of e.keys()){t.style.color=r;const n=window.getComputedStyle(t).color;e.set(r,qI(n))}t.remove()}function an(e){const{a:t,b:r,c:n,d:a,e:i,f:s}=e.getTransform();return[t,r,n,a,i,s]}function co(e){const{a:t,b:r,c:n,d:a,e:i,f:s}=e.getTransform().invertSelf();return[t,r,n,a,i,s]}function Wc(e,t,r=!1,n=!0){if(t instanceof ag){const{pageWidth:a,pageHeight:i}=t.rawDims,{style:s}=e,o=ea.isCSSRoundSupported,l=`var(--total-scale-factor) * ${a}px`,c=`var(--total-scale-factor) * ${i}px`,u=o?`round(down, ${l}, var(--scale-round-x))`:`calc(${l})`,f=o?`round(down, ${c}, var(--scale-round-y))`:`calc(${c})`;!r||t.rotation%180===0?(s.width=u,s.height=f):(s.width=f,s.height=u)}n&&e.setAttribute("data-main-rotation",t.rotation)}class Gs{constructor(){const{pixelRatio:t}=Gs;this.sx=t,this.sy=t}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(t,r,n,a,i=-1){let s=1/0,o=1/0,l=1/0;n=Gs.capPixels(n,i),n>0&&(s=Math.sqrt(n/(t*r))),a!==-1&&(o=a/t,l=a/r);const c=Math.min(s,o,l);return this.sx>c||this.sy>c?(this.sx=c,this.sy=c,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(t,r){if(r>=0){const n=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+r/100));return t>0?Math.min(t,n):n}return t}}const Pb=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class Mp{#e=null;#t=null;#r;#n=null;#i=null;#a=null;static#o=null;constructor(t){this.#r=t,Mp.#o||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"})}render(){const t=this.#e=document.createElement("div");t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const r=this.#r._uiManager._signal;t.addEventListener("contextmenu",ps,{signal:r}),t.addEventListener("pointerdown",Mp.#s,{signal:r});const n=this.#n=document.createElement("div");n.className="buttons",t.append(n);const a=this.#r.toolbarPosition;if(a){const{style:i}=t,s=this.#r._uiManager.direction==="ltr"?1-a[0]:a[0];i.insetInlineEnd=`${100*s}%`,i.top=`calc(${100*a[1]}% + var(--editor-toolbar-vert-offset))`}return t}get div(){return this.#e}static#s(t){t.stopPropagation()}#d(t){this.#r._focusEventsAllowed=!1,En(t)}#l(t){this.#r._focusEventsAllowed=!0,En(t)}#f(t){const r=this.#r._uiManager._signal;t.addEventListener("focusin",this.#d.bind(this),{capture:!0,signal:r}),t.addEventListener("focusout",this.#l.bind(this),{capture:!0,signal:r}),t.addEventListener("contextmenu",ps,{signal:r})}hide(){this.#e.classList.add("hidden"),this.#t?.hideDropdown()}show(){this.#e.classList.remove("hidden"),this.#i?.shown()}addDeleteButton(){const{editorType:t,_uiManager:r}=this.#r,n=document.createElement("button");n.className="delete",n.tabIndex=0,n.setAttribute("data-l10n-id",Mp.#o[t]),this.#f(n),n.addEventListener("click",a=>{r.delete()},{signal:r._signal}),this.#n.append(n)}get#u(){const t=document.createElement("div");return t.className="divider",t}async addAltText(t){const r=await t.render();this.#f(r),this.#n.append(r,this.#u),this.#i=t}addColorPicker(t){this.#t=t;const r=t.renderButton();this.#f(r),this.#n.append(r,this.#u)}async addEditSignatureButton(t){const r=this.#a=await t.renderEditButton(this.#r);this.#f(r),this.#n.append(r,this.#u)}async addButton(t,r){switch(t){case"colorPicker":this.addColorPicker(r);break;case"altText":await this.addAltText(r);break;case"editSignature":await this.addEditSignatureButton(r);break;case"delete":this.addDeleteButton();break}}updateEditSignatureButton(t){this.#a&&(this.#a.title=t)}remove(){this.#e.remove(),this.#t?.destroy(),this.#t=null}}class WGe{#e=null;#t=null;#r;constructor(t){this.#r=t}#n(){const t=this.#t=document.createElement("div");t.className="editToolbar",t.setAttribute("role","toolbar"),t.addEventListener("contextmenu",ps,{signal:this.#r._signal});const r=this.#e=document.createElement("div");return r.className="buttons",t.append(r),this.#a(),t}#i(t,r){let n=0,a=0;for(const i of t){const s=i.y+i.height;if(s<n)continue;const o=i.x+(r?i.width:0);if(s>n){a=o,n=s;continue}r?o>a&&(a=o):o<a&&(a=o)}return[r?1-a:a,n]}show(t,r,n){const[a,i]=this.#i(r,n),{style:s}=this.#t||=this.#n();t.append(this.#t),s.insetInlineEnd=`${100*a}%`,s.top=`calc(${100*i}% + var(--editor-toolbar-vert-offset))`}hide(){this.#t.remove()}#a(){const t=document.createElement("button");t.className="highlightButton",t.tabIndex=0,t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const r=document.createElement("span");t.append(r),r.className="visuallyHidden",r.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const n=this.#r._signal;t.addEventListener("contextmenu",ps,{signal:n}),t.addEventListener("click",()=>{this.#r.highlightSelection("floating_button")},{signal:n}),this.#e.append(t)}}function lce(e,t,r){for(const n of r)t.addEventListener(n,e[n].bind(e))}class KGe{#e=0;get id(){return`${Jle}${this.#e++}`}}class UI{#e=BI();#t=0;#r=null;static get _isSVGFittingCanvas(){const t='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',n=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),a=new Image;a.src=t;const i=a.decode().then(()=>(n.drawImage(a,0,0,1,1,0,0,1,3),new Uint32Array(n.getImageData(0,0,1,1).data.buffer)[0]===0));return dr(this,"_isSVGFittingCanvas",i)}async#n(t,r){this.#r||=new Map;let n=this.#r.get(t);if(n===null)return null;if(n?.bitmap)return n.refCounter+=1,n;try{n||={bitmap:null,id:`image_${this.#e}_${this.#t++}`,refCounter:0,isSvg:!1};let a;if(typeof r=="string"?(n.url=r,a=await L0(r,"blob")):r instanceof File?a=n.file=r:r instanceof Blob&&(a=r),a.type==="image/svg+xml"){const i=UI._isSVGFittingCanvas,s=new FileReader,o=new Image,l=new Promise((c,u)=>{o.onload=()=>{n.bitmap=o,n.isSvg=!0,c()},s.onload=async()=>{const f=n.svgUrl=s.result;o.src=await i?`${f}#svgView(preserveAspectRatio(none))`:f},o.onerror=s.onerror=u});s.readAsDataURL(a),await l}else n.bitmap=await createImageBitmap(a);n.refCounter=1}catch(a){Kt(a),n=null}return this.#r.set(t,n),n&&this.#r.set(n.id,n),n}async getFromFile(t){const{lastModified:r,name:n,size:a,type:i}=t;return this.#n(`${r}_${n}_${a}_${i}`,t)}async getFromUrl(t){return this.#n(t,t)}async getFromBlob(t,r){const n=await r;return this.#n(t,n)}async getFromId(t){this.#r||=new Map;const r=this.#r.get(t);if(!r)return null;if(r.bitmap)return r.refCounter+=1,r;if(r.file)return this.getFromFile(r.file);if(r.blobPromise){const{blobPromise:n}=r;return delete r.blobPromise,this.getFromBlob(r.id,n)}return this.getFromUrl(r.url)}getFromCanvas(t,r){this.#r||=new Map;let n=this.#r.get(t);if(n?.bitmap)return n.refCounter+=1,n;const a=new OffscreenCanvas(r.width,r.height);return a.getContext("2d").drawImage(r,0,0),n={bitmap:a.transferToImageBitmap(),id:`image_${this.#e}_${this.#t++}`,refCounter:1,isSvg:!1},this.#r.set(t,n),this.#r.set(n.id,n),n}getSvgUrl(t){const r=this.#r.get(t);return r?.isSvg?r.svgUrl:null}deleteId(t){this.#r||=new Map;const r=this.#r.get(t);if(!r||(r.refCounter-=1,r.refCounter!==0))return;const{bitmap:n}=r;if(!r.url&&!r.file){const a=new OffscreenCanvas(n.width,n.height);a.getContext("bitmaprenderer").transferFromImageBitmap(n),r.blobPromise=a.convertToBlob()}n.close?.(),r.bitmap=null}isValidId(t){return t.startsWith(`image_${this.#e}_`)}}class XGe{#e=[];#t=!1;#r;#n=-1;constructor(t=128){this.#r=t}add({cmd:t,undo:r,post:n,mustExec:a,type:i=NaN,overwriteIfSameType:s=!1,keepUndo:o=!1}){if(a&&t(),this.#t)return;const l={cmd:t,undo:r,post:n,type:i};if(this.#n===-1){this.#e.length>0&&(this.#e.length=0),this.#n=0,this.#e.push(l);return}if(s&&this.#e[this.#n].type===i){o&&(l.undo=this.#e[this.#n].undo),this.#e[this.#n]=l;return}const c=this.#n+1;c===this.#r?this.#e.splice(0,1):(this.#n=c,c<this.#e.length&&this.#e.splice(c)),this.#e.push(l)}undo(){if(this.#n===-1)return;this.#t=!0;const{undo:t,post:r}=this.#e[this.#n];t(),r?.(),this.#t=!1,this.#n-=1}redo(){if(this.#n<this.#e.length-1){this.#n+=1,this.#t=!0;const{cmd:t,post:r}=this.#e[this.#n];t(),r?.(),this.#t=!1}}hasSomethingToUndo(){return this.#n!==-1}hasSomethingToRedo(){return this.#n<this.#e.length-1}cleanType(t){if(this.#n!==-1){for(let r=this.#n;r>=0;r--)if(this.#e[r].type!==t){this.#e.splice(r+1,this.#n-r),this.#n=r;return}this.#e.length=0,this.#n=-1}}destroy(){this.#e=null}}class sg{constructor(t){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:r}=ea.platform;for(const[n,a,i={}]of t)for(const s of n){const o=s.startsWith("mac+");r&&o?(this.callbacks.set(s.slice(4),{callback:a,options:i}),this.allKeys.add(s.split("+").at(-1))):!r&&!o&&(this.callbacks.set(s,{callback:a,options:i}),this.allKeys.add(s.split("+").at(-1)))}}#e(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const r=this.buffer.join("+");return this.buffer.length=0,r}exec(t,r){if(!this.allKeys.has(r.key))return;const n=this.callbacks.get(this.#e(r));if(!n)return;const{callback:a,options:{bubbles:i=!1,args:s=[],checker:o=null}}=n;o&&!o(t,r)||(a.bind(t,...s,r)(),i||En(r))}}class $I{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return VGe(t),dr(this,"_colors",t)}convert(t){const r=qI(t);if(!window.matchMedia("(forced-colors: active)").matches)return r;for(const[n,a]of this._colors)if(a.every((i,s)=>i===r[s]))return $I._colorsMapping.get(n);return r}getHexCode(t){const r=this._colors.get(t);return r?kt.makeHexColor(...r):t}}class Ll{#e=new AbortController;#t=null;#r=new Map;#n=new Map;#i=null;#a=null;#o=null;#s=new XGe;#d=null;#l=null;#f=0;#u=new Set;#h=null;#p=null;#m=new Set;_editorUndoBar=null;#c=!1;#g=!1;#v=!1;#b=null;#y=null;#_=null;#w=null;#C=!1;#A=null;#N=new KGe;#E=!1;#k=!1;#T=null;#M=null;#D=null;#O=null;#j=null;#S=Gt.NONE;#x=new Set;#F=null;#B=null;#$=null;#H=null;#G={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#q=[0,0];#I=null;#L=null;#U=null;#X=null;#P=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const t=Ll.prototype,r=s=>s.#L.contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&s.hasSomethingToControl(),n=(s,{target:o})=>{if(o instanceof HTMLInputElement){const{type:l}=o;return l!=="text"&&l!=="number"}return!0},a=this.TRANSLATE_SMALL,i=this.TRANSLATE_BIG;return dr(this,"_keyboardManager",new sg([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:n}],[["ctrl+z","mac+meta+z"],t.undo,{checker:n}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:n}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:n}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(s,{target:o})=>!(o instanceof HTMLButtonElement)&&s.#L.contains(o)&&!s.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(s,{target:o})=>!(o instanceof HTMLButtonElement)&&s.#L.contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-a,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[a,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-a],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:r}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,a],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:r}]]))}constructor(t,r,n,a,i,s,o,l,c,u,f,p,m,b,v){const y=this._signal=this.#e.signal;this.#L=t,this.#U=r,this.#X=n,this.#i=a,this.#B=i,this._eventBus=s,s._on("editingaction",this.onEditingAction.bind(this),{signal:y}),s._on("pagechanging",this.onPageChanging.bind(this),{signal:y}),s._on("scalechanging",this.onScaleChanging.bind(this),{signal:y}),s._on("rotationchanging",this.onRotationChanging.bind(this),{signal:y}),s._on("setpreference",this.onSetPreference.bind(this),{signal:y}),s._on("switchannotationeditorparams",_=>this.updateParams(_.type,_.value),{signal:y}),this.#ae(),this.#le(),this.#Z(),this.#a=o.annotationStorage,this.#b=o.filterFactory,this.#$=l,this.#w=c||null,this.#c=u,this.#g=f,this.#v=p,this.#j=m||null,this.viewParameters={realScale:ed.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=b||null,this._supportsPinchToZoom=v!==!1}destroy(){this.#P?.resolve(),this.#P=null,this.#e?.abort(),this.#e=null,this._signal=null;for(const t of this.#n.values())t.destroy();this.#n.clear(),this.#r.clear(),this.#m.clear(),this.#O?.clear(),this.#t=null,this.#x.clear(),this.#s.destroy(),this.#i?.destroy(),this.#B?.destroy(),this.#A?.hide(),this.#A=null,this.#D?.destroy(),this.#D=null,this.#y&&(clearTimeout(this.#y),this.#y=null),this.#I&&(clearTimeout(this.#I),this.#I=null),this._editorUndoBar?.destroy()}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return this.#j}get useNewAltTextFlow(){return this.#g}get useNewAltTextWhenAddingImage(){return this.#v}get hcmFilter(){return dr(this,"hcmFilter",this.#$?this.#b.addHCMFilter(this.#$.foreground,this.#$.background):"none")}get direction(){return dr(this,"direction",getComputedStyle(this.#L).direction)}get highlightColors(){return dr(this,"highlightColors",this.#w?new Map(this.#w.split(",").map(t=>(t=t.split("=").map(r=>r.trim()),t[1]=t[1].toUpperCase(),t))):null)}get highlightColorNames(){return dr(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}setCurrentDrawingSession(t){t?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),this.#l=t}setMainHighlightColorPicker(t){this.#D=t}editAltText(t,r=!1){this.#i?.editAltText(this,t,r)}getSignature(t){this.#B?.getSignature({uiManager:this,editor:t})}get signatureManager(){return this.#B}switchToMode(t,r){this._eventBus.on("annotationeditormodechanged",r,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,r){this._eventBus.dispatch("setpreference",{source:this,name:t,value:r})}onSetPreference({name:t,value:r}){switch(t){case"enableNewAltTextWhenAddingImage":this.#v=r;break}}onPageChanging({pageNumber:t}){this.#f=t-1}focusMainContainer(){this.#L.focus()}findParent(t,r){for(const n of this.#n.values()){const{x:a,y:i,width:s,height:o}=n.div.getBoundingClientRect();if(t>=a&&t<=a+s&&r>=i&&r<=i+o)return n}return null}disableUserSelect(t=!1){this.#U.classList.toggle("noUserSelect",t)}addShouldRescale(t){this.#m.add(t)}removeShouldRescale(t){this.#m.delete(t)}onScaleChanging({scale:t}){this.commitOrRemove(),this.viewParameters.realScale=t*ed.PDF_TO_CSS_UNITS;for(const r of this.#m)r.onScaleChanging();this.#l?.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}#W({anchorNode:t}){return t.nodeType===Node.TEXT_NODE?t.parentElement:t}#Y(t){const{currentLayer:r}=this;if(r.hasTextLayer(t))return r;for(const n of this.#n.values())if(n.hasTextLayer(t))return n;return null}highlightSelection(t=""){const r=document.getSelection();if(!r||r.isCollapsed)return;const{anchorNode:n,anchorOffset:a,focusNode:i,focusOffset:s}=r,o=r.toString(),c=this.#W(r).closest(".textLayer"),u=this.getSelectionBoxes(c);if(!u)return;r.empty();const f=this.#Y(c),p=this.#S===Gt.NONE,m=()=>{f?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:u,anchorNode:n,anchorOffset:a,focusNode:i,focusOffset:s,text:o}),p&&this.showAllEditors("highlight",!0,!0)};if(p){this.switchToMode(Gt.HIGHLIGHT,m);return}m()}#re(){const t=document.getSelection();if(!t||t.isCollapsed)return;const n=this.#W(t).closest(".textLayer"),a=this.getSelectionBoxes(n);a&&(this.#A||=new WGe(this),this.#A.show(n,a,this.direction==="ltr"))}addToAnnotationStorage(t){!t.isEmpty()&&this.#a&&!this.#a.has(t.id)&&this.#a.setValue(t.id,t)}a11yAlert(t,r=null){const n=this.#X;n&&(n.setAttribute("data-l10n-id",t),r?n.setAttribute("data-l10n-args",JSON.stringify(r)):n.removeAttribute("data-l10n-args"))}#ne(){const t=document.getSelection();if(!t||t.isCollapsed){this.#F&&(this.#A?.hide(),this.#F=null,this.#R({hasSelectedText:!1}));return}const{anchorNode:r}=t;if(r===this.#F)return;const a=this.#W(t).closest(".textLayer");if(!a){this.#F&&(this.#A?.hide(),this.#F=null,this.#R({hasSelectedText:!1}));return}if(this.#A?.hide(),this.#F=r,this.#R({hasSelectedText:!0}),!(this.#S!==Gt.HIGHLIGHT&&this.#S!==Gt.NONE)&&(this.#S===Gt.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#C=this.isShiftKeyDown,!this.isShiftKeyDown)){const i=this.#S===Gt.HIGHLIGHT?this.#Y(a):null;i?.toggleDrawing();const s=new AbortController,o=this.combinedSignal(s),l=c=>{c.type==="pointerup"&&c.button!==0||(s.abort(),i?.toggleDrawing(!0),c.type==="pointerup"&&this.#K("main_toolbar"))};window.addEventListener("pointerup",l,{signal:o}),window.addEventListener("blur",l,{signal:o})}}#K(t=""){this.#S===Gt.HIGHLIGHT?this.highlightSelection(t):this.#c&&this.#re()}#ae(){document.addEventListener("selectionchange",this.#ne.bind(this),{signal:this._signal})}#ie(){if(this.#_)return;this.#_=new AbortController;const t=this.combinedSignal(this.#_);window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})}#se(){this.#_?.abort(),this.#_=null}blur(){if(this.isShiftKeyDown=!1,this.#C&&(this.#C=!1,this.#K("main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const r of this.#x)if(r.div.contains(t)){this.#M=[r,t],r._focusEventsAllowed=!1;break}}focus(){if(!this.#M)return;const[t,r]=this.#M;this.#M=null,r.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),r.focus()}#Z(){if(this.#T)return;this.#T=new AbortController;const t=this.combinedSignal(this.#T);window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})}#oe(){this.#T?.abort(),this.#T=null}#Q(){if(this.#d)return;this.#d=new AbortController;const t=this.combinedSignal(this.#d);document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})}#J(){this.#d?.abort(),this.#d=null}#le(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})}addEditListeners(){this.#Z(),this.#Q()}removeEditListeners(){this.#oe(),this.#J()}dragOver(t){for(const{type:r}of t.dataTransfer.items)for(const n of this.#p)if(n.isHandlingMimeForPasting(r)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const r of t.dataTransfer.items)for(const n of this.#p)if(n.isHandlingMimeForPasting(r.type)){n.paste(r,this.currentLayer),t.preventDefault();return}}copy(t){if(t.preventDefault(),this.#t?.commitOrRemove(),!this.hasSelection)return;const r=[];for(const n of this.#x){const a=n.serialize(!0);a&&r.push(a)}r.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(r))}cut(t){this.copy(t),this.delete()}async paste(t){t.preventDefault();const{clipboardData:r}=t;for(const i of r.items)for(const s of this.#p)if(s.isHandlingMimeForPasting(i.type)){s.paste(i,this.currentLayer);return}let n=r.getData("application/pdfjs");if(!n)return;try{n=JSON.parse(n)}catch(i){Kt(`paste: "${i.message}".`);return}if(!Array.isArray(n))return;this.unselectAll();const a=this.currentLayer;try{const i=[];for(const l of n){const c=await a.deserialize(l);if(!c)return;i.push(c)}const s=()=>{for(const l of i)this.#ee(l);this.#te(i)},o=()=>{for(const l of i)l.remove()};this.addCommands({cmd:s,undo:o,mustExec:!0})}catch(i){Kt(`paste: "${i.message}".`)}}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),this.#S!==Gt.NONE&&!this.isEditorHandlingKeyboard&&Ll._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,this.#C&&(this.#C=!1,this.#K("main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}#R(t){Object.entries(t).some(([n,a])=>this.#G[n]!==a)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#G,t)}),this.#S===Gt.HIGHLIGHT&&t.hasSelectedEditor===!1&&this.#z([[mr.HIGHLIGHT_FREE,!0]]))}#z(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}setEditingState(t){t?(this.#ie(),this.#Q(),this.#R({isEditing:this.#S!==Gt.NONE,isEmpty:this.#V(),hasSomethingToUndo:this.#s.hasSomethingToUndo(),hasSomethingToRedo:this.#s.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#se(),this.#J(),this.#R({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!this.#p){this.#p=t;for(const r of this.#p)this.#z(r.defaultPropertiesToUpdate)}}getId(){return this.#N.id}get currentLayer(){return this.#n.get(this.#f)}getLayer(t){return this.#n.get(t)}get currentPageIndex(){return this.#f}addLayer(t){this.#n.set(t.pageIndex,t),this.#E?t.enable():t.disable()}removeLayer(t){this.#n.delete(t.pageIndex)}async updateMode(t,r=null,n=!1,a=!1){if(this.#S!==t&&!(this.#P&&(await this.#P.promise,!this.#P))){if(this.#P=Promise.withResolvers(),this.#l?.commitOrRemove(),this.#S=t,t===Gt.NONE){this.setEditingState(!1),this.#ue(),this._editorUndoBar?.hide(),this.#P.resolve();return}t===Gt.SIGNATURE&&await this.#B?.loadSignatures(),this.setEditingState(!0),await this.#ce(),this.unselectAll();for(const i of this.#n.values())i.updateMode(t);if(!r){n&&this.addNewEditorFromKeyboard(),this.#P.resolve();return}for(const i of this.#r.values())i.annotationElementId===r||i.id===r?(this.setSelected(i),a&&i.enterInEditMode()):i.unselect();this.#P.resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t.mode!==this.#S&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...t})}updateParams(t,r){if(this.#p){switch(t){case mr.CREATE:this.currentLayer.addNewEditor(r);return;case mr.HIGHLIGHT_DEFAULT_COLOR:this.#D?.updateColor(r);break;case mr.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#H||=new Map).set(t,r),this.showAllEditors("highlight",r);break}for(const n of this.#x)n.updateParams(t,r);for(const n of this.#p)n.updateDefaultParams(t,r)}}showAllEditors(t,r,n=!1){for(const i of this.#r.values())i.editorType===t&&i.show(r);(this.#H?.get(mr.HIGHLIGHT_SHOW_ALL)??!0)!==r&&this.#z([[mr.HIGHLIGHT_SHOW_ALL,r]])}enableWaiting(t=!1){if(this.#k!==t){this.#k=t;for(const r of this.#n.values())t?r.disableClick():r.enableClick(),r.div.classList.toggle("waiting",t)}}async#ce(){if(!this.#E){this.#E=!0;const t=[];for(const r of this.#n.values())t.push(r.enable());await Promise.all(t);for(const r of this.#r.values())r.enable()}}#ue(){if(this.unselectAll(),this.#E){this.#E=!1;for(const t of this.#n.values())t.disable();for(const t of this.#r.values())t.disable()}}getEditors(t){const r=[];for(const n of this.#r.values())n.pageIndex===t&&r.push(n);return r}getEditor(t){return this.#r.get(t)}addEditor(t){this.#r.set(t.id,t)}removeEditor(t){t.div.contains(document.activeElement)&&(this.#y&&clearTimeout(this.#y),this.#y=setTimeout(()=>{this.focusMainContainer(),this.#y=null},0)),this.#r.delete(t.id),t.annotationElementId&&this.#O?.delete(t.annotationElementId),this.unselect(t),(!t.annotationElementId||!this.#u.has(t.annotationElementId))&&this.#a?.remove(t.id)}addDeletedAnnotationElement(t){this.#u.add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return this.#u.has(t)}removeDeletedAnnotationElement(t){this.#u.delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}#ee(t){const r=this.#n.get(t.pageIndex);r?r.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))}setActiveEditor(t){this.#t!==t&&(this.#t=t,t&&this.#z(t.propertiesToUpdate))}get#de(){let t=null;for(t of this.#x);return t}updateUI(t){this.#de===t&&this.#z(t.propertiesToUpdate)}updateUIForDefaultProperties(t){this.#z(t.defaultPropertiesToUpdate)}toggleSelected(t){if(this.#x.has(t)){this.#x.delete(t),t.unselect(),this.#R({hasSelectedEditor:this.hasSelection});return}this.#x.add(t),t.select(),this.#z(t.propertiesToUpdate),this.#R({hasSelectedEditor:!0})}setSelected(t){this.updateToolbar({mode:t.mode,editId:t.id}),this.#l?.commitOrRemove();for(const r of this.#x)r!==t&&r.unselect();this.#x.clear(),this.#x.add(t),t.select(),this.#z(t.propertiesToUpdate),this.#R({hasSelectedEditor:!0})}isSelected(t){return this.#x.has(t)}get firstSelectedEditor(){return this.#x.values().next().value}unselect(t){t.unselect(),this.#x.delete(t),this.#R({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#x.size!==0}get isEnterHandled(){return this.#x.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#s.undo(),this.#R({hasSomethingToUndo:this.#s.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#V()}),this._editorUndoBar?.hide()}redo(){this.#s.redo(),this.#R({hasSomethingToUndo:!0,hasSomethingToRedo:this.#s.hasSomethingToRedo(),isEmpty:this.#V()})}addCommands(t){this.#s.add(t),this.#R({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#V()})}cleanUndoStack(t){this.#s.cleanType(t)}#V(){if(this.#r.size===0)return!0;if(this.#r.size===1)for(const t of this.#r.values())return t.isEmpty();return!1}delete(){this.commitOrRemove();const t=this.currentLayer?.endDrawingSession(!0);if(!this.hasSelection&&!t)return;const r=t?[t]:[...this.#x],n=()=>{this._editorUndoBar?.show(a,r.length===1?r[0].editorType:r.length);for(const i of r)i.remove()},a=()=>{for(const i of r)this.#ee(i)};this.addCommands({cmd:n,undo:a,mustExec:!0})}commitOrRemove(){this.#t?.commitOrRemove()}hasSomethingToControl(){return this.#t||this.hasSelection}#te(t){for(const r of this.#x)r.unselect();this.#x.clear();for(const r of t)r.isEmpty()||(this.#x.add(r),r.select());this.#R({hasSelectedEditor:this.hasSelection})}selectAll(){for(const t of this.#x)t.commit();this.#te(this.#r.values())}unselectAll(){if(!(this.#t&&(this.#t.commitOrRemove(),this.#S!==Gt.NONE))&&!this.#l?.commitOrRemove()&&this.hasSelection){for(const t of this.#x)t.unselect();this.#x.clear(),this.#R({hasSelectedEditor:!1})}}translateSelectedEditors(t,r,n=!1){if(n||this.commitOrRemove(),!this.hasSelection)return;this.#q[0]+=t,this.#q[1]+=r;const[a,i]=this.#q,s=[...this.#x],o=1e3;this.#I&&clearTimeout(this.#I),this.#I=setTimeout(()=>{this.#I=null,this.#q[0]=this.#q[1]=0,this.addCommands({cmd:()=>{for(const l of s)this.#r.has(l.id)&&(l.translateInPage(a,i),l.translationDone())},undo:()=>{for(const l of s)this.#r.has(l.id)&&(l.translateInPage(-a,-i),l.translationDone())},mustExec:!1})},o);for(const l of s)l.translateInPage(t,r),l.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#h=new Map;for(const t of this.#x)this.#h.set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#h)return!1;this.disableUserSelect(!1);const t=this.#h;this.#h=null;let r=!1;for(const[{x:a,y:i,pageIndex:s},o]of t)o.newX=a,o.newY=i,o.newPageIndex=s,r||=a!==o.savedX||i!==o.savedY||s!==o.savedPageIndex;if(!r)return!1;const n=(a,i,s,o)=>{if(this.#r.has(a.id)){const l=this.#n.get(o);l?a._setParentAndPosition(l,i,s):(a.pageIndex=o,a.x=i,a.y=s)}};return this.addCommands({cmd:()=>{for(const[a,{newX:i,newY:s,newPageIndex:o}]of t)n(a,i,s,o)},undo:()=>{for(const[a,{savedX:i,savedY:s,savedPageIndex:o}]of t)n(a,i,s,o)},mustExec:!0}),!0}dragSelectedEditors(t,r){if(this.#h)for(const n of this.#h.keys())n.drag(t,r)}rebuild(t){if(t.parent===null){const r=this.getLayer(t.pageIndex);r?(r.changeParent(t),r.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#x.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return this.#t===t}getActive(){return this.#t}getMode(){return this.#S}get imageManager(){return dr(this,"imageManager",new UI)}getSelectionBoxes(t){if(!t)return null;const r=document.getSelection();for(let c=0,u=r.rangeCount;c<u;c++)if(!t.contains(r.getRangeAt(c).commonAncestorContainer))return null;const{x:n,y:a,width:i,height:s}=t.getBoundingClientRect();let o;switch(t.getAttribute("data-main-rotation")){case"90":o=(c,u,f,p)=>({x:(u-a)/s,y:1-(c+f-n)/i,width:p/s,height:f/i});break;case"180":o=(c,u,f,p)=>({x:1-(c+f-n)/i,y:1-(u+p-a)/s,width:f/i,height:p/s});break;case"270":o=(c,u,f,p)=>({x:1-(u+p-a)/s,y:(c-n)/i,width:p/s,height:f/i});break;default:o=(c,u,f,p)=>({x:(c-n)/i,y:(u-a)/s,width:f/i,height:p/s});break}const l=[];for(let c=0,u=r.rangeCount;c<u;c++){const f=r.getRangeAt(c);if(!f.collapsed)for(const{x:p,y:m,width:b,height:v}of f.getClientRects())b===0||v===0||l.push(o(p,m,b,v))}return l.length===0?null:l}addChangedExistingAnnotation({annotationElementId:t,id:r}){(this.#o||=new Map).set(t,r)}removeChangedExistingAnnotation({annotationElementId:t}){this.#o?.delete(t)}renderAnnotationElement(t){const r=this.#o?.get(t.data.id);if(!r)return;const n=this.#a.getRawValue(r);n&&(this.#S===Gt.NONE&&!n.hasBeenModified||n.renderAnnotationElement(t))}setMissingCanvas(t,r,n){const a=this.#O?.get(t);a&&(a.setCanvas(r,n),this.#O.delete(t))}addMissingCanvas(t,r){(this.#O||=new Map).set(t,r)}}class vo{#e=null;#t=!1;#r=null;#n=null;#i=null;#a=null;#o=!1;#s=null;#d=null;#l=null;#f=null;#u=!1;static#h=null;static _l10n=null;constructor(t){this.#d=t,this.#u=t._uiManager.useNewAltTextFlow,vo.#h||=Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"})}static initialize(t){vo._l10n??=t}async render(){const t=this.#r=document.createElement("button");t.className="altText",t.tabIndex="0";const r=this.#n=document.createElement("span");t.append(r),this.#u?(t.classList.add("new"),t.setAttribute("data-l10n-id",vo.#h.missing),r.setAttribute("data-l10n-id",vo.#h["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),r.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const n=this.#d._uiManager._signal;t.addEventListener("contextmenu",ps,{signal:n}),t.addEventListener("pointerdown",i=>i.stopPropagation(),{signal:n});const a=i=>{i.preventDefault(),this.#d._uiManager.editAltText(this.#d),this.#u&&this.#d._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#p}})};return t.addEventListener("click",a,{capture:!0,signal:n}),t.addEventListener("keydown",i=>{i.target===t&&i.key==="Enter"&&(this.#o=!0,a(i))},{signal:n}),await this.#m(),t}get#p(){return this.#e&&"added"||this.#e===null&&this.guessedText&&"review"||"missing"}finish(){this.#r&&(this.#r.focus({focusVisible:this.#o}),this.#o=!1)}isEmpty(){return this.#u?this.#e===null:!this.#e&&!this.#t}hasData(){return this.#u?this.#e!==null||!!this.#l:this.isEmpty()}get guessedText(){return this.#l}async setGuessedText(t){this.#e===null&&(this.#l=t,this.#f=await vo._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t}),this.#m())}toggleAltTextBadge(t=!1){if(!this.#u||this.#e){this.#s?.remove(),this.#s=null;return}if(!this.#s){const r=this.#s=document.createElement("div");r.className="noAltTextBadge",this.#d.div.append(r)}this.#s.classList.toggle("hidden",!t)}serialize(t){let r=this.#e;return!t&&this.#l===r&&(r=this.#f),{altText:r,decorative:this.#t,guessedText:this.#l,textWithDisclaimer:this.#f}}get data(){return{altText:this.#e,decorative:this.#t}}set data({altText:t,decorative:r,guessedText:n,textWithDisclaimer:a,cancel:i=!1}){n&&(this.#l=n,this.#f=a),!(this.#e===t&&this.#t===r)&&(i||(this.#e=t,this.#t=r),this.#m())}toggle(t=!1){this.#r&&(!t&&this.#a&&(clearTimeout(this.#a),this.#a=null),this.#r.disabled=!t)}shown(){this.#d._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#p}})}destroy(){this.#r?.remove(),this.#r=null,this.#n=null,this.#i=null,this.#s?.remove(),this.#s=null}async#m(){const t=this.#r;if(!t)return;if(this.#u){if(t.classList.toggle("done",!!this.#e),t.setAttribute("data-l10n-id",vo.#h[this.#p]),this.#n?.setAttribute("data-l10n-id",vo.#h[`${this.#p}-label`]),!this.#e){this.#i?.remove();return}}else{if(!this.#e&&!this.#t){t.classList.remove("done"),this.#i?.remove();return}t.classList.add("done"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let r=this.#i;if(!r){this.#i=r=document.createElement("span"),r.className="tooltip",r.setAttribute("role","tooltip"),r.id=`alt-text-tooltip-${this.#d.id}`;const a=100,i=this.#d._uiManager._signal;i.addEventListener("abort",()=>{clearTimeout(this.#a),this.#a=null},{once:!0}),t.addEventListener("mouseenter",()=>{this.#a=setTimeout(()=>{this.#a=null,this.#i.classList.add("show"),this.#d._reportTelemetry({action:"alt_text_tooltip"})},a)},{signal:i}),t.addEventListener("mouseleave",()=>{this.#a&&(clearTimeout(this.#a),this.#a=null),this.#i?.classList.remove("show")},{signal:i})}this.#t?r.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(r.removeAttribute("data-l10n-id"),r.textContent=this.#e),r.parentNode||t.append(r),this.#d.getElementForAltText()?.setAttribute("aria-describedby",r.id)}}class og{#e;#t=!1;#r=null;#n;#i;#a;#o;#s=null;#d;#l=null;#f;#u=null;constructor({container:t,isPinchingDisabled:r=null,isPinchingStopped:n=null,onPinchStart:a=null,onPinching:i=null,onPinchEnd:s=null,signal:o}){this.#e=t,this.#r=n,this.#n=r,this.#i=a,this.#a=i,this.#o=s,this.#f=new AbortController,this.#d=AbortSignal.any([o,this.#f.signal]),t.addEventListener("touchstart",this.#h.bind(this),{passive:!1,signal:this.#d})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/Gs.pixelRatio}#h(t){if(this.#n?.())return;if(t.touches.length===1){if(this.#s)return;const a=this.#s=new AbortController,i=AbortSignal.any([this.#d,a.signal]),s=this.#e,o={capture:!0,signal:i,passive:!1},l=c=>{c.pointerType==="touch"&&(this.#s?.abort(),this.#s=null)};s.addEventListener("pointerdown",c=>{c.pointerType==="touch"&&(En(c),l(c))},o),s.addEventListener("pointerup",l,o),s.addEventListener("pointercancel",l,o);return}if(!this.#u){this.#u=new AbortController;const a=AbortSignal.any([this.#d,this.#u.signal]),i=this.#e,s={signal:a,capture:!1,passive:!1};i.addEventListener("touchmove",this.#p.bind(this),s);const o=this.#m.bind(this);i.addEventListener("touchend",o,s),i.addEventListener("touchcancel",o,s),s.capture=!0,i.addEventListener("pointerdown",En,s),i.addEventListener("pointermove",En,s),i.addEventListener("pointercancel",En,s),i.addEventListener("pointerup",En,s),this.#i?.()}if(En(t),t.touches.length!==2||this.#r?.()){this.#l=null;return}let[r,n]=t.touches;r.identifier>n.identifier&&([r,n]=[n,r]),this.#l={touch0X:r.screenX,touch0Y:r.screenY,touch1X:n.screenX,touch1Y:n.screenY}}#p(t){if(!this.#l||t.touches.length!==2)return;En(t);let[r,n]=t.touches;r.identifier>n.identifier&&([r,n]=[n,r]);const{screenX:a,screenY:i}=r,{screenX:s,screenY:o}=n,l=this.#l,{touch0X:c,touch0Y:u,touch1X:f,touch1Y:p}=l,m=f-c,b=p-u,v=s-a,y=o-i,_=Math.hypot(v,y)||1,S=Math.hypot(m,b)||1;if(!this.#t&&Math.abs(S-_)<=og.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(l.touch0X=a,l.touch0Y=i,l.touch1X=s,l.touch1Y=o,!this.#t){this.#t=!0;return}const C=[(a+s)/2,(i+o)/2];this.#a?.(C,S,_)}#m(t){t.touches.length>=2||(this.#u&&(this.#u.abort(),this.#u=null,this.#o?.()),this.#l&&(En(t),this.#l=null,this.#t=!1))}destroy(){this.#f?.abort(),this.#f=null,this.#s?.abort(),this.#s=null}}class Rt{#e=null;#t=null;#r=null;#n=!1;#i=null;#a="";#o=!1;#s=null;#d=null;#l=null;#f=null;#u="";#h=!1;#p=null;#m=!1;#c=!1;#g=!1;#v=null;#b=0;#y=0;#_=null;#w=null;isSelected=!1;_isCopy=!1;_editToolbar=null;_initialOptions=Object.create(null);_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#C=!1;#A=Rt._zIndex++;static _borderLineWidth=-1;static _colorManager=new $I;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const t=Rt.prototype._resizeWithKeyboard,r=Ll.TRANSLATE_SMALL,n=Ll.TRANSLATE_BIG;return dr(this,"_resizerKeyboardManager",new sg([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-r,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-n,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[r,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[n,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-r]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-n]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,r]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,n]}],[["Escape","mac+Escape"],Rt.prototype._stopResizingWithKeyboard]]))}constructor(t){this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null,this.annotationElementId=t.annotationElementId||null;const{rotation:r,rawDims:{pageWidth:n,pageHeight:a,pageX:i,pageY:s}}=this.parent.viewport;this.rotation=r,this.pageRotation=(360+r-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[n,a],this.pageTranslation=[i,s];const[o,l]=this.parentDimensions;this.x=t.x/o,this.y=t.y/l,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return dr(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const r=new YGe({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});r.annotationElementId=t.annotationElementId,r.deleted=!0,r._uiManager.addToAnnotationStorage(r)}static initialize(t,r){if(Rt._l10n??=t,Rt._l10nResizer||=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"}),Rt._borderLineWidth!==-1)return;const n=getComputedStyle(document.documentElement);Rt._borderLineWidth=parseFloat(n.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,r){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,r){Br("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#C}set _isDraggable(t){this.#C=t,this.div?.classList.toggle("draggable",t)}get isEnterHandled(){return!0}center(){const[t,r]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*r/(t*2),this.y+=this.width*t/(r*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*r/(t*2),this.y-=this.width*t/(r*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#A}setParent(t){t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):this.#U(),this.parent=t}focusin(t){this._focusEventsAllowed&&(this.#h?this.#h=!1:this.parent.setSelected(this))}focusout(t){!this._focusEventsAllowed||!this.isAttachedToDOM||t.relatedTarget?.closest(`#${this.id}`)||(t.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,r,n,a){const[i,s]=this.parentDimensions;[n,a]=this.screenToPageTranslation(n,a),this.x=(t+n)/i,this.y=(r+a)/s,this.fixAndSetPosition()}_moveAfterPaste(t,r){const[n,a]=this.parentDimensions;this.setAt(t*n,r*a,this.width*n,this.height*a),this._onTranslated()}#N([t,r],n,a){[n,a]=this.screenToPageTranslation(n,a),this.x+=n/t,this.y+=a/r,this._onTranslating(this.x,this.y),this.fixAndSetPosition()}translate(t,r){this.#N(this.parentDimensions,t,r)}translateInPage(t,r){this.#p||=[this.x,this.y,this.width,this.height],this.#N(this.pageDimensions,t,r),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(t,r){this.#p||=[this.x,this.y,this.width,this.height];const{div:n,parentDimensions:[a,i]}=this;if(this.x+=t/a,this.y+=r/i,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:f,y:p}=this.div.getBoundingClientRect();this.parent.findNewParent(this,f,p)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:s,y:o}=this;const[l,c]=this.getBaseTranslation();s+=l,o+=c;const{style:u}=n;u.left=`${(100*s).toFixed(2)}%`,u.top=`${(100*o).toFixed(2)}%`,this._onTranslating(s,o),n.scrollIntoView({block:"nearest"})}_onTranslating(t,r){}_onTranslated(t,r){}get _hasBeenMoved(){return!!this.#p&&(this.#p[0]!==this.x||this.#p[1]!==this.y)}get _hasBeenResized(){return!!this.#p&&(this.#p[2]!==this.width||this.#p[3]!==this.height)}getBaseTranslation(){const[t,r]=this.parentDimensions,{_borderLineWidth:n}=Rt,a=n/t,i=n/r;switch(this.rotation){case 90:return[-a,i];case 180:return[a,i];case 270:return[a,-i];default:return[-a,-i]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const{div:{style:r},pageDimensions:[n,a]}=this;let{x:i,y:s,width:o,height:l}=this;if(o*=n,l*=a,i*=n,s*=a,this._mustFixPosition)switch(t){case 0:i=ga(i,0,n-o),s=ga(s,0,a-l);break;case 90:i=ga(i,0,n-l),s=ga(s,o,a);break;case 180:i=ga(i,o,n),s=ga(s,l,a);break;case 270:i=ga(i,l,n),s=ga(s,0,a-o);break}this.x=i/=n,this.y=s/=a;const[c,u]=this.getBaseTranslation();i+=c,s+=u,r.left=`${(100*i).toFixed(2)}%`,r.top=`${(100*s).toFixed(2)}%`,this.moveInDOM()}static#E(t,r,n){switch(n){case 90:return[r,-t];case 180:return[-t,-r];case 270:return[-r,t];default:return[t,r]}}screenToPageTranslation(t,r){return Rt.#E(t,r,this.parentRotation)}pageTranslationToScreen(t,r){return Rt.#E(t,r,360-this.parentRotation)}#k(t){switch(t){case 90:{const[r,n]=this.pageDimensions;return[0,-r/n,n/r,0]}case 180:return[-1,0,0,-1];case 270:{const[r,n]=this.pageDimensions;return[0,r/n,-n/r,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[r,n]}=this;return[r*t,n*t]}setDims(t,r){const[n,a]=this.parentDimensions,{style:i}=this.div;i.width=`${(100*t/n).toFixed(2)}%`,this.#o||(i.height=`${(100*r/a).toFixed(2)}%`)}fixDims(){const{style:t}=this.div,{height:r,width:n}=t,a=n.endsWith("%"),i=!this.#o&&r.endsWith("%");if(a&&i)return;const[s,o]=this.parentDimensions;a||(t.width=`${(100*parseFloat(n)/s).toFixed(2)}%`),!this.#o&&!i&&(t.height=`${(100*parseFloat(r)/o).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#T(){if(this.#s)return;this.#s=document.createElement("div"),this.#s.classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],r=this._uiManager._signal;for(const n of t){const a=document.createElement("div");this.#s.append(a),a.classList.add("resizer",n),a.setAttribute("data-resizer-name",n),a.addEventListener("pointerdown",this.#M.bind(this,n),{signal:r}),a.addEventListener("contextmenu",ps,{signal:r}),a.tabIndex=-1}this.div.prepend(this.#s)}#M(t,r){r.preventDefault();const{isMac:n}=ea.platform;if(r.button!==0||r.ctrlKey&&n)return;this.#r?.toggle(!1);const a=this._isDraggable;this._isDraggable=!1,this.#d=[r.screenX,r.screenY];const i=new AbortController,s=this._uiManager.combinedSignal(i);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#j.bind(this,t),{passive:!0,capture:!0,signal:s}),window.addEventListener("touchmove",En,{passive:!1,signal:s}),window.addEventListener("contextmenu",ps,{signal:s}),this.#l={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const o=this.parent.div.style.cursor,l=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(r.target).cursor;const c=()=>{i.abort(),this.parent.togglePointerEvents(!0),this.#r?.toggle(!0),this._isDraggable=a,this.parent.div.style.cursor=o,this.div.style.cursor=l,this.#O()};window.addEventListener("pointerup",c,{signal:s}),window.addEventListener("blur",c,{signal:s})}#D(t,r,n,a){this.width=n,this.height=a,this.x=t,this.y=r;const[i,s]=this.parentDimensions;this.setDims(i*n,s*a),this.fixAndSetPosition(),this._onResized()}_onResized(){}#O(){if(!this.#l)return;const{savedX:t,savedY:r,savedWidth:n,savedHeight:a}=this.#l;this.#l=null;const i=this.x,s=this.y,o=this.width,l=this.height;i===t&&s===r&&o===n&&l===a||this.addCommands({cmd:this.#D.bind(this,i,s,o,l),undo:this.#D.bind(this,t,r,n,a),mustExec:!0})}static _round(t){return Math.round(t*1e4)/1e4}#j(t,r){const[n,a]=this.parentDimensions,i=this.x,s=this.y,o=this.width,l=this.height,c=Rt.MIN_SIZE/n,u=Rt.MIN_SIZE/a,f=this.#k(this.rotation),p=(D,U)=>[f[0]*D+f[2]*U,f[1]*D+f[3]*U],m=this.#k(360-this.rotation),b=(D,U)=>[m[0]*D+m[2]*U,m[1]*D+m[3]*U];let v,y,_=!1,S=!1;switch(t){case"topLeft":_=!0,v=(D,U)=>[0,0],y=(D,U)=>[D,U];break;case"topMiddle":v=(D,U)=>[D/2,0],y=(D,U)=>[D/2,U];break;case"topRight":_=!0,v=(D,U)=>[D,0],y=(D,U)=>[0,U];break;case"middleRight":S=!0,v=(D,U)=>[D,U/2],y=(D,U)=>[0,U/2];break;case"bottomRight":_=!0,v=(D,U)=>[D,U],y=(D,U)=>[0,0];break;case"bottomMiddle":v=(D,U)=>[D/2,U],y=(D,U)=>[D/2,0];break;case"bottomLeft":_=!0,v=(D,U)=>[0,U],y=(D,U)=>[D,0];break;case"middleLeft":S=!0,v=(D,U)=>[0,U/2],y=(D,U)=>[D,U/2];break}const C=v(o,l),T=y(o,l);let A=p(...T);const k=Rt._round(i+A[0]),N=Rt._round(s+A[1]);let L=1,I=1,P,H;if(r.fromKeyboard)({deltaX:P,deltaY:H}=r);else{const{screenX:D,screenY:U}=r,[Y,z]=this.#d;[P,H]=this.screenToPageTranslation(D-Y,U-z),this.#d[0]=D,this.#d[1]=U}if([P,H]=b(P/n,H/a),_){const D=Math.hypot(o,l);L=I=Math.max(Math.min(Math.hypot(T[0]-C[0]-P,T[1]-C[1]-H)/D,1/o,1/l),c/o,u/l)}else S?L=ga(Math.abs(T[0]-C[0]-P),c,1)/o:I=ga(Math.abs(T[1]-C[1]-H),u,1)/l;const B=Rt._round(o*L),K=Rt._round(l*I);A=p(...y(B,K));const j=k-A[0],W=N-A[1];this.#p||=[this.x,this.y,this.width,this.height],this.width=B,this.height=K,this.x=j,this.y=W,this.setDims(n*B,a*K),this.fixAndSetPosition(),this._onResizing()}_onResizing(){}altTextFinish(){this.#r?.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||this.#c)return this._editToolbar;this._editToolbar=new Mp(this),this.div.append(this._editToolbar.render());const{toolbarButtons:t}=this;if(t)for(const[r,n]of t)await this._editToolbar.addButton(r,n);return this._editToolbar.addButton("delete"),this._editToolbar}removeEditToolbar(){this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,this.#r?.destroy())}addContainer(t){const r=this._editToolbar?.div;r?r.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return this.#r||(vo.initialize(Rt._l10n),this.#r=new vo(this),this.#e&&(this.#r.data=this.#e,this.#e=null)),this.#r}get altTextData(){return this.#r?.data}set altTextData(t){this.#r&&(this.#r.data=t)}get guessedAltText(){return this.#r?.guessedText}async setGuessedAltText(t){await this.#r?.setGuessedText(t)}serializeAltText(t){return this.#r?.serialize(t)}hasAltText(){return!!this.#r&&!this.#r.isEmpty()}hasAltTextData(){return this.#r?.hasData()??!1}render(){const t=this.div=document.createElement("div");t.setAttribute("data-editor-rotation",(360-this.rotation)%360),t.className=this.name,t.setAttribute("id",this.id),t.tabIndex=this.#n?-1:0,t.setAttribute("role","application"),this.defaultL10nId&&t.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||t.classList.add("hidden"),this.setInForeground(),this.#H();const[r,n]=this.parentDimensions;this.parentRotation%180!==0&&(t.style.maxWidth=`${(100*n/r).toFixed(2)}%`,t.style.maxHeight=`${(100*r/n).toFixed(2)}%`);const[a,i]=this.getInitialTranslation();return this.translate(a,i),lce(this,t,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(this.#w||=new og({container:t,isPinchingDisabled:()=>!this.isSelected,onPinchStart:this.#S.bind(this),onPinching:this.#x.bind(this),onPinchEnd:this.#F.bind(this),signal:this._uiManager._signal})),this._uiManager._editorUndoBar?.hide(),t}#S(){this.#l={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height},this.#r?.toggle(!1),this.parent.togglePointerEvents(!1)}#x(t,r,n){let i=.7*(n/r)+1-.7;if(i===1)return;const s=this.#k(this.rotation),o=(k,N)=>[s[0]*k+s[2]*N,s[1]*k+s[3]*N],[l,c]=this.parentDimensions,u=this.x,f=this.y,p=this.width,m=this.height,b=Rt.MIN_SIZE/l,v=Rt.MIN_SIZE/c;i=Math.max(Math.min(i,1/p,1/m),b/p,v/m);const y=Rt._round(p*i),_=Rt._round(m*i);if(y===p&&_===m)return;this.#p||=[u,f,p,m];const S=o(p/2,m/2),C=Rt._round(u+S[0]),T=Rt._round(f+S[1]),A=o(y/2,_/2);this.x=C-A[0],this.y=T-A[1],this.width=y,this.height=_,this.setDims(l*y,c*_),this.fixAndSetPosition(),this._onResizing()}#F(){this.#r?.toggle(!0),this.parent.togglePointerEvents(!0),this.#O()}pointerdown(t){const{isMac:r}=ea.platform;if(t.button!==0||t.ctrlKey&&r){t.preventDefault();return}if(this.#h=!0,this._isDraggable){this.#$(t);return}this.#B(t)}#B(t){const{isMac:r}=ea.platform;t.ctrlKey&&!r||t.shiftKey||t.metaKey&&r?this.parent.toggleSelected(this):this.parent.setSelected(this)}#$(t){const{isSelected:r}=this;this._uiManager.setUpDragSession();let n=!1;const a=new AbortController,i=this._uiManager.combinedSignal(a),s={capture:!0,passive:!1,signal:i},o=c=>{a.abort(),this.#i=null,this.#h=!1,this._uiManager.endDragSession()||this.#B(c),n&&this._onStopDragging()};r&&(this.#b=t.clientX,this.#y=t.clientY,this.#i=t.pointerId,this.#a=t.pointerType,window.addEventListener("pointermove",c=>{n||(n=!0,this._onStartDragging());const{clientX:u,clientY:f,pointerId:p}=c;if(p!==this.#i){En(c);return}const[m,b]=this.screenToPageTranslation(u-this.#b,f-this.#y);this.#b=u,this.#y=f,this._uiManager.dragSelectedEditors(m,b)},s),window.addEventListener("touchmove",En,s),window.addEventListener("pointerdown",c=>{c.pointerType===this.#a&&(this.#w||c.isPrimary)&&o(c),En(c)},s));const l=c=>{if(!this.#i||this.#i===c.pointerId){o(c);return}En(c)};window.addEventListener("pointerup",l,{signal:i}),window.addEventListener("blur",l,{signal:i})}_onStartDragging(){}_onStopDragging(){}moveInDOM(){this.#v&&clearTimeout(this.#v),this.#v=setTimeout(()=>{this.#v=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(t,r,n){t.changeParent(this),this.x=r,this.y=n,this.fixAndSetPosition(),this._onTranslated()}getRect(t,r,n=this.rotation){const a=this.parentScale,[i,s]=this.pageDimensions,[o,l]=this.pageTranslation,c=t/a,u=r/a,f=this.x*i,p=this.y*s,m=this.width*i,b=this.height*s;switch(n){case 0:return[f+c+o,s-p-u-b+l,f+c+m+o,s-p-u+l];case 90:return[f+u+o,s-p+c+l,f+u+b+o,s-p+c+m+l];case 180:return[f-c-m+o,s-p+u+l,f-c+o,s-p+u+b+l];case 270:return[f-u-b+o,s-p-c-m+l,f-u+o,s-p-c+l];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,r){const[n,a,i,s]=t,o=i-n,l=s-a;switch(this.rotation){case 0:return[n,r-s,o,l];case 90:return[n,r-a,l,o];case 180:return[i,r-a,o,l];case 270:return[i,r-s,l,o];default:throw new Error("Invalid rotation")}}onceAdded(t){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),this.#c=!0,!0)}disableEditMode(){return this.isInEditMode()?(this.parent.setEditingState(!0),this.#c=!1,!0):!1}isInEditMode(){return this.#c}shouldGetKeyboardEvents(){return this.#g}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:t,left:r,bottom:n,right:a}=this.getClientDimensions(),{innerHeight:i,innerWidth:s}=window;return r<s&&a>0&&t<i&&n>0}#H(){if(this.#f||!this.div)return;this.#f=new AbortController;const t=this._uiManager.combinedSignal(this.#f);this.div.addEventListener("focusin",this.focusin.bind(this),{signal:t}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:t})}rebuild(){this.#H()}rotate(t){}resize(){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(t=!1,r=null){Br("An editor must be serializable")}static async deserialize(t,r,n){const a=new this.prototype.constructor({parent:r,id:r.getNextId(),uiManager:n,annotationElementId:t.annotationElementId});a.rotation=t.rotation,a.#e=t.accessibilityData,a._isCopy=t.isCopy||!1;const[i,s]=a.pageDimensions,[o,l,c,u]=a.getRectInCurrentCoords(t.rect,s);return a.x=o/i,a.y=l/s,a.width=c/i,a.height=u/s,a}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.#f?.abort(),this.#f=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#v&&(clearTimeout(this.#v),this.#v=null),this.#U(),this.removeEditToolbar(),this.#_){for(const t of this.#_.values())clearTimeout(t);this.#_=null}this.parent=null,this.#w?.destroy(),this.#w=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#T(),this.#s.classList.remove("hidden"))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),this.#l={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const r=this.#s.children;if(!this.#t){this.#t=Array.from(r);const s=this.#G.bind(this),o=this.#q.bind(this),l=this._uiManager._signal;for(const c of this.#t){const u=c.getAttribute("data-resizer-name");c.setAttribute("role","spinbutton"),c.addEventListener("keydown",s,{signal:l}),c.addEventListener("blur",o,{signal:l}),c.addEventListener("focus",this.#I.bind(this,u),{signal:l}),c.setAttribute("data-l10n-id",Rt._l10nResizer[u])}}const n=this.#t[0];let a=0;for(const s of r){if(s===n)break;a++}const i=(360-this.rotation+this.parentRotation)%360/90*(this.#t.length/4);if(i!==a){if(i<a)for(let o=0;o<a-i;o++)this.#s.append(this.#s.firstChild);else if(i>a)for(let o=0;o<i-a;o++)this.#s.firstChild.before(this.#s.lastChild);let s=0;for(const o of r){const c=this.#t[s++].getAttribute("data-resizer-name");o.setAttribute("data-l10n-id",Rt._l10nResizer[c])}}this.#L(0),this.#g=!0,this.#s.firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}#G(t){Rt._resizerKeyboardManager.exec(this,t)}#q(t){this.#g&&t.relatedTarget?.parentNode!==this.#s&&this.#U()}#I(t){this.#u=this.#g?t:""}#L(t){if(this.#t)for(const r of this.#t)r.tabIndex=t}_resizeWithKeyboard(t,r){this.#g&&this.#j(this.#u,{deltaX:t,deltaY:r,fromKeyboard:!0})}#U(){this.#g=!1,this.#L(-1),this.#O()}_stopResizingWithKeyboard(){this.#U(),this.div.focus()}select(){if(!(this.isSelected&&this._editToolbar)){if(this.isSelected=!0,this.makeResizable(),this.div?.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()});return}this._editToolbar?.show(),this.#r?.toggleAltTextBadge(!1)}}unselect(){this.isSelected&&(this.isSelected=!1,this.#s?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#r?.toggleAltTextBadge(!0))}updateParams(t,r){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(t){this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.id})}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return this.#m}set isEditing(t){this.#m=t,this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,r){this.#o=!0;const n=t/r,{style:a}=this.div;a.aspectRatio=n,a.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,r=!1){if(r){this.#_||=new Map;const{action:n}=t;let a=this.#_.get(n);a&&clearTimeout(a),a=setTimeout(()=>{this._reportTelemetry(t),this.#_.delete(n),this.#_.size===0&&(this.#_=null)},Rt._telemetryTimeout),this.#_.set(n,a);return}t.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),this.#n=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#n=!0}renderAnnotationElement(t){let r=t.container.querySelector(".annotationContent");if(!r)r=document.createElement("div"),r.classList.add("annotationContent",this.editorType),t.container.prepend(r);else if(r.nodeName==="CANVAS"){const n=r;r=document.createElement("div"),r.classList.add("annotationContent",this.editorType),n.before(r)}return r}resetAnnotationElement(t){const{firstChild:r}=t.container;r?.nodeName==="DIV"&&r.classList.contains("annotationContent")&&r.remove()}}class YGe extends Rt{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const VZ=3285377520,Qi=4294901760,uo=65535;class cce{constructor(t){this.h1=t?t&4294967295:VZ,this.h2=t?t&4294967295:VZ}update(t){let r,n;if(typeof t=="string"){r=new Uint8Array(t.length*2),n=0;for(let v=0,y=t.length;v<y;v++){const _=t.charCodeAt(v);_<=255?r[n++]=_:(r[n++]=_>>>8,r[n++]=_&255)}}else if(ArrayBuffer.isView(t))r=t.slice(),n=r.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const a=n>>2,i=n-a*4,s=new Uint32Array(r.buffer,0,a);let o=0,l=0,c=this.h1,u=this.h2;const f=3432918353,p=461845907,m=f&uo,b=p&uo;for(let v=0;v<a;v++)v&1?(o=s[v],o=o*f&Qi|o*m&uo,o=o<<15|o>>>17,o=o*p&Qi|o*b&uo,c^=o,c=c<<13|c>>>19,c=c*5+3864292196):(l=s[v],l=l*f&Qi|l*m&uo,l=l<<15|l>>>17,l=l*p&Qi|l*b&uo,u^=l,u=u<<13|u>>>19,u=u*5+3864292196);switch(o=0,i){case 3:o^=r[a*4+2]<<16;case 2:o^=r[a*4+1]<<8;case 1:o^=r[a*4],o=o*f&Qi|o*m&uo,o=o<<15|o>>>17,o=o*p&Qi|o*b&uo,a&1?c^=o:u^=o}this.h1=c,this.h2=u}hexdigest(){let t=this.h1,r=this.h2;return t^=r>>>1,t=t*3981806797&Qi|t*36045&uo,r=r*4283543511&Qi|((r<<16|t>>>16)*2950163797&Qi)>>>16,t^=r>>>1,t=t*444984403&Qi|t*60499&uo,r=r*3301882366&Qi|((r<<16|t>>>16)*3120437893&Qi)>>>16,t^=r>>>1,(t>>>0).toString(16).padStart(8,"0")+(r>>>0).toString(16).padStart(8,"0")}}const B6=Object.freeze({map:null,hash:"",transfer:void 0});class HI{#e=!1;#t=null;#r=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,r){const n=this.#r.get(t);return n===void 0?r:Object.assign(r,n)}getRawValue(t){return this.#r.get(t)}remove(t){if(this.#r.delete(t),this.#r.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const r of this.#r.values())if(r instanceof Rt)return;this.onAnnotationEditor(null)}}setValue(t,r){const n=this.#r.get(t);let a=!1;if(n!==void 0)for(const[i,s]of Object.entries(r))n[i]!==s&&(a=!0,n[i]=s);else a=!0,this.#r.set(t,r);a&&this.#n(),r instanceof Rt&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(r.constructor._type)}has(t){return this.#r.has(t)}get size(){return this.#r.size}#n(){this.#e||(this.#e=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#e&&(this.#e=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new uce(this)}get serializable(){if(this.#r.size===0)return B6;const t=new Map,r=new cce,n=[],a=Object.create(null);let i=!1;for(const[s,o]of this.#r){const l=o instanceof Rt?o.serialize(!1,a):o;l&&(t.set(s,l),r.update(`${s}:${JSON.stringify(l)}`),i||=!!l.bitmap)}if(i)for(const s of t.values())s.bitmap&&n.push(s.bitmap);return t.size>0?{map:t,hash:r.hexdigest(),transfer:n}:B6}get editorStats(){let t=null;const r=new Map;for(const n of this.#r.values()){if(!(n instanceof Rt))continue;const a=n.telemetryFinalData;if(!a)continue;const{type:i}=a;r.has(i)||r.set(i,Object.getPrototypeOf(n).constructor),t||=Object.create(null);const s=t[i]||=new Map;for(const[o,l]of Object.entries(a)){if(o==="type")continue;let c=s.get(o);c||(c=new Map,s.set(o,c));const u=c.get(l)??0;c.set(l,u+1)}}for(const[n,a]of r)t[n]=a.computeTelemetryFinalData(t[n]);return t}resetModifiedIds(){this.#t=null}get modifiedIds(){if(this.#t)return this.#t;const t=[];for(const r of this.#r.values())!(r instanceof Rt)||!r.annotationElementId||!r.serialize()||t.push(r.annotationElementId);return this.#t={ids:new Set(t),hash:t.join(",")}}[Symbol.iterator](){return this.#r.entries()}}class uce extends HI{#e;constructor(t){super();const{map:r,hash:n,transfer:a}=t.serializable,i=structuredClone(r,a?{transfer:a}:null);this.#e={map:i,hash:n,transfer:a}}get print(){Br("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#e}get modifiedIds(){return dr(this,"modifiedIds",{ids:new Set,hash:""})}}class ZGe{#e=new Set;constructor({ownerDocument:t=globalThis.document,styleElement:r=null}){this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const r=this.styleElement.sheet;r.insertRule(t,r.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),this.#e.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:t,disableFontFace:r,_inspectFont:n}){if(!(!t||this.#e.has(t.loadedName))){if(Ln(!r,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:a,src:i,style:s}=t,o=new FontFace(a,i,s);this.addNativeFontFace(o);try{await o.load(),this.#e.add(a),n?.(t)}catch{Kt(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(o)}return}Br("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){await this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const n=t.createNativeFontFace();if(n){this.addNativeFontFace(n);try{await n.loaded}catch(a){throw Kt(`Failed to load font '${n.family}': '${a}'.`),t.disableFontFace=!0,a}}return}const r=t.createFontFaceRule();if(r){if(this.insertRule(r),this.isSyncFontLoadingSupported)return;await new Promise(n=>{const a=this._queueLoadingCallback(n);this._prepareFontLoadEvent(t,a)})}}get isFontLoadingAPISupported(){const t=!!this._document?.fonts;return dr(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){return dr(this,"isSyncFontLoadingSupported",Ra||ea.platform.isFirefox)}_queueLoadingCallback(t){function r(){for(Ln(!a.done,"completeRequest() cannot be called twice."),a.done=!0;n.length>0&&n[0].done;){const i=n.shift();setTimeout(i.callback,0)}}const{loadingRequests:n}=this,a={done:!1,complete:r,callback:t};return n.push(a),a}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return dr(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,r){function n(T,A){return T.charCodeAt(A)<<24|T.charCodeAt(A+1)<<16|T.charCodeAt(A+2)<<8|T.charCodeAt(A+3)&255}function a(T,A,k,N){const L=T.substring(0,A),I=T.substring(A+k);return L+N+I}let i,s;const o=this._document.createElement("canvas");o.width=1,o.height=1;const l=o.getContext("2d");let c=0;function u(T,A){if(++c>30){Kt("Load test font never loaded."),A();return}if(l.font="30px "+T,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){A();return}setTimeout(u.bind(null,T,A))}const f=`lt${Date.now()}${this.loadTestFontId++}`;let p=this._loadTestFont;p=a(p,976,f.length,f);const b=16,v=1482184792;let y=n(p,b);for(i=0,s=f.length-3;i<s;i+=4)y=y-v+n(f,i)|0;i<f.length&&(y=y-v+n(f+"XXX",i)|0),p=a(p,b,4,zGe(y));const _=`url(data:font/opentype;base64,${btoa(p)});`,S=`@font-face {font-family:"${f}";src:${_}}`;this.insertRule(S);const C=this._document.createElement("div");C.style.visibility="hidden",C.style.width=C.style.height="10px",C.style.position="absolute",C.style.top=C.style.left="0px";for(const T of[t.loadedName,f]){const A=this._document.createElement("span");A.textContent="Hi",A.style.fontFamily=T,C.append(A)}this._document.body.append(C),u(f,()=>{C.remove(),r.complete()})}}class QGe{constructor(t,r=null){this.compiledGlyphs=Object.create(null);for(const n in t)this[n]=t[n];this._inspectFont=r}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{const r={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(r.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,r)}return this._inspectFont?.(this),t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const t=`url(data:${this.mimetype};base64,${ace(this.data)});`;let r;if(!this.cssFontInfo)r=`@font-face {font-family:"${this.loadedName}";src:${t}}`;else{let n=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(n+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),r=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${n}src:${t}}`}return this._inspectFont?.(this,t),r}getPathGenerator(t,r){if(this.compiledGlyphs[r]!==void 0)return this.compiledGlyphs[r];const n=this.loadedName+"_path_"+r;let a;try{a=t.get(n)}catch(s){Kt(`getPathGenerator - ignoring character: "${s}".`)}const i=new Path2D(a||"");return this.fontExtraProperties||t.delete(n),this.compiledGlyphs[r]=i}}function JGe(e){if(e instanceof URL)return e.href;if(typeof e=="string"){if(Ra)return e;const t=URL.parse(e,window.location);if(t)return t.href}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function eVe(e){if(Ra&&typeof Buffer<"u"&&e instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if(typeof e=="string")return ng(e);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof e=="object"&&!isNaN(e?.length))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function v1(e){if(typeof e!="string")return null;if(e.endsWith("/"))return e;throw new Error(`Invalid factory url: "${e}" must include trailing slash.`)}const z6=e=>typeof e=="object"&&Number.isInteger(e?.num)&&e.num>=0&&Number.isInteger(e?.gen)&&e.gen>=0,tVe=e=>typeof e=="object"&&typeof e?.name=="string",dce=$Ge.bind(null,z6,tVe);class rVe{#e=new Map;#t=Promise.resolve();postMessage(t,r){const n={data:structuredClone(t,r?{transfer:r}:null)};this.#t.then(()=>{for(const[a]of this.#e)a.call(this,n)})}addEventListener(t,r,n=null){let a=null;if(n?.signal instanceof AbortSignal){const{signal:i}=n;if(i.aborted){Kt("LoopbackPort - cannot use an `aborted` signal.");return}const s=()=>this.removeEventListener(t,r);a=()=>i.removeEventListener("abort",s),i.addEventListener("abort",s)}this.#e.set(r,a)}removeEventListener(t,r){this.#e.get(r)?.(),this.#e.delete(r)}terminate(){for(const[,t]of this.#e)t?.();this.#e.clear()}}const b1={DATA:1,ERROR:2},Rn={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function WZ(){}function Za(e){if(e instanceof Il||e instanceof Lb||e instanceof $Z||e instanceof cm||e instanceof MM)return e;switch(e instanceof Error||typeof e=="object"&&e!==null||Br('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new Il(e.message);case"InvalidPDFException":return new Lb(e.message);case"PasswordException":return new $Z(e.message,e.code);case"ResponseException":return new cm(e.message,e.status,e.missing);case"UnknownErrorException":return new MM(e.message,e.details)}return new MM(e.message,e.toString())}class hp{#e=new AbortController;constructor(t,r,n){this.sourceName=t,this.targetName=r,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),n.addEventListener("message",this.#t.bind(this),{signal:this.#e.signal})}#t({data:t}){if(t.targetName!==this.sourceName)return;if(t.stream){this.#n(t);return}if(t.callback){const n=t.callbackId,a=this.callbackCapabilities[n];if(!a)throw new Error(`Cannot resolve callback ${n}`);if(delete this.callbackCapabilities[n],t.callback===b1.DATA)a.resolve(t.data);else if(t.callback===b1.ERROR)a.reject(Za(t.reason));else throw new Error("Unexpected callback case");return}const r=this.actionHandler[t.action];if(!r)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const n=this.sourceName,a=t.sourceName,i=this.comObj;Promise.try(r,t.data).then(function(s){i.postMessage({sourceName:n,targetName:a,callback:b1.DATA,callbackId:t.callbackId,data:s})},function(s){i.postMessage({sourceName:n,targetName:a,callback:b1.ERROR,callbackId:t.callbackId,reason:Za(s)})});return}if(t.streamId){this.#r(t);return}r(t.data)}on(t,r){const n=this.actionHandler;if(n[t])throw new Error(`There is already an actionName called "${t}"`);n[t]=r}send(t,r,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:r},n)}sendWithPromise(t,r,n){const a=this.callbackId++,i=Promise.withResolvers();this.callbackCapabilities[a]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:a,data:r},n)}catch(s){i.reject(s)}return i.promise}sendWithStream(t,r,n,a){const i=this.streamId++,s=this.sourceName,o=this.targetName,l=this.comObj;return new ReadableStream({start:c=>{const u=Promise.withResolvers();return this.streamControllers[i]={controller:c,startCall:u,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:s,targetName:o,action:t,streamId:i,data:r,desiredSize:c.desiredSize},a),u.promise},pull:c=>{const u=Promise.withResolvers();return this.streamControllers[i].pullCall=u,l.postMessage({sourceName:s,targetName:o,stream:Rn.PULL,streamId:i,desiredSize:c.desiredSize}),u.promise},cancel:c=>{Ln(c instanceof Error,"cancel must have a valid reason");const u=Promise.withResolvers();return this.streamControllers[i].cancelCall=u,this.streamControllers[i].isClosed=!0,l.postMessage({sourceName:s,targetName:o,stream:Rn.CANCEL,streamId:i,reason:Za(c)}),u.promise}},n)}#r(t){const r=t.streamId,n=this.sourceName,a=t.sourceName,i=this.comObj,s=this,o=this.actionHandler[t.action],l={enqueue(c,u=1,f){if(this.isCancelled)return;const p=this.desiredSize;this.desiredSize-=u,p>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),i.postMessage({sourceName:n,targetName:a,stream:Rn.ENQUEUE,streamId:r,chunk:c},f)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:a,stream:Rn.CLOSE,streamId:r}),delete s.streamSinks[r])},error(c){Ln(c instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:a,stream:Rn.ERROR,streamId:r,reason:Za(c)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[r]=l,Promise.try(o,t.data,l).then(function(){i.postMessage({sourceName:n,targetName:a,stream:Rn.START_COMPLETE,streamId:r,success:!0})},function(c){i.postMessage({sourceName:n,targetName:a,stream:Rn.START_COMPLETE,streamId:r,reason:Za(c)})})}#n(t){const r=t.streamId,n=this.sourceName,a=t.sourceName,i=this.comObj,s=this.streamControllers[r],o=this.streamSinks[r];switch(t.stream){case Rn.START_COMPLETE:t.success?s.startCall.resolve():s.startCall.reject(Za(t.reason));break;case Rn.PULL_COMPLETE:t.success?s.pullCall.resolve():s.pullCall.reject(Za(t.reason));break;case Rn.PULL:if(!o){i.postMessage({sourceName:n,targetName:a,stream:Rn.PULL_COMPLETE,streamId:r,success:!0});break}o.desiredSize<=0&&t.desiredSize>0&&o.sinkCapability.resolve(),o.desiredSize=t.desiredSize,Promise.try(o.onPull||WZ).then(function(){i.postMessage({sourceName:n,targetName:a,stream:Rn.PULL_COMPLETE,streamId:r,success:!0})},function(c){i.postMessage({sourceName:n,targetName:a,stream:Rn.PULL_COMPLETE,streamId:r,reason:Za(c)})});break;case Rn.ENQUEUE:if(Ln(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(t.chunk);break;case Rn.CLOSE:if(Ln(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),this.#i(s,r);break;case Rn.ERROR:Ln(s,"error should have stream controller"),s.controller.error(Za(t.reason)),this.#i(s,r);break;case Rn.CANCEL_COMPLETE:t.success?s.cancelCall.resolve():s.cancelCall.reject(Za(t.reason)),this.#i(s,r);break;case Rn.CANCEL:if(!o)break;const l=Za(t.reason);Promise.try(o.onCancel||WZ,l).then(function(){i.postMessage({sourceName:n,targetName:a,stream:Rn.CANCEL_COMPLETE,streamId:r,success:!0})},function(c){i.postMessage({sourceName:n,targetName:a,stream:Rn.CANCEL_COMPLETE,streamId:r,reason:Za(c)})}),o.sinkCapability.reject(l),o.isCancelled=!0,delete this.streamSinks[r];break;default:throw new Error("Unexpected stream case")}}async#i(t,r){await Promise.allSettled([t.startCall?.promise,t.pullCall?.promise,t.cancelCall?.promise]),delete this.streamControllers[r]}destroy(){this.#e?.abort(),this.#e=null}}class fce{#e=!1;constructor({enableHWA:t=!1}){this.#e=t}create(t,r){if(t<=0||r<=0)throw new Error("Invalid canvas size");const n=this._createCanvas(t,r);return{canvas:n,context:n.getContext("2d",{willReadFrequently:!this.#e})}}reset(t,r,n){if(!t.canvas)throw new Error("Canvas is not specified");if(r<=0||n<=0)throw new Error("Invalid canvas size");t.canvas.width=r,t.canvas.height=n}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,r){Br("Abstract method `_createCanvas` called.")}}class nVe extends fce{constructor({ownerDocument:t=globalThis.document,enableHWA:r=!1}){super({enableHWA:r}),this._document=t}_createCanvas(t,r){const n=this._document.createElement("canvas");return n.width=t,n.height=r,n}}class hce{constructor({baseUrl:t=null,isCompressed:r=!0}){this.baseUrl=t,this.isCompressed=r}async fetch({name:t}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!t)throw new Error("CMap name must be specified.");const r=this.baseUrl+t+(this.isCompressed?".bcmap":"");return this._fetch(r).then(n=>({cMapData:n,isCompressed:this.isCompressed})).catch(n=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${r}`)})}async _fetch(t){Br("Abstract method `_fetch` called.")}}class KZ extends hce{async _fetch(t){const r=await L0(t,this.isCompressed?"arraybuffer":"text");return r instanceof ArrayBuffer?new Uint8Array(r):ng(r)}}class pce{addFilter(t){return"none"}addHCMFilter(t,r){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,r,n,a,i){return"none"}destroy(t=!1){}}class aVe extends pce{#e;#t;#r;#n;#i;#a;#o=0;constructor({docId:t,ownerDocument:r=globalThis.document}){super(),this.#n=t,this.#i=r}get#s(){return this.#t||=new Map}get#d(){return this.#a||=new Map}get#l(){if(!this.#r){const t=this.#i.createElement("div"),{style:r}=t;r.visibility="hidden",r.contain="strict",r.width=r.height=0,r.position="absolute",r.top=r.left=0,r.zIndex=-1;const n=this.#i.createElementNS(ul,"svg");n.setAttribute("width",0),n.setAttribute("height",0),this.#r=this.#i.createElementNS(ul,"defs"),t.append(n),n.append(this.#r),this.#i.body.append(t)}return this.#r}#f(t){if(t.length===1){const l=t[0],c=new Array(256);for(let f=0;f<256;f++)c[f]=l[f]/255;const u=c.join(",");return[u,u,u]}const[r,n,a]=t,i=new Array(256),s=new Array(256),o=new Array(256);for(let l=0;l<256;l++)i[l]=r[l]/255,s[l]=n[l]/255,o[l]=a[l]/255;return[i.join(","),s.join(","),o.join(",")]}#u(t){if(this.#e===void 0){this.#e="";const r=this.#i.URL;r!==this.#i.baseURI&&(ig(r)?Kt('#createUrl: ignore "data:"-URL for performance reasons.'):this.#e=FI(r,""))}return`url(${this.#e}#${t})`}addFilter(t){if(!t)return"none";let r=this.#s.get(t);if(r)return r;const[n,a,i]=this.#f(t),s=t.length===1?n:`${n}${a}${i}`;if(r=this.#s.get(s),r)return this.#s.set(t,r),r;const o=`g_${this.#n}_transfer_map_${this.#o++}`,l=this.#u(o);this.#s.set(t,l),this.#s.set(s,l);const c=this.#m(o);return this.#g(n,a,i,c),l}addHCMFilter(t,r){const n=`${t}-${r}`,a="base";let i=this.#d.get(a);if(i?.key===n||(i?(i.filter?.remove(),i.key=n,i.url="none",i.filter=null):(i={key:n,url:"none",filter:null},this.#d.set(a,i)),!t||!r))return i.url;const s=this.#b(t);t=kt.makeHexColor(...s);const o=this.#b(r);if(r=kt.makeHexColor(...o),this.#l.style.color="",t==="#000000"&&r==="#ffffff"||t===r)return i.url;const l=new Array(256);for(let m=0;m<=255;m++){const b=m/255;l[m]=b<=.03928?b/12.92:((b+.055)/1.055)**2.4}const c=l.join(","),u=`g_${this.#n}_hcm_filter`,f=i.filter=this.#m(u);this.#g(c,c,c,f),this.#p(f);const p=(m,b)=>{const v=s[m]/255,y=o[m]/255,_=new Array(b+1);for(let S=0;S<=b;S++)_[S]=v+S/b*(y-v);return _.join(",")};return this.#g(p(0,5),p(1,5),p(2,5),f),i.url=this.#u(u),i.url}addAlphaFilter(t){let r=this.#s.get(t);if(r)return r;const[n]=this.#f([t]),a=`alpha_${n}`;if(r=this.#s.get(a),r)return this.#s.set(t,r),r;const i=`g_${this.#n}_alpha_map_${this.#o++}`,s=this.#u(i);this.#s.set(t,s),this.#s.set(a,s);const o=this.#m(i);return this.#v(n,o),s}addLuminosityFilter(t){let r=this.#s.get(t||"luminosity");if(r)return r;let n,a;if(t?([n]=this.#f([t]),a=`luminosity_${n}`):a="luminosity",r=this.#s.get(a),r)return this.#s.set(t,r),r;const i=`g_${this.#n}_luminosity_map_${this.#o++}`,s=this.#u(i);this.#s.set(t,s),this.#s.set(a,s);const o=this.#m(i);return this.#h(o),t&&this.#v(n,o),s}addHighlightHCMFilter(t,r,n,a,i){const s=`${r}-${n}-${a}-${i}`;let o=this.#d.get(t);if(o?.key===s||(o?(o.filter?.remove(),o.key=s,o.url="none",o.filter=null):(o={key:s,url:"none",filter:null},this.#d.set(t,o)),!r||!n))return o.url;const[l,c]=[r,n].map(this.#b.bind(this));let u=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),f=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),[p,m]=[a,i].map(this.#b.bind(this));f<u&&([u,f,p,m]=[f,u,m,p]),this.#l.style.color="";const b=(_,S,C)=>{const T=new Array(256),A=(f-u)/C,k=_/255,N=(S-_)/(255*C);let L=0;for(let I=0;I<=C;I++){const P=Math.round(u+I*A),H=k+I*N;for(let B=L;B<=P;B++)T[B]=H;L=P+1}for(let I=L;I<256;I++)T[I]=T[L-1];return T.join(",")},v=`g_${this.#n}_hcm_${t}_filter`,y=o.filter=this.#m(v);return this.#p(y),this.#g(b(p[0],m[0],5),b(p[1],m[1],5),b(p[2],m[2],5),y),o.url=this.#u(v),o.url}destroy(t=!1){t&&this.#a?.size||(this.#r?.parentNode.parentNode.remove(),this.#r=null,this.#t?.clear(),this.#t=null,this.#a?.clear(),this.#a=null,this.#o=0)}#h(t){const r=this.#i.createElementNS(ul,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),t.append(r)}#p(t){const r=this.#i.createElementNS(ul,"feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(r)}#m(t){const r=this.#i.createElementNS(ul,"filter");return r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("id",t),this.#l.append(r),r}#c(t,r,n){const a=this.#i.createElementNS(ul,r);a.setAttribute("type","discrete"),a.setAttribute("tableValues",n),t.append(a)}#g(t,r,n,a){const i=this.#i.createElementNS(ul,"feComponentTransfer");a.append(i),this.#c(i,"feFuncR",t),this.#c(i,"feFuncG",r),this.#c(i,"feFuncB",n)}#v(t,r){const n=this.#i.createElementNS(ul,"feComponentTransfer");r.append(n),this.#c(n,"feFuncA",t)}#b(t){return this.#l.style.color=t,qI(getComputedStyle(this.#l).getPropertyValue("color"))}}class mce{constructor({baseUrl:t=null}){this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!t)throw new Error("Font filename must be specified.");const r=`${this.baseUrl}${t}`;return this._fetch(r).catch(n=>{throw new Error(`Unable to load font data at: ${r}`)})}async _fetch(t){Br("Abstract method `_fetch` called.")}}class XZ extends mce{async _fetch(t){const r=await L0(t,"arraybuffer");return new Uint8Array(r)}}class gce{constructor({baseUrl:t=null}){this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error("Ensure that the `wasmUrl` API parameter is provided.");if(!t)throw new Error("Wasm filename must be specified.");const r=`${this.baseUrl}${t}`;return this._fetch(r).catch(n=>{throw new Error(`Unable to load wasm data at: ${r}`)})}async _fetch(t){Br("Abstract method `_fetch` called.")}}class YZ extends gce{async _fetch(t){const r=await L0(t,"arraybuffer");return new Uint8Array(r)}}Ra&&Kt("Please use the `legacy` build in Node.js environments.");async function GI(e){const r=await process.getBuiltinModule("fs").promises.readFile(e);return new Uint8Array(r)}class iVe extends pce{}class sVe extends fce{_createCanvas(t,r){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(t,r)}}class oVe extends hce{async _fetch(t){return GI(t)}}class lVe extends mce{async _fetch(t){return GI(t)}}class cVe extends gce{async _fetch(t){return GI(t)}}const oa={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function j6(e,t){if(!t)return;const r=t[2]-t[0],n=t[3]-t[1],a=new Path2D;a.rect(t[0],t[1],r,n),e.clip(a)}class VI{isModifyingCurrentTransform(){return!1}getPattern(){Br("Abstract method `getPattern` called.")}}class uVe extends VI{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let r;this._type==="axial"?r=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(r=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const n of this._colorStops)r.addColorStop(n[0],n[1]);return r}getPattern(t,r,n,a){let i;if(a===oa.STROKE||a===oa.FILL){const s=r.current.getClippedPathBoundingBox(a,an(t))||[0,0,0,0],o=Math.ceil(s[2]-s[0])||1,l=Math.ceil(s[3]-s[1])||1,c=r.cachedCanvases.getCanvas("pattern",o,l),u=c.context;u.clearRect(0,0,u.canvas.width,u.canvas.height),u.beginPath(),u.rect(0,0,u.canvas.width,u.canvas.height),u.translate(-s[0],-s[1]),n=kt.transform(n,[1,0,0,1,s[0],s[1]]),u.transform(...r.baseTransform),this.matrix&&u.transform(...this.matrix),j6(u,this._bbox),u.fillStyle=this._createGradient(u),u.fill(),i=t.createPattern(c.canvas,"no-repeat");const f=new DOMMatrix(n);i.setTransform(f)}else j6(t,this._bbox),i=this._createGradient(t);return i}}function IM(e,t,r,n,a,i,s,o){const l=t.coords,c=t.colors,u=e.data,f=e.width*4;let p;l[r+1]>l[n+1]&&(p=r,r=n,n=p,p=i,i=s,s=p),l[n+1]>l[a+1]&&(p=n,n=a,a=p,p=s,s=o,o=p),l[r+1]>l[n+1]&&(p=r,r=n,n=p,p=i,i=s,s=p);const m=(l[r]+t.offsetX)*t.scaleX,b=(l[r+1]+t.offsetY)*t.scaleY,v=(l[n]+t.offsetX)*t.scaleX,y=(l[n+1]+t.offsetY)*t.scaleY,_=(l[a]+t.offsetX)*t.scaleX,S=(l[a+1]+t.offsetY)*t.scaleY;if(b>=S)return;const C=c[i],T=c[i+1],A=c[i+2],k=c[s],N=c[s+1],L=c[s+2],I=c[o],P=c[o+1],H=c[o+2],B=Math.round(b),K=Math.round(S);let j,W,D,U,Y,z,M,Q;for(let q=B;q<=K;q++){if(q<y){const te=q<b?0:(b-q)/(b-y);j=m-(m-v)*te,W=C-(C-k)*te,D=T-(T-N)*te,U=A-(A-L)*te}else{let te;q>S?te=1:y===S?te=0:te=(y-q)/(y-S),j=v-(v-_)*te,W=k-(k-I)*te,D=N-(N-P)*te,U=L-(L-H)*te}let F;q<b?F=0:q>S?F=1:F=(b-q)/(b-S),Y=m-(m-_)*F,z=C-(C-I)*F,M=T-(T-P)*F,Q=A-(A-H)*F;const V=Math.round(Math.min(j,Y)),Z=Math.round(Math.max(j,Y));let ee=f*q+V*4;for(let te=V;te<=Z;te++)F=(j-te)/(j-Y),F<0?F=0:F>1&&(F=1),u[ee++]=W-(W-z)*F|0,u[ee++]=D-(D-M)*F|0,u[ee++]=U-(U-Q)*F|0,u[ee++]=255}}function dVe(e,t,r){const n=t.coords,a=t.colors;let i,s;switch(t.type){case"lattice":const o=t.verticesPerRow,l=Math.floor(n.length/o)-1,c=o-1;for(i=0;i<l;i++){let u=i*o;for(let f=0;f<c;f++,u++)IM(e,r,n[u],n[u+1],n[u+o],a[u],a[u+1],a[u+o]),IM(e,r,n[u+o+1],n[u+1],n[u+o],a[u+o+1],a[u+1],a[u+o])}break;case"triangles":for(i=0,s=n.length;i<s;i+=3)IM(e,r,n[i],n[i+1],n[i+2],a[i],a[i+1],a[i+2]);break;default:throw new Error("illegal figure")}}class fVe extends VI{constructor(t){super(),this._coords=t[2],this._colors=t[3],this._figures=t[4],this._bounds=t[5],this._bbox=t[6],this._background=t[7],this.matrix=null}_createMeshCanvas(t,r,n){const o=Math.floor(this._bounds[0]),l=Math.floor(this._bounds[1]),c=Math.ceil(this._bounds[2])-o,u=Math.ceil(this._bounds[3])-l,f=Math.min(Math.ceil(Math.abs(c*t[0]*1.1)),3e3),p=Math.min(Math.ceil(Math.abs(u*t[1]*1.1)),3e3),m=c/f,b=u/p,v={coords:this._coords,colors:this._colors,offsetX:-o,offsetY:-l,scaleX:1/m,scaleY:1/b},y=f+4,_=p+4,S=n.getCanvas("mesh",y,_),C=S.context,T=C.createImageData(f,p);if(r){const k=T.data;for(let N=0,L=k.length;N<L;N+=4)k[N]=r[0],k[N+1]=r[1],k[N+2]=r[2],k[N+3]=255}for(const k of this._figures)dVe(T,k,v);return C.putImageData(T,2,2),{canvas:S.canvas,offsetX:o-2*m,offsetY:l-2*b,scaleX:m,scaleY:b}}isModifyingCurrentTransform(){return!0}getPattern(t,r,n,a){j6(t,this._bbox);const i=new Float32Array(2);if(a===oa.SHADING)kt.singularValueDecompose2dScale(an(t),i);else if(this.matrix){kt.singularValueDecompose2dScale(this.matrix,i);const[o,l]=i;kt.singularValueDecompose2dScale(r.baseTransform,i),i[0]*=o,i[1]*=l}else kt.singularValueDecompose2dScale(r.baseTransform,i);const s=this._createMeshCanvas(i,a===oa.SHADING?null:this._background,r.cachedCanvases);return a!==oa.SHADING&&(t.setTransform(...r.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(s.offsetX,s.offsetY),t.scale(s.scaleX,s.scaleY),t.createPattern(s.canvas,"no-repeat")}}class hVe extends VI{getPattern(){return"hotpink"}}function pVe(e){switch(e[0]){case"RadialAxial":return new uVe(e);case"Mesh":return new fVe(e);case"Dummy":return new hVe}throw new Error(`Unknown IR type: ${e[0]}`)}const ZZ={COLORED:1,UNCOLORED:2};class WI{static MAX_PATTERN_SIZE=3e3;constructor(t,r,n,a){this.color=t[1],this.operatorList=t[2],this.matrix=t[3],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.ctx=r,this.canvasGraphicsFactory=n,this.baseTransform=a}createPatternCanvas(t){const{bbox:r,operatorList:n,paintType:a,tilingType:i,color:s,canvasGraphicsFactory:o}=this;let{xstep:l,ystep:c}=this;l=Math.abs(l),c=Math.abs(c),fy("TilingType: "+i);const u=r[0],f=r[1],p=r[2],m=r[3],b=p-u,v=m-f,y=new Float32Array(2);kt.singularValueDecompose2dScale(this.matrix,y);const[_,S]=y;kt.singularValueDecompose2dScale(this.baseTransform,y);const C=_*y[0],T=S*y[1];let A=b,k=v,N=!1,L=!1;const I=Math.ceil(l*C),P=Math.ceil(c*T),H=Math.ceil(b*C),B=Math.ceil(v*T);I>=H?A=l:N=!0,P>=B?k=c:L=!0;const K=this.getSizeAndScale(A,this.ctx.canvas.width,C),j=this.getSizeAndScale(k,this.ctx.canvas.height,T),W=t.cachedCanvases.getCanvas("pattern",K.size,j.size),D=W.context,U=o.createCanvasGraphics(D);if(U.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(U,a,s),D.translate(-K.scale*u,-j.scale*f),U.transform(K.scale,0,0,j.scale,0,0),D.save(),this.clipBbox(U,u,f,p,m),U.baseTransform=an(U.ctx),U.executeOperatorList(n),U.endDrawing(),D.restore(),N||L){const Y=W.canvas;N&&(A=l),L&&(k=c);const z=this.getSizeAndScale(A,this.ctx.canvas.width,C),M=this.getSizeAndScale(k,this.ctx.canvas.height,T),Q=z.size,q=M.size,F=t.cachedCanvases.getCanvas("pattern-workaround",Q,q),V=F.context,Z=N?Math.floor(b/l):0,ee=L?Math.floor(v/c):0;for(let te=0;te<=Z;te++)for(let oe=0;oe<=ee;oe++)V.drawImage(Y,Q*te,q*oe,Q,q,0,0,Q,q);return{canvas:F.canvas,scaleX:z.scale,scaleY:M.scale,offsetX:u,offsetY:f}}return{canvas:W.canvas,scaleX:K.scale,scaleY:j.scale,offsetX:u,offsetY:f}}getSizeAndScale(t,r,n){const a=Math.max(WI.MAX_PATTERN_SIZE,r);let i=Math.ceil(t*n);return i>=a?i=a:n=i/t,{scale:n,size:i}}clipBbox(t,r,n,a,i){const s=a-r,o=i-n;t.ctx.rect(r,n,s,o),kt.axialAlignedBoundingBox([r,n,a,i],an(t.ctx),t.current.minMax),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,r,n){const a=t.ctx,i=t.current;switch(r){case ZZ.COLORED:const{fillStyle:s,strokeStyle:o}=this.ctx;a.fillStyle=i.fillColor=s,a.strokeStyle=i.strokeColor=o;break;case ZZ.UNCOLORED:a.fillStyle=a.strokeStyle=n,i.fillColor=i.strokeColor=n;break;default:throw new BGe(`Unsupported paint type: ${r}`)}}isModifyingCurrentTransform(){return!1}getPattern(t,r,n,a){let i=n;a!==oa.SHADING&&(i=kt.transform(i,r.baseTransform),this.matrix&&(i=kt.transform(i,this.matrix)));const s=this.createPatternCanvas(r);let o=new DOMMatrix(i);o=o.translate(s.offsetX,s.offsetY),o=o.scale(1/s.scaleX,1/s.scaleY);const l=t.createPattern(s.canvas,"repeat");return l.setTransform(o),l}}function mVe({src:e,srcPos:t=0,dest:r,width:n,height:a,nonBlackColor:i=4294967295,inverseDecode:s=!1}){const o=ea.isLittleEndian?4278190080:255,[l,c]=s?[i,o]:[o,i],u=n>>3,f=n&7,p=e.length;r=new Uint32Array(r.buffer);let m=0;for(let b=0;b<a;b++){for(const y=t+u;t<y;t++){const _=t<p?e[t]:255;r[m++]=_&128?c:l,r[m++]=_&64?c:l,r[m++]=_&32?c:l,r[m++]=_&16?c:l,r[m++]=_&8?c:l,r[m++]=_&4?c:l,r[m++]=_&2?c:l,r[m++]=_&1?c:l}if(f===0)continue;const v=t<p?e[t++]:255;for(let y=0;y<f;y++)r[m++]=v&1<<7-y?c:l}return{srcPos:t,destPos:m}}const QZ=16,JZ=100,gVe=15,eQ=10,ei=16,LM=new DOMMatrix,Ai=new Float32Array(2),Nf=new Float32Array([1/0,1/0,-1/0,-1/0]);function vVe(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(r,n){t.translate(r,n),this.__originalTranslate(r,n)},e.scale=function(r,n){t.scale(r,n),this.__originalScale(r,n)},e.transform=function(r,n,a,i,s,o){t.transform(r,n,a,i,s,o),this.__originalTransform(r,n,a,i,s,o)},e.setTransform=function(r,n,a,i,s,o){t.setTransform(r,n,a,i,s,o),this.__originalSetTransform(r,n,a,i,s,o)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(r){t.rotate(r),this.__originalRotate(r)},e.clip=function(r){t.clip(r),this.__originalClip(r)},e.moveTo=function(r,n){t.moveTo(r,n),this.__originalMoveTo(r,n)},e.lineTo=function(r,n){t.lineTo(r,n),this.__originalLineTo(r,n)},e.bezierCurveTo=function(r,n,a,i,s,o){t.bezierCurveTo(r,n,a,i,s,o),this.__originalBezierCurveTo(r,n,a,i,s,o)},e.rect=function(r,n,a,i){t.rect(r,n,a,i),this.__originalRect(r,n,a,i)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}class bVe{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,r,n){let a;return this.cache[t]!==void 0?(a=this.cache[t],this.canvasFactory.reset(a,r,n)):(a=this.canvasFactory.create(r,n),this.cache[t]=a),a}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const r=this.cache[t];this.canvasFactory.destroy(r),delete this.cache[t]}}}function x1(e,t,r,n,a,i,s,o,l,c){const[u,f,p,m,b,v]=an(e);if(f===0&&p===0){const S=s*u+b,C=Math.round(S),T=o*m+v,A=Math.round(T),k=(s+l)*u+b,N=Math.abs(Math.round(k)-C)||1,L=(o+c)*m+v,I=Math.abs(Math.round(L)-A)||1;return e.setTransform(Math.sign(u),0,0,Math.sign(m),C,A),e.drawImage(t,r,n,a,i,0,0,N,I),e.setTransform(u,f,p,m,b,v),[N,I]}if(u===0&&m===0){const S=o*p+b,C=Math.round(S),T=s*f+v,A=Math.round(T),k=(o+c)*p+b,N=Math.abs(Math.round(k)-C)||1,L=(s+l)*f+v,I=Math.abs(Math.round(L)-A)||1;return e.setTransform(0,Math.sign(f),Math.sign(p),0,C,A),e.drawImage(t,r,n,a,i,0,0,I,N),e.setTransform(u,f,p,m,b,v),[I,N]}e.drawImage(t,r,n,a,i,s,o,l,c);const y=Math.hypot(u,f),_=Math.hypot(p,m);return[y*l,_*c]}class tQ{alphaIsShape=!1;fontSize=0;fontSizeScale=1;textMatrix=null;textMatrixScale=1;fontMatrix=F6;leading=0;x=0;y=0;lineX=0;lineY=0;charSpacing=0;wordSpacing=0;textHScale=1;textRenderingMode=ma.FILL;textRise=0;fillColor="#000000";strokeColor="#000000";patternFill=!1;patternStroke=!1;fillAlpha=1;strokeAlpha=1;lineWidth=1;activeSMask=null;transferMaps="none";constructor(t,r){this.clipBox=new Float32Array([0,0,t,r]),this.minMax=Nf.slice()}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t.minMax=this.minMax.slice(),t}getPathBoundingBox(t=oa.FILL,r=null){const n=this.minMax.slice();if(t===oa.STROKE){r||Br("Stroke bounding box must include transform."),kt.singularValueDecompose2dScale(r,Ai);const a=Ai[0]*this.lineWidth/2,i=Ai[1]*this.lineWidth/2;n[0]-=a,n[1]-=i,n[2]+=a,n[3]+=i}return n}updateClipFromPath(){const t=kt.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(t){this.clipBox.set(t,0),this.minMax.set(Nf,0)}getClippedPathBoundingBox(t=oa.FILL,r=null){return kt.intersect(this.clipBox,this.getPathBoundingBox(t,r))}}function rQ(e,t){if(t instanceof ImageData){e.putImageData(t,0,0);return}const r=t.height,n=t.width,a=r%ei,i=(r-a)/ei,s=a===0?i:i+1,o=e.createImageData(n,ei);let l=0,c;const u=t.data,f=o.data;let p,m,b,v;if(t.kind===Rp.GRAYSCALE_1BPP){const y=u.byteLength,_=new Uint32Array(f.buffer,0,f.byteLength>>2),S=_.length,C=n+7>>3,T=4294967295,A=ea.isLittleEndian?4278190080:255;for(p=0;p<s;p++){for(b=p<i?ei:a,c=0,m=0;m<b;m++){const k=y-l;let N=0;const L=k>C?n:k*8-7,I=L&-8;let P=0,H=0;for(;N<I;N+=8)H=u[l++],_[c++]=H&128?T:A,_[c++]=H&64?T:A,_[c++]=H&32?T:A,_[c++]=H&16?T:A,_[c++]=H&8?T:A,_[c++]=H&4?T:A,_[c++]=H&2?T:A,_[c++]=H&1?T:A;for(;N<L;N++)P===0&&(H=u[l++],P=128),_[c++]=H&P?T:A,P>>=1}for(;c<S;)_[c++]=0;e.putImageData(o,0,p*ei)}}else if(t.kind===Rp.RGBA_32BPP){for(m=0,v=n*ei*4,p=0;p<i;p++)f.set(u.subarray(l,l+v)),l+=v,e.putImageData(o,0,m),m+=ei;p<s&&(v=n*a*4,f.set(u.subarray(l,l+v)),e.putImageData(o,0,m))}else if(t.kind===Rp.RGB_24BPP)for(b=ei,v=n*b,p=0;p<s;p++){for(p>=i&&(b=a,v=n*b),c=0,m=v;m--;)f[c++]=u[l++],f[c++]=u[l++],f[c++]=u[l++],f[c++]=255;e.putImageData(o,0,p*ei)}else throw new Error(`bad image kind: ${t.kind}`)}function nQ(e,t){if(t.bitmap){e.drawImage(t.bitmap,0,0);return}const r=t.height,n=t.width,a=r%ei,i=(r-a)/ei,s=a===0?i:i+1,o=e.createImageData(n,ei);let l=0;const c=t.data,u=o.data;for(let f=0;f<s;f++){const p=f<i?ei:a;({srcPos:l}=mVe({src:c,srcPos:l,dest:u,width:n,height:p,nonBlackColor:0})),e.putImageData(o,0,f*ei)}}function Xh(e,t){const r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const n of r)e[n]!==void 0&&(t[n]=e[n]);e.setLineDash!==void 0&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function y1(e){e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",e.setLineDash!==void 0&&(e.setLineDash([]),e.lineDashOffset=0);const{filter:t}=e;t!=="none"&&t!==""&&(e.filter="none")}function aQ(e,t){if(t)return!0;kt.singularValueDecompose2dScale(e,Ai);const r=Math.fround(Gs.pixelRatio*ed.PDF_TO_CSS_UNITS);return Ai[0]<=r&&Ai[1]<=r}const xVe=["butt","round","square"],yVe=["miter","round","bevel"],_Ve={},iQ={};class Uf{constructor(t,r,n,a,i,{optionalContentConfig:s,markedContentStack:o=null},l,c){this.ctx=t,this.current=new tQ(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=r,this.objs=n,this.canvasFactory=a,this.filterFactory=i,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=o||[],this.optionalContentConfig=s,this.cachedCanvases=new bVe(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=l,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=c,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(t,r=null){return typeof t=="string"?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):r}beginDrawing({transform:t,viewport:r,transparency:n=!1,background:a=null}){const i=this.ctx.canvas.width,s=this.ctx.canvas.height,o=this.ctx.fillStyle;if(this.ctx.fillStyle=a||"#ffffff",this.ctx.fillRect(0,0,i,s),this.ctx.fillStyle=o,n){const l=this.cachedCanvases.getCanvas("transparent",i,s);this.compositeCtx=this.ctx,this.transparentCanvas=l.canvas,this.ctx=l.context,this.ctx.save(),this.ctx.transform(...an(this.compositeCtx))}this.ctx.save(),y1(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...r.transform),this.viewportScale=r.scale,this.baseTransform=an(this.ctx)}executeOperatorList(t,r,n,a){const i=t.argsArray,s=t.fnArray;let o=r||0;const l=i.length;if(l===o)return o;const c=l-o>eQ&&typeof n=="function",u=c?Date.now()+gVe:0;let f=0;const p=this.commonObjs,m=this.objs;let b;for(;;){if(a!==void 0&&o===a.nextBreakPoint)return a.breakIt(o,n),o;if(b=s[o],b!==lm.dependency)this[b].apply(this,i[o]);else for(const v of i[o]){const y=v.startsWith("g_")?p:m;if(!y.has(v))return y.get(v,n),o}if(o++,o===l)return o;if(c&&++f>eQ){if(Date.now()>u)return n(),o;f=0}}}#e(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#e(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const r of t.values())typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement&&(r.width=r.height=0);t.clear()}this._cachedBitmapsMap.clear(),this.#t()}#t(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){const r=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=r}}}_scaleImage(t,r){const n=t.width??t.displayWidth,a=t.height??t.displayHeight;let i=Math.max(Math.hypot(r[0],r[1]),1),s=Math.max(Math.hypot(r[2],r[3]),1),o=n,l=a,c="prescale1",u,f;for(;i>2&&o>1||s>2&&l>1;){let p=o,m=l;i>2&&o>1&&(p=o>=16384?Math.floor(o/2)-1||1:Math.ceil(o/2),i/=o/p),s>2&&l>1&&(m=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l)/2,s/=l/m),u=this.cachedCanvases.getCanvas(c,p,m),f=u.context,f.clearRect(0,0,p,m),f.drawImage(t,0,0,o,l,0,0,p,m),t=u.canvas,o=p,l=m,c=c==="prescale1"?"prescale2":"prescale1"}return{img:t,paintWidth:o,paintHeight:l}}_createMaskCanvas(t){const r=this.ctx,{width:n,height:a}=t,i=this.current.fillColor,s=this.current.patternFill,o=an(r);let l,c,u,f;if((t.bitmap||t.data)&&t.count>1){const I=t.bitmap||t.data.buffer;c=JSON.stringify(s?o:[o.slice(0,4),i]),l=this._cachedBitmapsMap.get(I),l||(l=new Map,this._cachedBitmapsMap.set(I,l));const P=l.get(c);if(P&&!s){const H=Math.round(Math.min(o[0],o[2])+o[4]),B=Math.round(Math.min(o[1],o[3])+o[5]);return{canvas:P,offsetX:H,offsetY:B}}u=P}u||(f=this.cachedCanvases.getCanvas("maskCanvas",n,a),nQ(f.context,t));let p=kt.transform(o,[1/n,0,0,-1/a,0,0]);p=kt.transform(p,[1,0,0,1,0,-a]);const m=Nf.slice();kt.axialAlignedBoundingBox([0,0,n,a],p,m);const[b,v,y,_]=m,S=Math.round(y-b)||1,C=Math.round(_-v)||1,T=this.cachedCanvases.getCanvas("fillCanvas",S,C),A=T.context,k=b,N=v;A.translate(-k,-N),A.transform(...p),u||(u=this._scaleImage(f.canvas,co(A)),u=u.img,l&&s&&l.set(c,u)),A.imageSmoothingEnabled=aQ(an(A),t.interpolate),x1(A,u,0,0,u.width,u.height,0,0,n,a),A.globalCompositeOperation="source-in";const L=kt.transform(co(A),[1,0,0,1,-k,-N]);return A.fillStyle=s?i.getPattern(r,this,L,oa.FILL):i,A.fillRect(0,0,n,a),l&&!s&&(this.cachedCanvases.delete("fillCanvas"),l.set(c,T.canvas)),{canvas:T.canvas,offsetX:Math.round(k),offsetY:Math.round(N)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=xVe[t]}setLineJoin(t){this.ctx.lineJoin=yVe[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,r){const n=this.ctx;n.setLineDash!==void 0&&(n.setLineDash(t),n.lineDashOffset=r)}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[r,n]of t)switch(r){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n[0],n[1]);break;case"CA":this.current.strokeAlpha=n;break;case"ca":this.ctx.globalAlpha=this.current.fillAlpha=n;break;case"BM":this.ctx.globalCompositeOperation=n;break;case"SMask":this.current.activeSMask=n?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(n);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.ctx.canvas.width,r=this.ctx.canvas.height,n="smaskGroupAt"+this.groupLevel,a=this.cachedCanvases.getCanvas(n,t,r);this.suspendedCtx=this.ctx;const i=this.ctx=a.context;i.setTransform(this.suspendedCtx.getTransform()),Xh(this.suspendedCtx,i),vVe(i,this.suspendedCtx),this.setGState([["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),Xh(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const r=this.current.activeSMask,n=this.suspendedCtx;this.composeSMask(n,r,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(t,r,n,a){const i=a[0],s=a[1],o=a[2]-i,l=a[3]-s;o===0||l===0||(this.genericComposeSMask(r.context,n,o,l,r.subtype,r.backdrop,r.transferMap,i,s,r.offsetX,r.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(n.canvas,0,0),t.restore())}genericComposeSMask(t,r,n,a,i,s,o,l,c,u,f){let p=t.canvas,m=l-u,b=c-f;if(s)if(m<0||b<0||m+n>p.width||b+a>p.height){const y=this.cachedCanvases.getCanvas("maskExtension",n,a),_=y.context;_.drawImage(p,-m,-b),_.globalCompositeOperation="destination-atop",_.fillStyle=s,_.fillRect(0,0,n,a),_.globalCompositeOperation="source-over",p=y.canvas,m=b=0}else{t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const y=new Path2D;y.rect(m,b,n,a),t.clip(y),t.globalCompositeOperation="destination-atop",t.fillStyle=s,t.fillRect(m,b,n,a),t.restore()}r.save(),r.globalAlpha=1,r.setTransform(1,0,0,1,0,0),i==="Alpha"&&o?r.filter=this.filterFactory.addAlphaFilter(o):i==="Luminosity"&&(r.filter=this.filterFactory.addLuminosityFilter(o));const v=new Path2D;v.rect(l,c,n,a),r.clip(v),r.globalCompositeOperation="destination-in",r.drawImage(p,m,b,n,a,l,c,n,a),r.restore()}save(){this.inSMaskMode&&Xh(this.ctx,this.suspendedCtx),this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){if(this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&Xh(this.suspendedCtx,this.ctx),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(t,r,n,a,i,s){this.ctx.transform(t,r,n,a,i,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,r,n){let[a]=r;if(!n){a||=r[0]=new Path2D,this[t](a);return}if(!(a instanceof Path2D)){const i=r[0]=new Path2D;for(let s=0,o=a.length;s<o;)switch(a[s++]){case g1.moveTo:i.moveTo(a[s++],a[s++]);break;case g1.lineTo:i.lineTo(a[s++],a[s++]);break;case g1.curveTo:i.bezierCurveTo(a[s++],a[s++],a[s++],a[s++],a[s++],a[s++]);break;case g1.closePath:i.closePath();break;default:Kt(`Unrecognized drawing path operator: ${a[s-1]}`);break}a=i}kt.axialAlignedBoundingBox(n,an(this.ctx),this.current.minMax),this[t](a)}closePath(){this.ctx.closePath()}stroke(t,r=!0){const n=this.ctx,a=this.current.strokeColor;if(n.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof a=="object"&&a?.getPattern){const i=a.isModifyingCurrentTransform()?n.getTransform():null;if(n.save(),n.strokeStyle=a.getPattern(n,this,co(n),oa.STROKE),i){const s=new Path2D;s.addPath(t,n.getTransform().invertSelf().multiplySelf(i)),t=s}this.rescaleAndStroke(t,!1),n.restore()}else this.rescaleAndStroke(t,!0);r&&this.consumePath(t,this.current.getClippedPathBoundingBox(oa.STROKE,an(this.ctx))),n.globalAlpha=this.current.fillAlpha}closeStroke(t){this.stroke(t)}fill(t,r=!0){const n=this.ctx,a=this.current.fillColor,i=this.current.patternFill;let s=!1;if(i){const l=a.isModifyingCurrentTransform()?n.getTransform():null;if(n.save(),n.fillStyle=a.getPattern(n,this,co(n),oa.FILL),l){const c=new Path2D;c.addPath(t,n.getTransform().invertSelf().multiplySelf(l)),t=c}s=!0}const o=this.current.getClippedPathBoundingBox();this.contentVisible&&o!==null&&(this.pendingEOFill?(n.fill(t,"evenodd"),this.pendingEOFill=!1):n.fill(t)),s&&n.restore(),r&&this.consumePath(t,o)}eoFill(t){this.pendingEOFill=!0,this.fill(t)}fillStroke(t){this.fill(t,!1),this.stroke(t,!1),this.consumePath(t)}eoFillStroke(t){this.pendingEOFill=!0,this.fillStroke(t)}closeFillStroke(t){this.fillStroke(t)}closeEOFillStroke(t){this.pendingEOFill=!0,this.fillStroke(t)}endPath(t){this.consumePath(t)}rawFillPath(t){this.ctx.fill(t)}clip(){this.pendingClip=_Ve}eoClip(){this.pendingClip=iQ}beginText(){this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const t=this.pendingTextPaths,r=this.ctx;if(t===void 0)return;const n=new Path2D,a=r.getTransform().invertSelf();for(const{transform:i,x:s,y:o,fontSize:l,path:c}of t)n.addPath(c,new DOMMatrix(i).preMultiplySelf(a).translate(s,o).scale(l,-l));r.clip(n),delete this.pendingTextPaths}setCharSpacing(t){this.current.charSpacing=t}setWordSpacing(t){this.current.wordSpacing=t}setHScale(t){this.current.textHScale=t/100}setLeading(t){this.current.leading=-t}setFont(t,r){const n=this.commonObjs.get(t),a=this.current;if(!n)throw new Error(`Can't find font for ${t}`);if(a.fontMatrix=n.fontMatrix||F6,(a.fontMatrix[0]===0||a.fontMatrix[3]===0)&&Kt("Invalid font matrix for font "+t),r<0?(r=-r,a.fontDirection=-1):a.fontDirection=1,this.current.font=n,this.current.fontSize=r,n.isType3Font)return;const i=n.loadedName||"sans-serif",s=n.systemFontInfo?.css||`"${i}", ${n.fallbackName}`;let o="normal";n.black?o="900":n.bold&&(o="bold");const l=n.italic?"italic":"normal";let c=r;r<QZ?c=QZ:r>JZ&&(c=JZ),this.current.fontSizeScale=r/c,this.ctx.font=`${l} ${o} ${c}px ${s}`}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,r){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=r}setLeadingMoveText(t,r){this.setLeading(-r),this.moveText(t,r)}setTextMatrix(t){const{current:r}=this;r.textMatrix=t,r.textMatrixScale=Math.hypot(t[0],t[1]),r.x=r.lineX=0,r.y=r.lineY=0}nextLine(){this.moveText(0,this.current.leading)}#r(t,r,n){const a=new Path2D;return a.addPath(t,new DOMMatrix(n).invertSelf().multiplySelf(r)),a}paintChar(t,r,n,a,i){const s=this.ctx,o=this.current,l=o.font,c=o.textRenderingMode,u=o.fontSize/o.fontSizeScale,f=c&ma.FILL_STROKE_MASK,p=!!(c&ma.ADD_TO_PATH_FLAG),m=o.patternFill&&!l.missingFile,b=o.patternStroke&&!l.missingFile;let v;if((l.disableFontFace||p||m||b)&&(v=l.getPathGenerator(this.commonObjs,t)),l.disableFontFace||m||b){s.save(),s.translate(r,n),s.scale(u,-u);let y;if((f===ma.FILL||f===ma.FILL_STROKE)&&(a?(y=s.getTransform(),s.setTransform(...a),s.fill(this.#r(v,y,a))):s.fill(v)),f===ma.STROKE||f===ma.FILL_STROKE)if(i){y||=s.getTransform(),s.setTransform(...i);const{a:_,b:S,c:C,d:T}=y,A=kt.inverseTransform(i),k=kt.transform([_,S,C,T,0,0],A);kt.singularValueDecompose2dScale(k,Ai),s.lineWidth*=Math.max(Ai[0],Ai[1])/u,s.stroke(this.#r(v,y,i))}else s.lineWidth/=u,s.stroke(v);s.restore()}else(f===ma.FILL||f===ma.FILL_STROKE)&&s.fillText(t,r,n),(f===ma.STROKE||f===ma.FILL_STROKE)&&s.strokeText(t,r,n);p&&(this.pendingTextPaths||=[]).push({transform:an(s),x:r,y:n,fontSize:u,path:v})}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const r=t.getImageData(0,0,10,10).data;let n=!1;for(let a=3;a<r.length;a+=4)if(r[a]>0&&r[a]<255){n=!0;break}return dr(this,"isFontSubpixelAAEnabled",n)}showText(t){const r=this.current,n=r.font;if(n.isType3Font)return this.showType3Text(t);const a=r.fontSize;if(a===0)return;const i=this.ctx,s=r.fontSizeScale,o=r.charSpacing,l=r.wordSpacing,c=r.fontDirection,u=r.textHScale*c,f=t.length,p=n.vertical,m=p?1:-1,b=n.defaultVMetrics,v=a*r.fontMatrix[0],y=r.textRenderingMode===ma.FILL&&!n.disableFontFace&&!r.patternFill;i.save(),r.textMatrix&&i.transform(...r.textMatrix),i.translate(r.x,r.y+r.textRise),c>0?i.scale(u,-1):i.scale(u,1);let _,S;if(r.patternFill){i.save();const N=r.fillColor.getPattern(i,this,co(i),oa.FILL);_=an(i),i.restore(),i.fillStyle=N}if(r.patternStroke){i.save();const N=r.strokeColor.getPattern(i,this,co(i),oa.STROKE);S=an(i),i.restore(),i.strokeStyle=N}let C=r.lineWidth;const T=r.textMatrixScale;if(T===0||C===0){const N=r.textRenderingMode&ma.FILL_STROKE_MASK;(N===ma.STROKE||N===ma.FILL_STROKE)&&(C=this.getSinglePixelWidth())}else C/=T;if(s!==1&&(i.scale(s,s),C/=s),i.lineWidth=C,n.isInvalidPDFjsFont){const N=[];let L=0;for(const I of t)N.push(I.unicode),L+=I.width;i.fillText(N.join(""),0,0),r.x+=L*v*u,i.restore(),this.compose();return}let A=0,k;for(k=0;k<f;++k){const N=t[k];if(typeof N=="number"){A+=m*N*a/1e3;continue}let L=!1;const I=(N.isSpace?l:0)+o,P=N.fontChar,H=N.accent;let B,K,j=N.width;if(p){const D=N.vmetric||b,U=-(N.vmetric?D[1]:j*.5)*v,Y=D[2]*v;j=D?-D[0]:j,B=U/s,K=(A+Y)/s}else B=A/s,K=0;if(n.remeasure&&j>0){const D=i.measureText(P).width*1e3/a*s;if(j<D&&this.isFontSubpixelAAEnabled){const U=j/D;L=!0,i.save(),i.scale(U,1),B/=U}else j!==D&&(B+=(j-D)/2e3*a/s)}if(this.contentVisible&&(N.isInFont||n.missingFile)){if(y&&!H)i.fillText(P,B,K);else if(this.paintChar(P,B,K,_,S),H){const D=B+a*H.offset.x/s,U=K-a*H.offset.y/s;this.paintChar(H.fontChar,D,U,_,S)}}const W=p?j*v-I*c:j*v+I*c;A+=W,L&&i.restore()}p?r.y-=A:r.x+=A*u,i.restore(),this.compose()}showType3Text(t){const r=this.ctx,n=this.current,a=n.font,i=n.fontSize,s=n.fontDirection,o=a.vertical?1:-1,l=n.charSpacing,c=n.wordSpacing,u=n.textHScale*s,f=n.fontMatrix||F6,p=t.length,m=n.textRenderingMode===ma.INVISIBLE;let b,v,y,_;if(!(m||i===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,r.save(),n.textMatrix&&r.transform(...n.textMatrix),r.translate(n.x,n.y+n.textRise),r.scale(u,s),b=0;b<p;++b){if(v=t[b],typeof v=="number"){_=o*v*i/1e3,this.ctx.translate(_,0),n.x+=_*u;continue}const S=(v.isSpace?c:0)+l,C=a.charProcOperatorList[v.operatorListId];C?this.contentVisible&&(this.save(),r.scale(i,i),r.transform(...f),this.executeOperatorList(C),this.restore()):Kt(`Type3 character "${v.operatorListId}" is not available.`);const T=[v.width,0];kt.applyTransform(T,f),y=T[0]*i+S,r.translate(y,0),n.x+=y*u}r.restore()}}setCharWidth(t,r){}setCharWidthAndBounds(t,r,n,a,i,s){const o=new Path2D;o.rect(n,a,i-n,s-a),this.ctx.clip(o),this.endPath()}getColorN_Pattern(t){let r;if(t[0]==="TilingPattern"){const n=this.baseTransform||an(this.ctx),a={createCanvasGraphics:i=>new Uf(i,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};r=new WI(t,this.ctx,a,n)}else r=this._getPattern(t[1],t[2]);return r}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t){this.ctx.strokeStyle=this.current.strokeColor=t,this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(t){this.ctx.fillStyle=this.current.fillColor=t,this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(t,r=null){let n;return this.cachedPatterns.has(t)?n=this.cachedPatterns.get(t):(n=pVe(this.getObject(t)),this.cachedPatterns.set(t,n)),r&&(n.matrix=r),n}shadingFill(t){if(!this.contentVisible)return;const r=this.ctx;this.save();const n=this._getPattern(t);r.fillStyle=n.getPattern(r,this,co(r),oa.SHADING);const a=co(r);if(a){const{width:i,height:s}=r.canvas,o=Nf.slice();kt.axialAlignedBoundingBox([0,0,i,s],a,o);const[l,c,u,f]=o;this.ctx.fillRect(l,c,u-l,f-c)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){Br("Should not call beginInlineImage")}beginImageData(){Br("Should not call beginImageData")}paintFormXObjectBegin(t,r){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),t&&this.transform(...t),this.baseTransform=an(this.ctx),r)){kt.axialAlignedBoundingBox(r,this.baseTransform,this.current.minMax);const[n,a,i,s]=r,o=new Path2D;o.rect(n,a,i-n,s-a),this.ctx.clip(o),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const r=this.ctx;t.isolated||fy("TODO: Support non-isolated groups."),t.knockout&&Kt("Knockout groups not supported.");const n=an(r);if(t.matrix&&r.transform(...t.matrix),!t.bbox)throw new Error("Bounding box is required.");let a=Nf.slice();kt.axialAlignedBoundingBox(t.bbox,an(r),a);const i=[0,0,r.canvas.width,r.canvas.height];a=kt.intersect(a,i)||[0,0,0,0];const s=Math.floor(a[0]),o=Math.floor(a[1]),l=Math.max(Math.ceil(a[2])-s,1),c=Math.max(Math.ceil(a[3])-o,1);this.current.startNewPathAndClipBox([0,0,l,c]);let u="groupAt"+this.groupLevel;t.smask&&(u+="_smask_"+this.smaskCounter++%2);const f=this.cachedCanvases.getCanvas(u,l,c),p=f.context;p.translate(-s,-o),p.transform(...n);let m=new Path2D;const[b,v,y,_]=t.bbox;if(m.rect(b,v,y-b,_-v),t.matrix){const S=new Path2D;S.addPath(m,new DOMMatrix(t.matrix)),m=S}p.clip(m),t.smask?this.smaskStack.push({canvas:f.canvas,context:p,offsetX:s,offsetY:o,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(r.setTransform(1,0,0,1,0,0),r.translate(s,o),r.save()),Xh(r,p),this.ctx=p,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(r),this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;const r=this.ctx,n=this.groupStack.pop();if(this.ctx=n,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const a=an(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...a);const i=Nf.slice();kt.axialAlignedBoundingBox([0,0,r.canvas.width,r.canvas.height],a,i),this.ctx.drawImage(r.canvas,0,0),this.ctx.restore(),this.compose(i)}}beginAnnotation(t,r,n,a,i){if(this.#e(),y1(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),r){const s=r[2]-r[0],o=r[3]-r[1];if(i&&this.annotationCanvasMap){n=n.slice(),n[4]-=r[0],n[5]-=r[1],r=r.slice(),r[0]=r[1]=0,r[2]=s,r[3]=o,kt.singularValueDecompose2dScale(an(this.ctx),Ai);const{viewportScale:l}=this,c=Math.ceil(s*this.outputScaleX*l),u=Math.ceil(o*this.outputScaleY*l);this.annotationCanvas=this.canvasFactory.create(c,u);const{canvas:f,context:p}=this.annotationCanvas;this.annotationCanvasMap.set(t,f),this.annotationCanvas.savedCtx=this.ctx,this.ctx=p,this.ctx.save(),this.ctx.setTransform(Ai[0],0,0,-Ai[1],0,o*Ai[1]),y1(this.ctx)}else{y1(this.ctx),this.endPath();const l=new Path2D;l.rect(r[0],r[1],s,o),this.ctx.clip(l)}}this.current=new tQ(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...n),this.transform(...a)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#t(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){if(!this.contentVisible)return;const r=t.count;t=this.getObject(t.data,t),t.count=r;const n=this.ctx,a=this._createMaskCanvas(t),i=a.canvas;n.save(),n.setTransform(1,0,0,1,0,0),n.drawImage(i,a.offsetX,a.offsetY),n.restore(),this.compose()}paintImageMaskXObjectRepeat(t,r,n=0,a=0,i,s){if(!this.contentVisible)return;t=this.getObject(t.data,t);const o=this.ctx;o.save();const l=an(o);o.transform(r,n,a,i,0,0);const c=this._createMaskCanvas(t);o.setTransform(1,0,0,1,c.offsetX-l[4],c.offsetY-l[5]);for(let u=0,f=s.length;u<f;u+=2){const p=kt.transform(l,[r,n,a,i,s[u],s[u+1]]);o.drawImage(c.canvas,p[4],p[5])}o.restore(),this.compose()}paintImageMaskXObjectGroup(t){if(!this.contentVisible)return;const r=this.ctx,n=this.current.fillColor,a=this.current.patternFill;for(const i of t){const{data:s,width:o,height:l,transform:c}=i,u=this.cachedCanvases.getCanvas("maskCanvas",o,l),f=u.context;f.save();const p=this.getObject(s,i);nQ(f,p),f.globalCompositeOperation="source-in",f.fillStyle=a?n.getPattern(f,this,co(r),oa.FILL):n,f.fillRect(0,0,o,l),f.restore(),r.save(),r.transform(...c),r.scale(1,-1),x1(r,u.canvas,0,0,o,l,0,-1,1,1),r.restore()}this.compose()}paintImageXObject(t){if(!this.contentVisible)return;const r=this.getObject(t);if(!r){Kt("Dependent image isn't ready yet");return}this.paintInlineImageXObject(r)}paintImageXObjectRepeat(t,r,n,a){if(!this.contentVisible)return;const i=this.getObject(t);if(!i){Kt("Dependent image isn't ready yet");return}const s=i.width,o=i.height,l=[];for(let c=0,u=a.length;c<u;c+=2)l.push({transform:[r,0,0,n,a[c],a[c+1]],x:0,y:0,w:s,h:o});this.paintInlineImageXObjectGroup(i,l)}applyTransferMapsToCanvas(t){return this.current.transferMaps!=="none"&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if(this.current.transferMaps==="none")return t.bitmap;const{bitmap:r,width:n,height:a}=t,i=this.cachedCanvases.getCanvas("inlineImage",n,a),s=i.context;return s.filter=this.current.transferMaps,s.drawImage(r,0,0),s.filter="none",i.canvas}paintInlineImageXObject(t){if(!this.contentVisible)return;const r=t.width,n=t.height,a=this.ctx;this.save();const{filter:i}=a;i!=="none"&&i!==""&&(a.filter="none"),a.scale(1/r,-1/n);let s;if(t.bitmap)s=this.applyTransferMapsToBitmap(t);else if(typeof HTMLElement=="function"&&t instanceof HTMLElement||!t.data)s=t;else{const c=this.cachedCanvases.getCanvas("inlineImage",r,n).context;rQ(c,t),s=this.applyTransferMapsToCanvas(c)}const o=this._scaleImage(s,co(a));a.imageSmoothingEnabled=aQ(an(a),t.interpolate),x1(a,o.img,0,0,o.paintWidth,o.paintHeight,0,-n,r,n),this.compose(),this.restore()}paintInlineImageXObjectGroup(t,r){if(!this.contentVisible)return;const n=this.ctx;let a;if(t.bitmap)a=t.bitmap;else{const i=t.width,s=t.height,l=this.cachedCanvases.getCanvas("inlineImage",i,s).context;rQ(l,t),a=this.applyTransferMapsToCanvas(l)}for(const i of r)n.save(),n.transform(...i.transform),n.scale(1,-1),x1(n,a,i.x,i.y,i.w,i.h,0,-1,1,1),n.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t){}markPointProps(t,r){}beginMarkedContent(t){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,r){t==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(r)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(t,r){const n=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(r);const a=this.ctx;this.pendingClip&&(n||(this.pendingClip===iQ?a.clip(t,"evenodd"):a.clip(t)),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const t=an(this.ctx);if(t[1]===0&&t[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{const r=Math.abs(t[0]*t[3]-t[2]*t[1]),n=Math.hypot(t[0],t[2]),a=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(n,a)/r}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:t}=this.current,{a:r,b:n,c:a,d:i}=this.ctx.getTransform();let s,o;if(n===0&&a===0){const l=Math.abs(r),c=Math.abs(i);if(l===c)if(t===0)s=o=1/l;else{const u=l*t;s=o=u<1?1/u:1}else if(t===0)s=1/l,o=1/c;else{const u=l*t,f=c*t;s=u<1?1/u:1,o=f<1?1/f:1}}else{const l=Math.abs(r*i-n*a),c=Math.hypot(r,n),u=Math.hypot(a,i);if(t===0)s=u/l,o=c/l;else{const f=t*l;s=u>f?u/f:1,o=c>f?c/f:1}}this._cachedScaleForStroking[0]=s,this._cachedScaleForStroking[1]=o}return this._cachedScaleForStroking}rescaleAndStroke(t,r){const{ctx:n,current:{lineWidth:a}}=this,[i,s]=this.getScaleForStroking();if(i===s){n.lineWidth=(a||1)*i,n.stroke(t);return}const o=n.getLineDash();r&&n.save(),n.scale(i,s),LM.a=1/i,LM.d=1/s;const l=new Path2D;if(l.addPath(t,LM),o.length>0){const c=Math.max(i,s);n.setLineDash(o.map(u=>u/c)),n.lineDashOffset/=c}n.lineWidth=a||1,n.stroke(l),r&&n.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}for(const e in lm)Uf.prototype[e]!==void 0&&(Uf.prototype[lm[e]]=Uf.prototype[e]);class _l{static#e=null;static#t="";static get workerPort(){return this.#e}static set workerPort(t){if(!(typeof Worker<"u"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");this.#e=t}static get workerSrc(){return this.#t}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");this.#t=t}}class wVe{#e;#t;constructor({parsedData:t,rawData:r}){this.#e=t,this.#t=r}getRaw(){return this.#t}get(t){return this.#e.get(t)??null}[Symbol.iterator](){return this.#e.entries()}}const Cf=Symbol("INTERNAL");class EVe{#e=!1;#t=!1;#r=!1;#n=!0;constructor(t,{name:r,intent:n,usage:a,rbGroups:i}){this.#e=!!(t&wi.DISPLAY),this.#t=!!(t&wi.PRINT),this.name=r,this.intent=n,this.usage=a,this.rbGroups=i}get visible(){if(this.#r)return this.#n;if(!this.#n)return!1;const{print:t,view:r}=this.usage;return this.#e?r?.viewState!=="OFF":this.#t?t?.printState!=="OFF":!0}_setVisible(t,r,n=!1){t!==Cf&&Br("Internal method `_setVisible` called."),this.#r=n,this.#n=r}}class SVe{#e=null;#t=new Map;#r=null;#n=null;constructor(t,r=wi.DISPLAY){if(this.renderingIntent=r,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,this.#n=t.order;for(const n of t.groups)this.#t.set(n.id,new EVe(r,n));if(t.baseState==="OFF")for(const n of this.#t.values())n._setVisible(Cf,!1);for(const n of t.on)this.#t.get(n)._setVisible(Cf,!0);for(const n of t.off)this.#t.get(n)._setVisible(Cf,!1);this.#r=this.getHash()}}#i(t){const r=t.length;if(r<2)return!0;const n=t[0];for(let a=1;a<r;a++){const i=t[a];let s;if(Array.isArray(i))s=this.#i(i);else if(this.#t.has(i))s=this.#t.get(i).visible;else return Kt(`Optional content group not found: ${i}`),!0;switch(n){case"And":if(!s)return!1;break;case"Or":if(s)return!0;break;case"Not":return!s;default:return!0}}return n==="And"}isVisible(t){if(this.#t.size===0)return!0;if(!t)return fy("Optional content group not defined."),!0;if(t.type==="OCG")return this.#t.has(t.id)?this.#t.get(t.id).visible:(Kt(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return this.#i(t.expression);if(!t.policy||t.policy==="AnyOn"){for(const r of t.ids){if(!this.#t.has(r))return Kt(`Optional content group not found: ${r}`),!0;if(this.#t.get(r).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const r of t.ids){if(!this.#t.has(r))return Kt(`Optional content group not found: ${r}`),!0;if(!this.#t.get(r).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const r of t.ids){if(!this.#t.has(r))return Kt(`Optional content group not found: ${r}`),!0;if(!this.#t.get(r).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const r of t.ids){if(!this.#t.has(r))return Kt(`Optional content group not found: ${r}`),!0;if(this.#t.get(r).visible)return!1}return!0}return Kt(`Unknown optional content policy ${t.policy}.`),!0}return Kt(`Unknown group type ${t.type}.`),!0}setVisibility(t,r=!0,n=!0){const a=this.#t.get(t);if(!a){Kt(`Optional content group not found: ${t}`);return}if(n&&r&&a.rbGroups.length)for(const i of a.rbGroups)for(const s of i)s!==t&&this.#t.get(s)?._setVisible(Cf,!1,!0);a._setVisible(Cf,!!r,!0),this.#e=null}setOCGState({state:t,preserveRB:r}){let n;for(const a of t){switch(a){case"ON":case"OFF":case"Toggle":n=a;continue}const i=this.#t.get(a);if(i)switch(n){case"ON":this.setVisibility(a,!0,r);break;case"OFF":this.setVisibility(a,!1,r);break;case"Toggle":this.setVisibility(a,!i.visible,r);break}}this.#e=null}get hasInitialVisibility(){return this.#r===null||this.getHash()===this.#r}getOrder(){return this.#t.size?this.#n?this.#n.slice():[...this.#t.keys()]:null}getGroup(t){return this.#t.get(t)||null}getHash(){if(this.#e!==null)return this.#e;const t=new cce;for(const[r,n]of this.#t)t.update(`${r}:${n.visible}`);return this.#e=t.hexdigest()}[Symbol.iterator](){return this.#t.entries()}}class CVe{constructor(t,{disableRange:r=!1,disableStream:n=!1}){Ln(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:a,initialData:i,progressiveDone:s,contentDispositionFilename:o}=t;if(this._queuedChunks=[],this._progressiveDone=s,this._contentDispositionFilename=o,i?.length>0){const l=i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer;this._queuedChunks.push(l)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!n,this._isRangeSupported=!r,this._contentLength=a,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener((l,c)=>{this._onReceiveData({begin:l,chunk:c})}),t.addProgressListener((l,c)=>{this._onProgress({loaded:l,total:c})}),t.addProgressiveReadListener(l=>{this._onReceiveData({chunk:l})}),t.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),t.transportReady()}_onReceiveData({begin:t,chunk:r}){const n=r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer;if(t===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(n):this._queuedChunks.push(n);else{const a=this._rangeReaders.some(function(i){return i._begin!==t?!1:(i._enqueue(n),!0)});Ln(a,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(t){t.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:t.loaded}):this._fullRequestReader?.onProgress?.({loaded:t.loaded,total:t.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const r=this._rangeReaders.indexOf(t);r>=0&&this._rangeReaders.splice(r,1)}getFullReader(){Ln(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new TVe(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;const n=new AVe(this,t,r);return this._pdfDataRangeTransport.requestDataRange(t,r),this._rangeReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const r of this._rangeReaders.slice(0))r.cancel(t);this._pdfDataRangeTransport.abort()}}class TVe{constructor(t,r,n=!1,a=null){this._stream=t,this._done=n||!1,this._filename=py(a)?a:null,this._queuedChunks=r||[],this._loaded=0;for(const i of this._queuedChunks)this._loaded+=i.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class AVe{constructor(t,r,n){this._stream=t,this._begin=r,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length===0)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const r=this._queuedChunk;return this._queuedChunk=null,{value:r,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function kVe(e){let t=!0,r=n("filename\\*","i").exec(e);if(r){r=r[1];let u=o(r);return u=unescape(u),u=l(u),u=c(u),i(u)}if(r=s(e),r){const u=c(r);return i(u)}if(r=n("filename","i").exec(e),r){r=r[1];let u=o(r);return u=c(u),i(u)}function n(u,f){return new RegExp("(?:^|;)\\s*"+u+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',f)}function a(u,f){if(u){if(!/^[\x00-\xFF]+$/.test(f))return f;try{const p=new TextDecoder(u,{fatal:!0}),m=ng(f);f=p.decode(m),t=!1}catch{}}return f}function i(u){return t&&/[\x80-\xff]/.test(u)&&(u=a("utf-8",u),t&&(u=a("iso-8859-1",u))),u}function s(u){const f=[];let p;const m=n("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(p=m.exec(u))!==null;){let[,v,y,_]=p;if(v=parseInt(v,10),v in f){if(v===0)break;continue}f[v]=[y,_]}const b=[];for(let v=0;v<f.length&&v in f;++v){let[y,_]=f[v];_=o(_),y&&(_=unescape(_),v===0&&(_=l(_))),b.push(_)}return b.join("")}function o(u){if(u.startsWith('"')){const f=u.slice(1).split('\\"');for(let p=0;p<f.length;++p){const m=f[p].indexOf('"');m!==-1&&(f[p]=f[p].slice(0,m),f.length=p+1),f[p]=f[p].replaceAll(/\\(.)/g,"$1")}u=f.join('"')}return u}function l(u){const f=u.indexOf("'");if(f===-1)return u;const p=u.slice(0,f),b=u.slice(f+1).replace(/^[^']*'/,"");return a(p,b)}function c(u){return!u.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(u)?u:u.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(f,p,m,b){if(m==="q"||m==="Q")return b=b.replaceAll("_"," "),b=b.replaceAll(/=([0-9a-fA-F]{2})/g,function(v,y){return String.fromCharCode(parseInt(y,16))}),a(p,b);try{b=atob(b)}catch{}return a(p,b)})}return""}function vce(e,t){const r=new Headers;if(!e||!t||typeof t!="object")return r;for(const n in t){const a=t[n];a!==void 0&&r.append(n,a)}return r}function my(e){return URL.parse(e)?.origin??null}function bce({responseHeaders:e,isHttp:t,rangeChunkSize:r,disableRange:n}){const a={allowRangeRequests:!1,suggestedLength:void 0},i=parseInt(e.get("Content-Length"),10);return!Number.isInteger(i)||(a.suggestedLength=i,i<=2*r)||n||!t||e.get("Accept-Ranges")!=="bytes"||(e.get("Content-Encoding")||"identity")!=="identity"||(a.allowRangeRequests=!0),a}function xce(e){const t=e.get("Content-Disposition");if(t){let r=kVe(t);if(r.includes("%"))try{r=decodeURIComponent(r)}catch{}if(py(r))return r}return null}function lg(e,t){return new cm(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e,e===404||e===0&&t.startsWith("file:"))}function yce(e){return e===200||e===206}function _ce(e,t,r){return{method:"GET",headers:e,signal:r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function wce(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:(Kt(`getArrayBuffer - unexpected data format: ${e}`),new Uint8Array(e).buffer)}class NVe{_responseOrigin=null;constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.headers=vce(this.isHttp,t.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Ln(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new RVe(this),this._fullRequestReader}getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;const n=new MVe(this,t,r);return this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const r of this._rangeRequestReaders.slice(0))r.cancel(t)}}class RVe{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;const r=t.source;this._withCredentials=r.withCredentials||!1,this._contentLength=r.length,this._headersCapability=Promise.withResolvers(),this._disableRange=r.disableRange||!1,this._rangeChunkSize=r.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!r.disableStream,this._isRangeSupported=!r.disableRange;const n=new Headers(t.headers),a=r.url;fetch(a,_ce(n,this._withCredentials,this._abortController)).then(i=>{if(t._responseOrigin=my(i.url),!yce(i.status))throw lg(i.status,a);this._reader=i.body.getReader(),this._headersCapability.resolve();const s=i.headers,{allowRangeRequests:o,suggestedLength:l}=bce({responseHeaders:s,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=o,this._contentLength=l||this._contentLength,this._filename=xce(s),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Il("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:t,done:r}=await this._reader.read();return r?{value:t,done:r}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:wce(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}class MVe{constructor(t,r,n){this._stream=t,this._reader=null,this._loaded=0;const a=t.source;this._withCredentials=a.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!a.disableStream,this._abortController=new AbortController;const i=new Headers(t.headers);i.append("Range",`bytes=${r}-${n-1}`);const s=a.url;fetch(s,_ce(i,this._withCredentials,this._abortController)).then(o=>{const l=my(o.url);if(l!==t._responseOrigin)throw new Error(`Expected range response-origin "${l}" to match "${t._responseOrigin}".`);if(!yce(o.status))throw lg(o.status,s);this._readCapability.resolve(),this._reader=o.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:t,done:r}=await this._reader.read();return r?{value:t,done:r}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded}),{value:wce(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}const PM=200,FM=206;function DVe(e){const t=e.response;return typeof t!="string"?t:ng(t).buffer}class OVe{_responseOrigin=null;constructor({url:t,httpHeaders:r,withCredentials:n}){this.url=t,this.isHttp=/^https?:/i.test(t),this.headers=vce(this.isHttp,r),this.withCredentials=n||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(t){const r=new XMLHttpRequest,n=this.currXhrId++,a=this.pendingRequests[n]={xhr:r};r.open("GET",this.url),r.withCredentials=this.withCredentials;for(const[i,s]of this.headers)r.setRequestHeader(i,s);return this.isHttp&&"begin"in t&&"end"in t?(r.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),a.expectedStatus=FM):a.expectedStatus=PM,r.responseType="arraybuffer",Ln(t.onError,"Expected `onError` callback to be provided."),r.onerror=()=>{t.onError(r.status)},r.onreadystatechange=this.onStateChange.bind(this,n),r.onprogress=this.onProgress.bind(this,n),a.onHeadersReceived=t.onHeadersReceived,a.onDone=t.onDone,a.onError=t.onError,a.onProgress=t.onProgress,r.send(null),n}onProgress(t,r){const n=this.pendingRequests[t];n&&n.onProgress?.(r)}onStateChange(t,r){const n=this.pendingRequests[t];if(!n)return;const a=n.xhr;if(a.readyState>=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),a.readyState!==4||!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],a.status===0&&this.isHttp){n.onError(a.status);return}const i=a.status||PM;if(!(i===PM&&n.expectedStatus===FM)&&i!==n.expectedStatus){n.onError(a.status);return}const o=DVe(a);if(i===FM){const l=a.getResponseHeader("Content-Range"),c=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);c?n.onDone({begin:parseInt(c[1],10),chunk:o}):(Kt('Missing or invalid "Content-Range" header.'),n.onError(0))}else o?n.onDone({begin:0,chunk:o}):n.onError(a.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const r=this.pendingRequests[t].xhr;delete this.pendingRequests[t],r.abort()}}class IVe{constructor(t){this._source=t,this._manager=new OVe(t),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const r=this._rangeRequestReaders.indexOf(t);r>=0&&this._rangeRequestReaders.splice(r,1)}getFullReader(){return Ln(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new LVe(this._manager,this._source),this._fullRequestReader}getRangeReader(t,r){const n=new PVe(this._manager,t,r);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const r of this._rangeRequestReaders.slice(0))r.cancel(t)}}class LVe{constructor(t,r){this._manager=t,this._url=r.url,this._fullRequestId=t.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=r.disableRange||!1,this._contentLength=r.length,this._rangeChunkSize=r.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,r=this._manager.getRequestXhr(t);this._manager._responseOrigin=my(r.responseURL);const n=r.getAllResponseHeaders(),a=new Headers(n?n.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(o=>{const[l,...c]=o.split(": ");return[l,c.join(": ")]}):[]),{allowRangeRequests:i,suggestedLength:s}=bce({responseHeaders:a,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i&&(this._isRangeSupported=!0),this._contentLength=s||this._contentLength,this._filename=xce(a),this._isRangeSupported&&this._manager.abortRequest(t),this._headersCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=lg(t,this._url),this._headersCapability.reject(this._storedError);for(const r of this._requests)r.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){this.onProgress?.({loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersCapability.reject(t);for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class PVe{constructor(t,r,n){this._manager=t,this._url=t.url,this._requestId=t.request({begin:r,end:n,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){const t=my(this._manager.getRequestXhr(this._requestId)?.responseURL);t!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${t}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){this.onClosed?.(this)}_onDone(t){const r=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:r,done:!1}):this._queuedChunk=r,this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError??=lg(t,this._url);for(const r of this._requests)r.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){this.isStreamingSupported||this.onProgress?.({loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const r=this._queuedChunk;return this._queuedChunk=null,{value:r,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const FVe=/^[a-z][a-z0-9\-+.]+:/i;function BVe(e){if(FVe.test(e))return new URL(e);const t=process.getBuiltinModule("url");return new URL(t.pathToFileURL(e))}class zVe{constructor(t){this.source=t,this.url=BVe(t.url),Ln(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Ln(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new jVe(this),this._fullRequestReader}getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;const n=new qVe(this,t,r);return this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const r of this._rangeRequestReaders.slice(0))r.cancel(t)}}class jVe{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const r=t.source;this._contentLength=r.length,this._loaded=0,this._filename=null,this._disableRange=r.disableRange||!1,this._rangeChunkSize=r.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!r.disableStream,this._isRangeSupported=!r.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const n=process.getBuiltinModule("fs");n.promises.lstat(this._url).then(a=>{this._contentLength=a.size,this._setReadableStream(n.createReadStream(this._url)),this._headersCapability.resolve()},a=>{a.code==="ENOENT"&&(a=lg(0,this._url.href)),this._storedError=a,this._headersCapability.reject(a)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",r=>{this._error(r)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Il("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class qVe{constructor(t,r,n){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const a=t.source;this._isStreamingSupported=!a.disableStream;const i=process.getBuiltinModule("fs");this._setReadableStream(i.createReadStream(this._url,{start:r,end:n-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",r=>{this._error(r)}),this._storedError&&this._readableStream.destroy(this._storedError)}}const Yh=Symbol("INITIAL_DATA");class Ece{#e=Object.create(null);#t(t){return this.#e[t]||={...Promise.withResolvers(),data:Yh}}get(t,r=null){if(r){const a=this.#t(t);return a.promise.then(()=>r(a.data)),null}const n=this.#e[t];if(!n||n.data===Yh)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return n.data}has(t){const r=this.#e[t];return!!r&&r.data!==Yh}delete(t){const r=this.#e[t];return!r||r.data===Yh?!1:(delete this.#e[t],!0)}resolve(t,r=null){const n=this.#t(t);n.data=r,n.resolve()}clear(){for(const t in this.#e){const{data:r}=this.#e[t];r?.bitmap?.close()}this.#e=Object.create(null)}*[Symbol.iterator](){for(const t in this.#e){const{data:r}=this.#e[t];r!==Yh&&(yield[t,r])}}}const UVe=1e5,sQ=30;let um=class es{#e=Promise.withResolvers();#t=null;#r=!1;#n=!!globalThis.FontInspector?.enabled;#i=null;#a=null;#o=0;#s=0;#d=null;#l=null;#f=0;#u=0;#h=Object.create(null);#p=[];#m=null;#c=[];#g=new WeakMap;#v=null;static#b=new Map;static#y=new Map;static#_=new WeakMap;static#w=null;static#C=new Set;constructor({textContentSource:t,container:r,viewport:n}){if(t instanceof ReadableStream)this.#m=t;else if(typeof t=="object")this.#m=new ReadableStream({start(l){l.enqueue(t),l.close()}});else throw new Error('No "textContentSource" parameter specified.');this.#t=this.#l=r,this.#u=n.scale*Gs.pixelRatio,this.#f=n.rotation,this.#a={div:null,properties:null,ctx:null};const{pageWidth:a,pageHeight:i,pageX:s,pageY:o}=n.rawDims;this.#v=[1,0,0,-1,-s,o+i],this.#s=a,this.#o=i,es.#M(),Wc(r,n),this.#e.promise.finally(()=>{es.#C.delete(this),this.#a=null,this.#h=null}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:t,isFirefox:r}=ea.platform;return dr(this,"fontFamilyMap",new Map([["sans-serif",`${t&&r?"Calibri, ":""}sans-serif`],["monospace",`${t&&r?"Lucida Console, ":""}monospace`]]))}render(){const t=()=>{this.#d.read().then(({value:r,done:n})=>{if(n){this.#e.resolve();return}this.#i??=r.lang,Object.assign(this.#h,r.styles),this.#A(r.items),t()},this.#e.reject)};return this.#d=this.#m.getReader(),es.#C.add(this),t(),this.#e.promise}update({viewport:t,onBefore:r=null}){const n=t.scale*Gs.pixelRatio,a=t.rotation;if(a!==this.#f&&(r?.(),this.#f=a,Wc(this.#l,{rotation:a})),n!==this.#u){r?.(),this.#u=n;const i={div:null,properties:null,ctx:es.#k(this.#i)};for(const s of this.#c)i.properties=this.#g.get(s),i.div=s,this.#E(i)}}cancel(){const t=new Il("TextLayer task cancelled.");this.#d?.cancel(t).catch(()=>{}),this.#d=null,this.#e.reject(t)}get textDivs(){return this.#c}get textContentItemsStr(){return this.#p}#A(t){if(this.#r)return;this.#a.ctx??=es.#k(this.#i);const r=this.#c,n=this.#p;for(const a of t){if(r.length>UVe){Kt("Ignoring additional textDivs for performance reasons."),this.#r=!0;return}if(a.str===void 0){if(a.type==="beginMarkedContentProps"||a.type==="beginMarkedContent"){const i=this.#t;this.#t=document.createElement("span"),this.#t.classList.add("markedContent"),a.id!==null&&this.#t.setAttribute("id",`${a.id}`),i.append(this.#t)}else a.type==="endMarkedContent"&&(this.#t=this.#t.parentNode);continue}n.push(a.str),this.#N(a)}}#N(t){const r=document.createElement("span"),n={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};this.#c.push(r);const a=kt.transform(this.#v,t.transform);let i=Math.atan2(a[1],a[0]);const s=this.#h[t.fontName];s.vertical&&(i+=Math.PI/2);let o=this.#n&&s.fontSubstitution||s.fontFamily;o=es.fontFamilyMap.get(o)||o;const l=Math.hypot(a[2],a[3]),c=l*es.#D(o,s,this.#i);let u,f;i===0?(u=a[4],f=a[5]-c):(u=a[4]+c*Math.sin(i),f=a[5]-c*Math.cos(i));const p="calc(var(--total-scale-factor) *",m=r.style;this.#t===this.#l?(m.left=`${(100*u/this.#s).toFixed(2)}%`,m.top=`${(100*f/this.#o).toFixed(2)}%`):(m.left=`${p}${u.toFixed(2)}px)`,m.top=`${p}${f.toFixed(2)}px)`),m.fontSize=`${p}${(es.#w*l).toFixed(2)}px)`,m.fontFamily=o,n.fontSize=l,r.setAttribute("role","presentation"),r.textContent=t.str,r.dir=t.dir,this.#n&&(r.dataset.fontName=s.fontSubstitutionLoadedName||t.fontName),i!==0&&(n.angle=i*(180/Math.PI));let b=!1;if(t.str.length>1)b=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){const v=Math.abs(t.transform[0]),y=Math.abs(t.transform[3]);v!==y&&Math.max(v,y)/Math.min(v,y)>1.5&&(b=!0)}if(b&&(n.canvasWidth=s.vertical?t.height:t.width),this.#g.set(r,n),this.#a.div=r,this.#a.properties=n,this.#E(this.#a),n.hasText&&this.#t.append(r),n.hasEOL){const v=document.createElement("br");v.setAttribute("role","presentation"),this.#t.append(v)}}#E(t){const{div:r,properties:n,ctx:a}=t,{style:i}=r;let s="";if(es.#w>1&&(s=`scale(${1/es.#w})`),n.canvasWidth!==0&&n.hasText){const{fontFamily:o}=i,{canvasWidth:l,fontSize:c}=n;es.#T(a,c*this.#u,o);const{width:u}=a.measureText(r.textContent);u>0&&(s=`scaleX(${l*this.#u/u}) ${s}`)}n.angle!==0&&(s=`rotate(${n.angle}deg) ${s}`),s.length>0&&(i.transform=s)}static cleanup(){if(!(this.#C.size>0)){this.#b.clear();for(const{canvas:t}of this.#y.values())t.remove();this.#y.clear()}}static#k(t=null){let r=this.#y.get(t||="");if(!r){const n=document.createElement("canvas");n.className="hiddenCanvasElement",n.lang=t,document.body.append(n),r=n.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#y.set(t,r),this.#_.set(r,{size:0,family:""})}return r}static#T(t,r,n){const a=this.#_.get(t);r===a.size&&n===a.family||(t.font=`${r}px ${n}`,a.size=r,a.family=n)}static#M(){if(this.#w!==null)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),this.#w=t.getBoundingClientRect().height,t.remove()}static#D(t,r,n){const a=this.#b.get(t);if(a)return a;const i=this.#k(n);i.canvas.width=i.canvas.height=sQ,this.#T(i,sQ,t);const s=i.measureText(""),o=s.fontBoundingBoxAscent,l=Math.abs(s.fontBoundingBoxDescent);i.canvas.width=i.canvas.height=0;let c=.8;return o?c=o/(o+l):(ea.platform.isFirefox&&Kt("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),r.ascent?c=r.ascent:r.descent&&(c=1+r.descent)),this.#b.set(t,c),c}};class dm{static textContent(t){const r=[],n={items:r,styles:Object.create(null)};function a(i){if(!i)return;let s=null;const o=i.name;if(o==="#text")s=i.value;else if(dm.shouldBuildText(o))i?.attributes?.textContent?s=i.attributes.textContent:i.value&&(s=i.value);else return;if(s!==null&&r.push({str:s}),!!i.children)for(const l of i.children)a(l)}return a(t),n}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}const $Ve=100;function KI(e={}){typeof e=="string"||e instanceof URL?e={url:e}:(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(e={data:e});const t=new XI,{docId:r}=t,n=e.url?JGe(e.url):null,a=e.data?eVe(e.data):null,i=e.httpHeaders||null,s=e.withCredentials===!0,o=e.password??null,l=e.range instanceof YI?e.range:null,c=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:2**16;let u=e.worker instanceof o0?e.worker:null;const f=e.verbosity,p=typeof e.docBaseUrl=="string"&&!ig(e.docBaseUrl)?e.docBaseUrl:null,m=v1(e.cMapUrl),b=e.cMapPacked!==!1,v=e.CMapReaderFactory||(Ra?oVe:KZ),y=v1(e.iccUrl),_=v1(e.standardFontDataUrl),S=e.StandardFontDataFactory||(Ra?lVe:XZ),C=v1(e.wasmUrl),T=e.WasmFactory||(Ra?cVe:YZ),A=e.stopAtErrors!==!0,k=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,N=e.isEvalSupported!==!1,L=typeof e.isOffscreenCanvasSupported=="boolean"?e.isOffscreenCanvasSupported:!Ra,I=typeof e.isImageDecoderSupported=="boolean"?e.isImageDecoderSupported:!Ra&&(ea.platform.isFirefox||!globalThis.chrome),P=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,H=typeof e.disableFontFace=="boolean"?e.disableFontFace:Ra,B=e.fontExtraProperties===!0,K=e.enableXfa===!0,j=e.ownerDocument||globalThis.document,W=e.disableRange===!0,D=e.disableStream===!0,U=e.disableAutoFetch===!0,Y=e.pdfBug===!0,z=e.CanvasFactory||(Ra?sVe:nVe),M=e.FilterFactory||(Ra?iVe:aVe),Q=e.enableHWA===!0,q=e.useWasm!==!1,F=l?l.length:e.length??NaN,V=typeof e.useSystemFonts=="boolean"?e.useSystemFonts:!Ra&&!H,Z=typeof e.useWorkerFetch=="boolean"?e.useWorkerFetch:!!(v===KZ&&S===XZ&&T===YZ&&m&&_&&C&&fp(m,document.baseURI)&&fp(_,document.baseURI)&&fp(C,document.baseURI)),ee=null;LGe(f);const te={canvasFactory:new z({ownerDocument:j,enableHWA:Q}),filterFactory:new M({docId:r,ownerDocument:j}),cMapReaderFactory:Z?null:new v({baseUrl:m,isCompressed:b}),standardFontDataFactory:Z?null:new S({baseUrl:_}),wasmFactory:Z?null:new T({baseUrl:C})};u||(u=o0.create({verbosity:f,port:_l.workerPort}),t._worker=u);const oe={docId:r,apiVersion:"5.3.93",data:a,password:o,disableAutoFetch:U,rangeChunkSize:c,length:F,docBaseUrl:p,enableXfa:K,evaluatorOptions:{maxImageSize:k,disableFontFace:H,ignoreErrors:A,isEvalSupported:N,isOffscreenCanvasSupported:L,isImageDecoderSupported:I,canvasMaxAreaInBytes:P,fontExtraProperties:B,useSystemFonts:V,useWasm:q,useWorkerFetch:Z,cMapUrl:m,iccUrl:y,standardFontDataUrl:_,wasmUrl:C}},pe={ownerDocument:j,pdfBug:Y,styleElement:ee,loadingParams:{disableAutoFetch:U,enableXfa:K}};return u.promise.then(function(){if(t.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const he=u.messageHandler.sendWithPromise("GetDocRequest",oe,a?[a.buffer]:null);let ke;if(l)ke=new CVe(l,{disableRange:W,disableStream:D});else if(!a){if(!n)throw new Error("getDocument - no `url` parameter provided.");const se=fp(n)?NVe:Ra?zVe:IVe;ke=new se({url:n,length:F,httpHeaders:i,withCredentials:s,rangeChunkSize:c,disableRange:W,disableStream:D})}return he.then(se=>{if(t.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const qe=new hp(r,se,u.port),$e=new VVe(qe,t,ke,pe,te);t._transport=$e,qe.send("Ready",null)})}).catch(t._capability.reject),t}class XI{static#e=0;_capability=Promise.withResolvers();_transport=null;_worker=null;docId=`d${XI.#e++}`;destroyed=!1;onPassword=null;onProgress=null;get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(t){throw this._worker?.port&&delete this._worker._pendingDestroy,t}this._transport=null,this._worker?.destroy(),this._worker=null}async getData(){return this._transport.getData()}}let YI=class{#e=Promise.withResolvers();#t=[];#r=[];#n=[];#i=[];constructor(t,r,n=!1,a=null){this.length=t,this.initialData=r,this.progressiveDone=n,this.contentDispositionFilename=a}addRangeListener(t){this.#i.push(t)}addProgressListener(t){this.#n.push(t)}addProgressiveReadListener(t){this.#r.push(t)}addProgressiveDoneListener(t){this.#t.push(t)}onDataRange(t,r){for(const n of this.#i)n(t,r)}onDataProgress(t,r){this.#e.promise.then(()=>{for(const n of this.#n)n(t,r)})}onDataProgressiveRead(t){this.#e.promise.then(()=>{for(const r of this.#r)r(t)})}onDataProgressiveDone(){this.#e.promise.then(()=>{for(const t of this.#t)t()})}transportReady(){this.#e.resolve()}requestDataRange(t,r){Br("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}};class HVe{constructor(t,r){this._pdfInfo=t,this._transport=r}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return dr(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:t="display"}={}){const{renderingIntent:r}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(r)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class GVe{#e=!1;constructor(t,r,n,a=!1){this._pageIndex=t,this._pageInfo=r,this._transport=n,this._stats=a?new GZ:null,this._pdfBug=a,this.commonObjs=n.commonObjs,this.objs=new Ece,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:r=this.rotate,offsetX:n=0,offsetY:a=0,dontFlip:i=!1}={}){return new ag({viewBox:this.view,userUnit:this.userUnit,scale:t,rotation:r,offsetX:n,offsetY:a,dontFlip:i})}getAnnotations({intent:t="display"}={}){const{renderingIntent:r}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,r)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return dr(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:t,viewport:r,intent:n="display",annotationMode:a=_o.ENABLE,transform:i=null,background:s=null,optionalContentConfigPromise:o=null,annotationCanvasMap:l=null,pageColors:c=null,printAnnotationStorage:u=null,isEditing:f=!1}){this._stats?.time("Overall");const p=this._transport.getRenderingIntent(n,a,u,f),{renderingIntent:m,cacheKey:b}=p;this.#e=!1,o||=this._transport.getOptionalContentConfig(m);let v=this._intentStates.get(b);v||(v=Object.create(null),this._intentStates.set(b,v)),v.streamReaderCancelTimeout&&(clearTimeout(v.streamReaderCancelTimeout),v.streamReaderCancelTimeout=null);const y=!!(m&wi.PRINT);v.displayReadyCapability||(v.displayReadyCapability=Promise.withResolvers(),v.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(p));const _=T=>{v.renderTasks.delete(S),y&&(this.#e=!0),this.#t(),T?(S.capability.reject(T),this._abortOperatorList({intentState:v,reason:T instanceof Error?T:new Error(T)})):S.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},S=new Rf({callback:_,params:{canvasContext:t,viewport:r,transform:i,background:s},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:v.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!y,pdfBug:this._pdfBug,pageColors:c});(v.renderTasks||=new Set).add(S);const C=S.task;return Promise.all([v.displayReadyCapability.promise,o]).then(([T,A])=>{if(this.destroyed){_();return}if(this._stats?.time("Rendering"),!(A.renderingIntent&m))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");S.initializeGraphics({transparency:T,optionalContentConfig:A}),S.operatorListChanged()}).catch(_),C}getOperatorList({intent:t="display",annotationMode:r=_o.ENABLE,printAnnotationStorage:n=null,isEditing:a=!1}={}){function i(){o.operatorList.lastChunk&&(o.opListReadCapability.resolve(o.operatorList),o.renderTasks.delete(l))}const s=this._transport.getRenderingIntent(t,r,n,a,!0);let o=this._intentStates.get(s.cacheKey);o||(o=Object.create(null),this._intentStates.set(s.cacheKey,o));let l;return o.opListReadCapability||(l=Object.create(null),l.operatorListChanged=i,o.opListReadCapability=Promise.withResolvers(),(o.renderTasks||=new Set).add(l),o.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(s)),o.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:r=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:r===!0},{highWaterMark:100,size(a){return a.items.length}})}getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(n=>dm.textContent(n));const r=this.streamTextContent(t);return new Promise(function(n,a){function i(){s.read().then(function({value:l,done:c}){if(c){n(o);return}o.lang??=l.lang,Object.assign(o.styles,l.styles),o.items.push(...l.items),i()},a)}const s=r.getReader(),o={items:[],styles:Object.create(null),lang:null};i()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const r of this._intentStates.values())if(this._abortOperatorList({intentState:r,reason:new Error("Page was destroyed."),force:!0}),!r.opListReadCapability)for(const n of r.renderTasks)t.push(n.completed),n.cancel();return this.objs.clear(),this.#e=!1,Promise.all(t)}cleanup(t=!1){this.#e=!0;const r=this.#t();return t&&r&&(this._stats&&=new GZ),r}#t(){if(!this.#e||this.destroyed)return!1;for(const{renderTasks:t,operatorList:r}of this._intentStates.values())if(t.size>0||!r.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#e=!1,!0}_startRenderPage(t,r){const n=this._intentStates.get(r);n&&(this._stats?.timeEnd("Page Request"),n.displayReadyCapability?.resolve(t))}_renderPageChunk(t,r){for(let n=0,a=t.length;n<a;n++)r.operatorList.fnArray.push(t.fnArray[n]),r.operatorList.argsArray.push(t.argsArray[n]);r.operatorList.lastChunk=t.lastChunk,r.operatorList.separateAnnots=t.separateAnnots;for(const n of r.renderTasks)n.operatorListChanged();t.lastChunk&&this.#t()}_pumpOperatorList({renderingIntent:t,cacheKey:r,annotationStorageSerializable:n,modifiedIds:a}){const{map:i,transfer:s}=n,l=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:t,cacheKey:r,annotationStorage:i,modifiedIds:a},s).getReader(),c=this._intentStates.get(r);c.streamReader=l;const u=()=>{l.read().then(({value:f,done:p})=>{if(p){c.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(f,c),u())},f=>{if(c.streamReader=null,!this._transport.destroyed){if(c.operatorList){c.operatorList.lastChunk=!0;for(const p of c.renderTasks)p.operatorListChanged();this.#t()}if(c.displayReadyCapability)c.displayReadyCapability.reject(f);else if(c.opListReadCapability)c.opListReadCapability.reject(f);else throw f}})};u()}_abortOperatorList({intentState:t,reason:r,force:n=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!n){if(t.renderTasks.size>0)return;if(r instanceof hy){let a=$Ve;r.extraDelay>0&&r.extraDelay<1e3&&(a+=r.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:r,force:!0})},a);return}}if(t.streamReader.cancel(new Il(r.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[a,i]of this._intentStates)if(i===t){this._intentStates.delete(a);break}this.cleanup()}}}get stats(){return this._stats}}var Nc,Rs,pl,zu,Qb,ju,qu,Pa,eb,Sce,Cce,pp,Xf,tb;const Yr=class Yr{constructor({name:t=null,port:r=null,verbosity:n=PGe()}={}){so(this,Pa);so(this,Nc,Promise.withResolvers());so(this,Rs,null);so(this,pl,null);so(this,zu,null);if(this.name=t,this.destroyed=!1,this.verbosity=n,r){if(Xr(Yr,qu).has(r))throw new Error("Cannot use more than one PDFWorker per port.");Xr(Yr,qu).set(r,this),oo(this,Pa,Sce).call(this,r)}else oo(this,Pa,Cce).call(this)}get promise(){return Xr(this,Nc).promise}get port(){return Xr(this,pl)}get messageHandler(){return Xr(this,Rs)}destroy(){this.destroyed=!0,Xr(this,zu)?.terminate(),Ka(this,zu,null),Xr(Yr,qu).delete(Xr(this,pl)),Ka(this,pl,null),Xr(this,Rs)?.destroy(),Ka(this,Rs,null)}static create(t){const r=Xr(this,qu).get(t?.port);if(r){if(r._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return r}return new Yr(t)}static get workerSrc(){if(_l.workerSrc)return _l.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return dr(this,"_setupFakeWorkerGlobal",(async()=>Xr(this,Xf,tb)?Xr(this,Xf,tb):(await import(this.workerSrc)).WorkerMessageHandler)())}};Nc=new WeakMap,Rs=new WeakMap,pl=new WeakMap,zu=new WeakMap,Qb=new WeakMap,ju=new WeakMap,qu=new WeakMap,Pa=new WeakSet,eb=function(){Xr(this,Nc).resolve(),Xr(this,Rs).send("configure",{verbosity:this.verbosity})},Sce=function(t){Ka(this,pl,t),Ka(this,Rs,new hp("main","worker",t)),Xr(this,Rs).on("ready",()=>{}),oo(this,Pa,eb).call(this)},Cce=function(){if(Xr(Yr,ju)||Xr(Yr,Xf,tb)){oo(this,Pa,pp).call(this);return}let{workerSrc:t}=Yr;try{Yr._isSameOrigin(window.location,t)||(t=Yr._createCDNWrapper(new URL(t,window.location).href));const r=new Worker(t,{type:"module"}),n=new hp("main","worker",r),a=()=>{i.abort(),n.destroy(),r.terminate(),this.destroyed?Xr(this,Nc).reject(new Error("Worker was destroyed")):oo(this,Pa,pp).call(this)},i=new AbortController;r.addEventListener("error",()=>{Xr(this,zu)||a()},{signal:i.signal}),n.on("test",o=>{if(i.abort(),this.destroyed||!o){a();return}Ka(this,Rs,n),Ka(this,pl,r),Ka(this,zu,r),oo(this,Pa,eb).call(this)}),n.on("ready",o=>{if(i.abort(),this.destroyed){a();return}try{s()}catch{oo(this,Pa,pp).call(this)}});const s=()=>{const o=new Uint8Array;n.send("test",o,[o.buffer])};s();return}catch{fy("The worker has been disabled.")}oo(this,Pa,pp).call(this)},pp=function(){Xr(Yr,ju)||(Kt("Setting up fake worker."),Ka(Yr,ju,!0)),Yr._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){Xr(this,Nc).reject(new Error("Worker was destroyed"));return}const r=new rVe;Ka(this,pl,r);const n=`fake${y9(Yr,Qb)._++}`,a=new hp(n+"_worker",n,r);t.setup(a,r),Ka(this,Rs,new hp(n,n+"_worker",r)),oo(this,Pa,eb).call(this)}).catch(t=>{Xr(this,Nc).reject(new Error(`Setting up fake worker failed: "${t.message}".`))})},Xf=new WeakSet,tb=function(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}},so(Yr,Xf),so(Yr,Qb,0),so(Yr,ju,!1),so(Yr,qu,new WeakMap),Ra&&(Ka(Yr,ju,!0),_l.workerSrc||="./pdf.worker.mjs"),Yr._isSameOrigin=(t,r)=>{const n=URL.parse(t);if(!n?.origin||n.origin==="null")return!1;const a=new URL(r,n);return n.origin===a.origin},Yr._createCDNWrapper=t=>{const r=`await import("${t}");`;return URL.createObjectURL(new Blob([r],{type:"text/javascript"}))},Yr.fromPort=t=>{if(GGe("`PDFWorker.fromPort` - please use `PDFWorker.create` instead."),!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return Yr.create(t)};let o0=Yr;class VVe{#e=new Map;#t=new Map;#r=new Map;#n=new Map;#i=null;constructor(t,r,n,a,i){this.messageHandler=t,this.loadingTask=r,this.commonObjs=new Ece,this.fontLoader=new ZGe({ownerDocument:a.ownerDocument,styleElement:a.styleElement}),this.loadingParams=a.loadingParams,this._params=a,this.canvasFactory=i.canvasFactory,this.filterFactory=i.filterFactory,this.cMapReaderFactory=i.cMapReaderFactory,this.standardFontDataFactory=i.standardFontDataFactory,this.wasmFactory=i.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}#a(t,r=null){const n=this.#e.get(t);if(n)return n;const a=this.messageHandler.sendWithPromise(t,r);return this.#e.set(t,a),a}get annotationStorage(){return dr(this,"annotationStorage",new HI)}getRenderingIntent(t,r=_o.ENABLE,n=null,a=!1,i=!1){let s=wi.DISPLAY,o=B6;switch(t){case"any":s=wi.ANY;break;case"display":break;case"print":s=wi.PRINT;break;default:Kt(`getRenderingIntent - invalid intent: ${t}`)}const l=s&wi.PRINT&&n instanceof uce?n:this.annotationStorage;switch(r){case _o.DISABLE:s+=wi.ANNOTATIONS_DISABLE;break;case _o.ENABLE:break;case _o.ENABLE_FORMS:s+=wi.ANNOTATIONS_FORMS;break;case _o.ENABLE_STORAGE:s+=wi.ANNOTATIONS_STORAGE,o=l.serializable;break;default:Kt(`getRenderingIntent - invalid annotationMode: ${r}`)}a&&(s+=wi.IS_EDITING),i&&(s+=wi.OPLIST);const{ids:c,hash:u}=l.modifiedIds,f=[s,o.hash,u];return{renderingIntent:s,cacheKey:f.join("_"),annotationStorageSerializable:o,modifiedIds:c}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#i?.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const n of this.#t.values())t.push(n._destroy());this.#t.clear(),this.#r.clear(),this.#n.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const r=this.messageHandler.sendWithPromise("Terminate",null);return t.push(r),Promise.all(t).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(),um.cleanup(),this._networkStream?.cancelAllRequests(new Il("Worker was terminated.")),this.messageHandler?.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:r}=this;t.on("GetReader",(n,a)=>{Ln(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=i=>{this._lastProgress={loaded:i.loaded,total:i.total}},a.onPull=()=>{this._fullReader.read().then(function({value:i,done:s}){if(s){a.close();return}Ln(i instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),a.enqueue(new Uint8Array(i),1,[i])}).catch(i=>{a.error(i)})},a.onCancel=i=>{this._fullReader.cancel(i),a.ready.catch(s=>{if(!this.destroyed)throw s})}}),t.on("ReaderHeadersReady",async n=>{await this._fullReader.headersReady;const{isStreamingSupported:a,isRangeSupported:i,contentLength:s}=this._fullReader;return(!a||!i)&&(this._lastProgress&&r.onProgress?.(this._lastProgress),this._fullReader.onProgress=o=>{r.onProgress?.({loaded:o.loaded,total:o.total})}),{isStreamingSupported:a,isRangeSupported:i,contentLength:s}}),t.on("GetRangeReader",(n,a)=>{Ln(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const i=this._networkStream.getRangeReader(n.begin,n.end);if(!i){a.close();return}a.onPull=()=>{i.read().then(function({value:s,done:o}){if(o){a.close();return}Ln(s instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),a.enqueue(new Uint8Array(s),1,[s])}).catch(s=>{a.error(s)})},a.onCancel=s=>{i.cancel(s),a.ready.catch(o=>{if(!this.destroyed)throw o})}}),t.on("GetDoc",({pdfInfo:n})=>{this._numPages=n.numPages,this._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,r._capability.resolve(new HVe(n,this))}),t.on("DocException",n=>{r._capability.reject(Za(n))}),t.on("PasswordRequest",n=>{this.#i=Promise.withResolvers();try{if(!r.onPassword)throw Za(n);const a=i=>{i instanceof Error?this.#i.reject(i):this.#i.resolve({password:i})};r.onPassword(a,n.code)}catch(a){this.#i.reject(a)}return this.#i.promise}),t.on("DataLoaded",n=>{r.onProgress?.({loaded:n.length,total:n.length}),this.downloadInfoCapability.resolve(n)}),t.on("StartRenderPage",n=>{if(this.destroyed)return;this.#t.get(n.pageIndex)._startRenderPage(n.transparency,n.cacheKey)}),t.on("commonobj",([n,a,i])=>{if(this.destroyed||this.commonObjs.has(n))return null;switch(a){case"Font":if("error"in i){const c=i.error;Kt(`Error during font loading: ${c}`),this.commonObjs.resolve(n,c);break}const s=this._params.pdfBug&&globalThis.FontInspector?.enabled?(c,u)=>globalThis.FontInspector.fontAdded(c,u):null,o=new QGe(i,s);this.fontLoader.bind(o).catch(()=>t.sendWithPromise("FontFallback",{id:n})).finally(()=>{!o.fontExtraProperties&&o.data&&(o.data=null),this.commonObjs.resolve(n,o)});break;case"CopyLocalImage":const{imageRef:l}=i;Ln(l,"The imageRef must be defined.");for(const c of this.#t.values())for(const[,u]of c.objs)if(u?.ref===l)return u.dataLen?(this.commonObjs.resolve(n,structuredClone(u)),u.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(n,i);break;default:throw new Error(`Got unknown common object type ${a}`)}return null}),t.on("obj",([n,a,i,s])=>{if(this.destroyed)return;const o=this.#t.get(a);if(!o.objs.has(n)){if(o._intentStates.size===0){s?.bitmap?.close();return}switch(i){case"Image":case"Pattern":o.objs.resolve(n,s);break;default:throw new Error(`Got unknown object type ${i}`)}}}),t.on("DocProgress",n=>{this.destroyed||r.onProgress?.({loaded:n.loaded,total:n.total})}),t.on("FetchBinaryData",async n=>{if(this.destroyed)throw new Error("Worker was destroyed.");const a=this[n.type];if(!a)throw new Error(`${n.type} not initialized, see the \`useWorkerFetch\` parameter.`);return a.fetch(n)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&Kt("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:r}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:this._fullReader?.filename??null},r).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const r=t-1,n=this.#r.get(r);if(n)return n;const a=this.messageHandler.sendWithPromise("GetPage",{pageIndex:r}).then(i=>{if(this.destroyed)throw new Error("Transport destroyed");i.refStr&&this.#n.set(i.refStr,t);const s=new GVe(r,i,this,this._params.pdfBug);return this.#t.set(r,s),s});return this.#r.set(r,a),a}getPageIndex(t){return z6(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,r){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:r})}getFieldObjects(){return this.#a("GetFieldObjects")}hasJSActions(){return this.#a("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#a("GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return this.#a("GetOptionalContentConfig").then(r=>new SVe(r,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",r=this.#e.get(t);if(r)return r;const n=this.messageHandler.sendWithPromise(t,null).then(a=>({info:a[0],metadata:a[1]?new wVe(a[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#e.set(t,n),n}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(t=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const r of this.#t.values())if(!r.cleanup())throw new Error(`startCleanup: Page ${r.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(!0),um.cleanup()}}cachedPageNumber(t){if(!z6(t))return null;const r=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;return this.#n.get(r)??null}}class WVe{#e=null;onContinue=null;onError=null;constructor(t){this.#e=t}get promise(){return this.#e.capability.promise}cancel(t=0){this.#e.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this.#e.operatorList;if(!t)return!1;const{annotationCanvasMap:r}=this.#e;return t.form||t.canvas&&r?.size>0}}class Rf{#e=null;static#t=new WeakSet;constructor({callback:t,params:r,objs:n,commonObjs:a,annotationCanvasMap:i,operatorList:s,pageIndex:o,canvasFactory:l,filterFactory:c,useRequestAnimationFrame:u=!1,pdfBug:f=!1,pageColors:p=null}){this.callback=t,this.params=r,this.objs=n,this.commonObjs=a,this.annotationCanvasMap=i,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=c,this._pdfBug=f,this.pageColors=p,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=u===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new WVe(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=r.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:r}){if(this.cancelled)return;if(this._canvas){if(Rf.#t.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Rf.#t.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:n,viewport:a,transform:i,background:s}=this.params;this.gfx=new Uf(n,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:r},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:i,viewport:a,transparency:t,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(t=null,r=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null),Rf.#t.delete(this._canvas),t||=new hy(`Rendering cancelled, page ${this._pageIndex+1}`,r),this.callback(t),this.task.onError?.(t)}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.stepper?.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?this.#e=window.requestAnimationFrame(()=>{this.#e=null,this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Rf.#t.delete(this._canvas),this.callback())))}}const gy="5.3.93",Tce="cbeef3233";function oQ(e){return Math.floor(Math.max(0,Math.min(1,e))*255).toString(16).padStart(2,"0")}function Zh(e){return Math.max(0,Math.min(255,255*e))}class lQ{static CMYK_G([t,r,n,a]){return["G",1-Math.min(1,.3*t+.59*n+.11*r+a)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=Zh(t),[t,t,t]}static G_HTML([t]){const r=oQ(t);return`#${r}${r}${r}`}static RGB_G([t,r,n]){return["G",.3*t+.59*r+.11*n]}static RGB_rgb(t){return t.map(Zh)}static RGB_HTML(t){return`#${t.map(oQ).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,r,n,a]){return["RGB",1-Math.min(1,t+a),1-Math.min(1,n+a),1-Math.min(1,r+a)]}static CMYK_rgb([t,r,n,a]){return[Zh(1-Math.min(1,t+a)),Zh(1-Math.min(1,n+a)),Zh(1-Math.min(1,r+a))]}static CMYK_HTML(t){const r=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(r)}static RGB_CMYK([t,r,n]){const a=1-t,i=1-r,s=1-n,o=Math.min(a,i,s);return["CMYK",a,i,s,o]}}class KVe{create(t,r,n=!1){if(t<=0||r<=0)throw new Error("Invalid SVG dimensions");const a=this._createSVG("svg:svg");return a.setAttribute("version","1.1"),n||(a.setAttribute("width",`${t}px`),a.setAttribute("height",`${r}px`)),a.setAttribute("preserveAspectRatio","none"),a.setAttribute("viewBox",`0 0 ${t} ${r}`),a}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){Br("Abstract method `_createSVG` called.")}}class fm extends KVe{_createSVG(t){return document.createElementNS(ul,t)}}class ZI{static setupStorage(t,r,n,a,i){const s=a.getValue(r,{value:null});switch(n.name){case"textarea":if(s.value!==null&&(t.textContent=s.value),i==="print")break;t.addEventListener("input",o=>{a.setValue(r,{value:o.target.value})});break;case"input":if(n.attributes.type==="radio"||n.attributes.type==="checkbox"){if(s.value===n.attributes.xfaOn?t.setAttribute("checked",!0):s.value===n.attributes.xfaOff&&t.removeAttribute("checked"),i==="print")break;t.addEventListener("change",o=>{a.setValue(r,{value:o.target.checked?o.target.getAttribute("xfaOn"):o.target.getAttribute("xfaOff")})})}else{if(s.value!==null&&t.setAttribute("value",s.value),i==="print")break;t.addEventListener("input",o=>{a.setValue(r,{value:o.target.value})})}break;case"select":if(s.value!==null){t.setAttribute("value",s.value);for(const o of n.children)o.attributes.value===s.value?o.attributes.selected=!0:o.attributes.hasOwnProperty("selected")&&delete o.attributes.selected}t.addEventListener("input",o=>{const l=o.target.options,c=l.selectedIndex===-1?"":l[l.selectedIndex].value;a.setValue(r,{value:c})});break}}static setAttributes({html:t,element:r,storage:n=null,intent:a,linkService:i}){const{attributes:s}=r,o=t instanceof HTMLAnchorElement;s.type==="radio"&&(s.name=`${s.name}-${a}`);for(const[l,c]of Object.entries(s))if(c!=null)switch(l){case"class":c.length&&t.setAttribute(l,c.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",c);break;case"style":Object.assign(t.style,c);break;case"textContent":t.textContent=c;break;default:(!o||l!=="href"&&l!=="newWindow")&&t.setAttribute(l,c)}o&&i.addLinkAttributes(t,s.href,s.newWindow),n&&s.dataId&&this.setupStorage(t,s.dataId,r,n)}static render(t){const r=t.annotationStorage,n=t.linkService,a=t.xfaHtml,i=t.intent||"display",s=document.createElement(a.name);a.attributes&&this.setAttributes({html:s,element:a,intent:i,linkService:n});const o=i!=="richText",l=t.div;if(l.append(s),t.viewport){const f=`matrix(${t.viewport.transform.join(",")})`;l.style.transform=f}o&&l.setAttribute("class","xfaLayer xfaFont");const c=[];if(a.children.length===0){if(a.value){const f=document.createTextNode(a.value);s.append(f),o&&dm.shouldBuildText(a.name)&&c.push(f)}return{textDivs:c}}const u=[[a,-1,s]];for(;u.length>0;){const[f,p,m]=u.at(-1);if(p+1===f.children.length){u.pop();continue}const b=f.children[++u.at(-1)[1]];if(b===null)continue;const{name:v}=b;if(v==="#text"){const _=document.createTextNode(b.value);c.push(_),m.append(_);continue}const y=b?.attributes?.xmlns?document.createElementNS(b.attributes.xmlns,v):document.createElement(v);if(m.append(y),b.attributes&&this.setAttributes({html:y,element:b,storage:r,intent:i,linkService:n}),b.children?.length>0)u.push([b,-1,y]);else if(b.value){const _=document.createTextNode(b.value);o&&dm.shouldBuildText(v)&&c.push(_),y.append(_)}}for(const f of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))f.setAttribute("readOnly",!0);return{textDivs:c}}static update(t){const r=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=r,t.div.hidden=!1}}const XVe=9,td=new WeakSet;class cQ{static create(t){switch(t.data.annotationType){case _n.LINK:return new Ace(t);case _n.TEXT:return new YVe(t);case _n.WIDGET:switch(t.data.fieldType){case"Tx":return new ZVe(t);case"Btn":return t.data.radioButton?new kce(t):t.data.checkBox?new JVe(t):new eWe(t);case"Ch":return new tWe(t);case"Sig":return new QVe(t)}return new xd(t);case _n.POPUP:return new q6(t);case _n.FREETEXT:return new Nce(t);case _n.LINE:return new nWe(t);case _n.SQUARE:return new aWe(t);case _n.CIRCLE:return new iWe(t);case _n.POLYLINE:return new Rce(t);case _n.CARET:return new oWe(t);case _n.INK:return new QI(t);case _n.POLYGON:return new sWe(t);case _n.HIGHLIGHT:return new Mce(t);case _n.UNDERLINE:return new lWe(t);case _n.SQUIGGLY:return new cWe(t);case _n.STRIKEOUT:return new uWe(t);case _n.STAMP:return new Dce(t);case _n.FILEATTACHMENT:return new dWe(t);default:return new Tn(t)}}}class Tn{#e=null;#t=!1;#r=null;constructor(t,{isRenderable:r=!1,ignoreBorder:n=!1,createQuadrilaterals:a=!1}={}){this.isRenderable=r,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,r&&(this.container=this._createContainer(n)),a&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:t,richText:r}){return!!(t?.str||r?.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return Tn._hasPopupData(this.data)}updateEdited(t){if(!this.container)return;this.#e||={rect:this.data.rect.slice(0)};const{rect:r}=t;r&&this.#n(r),this.#r?.popup.updateEdited(t)}resetEdited(){this.#e&&(this.#n(this.#e.rect),this.#r?.popup.resetEdited(),this.#e=null)}#n(t){const{container:{style:r},data:{rect:n,rotation:a},parent:{viewport:{rawDims:{pageWidth:i,pageHeight:s,pageX:o,pageY:l}}}}=this;n?.splice(0,4,...t),r.left=`${100*(t[0]-o)/i}%`,r.top=`${100*(s-t[3]+l)/s}%`,a===0?(r.width=`${100*(t[2]-t[0])/i}%`,r.height=`${100*(t[3]-t[1])/s}%`):this.setRotation(a)}_createContainer(t){const{data:r,parent:{page:n,viewport:a}}=this,i=document.createElement("section");i.setAttribute("data-annotation-id",r.id),this instanceof xd||(i.tabIndex=0);const{style:s}=i;if(s.zIndex=this.parent.zIndex++,r.alternativeText&&(i.title=r.alternativeText),r.noRotate&&i.classList.add("norotate"),!r.rect||this instanceof q6){const{rotation:v}=r;return!r.hasOwnCanvas&&v!==0&&this.setRotation(v,i),i}const{width:o,height:l}=this;if(!t&&r.borderStyle.width>0){s.borderWidth=`${r.borderStyle.width}px`;const v=r.borderStyle.horizontalCornerRadius,y=r.borderStyle.verticalCornerRadius;if(v>0||y>0){const S=`calc(${v}px * var(--total-scale-factor)) / calc(${y}px * var(--total-scale-factor))`;s.borderRadius=S}else if(this instanceof kce){const S=`calc(${o}px * var(--total-scale-factor)) / calc(${l}px * var(--total-scale-factor))`;s.borderRadius=S}switch(r.borderStyle.style){case Sf.SOLID:s.borderStyle="solid";break;case Sf.DASHED:s.borderStyle="dashed";break;case Sf.BEVELED:Kt("Unimplemented border style: beveled");break;case Sf.INSET:Kt("Unimplemented border style: inset");break;case Sf.UNDERLINE:s.borderBottomStyle="solid";break}const _=r.borderColor||null;_?(this.#t=!0,s.borderColor=kt.makeHexColor(_[0]|0,_[1]|0,_[2]|0)):s.borderWidth=0}const c=kt.normalizeRect([r.rect[0],n.view[3]-r.rect[1]+n.view[1],r.rect[2],n.view[3]-r.rect[3]+n.view[1]]),{pageWidth:u,pageHeight:f,pageX:p,pageY:m}=a.rawDims;s.left=`${100*(c[0]-p)/u}%`,s.top=`${100*(c[1]-m)/f}%`;const{rotation:b}=r;return r.hasOwnCanvas||b===0?(s.width=`${100*o/u}%`,s.height=`${100*l/f}%`):this.setRotation(b,i),i}setRotation(t,r=this.container){if(!this.data.rect)return;const{pageWidth:n,pageHeight:a}=this.parent.viewport.rawDims;let{width:i,height:s}=this;t%180!==0&&([i,s]=[s,i]),r.style.width=`${100*i/n}%`,r.style.height=`${100*s/a}%`,r.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(r,n,a)=>{const i=a.detail[r],s=i[0],o=i.slice(1);a.target.style[n]=lQ[`${s}_HTML`](o),this.annotationStorage.setValue(this.data.id,{[n]:lQ[`${s}_rgb`](o)})};return dr(this,"_commonActions",{display:r=>{const{display:n}=r.detail,a=n%2===1;this.container.style.visibility=a?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:a,noPrint:n===1||n===2})},print:r=>{this.annotationStorage.setValue(this.data.id,{noPrint:!r.detail.print})},hidden:r=>{const{hidden:n}=r.detail;this.container.style.visibility=n?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:n,noView:n})},focus:r=>{setTimeout(()=>r.target.focus({preventScroll:!1}),0)},userName:r=>{r.target.title=r.detail.userName},readonly:r=>{r.target.disabled=r.detail.readonly},required:r=>{this._setRequired(r.target,r.detail.required)},bgColor:r=>{t("bgColor","backgroundColor",r)},fillColor:r=>{t("fillColor","backgroundColor",r)},fgColor:r=>{t("fgColor","color",r)},textColor:r=>{t("textColor","color",r)},borderColor:r=>{t("borderColor","borderColor",r)},strokeColor:r=>{t("strokeColor","borderColor",r)},rotation:r=>{const n=r.detail.rotation;this.setRotation(n),this.annotationStorage.setValue(this.data.id,{rotation:n})}})}_dispatchEventFromSandbox(t,r){const n=this._commonActions;for(const a of Object.keys(r.detail))(t[a]||n[a])?.(r)}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const r=this.annotationStorage.getRawValue(this.data.id);if(!r)return;const n=this._commonActions;for(const[a,i]of Object.entries(r)){const s=n[a];if(s){const o={detail:{[a]:i},target:t};s(o),delete r[a]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[r,n,a,i]=this.data.rect.map(v=>Math.fround(v));if(t.length===8){const[v,y,_,S]=t.subarray(2,6);if(a===v&&i===y&&r===_&&n===S)return}const{style:s}=this.container;let o;if(this.#t){const{borderColor:v,borderWidth:y}=s;s.borderWidth=0,o=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${v}" stroke-width="${y}">`],this.container.classList.add("hasBorder")}const l=a-r,c=i-n,{svgFactory:u}=this,f=u.createElement("svg");f.classList.add("quadrilateralsContainer"),f.setAttribute("width",0),f.setAttribute("height",0),f.role="none";const p=u.createElement("defs");f.append(p);const m=u.createElement("clipPath"),b=`clippath_${this.data.id}`;m.setAttribute("id",b),m.setAttribute("clipPathUnits","objectBoundingBox"),p.append(m);for(let v=2,y=t.length;v<y;v+=8){const _=t[v],S=t[v+1],C=t[v+2],T=t[v+3],A=u.createElement("rect"),k=(C-r)/l,N=(i-S)/c,L=(_-C)/l,I=(S-T)/c;A.setAttribute("x",k),A.setAttribute("y",N),A.setAttribute("width",L),A.setAttribute("height",I),m.append(A),o?.push(`<rect vector-effect="non-scaling-stroke" x="${k}" y="${N}" width="${L}" height="${I}"/>`)}this.#t&&(o.push("</g></svg>')"),s.backgroundImage=o.join("")),this.container.append(f),this.container.style.clipPath=`url(#${b})`}_createPopup(){const{data:t}=this,r=this.#r=new q6({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation,noRotate:!0},parent:this.parent,elements:[this]});this.parent.div.append(r.render())}render(){Br("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,r=null){const n=[];if(this._fieldObjects){const a=this._fieldObjects[t];if(a)for(const{page:i,id:s,exportValues:o}of a){if(i===-1||s===r)continue;const l=typeof o=="string"?o:null,c=document.querySelector(`[data-element-id="${s}"]`);if(c&&!td.has(c)){Kt(`_getElementsByName - element not allowed: ${s}`);continue}n.push({id:s,exportValue:l,domElement:c})}return n}for(const a of document.getElementsByName(t)){const{exportValue:i}=a,s=a.getAttribute("data-element-id");s!==r&&td.has(a)&&n.push({id:s,exportValue:i,domElement:a})}return n}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const r of t)r.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:r}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:t,editId:r,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class Ace extends Tn{constructor(t,r=null){super(t,{isRenderable:!0,ignoreBorder:!!r?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:r}=this,n=document.createElement("a");n.setAttribute("data-element-id",t.id);let a=!1;return t.url?(r.addLinkAttributes(n,t.url,t.newWindow),a=!0):t.action?(this._bindNamedAction(n,t.action),a=!0):t.attachment?(this.#t(n,t.attachment,t.attachmentDest),a=!0):t.setOCGState?(this.#r(n,t.setOCGState),a=!0):t.dest?(this._bindLink(n,t.dest),a=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,t),a=!0),t.resetForm?(this._bindResetFormAction(n,t.resetForm),a=!0):this.isTooltipOnly&&!a&&(this._bindLink(n,""),a=!0)),this.container.classList.add("linkAnnotation"),a&&this.container.append(n),this.container}#e(){this.container.setAttribute("data-internal-link","")}_bindLink(t,r){t.href=this.linkService.getDestinationHash(r),t.onclick=()=>(r&&this.linkService.goToDestination(r),!1),(r||r==="")&&this.#e()}_bindNamedAction(t,r){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(r),!1),this.#e()}#t(t,r,n=null){t.href=this.linkService.getAnchorUrl(""),r.description&&(t.title=r.description),t.onclick=()=>(this.downloadManager?.openOrDownloadData(r.content,r.filename,n),!1),this.#e()}#r(t,r){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(r),!1),this.#e()}_bindJSAction(t,r){t.href=this.linkService.getAnchorUrl("");const n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const a of Object.keys(r.actions)){const i=n.get(a);i&&(t[i]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r.id,name:a}}),!1))}t.onclick||(t.onclick=()=>!1),this.#e()}_bindResetFormAction(t,r){const n=t.onclick;if(n||(t.href=this.linkService.getAnchorUrl("")),this.#e(),!this._fieldObjects){Kt('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),n||(t.onclick=()=>!1);return}t.onclick=()=>{n?.();const{fields:a,refs:i,include:s}=r,o=[];if(a.length!==0||i.length!==0){const u=new Set(i);for(const f of a){const p=this._fieldObjects[f]||[];for(const{id:m}of p)u.add(m)}for(const f of Object.values(this._fieldObjects))for(const p of f)u.has(p.id)===s&&o.push(p)}else for(const u of Object.values(this._fieldObjects))o.push(...u);const l=this.annotationStorage,c=[];for(const u of o){const{id:f}=u;switch(c.push(f),u.type){case"text":{const m=u.defaultValue||"";l.setValue(f,{value:m});break}case"checkbox":case"radiobutton":{const m=u.defaultValue===u.exportValues;l.setValue(f,{value:m});break}case"combobox":case"listbox":{const m=u.defaultValue||"";l.setValue(f,{value:m});break}default:continue}const p=document.querySelector(`[data-element-id="${f}"]`);if(p){if(!td.has(p)){Kt(`_bindResetFormAction - element not allowed: ${f}`);continue}}else continue;p.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:c,name:"ResetForm"}}),!1}}}class YVe extends Tn{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class xd extends Tn{render(){return this.container}showElementAndHideCanvas(t){this.data.hasOwnCanvas&&(t.previousSibling?.nodeName==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return ea.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,r,n,a,i){n.includes("mouse")?t.addEventListener(n,s=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:a,value:i(s),shift:s.shiftKey,modifier:this._getKeyModifier(s)}})}):t.addEventListener(n,s=>{if(n==="blur"){if(!r.focused||!s.relatedTarget)return;r.focused=!1}else if(n==="focus"){if(r.focused)return;r.focused=!0}i&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:a,value:i(s)}})})}_setEventListeners(t,r,n,a){for(const[i,s]of n)(s==="Action"||this.data.actions?.[s])&&((s==="Focus"||s==="Blur")&&(r||={focused:!1}),this._setEventListener(t,r,i,s,a),s==="Focus"&&!this.data.actions?.Blur?this._setEventListener(t,r,"blur","Blur",null):s==="Blur"&&!this.data.actions?.Focus&&this._setEventListener(t,r,"focus","Focus",null))}_setBackgroundColor(t){const r=this.data.backgroundColor||null;t.style.backgroundColor=r===null?"transparent":kt.makeHexColor(r[0],r[1],r[2])}_setTextStyle(t){const r=["left","center","right"],{fontColor:n}=this.data.defaultAppearanceData,a=this.data.defaultAppearanceData.fontSize||XVe,i=t.style;let s;const o=2,l=c=>Math.round(10*c)/10;if(this.data.multiLine){const c=Math.abs(this.data.rect[3]-this.data.rect[1]-o),u=Math.round(c/(RM*a))||1,f=c/u;s=Math.min(a,l(f/RM))}else{const c=Math.abs(this.data.rect[3]-this.data.rect[1]-o);s=Math.min(a,l(c/RM))}i.fontSize=`calc(${s}px * var(--total-scale-factor))`,i.color=kt.makeHexColor(n[0],n[1],n[2]),this.data.textAlignment!==null&&(i.textAlign=r[this.data.textAlignment])}_setRequired(t,r){r?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",r)}}class ZVe extends xd{constructor(t){const r=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:r})}setPropertyOnSiblings(t,r,n,a){const i=this.annotationStorage;for(const s of this._getElementsByName(t.name,t.id))s.domElement&&(s.domElement[r]=n),i.setValue(s.id,{[a]:n})}render(){const t=this.annotationStorage,r=this.data.id;this.container.classList.add("textWidgetAnnotation");let n=null;if(this.renderForms){const a=t.getValue(r,{value:this.data.fieldValue});let i=a.value||"";const s=t.getValue(r,{charLimit:this.data.maxLen}).charLimit;s&&i.length>s&&(i=i.slice(0,s));let o=a.formattedValue||this.data.textContent?.join(`
`)||null;o&&this.data.comb&&(o=o.replaceAll(/\s+/g,""));const l={userValue:i,formattedValue:o,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(n=document.createElement("textarea"),n.textContent=o??i,this.data.doNotScroll&&(n.style.overflowY="hidden")):(n=document.createElement("input"),n.type=this.data.password?"password":"text",n.setAttribute("value",o??i),this.data.doNotScroll&&(n.style.overflowX="hidden")),this.data.hasOwnCanvas&&(n.hidden=!0),td.add(n),n.setAttribute("data-element-id",r),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=0;const c=this.data.dateFormat||this.data.timeFormat;c&&(n.title=c),this._setRequired(n,this.data.required),s&&(n.maxLength=s),n.addEventListener("input",f=>{t.setValue(r,{value:f.target.value}),this.setPropertyOnSiblings(n,"value",f.target.value,"value"),l.formattedValue=null}),n.addEventListener("resetform",f=>{const p=this.data.defaultFieldValue??"";n.value=l.userValue=p,l.formattedValue=null});let u=f=>{const{formattedValue:p}=l;p!=null&&(f.target.value=p),f.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){n.addEventListener("focus",p=>{if(l.focused)return;const{target:m}=p;l.userValue&&(m.value=l.userValue),l.lastCommittedValue=m.value,l.commitKey=1,this.data.actions?.Focus||(l.focused=!0)}),n.addEventListener("updatefromsandbox",p=>{this.showElementAndHideCanvas(p.target);const m={value(b){l.userValue=b.detail.value??"",t.setValue(r,{value:l.userValue.toString()}),b.target.value=l.userValue},formattedValue(b){const{formattedValue:v}=b.detail;l.formattedValue=v,v!=null&&b.target!==document.activeElement&&(b.target.value=v),t.setValue(r,{formattedValue:v})},selRange(b){b.target.setSelectionRange(...b.detail.selRange)},charLimit:b=>{const{charLimit:v}=b.detail,{target:y}=b;if(v===0){y.removeAttribute("maxLength");return}y.setAttribute("maxLength",v);let _=l.userValue;!_||_.length<=v||(_=_.slice(0,v),y.value=l.userValue=_,t.setValue(r,{value:_}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r,name:"Keystroke",value:_,willCommit:!0,commitKey:1,selStart:y.selectionStart,selEnd:y.selectionEnd}}))}};this._dispatchEventFromSandbox(m,p)}),n.addEventListener("keydown",p=>{l.commitKey=1;let m=-1;if(p.key==="Escape"?m=0:p.key==="Enter"&&!this.data.multiLine?m=2:p.key==="Tab"&&(l.commitKey=3),m===-1)return;const{value:b}=p.target;l.lastCommittedValue!==b&&(l.lastCommittedValue=b,l.userValue=b,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r,name:"Keystroke",value:b,willCommit:!0,commitKey:m,selStart:p.target.selectionStart,selEnd:p.target.selectionEnd}}))});const f=u;u=null,n.addEventListener("blur",p=>{if(!l.focused||!p.relatedTarget)return;this.data.actions?.Blur||(l.focused=!1);const{value:m}=p.target;l.userValue=m,l.lastCommittedValue!==m&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r,name:"Keystroke",value:m,willCommit:!0,commitKey:l.commitKey,selStart:p.target.selectionStart,selEnd:p.target.selectionEnd}}),f(p)}),this.data.actions?.Keystroke&&n.addEventListener("beforeinput",p=>{l.lastCommittedValue=null;const{data:m,target:b}=p,{value:v,selectionStart:y,selectionEnd:_}=b;let S=y,C=_;switch(p.inputType){case"deleteWordBackward":{const T=v.substring(0,y).match(/\w*[^\w]*$/);T&&(S-=T[0].length);break}case"deleteWordForward":{const T=v.substring(y).match(/^[^\w]*\w*/);T&&(C+=T[0].length);break}case"deleteContentBackward":y===_&&(S-=1);break;case"deleteContentForward":y===_&&(C+=1);break}p.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r,name:"Keystroke",value:v,change:m||"",willCommit:!1,selStart:S,selEnd:C}})}),this._setEventListeners(n,l,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],p=>p.target.value)}if(u&&n.addEventListener("blur",u),this.data.comb){const p=(this.data.rect[2]-this.data.rect[0])/s;n.classList.add("comb"),n.style.letterSpacing=`calc(${p}px * var(--total-scale-factor) - 1ch)`}}else n=document.createElement("div"),n.textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell",this.data.hasOwnCanvas&&(n.hidden=!0);return this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class QVe extends xd{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class JVe extends xd{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,r=this.data,n=r.id;let a=t.getValue(n,{value:r.exportValue===r.fieldValue}).value;typeof a=="string"&&(a=a!=="Off",t.setValue(n,{value:a})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const i=document.createElement("input");return td.add(i),i.setAttribute("data-element-id",n),i.disabled=r.readOnly,this._setRequired(i,this.data.required),i.type="checkbox",i.name=r.fieldName,a&&i.setAttribute("checked",!0),i.setAttribute("exportValue",r.exportValue),i.tabIndex=0,i.addEventListener("change",s=>{const{name:o,checked:l}=s.target;for(const c of this._getElementsByName(o,n)){const u=l&&c.exportValue===r.exportValue;c.domElement&&(c.domElement.checked=u),t.setValue(c.id,{value:u})}t.setValue(n,{value:l})}),i.addEventListener("resetform",s=>{const o=r.defaultFieldValue||"Off";s.target.checked=o===r.exportValue}),this.enableScripting&&this.hasJSActions&&(i.addEventListener("updatefromsandbox",s=>{const o={value(l){l.target.checked=l.detail.value!=="Off",t.setValue(n,{value:l.target.checked})}};this._dispatchEventFromSandbox(o,s)}),this._setEventListeners(i,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],s=>s.target.checked)),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class kce extends xd{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,r=this.data,n=r.id;let a=t.getValue(n,{value:r.fieldValue===r.buttonValue}).value;if(typeof a=="string"&&(a=a!==r.buttonValue,t.setValue(n,{value:a})),a)for(const s of this._getElementsByName(r.fieldName,n))t.setValue(s.id,{value:!1});const i=document.createElement("input");if(td.add(i),i.setAttribute("data-element-id",n),i.disabled=r.readOnly,this._setRequired(i,this.data.required),i.type="radio",i.name=r.fieldName,a&&i.setAttribute("checked",!0),i.tabIndex=0,i.addEventListener("change",s=>{const{name:o,checked:l}=s.target;for(const c of this._getElementsByName(o,n))t.setValue(c.id,{value:!1});t.setValue(n,{value:l})}),i.addEventListener("resetform",s=>{const o=r.defaultFieldValue;s.target.checked=o!=null&&o===r.buttonValue}),this.enableScripting&&this.hasJSActions){const s=r.buttonValue;i.addEventListener("updatefromsandbox",o=>{const l={value:c=>{const u=s===c.detail.value;for(const f of this._getElementsByName(c.target.name)){const p=u&&f.id===n;f.domElement&&(f.domElement.checked=p),t.setValue(f.id,{value:p})}}};this._dispatchEventFromSandbox(l,o)}),this._setEventListeners(i,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],o=>o.target.checked)}return this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class eWe extends Ace{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const r=t.lastChild;return this.enableScripting&&this.hasJSActions&&r&&(this._setDefaultPropertiesFromJS(r),r.addEventListener("updatefromsandbox",n=>{this._dispatchEventFromSandbox({},n)})),t}}class tWe extends xd{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,r=this.data.id,n=t.getValue(r,{value:this.data.fieldValue}),a=document.createElement("select");td.add(a),a.setAttribute("data-element-id",r),a.disabled=this.data.readOnly,this._setRequired(a,this.data.required),a.name=this.data.fieldName,a.tabIndex=0;let i=this.data.combo&&this.data.options.length>0;this.data.combo||(a.size=this.data.options.length,this.data.multiSelect&&(a.multiple=!0)),a.addEventListener("resetform",u=>{const f=this.data.defaultFieldValue;for(const p of a.options)p.selected=p.value===f});for(const u of this.data.options){const f=document.createElement("option");f.textContent=u.displayValue,f.value=u.exportValue,n.value.includes(u.exportValue)&&(f.setAttribute("selected",!0),i=!1),a.append(f)}let s=null;if(i){const u=document.createElement("option");u.value=" ",u.setAttribute("hidden",!0),u.setAttribute("selected",!0),a.prepend(u),s=()=>{u.remove(),a.removeEventListener("input",s),s=null},a.addEventListener("input",s)}const o=u=>{const f=u?"value":"textContent",{options:p,multiple:m}=a;return m?Array.prototype.filter.call(p,b=>b.selected).map(b=>b[f]):p.selectedIndex===-1?null:p[p.selectedIndex][f]};let l=o(!1);const c=u=>{const f=u.target.options;return Array.prototype.map.call(f,p=>({displayValue:p.textContent,exportValue:p.value}))};return this.enableScripting&&this.hasJSActions?(a.addEventListener("updatefromsandbox",u=>{const f={value(p){s?.();const m=p.detail.value,b=new Set(Array.isArray(m)?m:[m]);for(const v of a.options)v.selected=b.has(v.value);t.setValue(r,{value:o(!0)}),l=o(!1)},multipleSelection(p){a.multiple=!0},remove(p){const m=a.options,b=p.detail.remove;m[b].selected=!1,a.remove(b),m.length>0&&Array.prototype.findIndex.call(m,y=>y.selected)===-1&&(m[0].selected=!0),t.setValue(r,{value:o(!0),items:c(p)}),l=o(!1)},clear(p){for(;a.length!==0;)a.remove(0);t.setValue(r,{value:null,items:[]}),l=o(!1)},insert(p){const{index:m,displayValue:b,exportValue:v}=p.detail.insert,y=a.children[m],_=document.createElement("option");_.textContent=b,_.value=v,y?y.before(_):a.append(_),t.setValue(r,{value:o(!0),items:c(p)}),l=o(!1)},items(p){const{items:m}=p.detail;for(;a.length!==0;)a.remove(0);for(const b of m){const{displayValue:v,exportValue:y}=b,_=document.createElement("option");_.textContent=v,_.value=y,a.append(_)}a.options.length>0&&(a.options[0].selected=!0),t.setValue(r,{value:o(!0),items:c(p)}),l=o(!1)},indices(p){const m=new Set(p.detail.indices);for(const b of p.target.options)b.selected=m.has(b.index);t.setValue(r,{value:o(!0)}),l=o(!1)},editable(p){p.target.disabled=!p.detail.editable}};this._dispatchEventFromSandbox(f,u)}),a.addEventListener("input",u=>{const f=o(!0),p=o(!1);t.setValue(r,{value:f}),u.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:r,name:"Keystroke",value:l,change:p,changeEx:f,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(a,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],u=>u.target.value)):a.addEventListener("input",function(u){t.setValue(r,{value:o(!0)})}),this.data.combo&&this._setTextStyle(a),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class q6 extends Tn{constructor(t){const{data:r,elements:n}=t;super(t,{isRenderable:Tn._hasPopupData(r)}),this.elements=n,this.popup=null}render(){const{container:t}=this;t.classList.add("popupAnnotation"),t.role="comment";const r=this.popup=new rWe({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),n=[];for(const a of this.elements)a.popup=r,a.container.ariaHasPopup="dialog",n.push(a.data.id),a.addHighlightArea();return this.container.setAttribute("aria-controls",n.map(a=>`${zI}${a}`).join(",")),this.container}}class rWe{#e=this.#A.bind(this);#t=this.#T.bind(this);#r=this.#k.bind(this);#n=this.#E.bind(this);#i=null;#a=null;#o=null;#s=null;#d=null;#l=null;#f=null;#u=!1;#h=null;#p=null;#m=null;#c=null;#g=null;#v=null;#b=!1;constructor({container:t,color:r,elements:n,titleObj:a,modificationDate:i,contentsObj:s,richText:o,parent:l,rect:c,parentRect:u,open:f}){this.#a=t,this.#g=a,this.#o=s,this.#c=o,this.#l=l,this.#i=r,this.#m=c,this.#f=u,this.#d=n,this.#s=jI.toDateObject(i),this.trigger=n.flatMap(p=>p.getElementsToTriggerPopup());for(const p of this.trigger)p.addEventListener("click",this.#n),p.addEventListener("mouseenter",this.#r),p.addEventListener("mouseleave",this.#t),p.classList.add("popupTriggerArea");for(const p of n)p.container?.addEventListener("keydown",this.#e);this.#a.hidden=!0,f&&this.#E()}render(){if(this.#h)return;const t=this.#h=document.createElement("div");if(t.className="popup",this.#i){const i=t.style.outlineColor=kt.makeHexColor(...this.#i);t.style.backgroundColor=`color-mix(in srgb, ${i} 30%, white)`}const r=document.createElement("span");r.className="header";const n=document.createElement("h1");if(r.append(n),{dir:n.dir,str:n.textContent}=this.#g,t.append(r),this.#s){const i=document.createElement("time");i.classList.add("popupDate"),i.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),i.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#s.valueOf()})),i.dateTime=this.#s.toISOString(),r.append(i)}const a=this.#y;if(a)ZI.render({xfaHtml:a,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{const i=this._formatContents(this.#o);t.append(i)}this.#a.append(t)}get#y(){const t=this.#c,r=this.#o;return t?.str&&(!r?.str||r.str===t.str)&&this.#c.html||null}get#_(){return this.#y?.attributes?.style?.fontSize||0}get#w(){return this.#y?.attributes?.style?.color||null}#C(t){const r=[],n={str:t,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:r}]}},a={style:{color:this.#w,fontSize:this.#_?`calc(${this.#_}px * var(--total-scale-factor))`:""}};for(const i of t.split(`
`))r.push({name:"span",value:i,attributes:a});return n}_formatContents({str:t,dir:r}){const n=document.createElement("p");n.classList.add("popupContent"),n.dir=r;const a=t.split(/(?:\r\n?|\n)/);for(let i=0,s=a.length;i<s;++i){const o=a[i];n.append(document.createTextNode(o)),i<s-1&&n.append(document.createElement("br"))}return n}#A(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||(t.key==="Enter"||t.key==="Escape"&&this.#u)&&this.#E()}updateEdited({rect:t,popupContent:r}){this.#v||={contentsObj:this.#o,richText:this.#c},t&&(this.#p=null),r&&(this.#c=this.#C(r),this.#o=null),this.#h?.remove(),this.#h=null}resetEdited(){this.#v&&({contentsObj:this.#o,richText:this.#c}=this.#v,this.#v=null,this.#h?.remove(),this.#h=null,this.#p=null)}#N(){if(this.#p!==null)return;const{page:{view:t},viewport:{rawDims:{pageWidth:r,pageHeight:n,pageX:a,pageY:i}}}=this.#l;let s=!!this.#f,o=s?this.#f:this.#m;for(const b of this.#d)if(!o||kt.intersect(b.data.rect,o)!==null){o=b.data.rect,s=!0;break}const l=kt.normalizeRect([o[0],t[3]-o[1]+t[1],o[2],t[3]-o[3]+t[1]]),u=s?o[2]-o[0]+5:0,f=l[0]+u,p=l[1];this.#p=[100*(f-a)/r,100*(p-i)/n];const{style:m}=this.#a;m.left=`${this.#p[0]}%`,m.top=`${this.#p[1]}%`}#E(){this.#u=!this.#u,this.#u?(this.#k(),this.#a.addEventListener("click",this.#n),this.#a.addEventListener("keydown",this.#e)):(this.#T(),this.#a.removeEventListener("click",this.#n),this.#a.removeEventListener("keydown",this.#e))}#k(){this.#h||this.render(),this.isVisible?this.#u&&this.#a.classList.add("focused"):(this.#N(),this.#a.hidden=!1,this.#a.style.zIndex=parseInt(this.#a.style.zIndex)+1e3)}#T(){this.#a.classList.remove("focused"),!(this.#u||!this.isVisible)&&(this.#a.hidden=!0,this.#a.style.zIndex=parseInt(this.#a.style.zIndex)-1e3)}forceHide(){this.#b=this.isVisible,this.#b&&(this.#a.hidden=!0)}maybeShow(){this.#b&&(this.#h||this.#k(),this.#b=!1,this.#a.hidden=!1)}get isVisible(){return this.#a.hidden===!1}}class Nce extends Tn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=Gt.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const r of this.textContent){const n=document.createElement("span");n.textContent=r,t.append(n)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class nWe extends Tn{#e=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const{data:t,width:r,height:n}=this,a=this.svgFactory.create(r,n,!0),i=this.#e=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),i.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),i.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),i.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),i.setAttribute("stroke-width",t.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),a.append(i),this.container.append(a),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class aWe extends Tn{#e=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const{data:t,width:r,height:n}=this,a=this.svgFactory.create(r,n,!0),i=t.borderStyle.width,s=this.#e=this.svgFactory.createElement("svg:rect");return s.setAttribute("x",i/2),s.setAttribute("y",i/2),s.setAttribute("width",r-i),s.setAttribute("height",n-i),s.setAttribute("stroke-width",i||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),a.append(s),this.container.append(a),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class iWe extends Tn{#e=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const{data:t,width:r,height:n}=this,a=this.svgFactory.create(r,n,!0),i=t.borderStyle.width,s=this.#e=this.svgFactory.createElement("svg:ellipse");return s.setAttribute("cx",r/2),s.setAttribute("cy",n/2),s.setAttribute("rx",r/2-i/2),s.setAttribute("ry",n/2-i/2),s.setAttribute("stroke-width",i||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),a.append(s),this.container.append(a),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class Rce extends Tn{#e=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,vertices:r,borderStyle:n,popupRef:a},width:i,height:s}=this;if(!r)return this.container;const o=this.svgFactory.create(i,s,!0);let l=[];for(let u=0,f=r.length;u<f;u+=2){const p=r[u]-t[0],m=t[3]-r[u+1];l.push(`${p},${m}`)}l=l.join(" ");const c=this.#e=this.svgFactory.createElement(this.svgElementName);return c.setAttribute("points",l),c.setAttribute("stroke-width",n.width||1),c.setAttribute("stroke","transparent"),c.setAttribute("fill","transparent"),o.append(c),this.container.append(o),!a&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class sWe extends Rce{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class oWe extends Tn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class QI extends Tn{#e=null;#t=[];constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?Gt.HIGHLIGHT:Gt.INK}#r(t,r){switch(t){case 90:return{transform:`rotate(90) translate(${-r[0]},${r[1]}) scale(1,-1)`,width:r[3]-r[1],height:r[2]-r[0]};case 180:return{transform:`rotate(180) translate(${-r[2]},${r[1]}) scale(1,-1)`,width:r[2]-r[0],height:r[3]-r[1]};case 270:return{transform:`rotate(270) translate(${-r[2]},${r[3]}) scale(1,-1)`,width:r[3]-r[1],height:r[2]-r[0]};default:return{transform:`translate(${-r[0]},${r[3]}) scale(1,-1)`,width:r[2]-r[0],height:r[3]-r[1]}}}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,rotation:r,inkLists:n,borderStyle:a,popupRef:i}}=this,{transform:s,width:o,height:l}=this.#r(r,t),c=this.svgFactory.create(o,l,!0),u=this.#e=this.svgFactory.createElement("svg:g");c.append(u),u.setAttribute("stroke-width",a.width||1),u.setAttribute("stroke-linecap","round"),u.setAttribute("stroke-linejoin","round"),u.setAttribute("stroke-miterlimit",10),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),u.setAttribute("transform",s);for(let f=0,p=n.length;f<p;f++){const m=this.svgFactory.createElement(this.svgElementName);this.#t.push(m),m.setAttribute("points",n[f].join(",")),u.append(m)}return!i&&this.hasPopupData&&this._createPopup(),this.container.append(c),this._editOnDoubleClick(),this.container}updateEdited(t){super.updateEdited(t);const{thickness:r,points:n,rect:a}=t,i=this.#e;if(r>=0&&i.setAttribute("stroke-width",r||1),n)for(let s=0,o=this.#t.length;s<o;s++)this.#t[s].setAttribute("points",n[s].join(","));if(a){const{transform:s,width:o,height:l}=this.#r(this.data.rotation,a);i.parentElement.setAttribute("viewBox",`0 0 ${o} ${l}`),i.setAttribute("transform",s)}}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}}class Mce extends Tn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=Gt.HIGHLIGHT}render(){const{data:{overlaidText:t,popupRef:r}}=this;if(!r&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),t){const n=document.createElement("mark");n.classList.add("overlaidText"),n.textContent=t,this.container.append(n)}return this.container}}class lWe extends Tn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:r}}=this;if(!r&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),t){const n=document.createElement("u");n.classList.add("overlaidText"),n.textContent=t,this.container.append(n)}return this.container}}class cWe extends Tn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:r}}=this;if(!r&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),t){const n=document.createElement("u");n.classList.add("overlaidText"),n.textContent=t,this.container.append(n)}return this.container}}class uWe extends Tn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:r}}=this;if(!r&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),t){const n=document.createElement("s");n.classList.add("overlaidText"),n.textContent=t,this.container.append(n)}return this.container}}class Dce extends Tn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=Gt.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class dWe extends Tn{#e=null;constructor(t){super(t,{isRenderable:!0});const{file:r}=this.data;this.filename=r.filename,this.content=r.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...r})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:r}=this;let n;r.hasAppearance||r.fillAlpha===0?n=document.createElement("div"):(n=document.createElement("img"),n.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(r.name)?"paperclip":"pushpin"}.svg`,r.fillAlpha&&r.fillAlpha<1&&(n.style=`filter: opacity(${Math.round(r.fillAlpha*100)}%);`)),n.addEventListener("dblclick",this.#t.bind(this)),this.#e=n;const{isMac:a}=ea.platform;return t.addEventListener("keydown",i=>{i.key==="Enter"&&(a?i.metaKey:i.ctrlKey)&&this.#t()}),!r.popupRef&&this.hasPopupData?this._createPopup():n.classList.add("popupTriggerArea"),t.append(n),t}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}#t(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}}let JI=class Oce{#e=null;#t=null;#r=new Map;#n=null;constructor({div:t,accessibilityManager:r,annotationCanvasMap:n,annotationEditorUIManager:a,page:i,viewport:s,structTreeLayer:o}){this.div=t,this.#e=r,this.#t=n,this.#n=o||null,this.page=i,this.viewport=s,this.zIndex=0,this._annotationEditorUIManager=a}hasEditableAnnotations(){return this.#r.size>0}async#i(t,r,n){const a=t.firstChild||t,i=a.id=`${zI}${r}`,s=await this.#n?.getAriaAttributes(i);if(s)for(const[o,l]of s)a.setAttribute(o,l);n?n.at(-1).container.after(t):(this.div.append(t),this.#e?.moveElementInDOM(this.div,t,a,!1))}async render(t){const{annotations:r}=t,n=this.div;Wc(n,this.viewport);const a=new Map,i={data:null,layer:n,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new fm,annotationStorage:t.annotationStorage||new HI,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const s of r){if(s.noHTML)continue;const o=s.annotationType===_n.POPUP;if(o){const u=a.get(s.id);if(!u)continue;i.elements=u}else if(s.rect[2]===s.rect[0]||s.rect[3]===s.rect[1])continue;i.data=s;const l=cQ.create(i);if(!l.isRenderable)continue;if(!o&&s.popupRef){const u=a.get(s.popupRef);u?u.push(l):a.set(s.popupRef,[l])}const c=l.render();s.hidden&&(c.style.visibility="hidden"),await this.#i(c,s.id,i.elements),l._isEditable&&(this.#r.set(l.data.id,l),this._annotationEditorUIManager?.renderAnnotationElement(l))}this.#a()}async addLinkAnnotations(t,r){const n={data:null,layer:this.div,linkService:r,svgFactory:new fm,parent:this};for(const a of t){a.borderStyle||=Oce._defaultBorderStyle,n.data=a;const i=cQ.create(n);if(!i.isRenderable)continue;const s=i.render();await this.#i(s,a.id,null)}}update({viewport:t}){const r=this.div;this.viewport=t,Wc(r,{rotation:t.rotation}),this.#a(),r.hidden=!1}#a(){if(!this.#t)return;const t=this.div;for(const[r,n]of this.#t){const a=t.querySelector(`[data-annotation-id="${r}"]`);if(!a)continue;n.className="annotationContent";const{firstChild:i}=a;i?i.nodeName==="CANVAS"?i.replaceWith(n):i.classList.contains("annotationContent")?i.after(n):i.before(n):a.append(n);const s=this.#r.get(r);s&&(s._hasNoCanvas?(this._annotationEditorUIManager?.setMissingCanvas(r,a.id,n),s._hasNoCanvas=!1):s.canvas=n)}this.#t.clear()}getEditableAnnotations(){return Array.from(this.#r.values())}getEditableAnnotation(t){return this.#r.get(t)}static get _defaultBorderStyle(){return dr(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:Sf.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}};const _1=/\r\n?|\n/g;class Un extends Rt{#e;#t="";#r=`${this.id}-editor`;#n=null;#i;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const t=Un.prototype,r=i=>i.isEmpty(),n=Ll.TRANSLATE_SMALL,a=Ll.TRANSLATE_BIG;return dr(this,"_keyboardManager",new sg([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-n,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-a,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[n,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[a,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-n],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-a],checker:r}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,n],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,a],checker:r}]]))}static _type="freetext";static _editorType=Gt.FREETEXT;constructor(t){super({...t,name:"freeTextEditor"}),this.#e=t.color||Un._defaultColor||Rt._defaultLineColor,this.#i=t.fontSize||Un._defaultFontSize,this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static initialize(t,r){Rt.initialize(t,r);const n=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(n.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,r){switch(t){case mr.FREETEXT_SIZE:Un._defaultFontSize=r;break;case mr.FREETEXT_COLOR:Un._defaultColor=r;break}}updateParams(t,r){switch(t){case mr.FREETEXT_SIZE:this.#a(r);break;case mr.FREETEXT_COLOR:this.#o(r);break}}static get defaultPropertiesToUpdate(){return[[mr.FREETEXT_SIZE,Un._defaultFontSize],[mr.FREETEXT_COLOR,Un._defaultColor||Rt._defaultLineColor]]}get propertiesToUpdate(){return[[mr.FREETEXT_SIZE,this.#i],[mr.FREETEXT_COLOR,this.#e]]}#a(t){const r=a=>{this.editorDiv.style.fontSize=`calc(${a}px * var(--total-scale-factor))`,this.translate(0,-(a-this.#i)*this.parentScale),this.#i=a,this.#d()},n=this.#i;this.addCommands({cmd:r.bind(this,t),undo:r.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:mr.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#o(t){const r=a=>{this.#e=this.editorDiv.style.color=a},n=this.#e;this.addCommands({cmd:r.bind(this,t),undo:r.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:mr.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(t,r){this._uiManager.translateSelectedEditors(t,r,!0)}getInitialTranslation(){const t=this.parentScale;return[-Un._internalPadding*t,-(Un._internalPadding+this.#i)*t]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#n=new AbortController;const t=this._uiManager.combinedSignal(this.#n);return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:t}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:t}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:t}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:t}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:t}),!0}disableEditMode(){return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#r),this._isDraggable=!0,this.#n?.abort(),this.#n=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(t){this.width||(this.enableEditMode(),t&&this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#s(){const t=[];this.editorDiv.normalize();let r=null;for(const n of this.editorDiv.childNodes)r?.nodeType===Node.TEXT_NODE&&n.nodeName==="BR"||(t.push(Un.#l(n)),r=n);return t.join(`
`)}#d(){const[t,r]=this.parentDimensions;let n;if(this.isAttachedToDOM)n=this.div.getBoundingClientRect();else{const{currentLayer:a,div:i}=this,s=i.style.display,o=i.classList.contains("hidden");i.classList.remove("hidden"),i.style.display="hidden",a.div.append(this.div),n=i.getBoundingClientRect(),i.remove(),i.style.display=s,i.classList.toggle("hidden",o)}this.rotation%180===this.parentRotation%180?(this.width=n.width/t,this.height=n.height/r):(this.width=n.height/t,this.height=n.width/r),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=this.#t,r=this.#t=this.#s().trimEnd();if(t===r)return;const n=a=>{if(this.#t=a,!a){this.remove();return}this.#f(),this._uiManager.rebuild(this),this.#d()};this.addCommands({cmd:()=>{n(r)},undo:()=>{n(t)},mustExec:!1}),this.#d()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(t){t.target===this.div&&t.key==="Enter"&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){Un._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let t,r;(this._isCopy||this.annotationElementId)&&(t=this.x,r=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#r),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:n}=this.editorDiv;if(n.fontSize=`calc(${this.#i}px * var(--total-scale-factor))`,n.color=this.#e,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[a,i]=this.parentDimensions;if(this.annotationElementId){const{position:s}=this._initialData;let[o,l]=this.getInitialTranslation();[o,l]=this.pageTranslationToScreen(o,l);const[c,u]=this.pageDimensions,[f,p]=this.pageTranslation;let m,b;switch(this.rotation){case 0:m=t+(s[0]-f)/c,b=r+this.height-(s[1]-p)/u;break;case 90:m=t+(s[0]-f)/c,b=r-(s[1]-p)/u,[o,l]=[l,-o];break;case 180:m=t-this.width+(s[0]-f)/c,b=r-(s[1]-p)/u,[o,l]=[-o,-l];break;case 270:m=t+(s[0]-f-this.height*u)/c,b=r+(s[1]-p-this.width*c)/u,[o,l]=[-l,o];break}this.setAt(m*a,b*i,o,l)}else this._moveAfterPaste(t,r);this.#f(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#l(t){return(t.nodeType===Node.TEXT_NODE?t.nodeValue:t.innerText).replaceAll(_1,"")}editorDivPaste(t){const r=t.clipboardData||window.clipboardData,{types:n}=r;if(n.length===1&&n[0]==="text/plain")return;t.preventDefault();const a=Un.#h(r.getData("text")||"").replaceAll(_1,`
`);if(!a)return;const i=window.getSelection();if(!i.rangeCount)return;this.editorDiv.normalize(),i.deleteFromDocument();const s=i.getRangeAt(0);if(!a.includes(`
`)){s.insertNode(document.createTextNode(a)),this.editorDiv.normalize(),i.collapseToStart();return}const{startContainer:o,startOffset:l}=s,c=[],u=[];if(o.nodeType===Node.TEXT_NODE){const m=o.parentElement;if(u.push(o.nodeValue.slice(l).replaceAll(_1,"")),m!==this.editorDiv){let b=c;for(const v of this.editorDiv.childNodes){if(v===m){b=u;continue}b.push(Un.#l(v))}}c.push(o.nodeValue.slice(0,l).replaceAll(_1,""))}else if(o===this.editorDiv){let m=c,b=0;for(const v of this.editorDiv.childNodes)b++===l&&(m=u),m.push(Un.#l(v))}this.#t=`${c.join(`
`)}${a}${u.join(`
`)}`,this.#f();const f=new Range;let p=Math.sumPrecise(c.map(m=>m.length));for(const{firstChild:m}of this.editorDiv.childNodes)if(m.nodeType===Node.TEXT_NODE){const b=m.nodeValue.length;if(p<=b){f.setStart(m,p),f.setEnd(m,p);break}p-=b}i.removeAllRanges(),i.addRange(f)}#f(){if(this.editorDiv.replaceChildren(),!!this.#t)for(const t of this.#t.split(`
`)){const r=document.createElement("div");r.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(r)}}#u(){return this.#t.replaceAll(" "," ")}static#h(t){return t.replaceAll(" "," ")}get contentDiv(){return this.editorDiv}static async deserialize(t,r,n){let a=null;if(t instanceof Nce){const{data:{defaultAppearanceData:{fontSize:s,fontColor:o},rect:l,rotation:c,id:u,popupRef:f},textContent:p,textPosition:m,parent:{page:{pageNumber:b}}}=t;if(!p||p.length===0)return null;a=t={annotationType:Gt.FREETEXT,color:Array.from(o),fontSize:s,value:p.join(`
`),position:m,pageIndex:b-1,rect:l.slice(0),rotation:c,annotationElementId:u,id:u,deleted:!1,popupRef:f}}const i=await super.deserialize(t,r,n);return i.#i=t.fontSize,i.#e=kt.makeHexColor(...t.color),i.#t=Un.#h(t.value),i._initialData=a,i}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const r=Un._internalPadding*this.parentScale,n=this.getRect(r,r),a=Rt._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#e),i={annotationType:Gt.FREETEXT,color:a,fontSize:this.#i,value:this.#u(),pageIndex:this.pageIndex,rect:n,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return t?(i.isCopy=!0,i):this.annotationElementId&&!this.#p(i)?null:(i.id=this.annotationElementId,i)}#p(t){const{value:r,fontSize:n,color:a,pageIndex:i}=this._initialData;return this._hasBeenMoved||t.value!==r||t.fontSize!==n||t.color.some((s,o)=>s!==a[o])||t.pageIndex!==i}renderAnnotationElement(t){const r=super.renderAnnotationElement(t);if(this.deleted)return r;const{style:n}=r;n.fontSize=`calc(${this.#i}px * var(--total-scale-factor))`,n.color=this.#e,r.replaceChildren();for(const i of this.#t.split(`
`)){const s=document.createElement("div");s.append(i?document.createTextNode(i):document.createElement("br")),r.append(s)}const a=Un._internalPadding*this.parentScale;return t.updateEdited({rect:this.getRect(a,a),popupContent:this.#t}),r}resetAnnotationElement(t){super.resetAnnotationElement(t),t.resetEdited()}}class yt{static PRECISION=1e-4;toSVGPath(){Br("Abstract method `toSVGPath` must be implemented.")}get box(){Br("Abstract getter `box` must be implemented.")}serialize(t,r){Br("Abstract method `serialize` must be implemented.")}static _rescale(t,r,n,a,i,s){s||=new Float32Array(t.length);for(let o=0,l=t.length;o<l;o+=2)s[o]=r+t[o]*a,s[o+1]=n+t[o+1]*i;return s}static _rescaleAndSwap(t,r,n,a,i,s){s||=new Float32Array(t.length);for(let o=0,l=t.length;o<l;o+=2)s[o]=r+t[o+1]*a,s[o+1]=n+t[o]*i;return s}static _translate(t,r,n,a){a||=new Float32Array(t.length);for(let i=0,s=t.length;i<s;i+=2)a[i]=r+t[i],a[i+1]=n+t[i+1];return a}static svgRound(t){return Math.round(t*1e4)}static _normalizePoint(t,r,n,a,i){switch(i){case 90:return[1-r/n,t/a];case 180:return[1-t/n,1-r/a];case 270:return[r/n,1-t/a];default:return[t/n,r/a]}}static _normalizePagePoint(t,r,n){switch(n){case 90:return[1-r,t];case 180:return[1-t,1-r];case 270:return[r,1-t];default:return[t,r]}}static createBezierPoints(t,r,n,a,i,s){return[(t+5*n)/6,(r+5*a)/6,(5*n+i)/6,(5*a+s)/6,(n+i)/2,(a+s)/2]}}class Fu{#e;#t=[];#r;#n;#i=[];#a=new Float32Array(18);#o;#s;#d;#l;#f;#u;#h=[];static#p=8;static#m=2;static#c=Fu.#p+Fu.#m;constructor({x:t,y:r},n,a,i,s,o=0){this.#e=n,this.#u=i*a,this.#n=s,this.#a.set([NaN,NaN,NaN,NaN,t,r],6),this.#r=o,this.#l=Fu.#p*a,this.#d=Fu.#c*a,this.#f=a,this.#h.push(t,r)}isEmpty(){return isNaN(this.#a[8])}#g(){const t=this.#a.subarray(4,6),r=this.#a.subarray(16,18),[n,a,i,s]=this.#e;return[(this.#o+(t[0]-r[0])/2-n)/i,(this.#s+(t[1]-r[1])/2-a)/s,(this.#o+(r[0]-t[0])/2-n)/i,(this.#s+(r[1]-t[1])/2-a)/s]}add({x:t,y:r}){this.#o=t,this.#s=r;const[n,a,i,s]=this.#e;let[o,l,c,u]=this.#a.subarray(8,12);const f=t-c,p=r-u,m=Math.hypot(f,p);if(m<this.#d)return!1;const b=m-this.#l,v=b/m,y=v*f,_=v*p;let S=o,C=l;o=c,l=u,c+=y,u+=_,this.#h?.push(t,r);const T=-_/b,A=y/b,k=T*this.#u,N=A*this.#u;return this.#a.set(this.#a.subarray(2,8),0),this.#a.set([c+k,u+N],4),this.#a.set(this.#a.subarray(14,18),12),this.#a.set([c-k,u-N],16),isNaN(this.#a[6])?(this.#i.length===0&&(this.#a.set([o+k,l+N],2),this.#i.push(NaN,NaN,NaN,NaN,(o+k-n)/i,(l+N-a)/s),this.#a.set([o-k,l-N],14),this.#t.push(NaN,NaN,NaN,NaN,(o-k-n)/i,(l-N-a)/s)),this.#a.set([S,C,o,l,c,u],6),!this.isEmpty()):(this.#a.set([S,C,o,l,c,u],6),Math.abs(Math.atan2(C-l,S-o)-Math.atan2(_,y))<Math.PI/2?([o,l,c,u]=this.#a.subarray(2,6),this.#i.push(NaN,NaN,NaN,NaN,((o+c)/2-n)/i,((l+u)/2-a)/s),[o,l,S,C]=this.#a.subarray(14,18),this.#t.push(NaN,NaN,NaN,NaN,((S+o)/2-n)/i,((C+l)/2-a)/s),!0):([S,C,o,l,c,u]=this.#a.subarray(0,6),this.#i.push(((S+5*o)/6-n)/i,((C+5*l)/6-a)/s,((5*o+c)/6-n)/i,((5*l+u)/6-a)/s,((o+c)/2-n)/i,((l+u)/2-a)/s),[c,u,o,l,S,C]=this.#a.subarray(12,18),this.#t.push(((S+5*o)/6-n)/i,((C+5*l)/6-a)/s,((5*o+c)/6-n)/i,((5*l+u)/6-a)/s,((o+c)/2-n)/i,((l+u)/2-a)/s),!0))}toSVGPath(){if(this.isEmpty())return"";const t=this.#i,r=this.#t;if(isNaN(this.#a[6])&&!this.isEmpty())return this.#v();const n=[];n.push(`M${t[4]} ${t[5]}`);for(let a=6;a<t.length;a+=6)isNaN(t[a])?n.push(`L${t[a+4]} ${t[a+5]}`):n.push(`C${t[a]} ${t[a+1]} ${t[a+2]} ${t[a+3]} ${t[a+4]} ${t[a+5]}`);this.#y(n);for(let a=r.length-6;a>=6;a-=6)isNaN(r[a])?n.push(`L${r[a+4]} ${r[a+5]}`):n.push(`C${r[a]} ${r[a+1]} ${r[a+2]} ${r[a+3]} ${r[a+4]} ${r[a+5]}`);return this.#b(n),n.join(" ")}#v(){const[t,r,n,a]=this.#e,[i,s,o,l]=this.#g();return`M${(this.#a[2]-t)/n} ${(this.#a[3]-r)/a} L${(this.#a[4]-t)/n} ${(this.#a[5]-r)/a} L${i} ${s} L${o} ${l} L${(this.#a[16]-t)/n} ${(this.#a[17]-r)/a} L${(this.#a[14]-t)/n} ${(this.#a[15]-r)/a} Z`}#b(t){const r=this.#t;t.push(`L${r[4]} ${r[5]} Z`)}#y(t){const[r,n,a,i]=this.#e,s=this.#a.subarray(4,6),o=this.#a.subarray(16,18),[l,c,u,f]=this.#g();t.push(`L${(s[0]-r)/a} ${(s[1]-n)/i} L${l} ${c} L${u} ${f} L${(o[0]-r)/a} ${(o[1]-n)/i}`)}newFreeDrawOutline(t,r,n,a,i,s){return new Ice(t,r,n,a,i,s)}getOutlines(){const t=this.#i,r=this.#t,n=this.#a,[a,i,s,o]=this.#e,l=new Float32Array((this.#h?.length??0)+2);for(let f=0,p=l.length-2;f<p;f+=2)l[f]=(this.#h[f]-a)/s,l[f+1]=(this.#h[f+1]-i)/o;if(l[l.length-2]=(this.#o-a)/s,l[l.length-1]=(this.#s-i)/o,isNaN(n[6])&&!this.isEmpty())return this.#_(l);const c=new Float32Array(this.#i.length+24+this.#t.length);let u=t.length;for(let f=0;f<u;f+=2){if(isNaN(t[f])){c[f]=c[f+1]=NaN;continue}c[f]=t[f],c[f+1]=t[f+1]}u=this.#C(c,u);for(let f=r.length-6;f>=6;f-=6)for(let p=0;p<6;p+=2){if(isNaN(r[f+p])){c[u]=c[u+1]=NaN,u+=2;continue}c[u]=r[f+p],c[u+1]=r[f+p+1],u+=2}return this.#w(c,u),this.newFreeDrawOutline(c,l,this.#e,this.#f,this.#r,this.#n)}#_(t){const r=this.#a,[n,a,i,s]=this.#e,[o,l,c,u]=this.#g(),f=new Float32Array(36);return f.set([NaN,NaN,NaN,NaN,(r[2]-n)/i,(r[3]-a)/s,NaN,NaN,NaN,NaN,(r[4]-n)/i,(r[5]-a)/s,NaN,NaN,NaN,NaN,o,l,NaN,NaN,NaN,NaN,c,u,NaN,NaN,NaN,NaN,(r[16]-n)/i,(r[17]-a)/s,NaN,NaN,NaN,NaN,(r[14]-n)/i,(r[15]-a)/s],0),this.newFreeDrawOutline(f,t,this.#e,this.#f,this.#r,this.#n)}#w(t,r){const n=this.#t;return t.set([NaN,NaN,NaN,NaN,n[4],n[5]],r),r+=6}#C(t,r){const n=this.#a.subarray(4,6),a=this.#a.subarray(16,18),[i,s,o,l]=this.#e,[c,u,f,p]=this.#g();return t.set([NaN,NaN,NaN,NaN,(n[0]-i)/o,(n[1]-s)/l,NaN,NaN,NaN,NaN,c,u,NaN,NaN,NaN,NaN,f,p,NaN,NaN,NaN,NaN,(a[0]-i)/o,(a[1]-s)/l],r),r+=24}}class Ice extends yt{#e;#t=new Float32Array(4);#r;#n;#i;#a;#o;constructor(t,r,n,a,i,s){super(),this.#o=t,this.#i=r,this.#e=n,this.#a=a,this.#r=i,this.#n=s,this.lastPoint=[NaN,NaN],this.#s(s);const[o,l,c,u]=this.#t;for(let f=0,p=t.length;f<p;f+=2)t[f]=(t[f]-o)/c,t[f+1]=(t[f+1]-l)/u;for(let f=0,p=r.length;f<p;f+=2)r[f]=(r[f]-o)/c,r[f+1]=(r[f+1]-l)/u}toSVGPath(){const t=[`M${this.#o[4]} ${this.#o[5]}`];for(let r=6,n=this.#o.length;r<n;r+=6){if(isNaN(this.#o[r])){t.push(`L${this.#o[r+4]} ${this.#o[r+5]}`);continue}t.push(`C${this.#o[r]} ${this.#o[r+1]} ${this.#o[r+2]} ${this.#o[r+3]} ${this.#o[r+4]} ${this.#o[r+5]}`)}return t.push("Z"),t.join(" ")}serialize([t,r,n,a],i){const s=n-t,o=a-r;let l,c;switch(i){case 0:l=yt._rescale(this.#o,t,a,s,-o),c=yt._rescale(this.#i,t,a,s,-o);break;case 90:l=yt._rescaleAndSwap(this.#o,t,r,s,o),c=yt._rescaleAndSwap(this.#i,t,r,s,o);break;case 180:l=yt._rescale(this.#o,n,r,-s,o),c=yt._rescale(this.#i,n,r,-s,o);break;case 270:l=yt._rescaleAndSwap(this.#o,n,a,-s,-o),c=yt._rescaleAndSwap(this.#i,n,a,-s,-o);break}return{outline:Array.from(l),points:[Array.from(c)]}}#s(t){const r=this.#o;let n=r[4],a=r[5];const i=[n,a,n,a];let s=n,o=a;const l=t?Math.max:Math.min;for(let u=6,f=r.length;u<f;u+=6){const p=r[u+4],m=r[u+5];if(isNaN(r[u]))kt.pointBoundingBox(p,m,i),o<m?(s=p,o=m):o===m&&(s=l(s,p));else{const b=[1/0,1/0,-1/0,-1/0];kt.bezierBoundingBox(n,a,...r.slice(u,u+6),b),kt.rectBoundingBox(...b,i),o<b[3]?(s=b[2],o=b[3]):o===b[3]&&(s=l(s,b[2]))}n=p,a=m}const c=this.#t;c[0]=i[0]-this.#r,c[1]=i[1]-this.#r,c[2]=i[2]-i[0]+2*this.#r,c[3]=i[3]-i[1]+2*this.#r,this.lastPoint=[s,o]}get box(){return this.#t}newOutliner(t,r,n,a,i,s=0){return new Fu(t,r,n,a,i,s)}getNewOutline(t,r){const[n,a,i,s]=this.#t,[o,l,c,u]=this.#e,f=i*c,p=s*u,m=n*c+o,b=a*u+l,v=this.newOutliner({x:this.#i[0]*f+m,y:this.#i[1]*p+b},this.#e,this.#a,t,this.#n,r??this.#r);for(let y=2;y<this.#i.length;y+=2)v.add({x:this.#i[y]*f+m,y:this.#i[y+1]*p+b});return v.getOutlines()}}class U6{#e;#t;#r=[];#n=[];constructor(t,r=0,n=0,a=!0){const i=[1/0,1/0,-1/0,-1/0],s=10**-4;for(const{x:m,y:b,width:v,height:y}of t){const _=Math.floor((m-r)/s)*s,S=Math.ceil((m+v+r)/s)*s,C=Math.floor((b-r)/s)*s,T=Math.ceil((b+y+r)/s)*s,A=[_,C,T,!0],k=[S,C,T,!1];this.#r.push(A,k),kt.rectBoundingBox(_,C,S,T,i)}const o=i[2]-i[0]+2*n,l=i[3]-i[1]+2*n,c=i[0]-n,u=i[1]-n,f=this.#r.at(a?-1:-2),p=[f[0],f[2]];for(const m of this.#r){const[b,v,y]=m;m[0]=(b-c)/o,m[1]=(v-u)/l,m[2]=(y-u)/l}this.#e=new Float32Array([c,u,o,l]),this.#t=p}getOutlines(){this.#r.sort((r,n)=>r[0]-n[0]||r[1]-n[1]||r[2]-n[2]);const t=[];for(const r of this.#r)r[3]?(t.push(...this.#d(r)),this.#o(r)):(this.#s(r),t.push(...this.#d(r)));return this.#i(t)}#i(t){const r=[],n=new Set;for(const s of t){const[o,l,c]=s;r.push([o,l,s],[o,c,s])}r.sort((s,o)=>s[1]-o[1]||s[0]-o[0]);for(let s=0,o=r.length;s<o;s+=2){const l=r[s][2],c=r[s+1][2];l.push(c),c.push(l),n.add(l),n.add(c)}const a=[];let i;for(;n.size>0;){const s=n.values().next().value;let[o,l,c,u,f]=s;n.delete(s);let p=o,m=l;for(i=[o,c],a.push(i);;){let b;if(n.has(u))b=u;else if(n.has(f))b=f;else break;n.delete(b),[o,l,c,u,f]=b,p!==o&&(i.push(p,m,o,m===l?l:c),p=o),m=m===l?c:l}i.push(p,m)}return new fWe(a,this.#e,this.#t)}#a(t){const r=this.#n;let n=0,a=r.length-1;for(;n<=a;){const i=n+a>>1,s=r[i][0];if(s===t)return i;s<t?n=i+1:a=i-1}return a+1}#o([,t,r]){const n=this.#a(t);this.#n.splice(n,0,[t,r])}#s([,t,r]){const n=this.#a(t);for(let a=n;a<this.#n.length;a++){const[i,s]=this.#n[a];if(i!==t)break;if(i===t&&s===r){this.#n.splice(a,1);return}}for(let a=n-1;a>=0;a--){const[i,s]=this.#n[a];if(i!==t)break;if(i===t&&s===r){this.#n.splice(a,1);return}}}#d(t){const[r,n,a]=t,i=[[r,n,a]],s=this.#a(a);for(let o=0;o<s;o++){const[l,c]=this.#n[o];for(let u=0,f=i.length;u<f;u++){const[,p,m]=i[u];if(!(c<=p||m<=l)){if(p>=l){if(m>c)i[u][1]=c;else{if(f===1)return[];i.splice(u,1),u--,f--}continue}i[u][2]=l,m>c&&i.push([r,c,m])}}}return i}}class fWe extends yt{#e;#t;constructor(t,r,n){super(),this.#t=t,this.#e=r,this.lastPoint=n}toSVGPath(){const t=[];for(const r of this.#t){let[n,a]=r;t.push(`M${n} ${a}`);for(let i=2;i<r.length;i+=2){const s=r[i],o=r[i+1];s===n?(t.push(`V${o}`),a=o):o===a&&(t.push(`H${s}`),n=s)}t.push("Z")}return t.join(" ")}serialize([t,r,n,a],i){const s=[],o=n-t,l=a-r;for(const c of this.#t){const u=new Array(c.length);for(let f=0;f<c.length;f+=2)u[f]=t+c[f]*o,u[f+1]=a-c[f+1]*l;s.push(u)}return s}get box(){return this.#e}get classNamesForOutlining(){return["highlightOutline"]}}class $6 extends Fu{newFreeDrawOutline(t,r,n,a,i,s){return new hWe(t,r,n,a,i,s)}}class hWe extends Ice{newOutliner(t,r,n,a,i,s=0){return new $6(t,r,n,a,i,s)}}class Ei{#e=null;#t=null;#r;#n=null;#i=!1;#a=!1;#o=null;#s;#d=null;#l=null;#f;static#u=null;static get _keyboardManager(){return dr(this,"_keyboardManager",new sg([[["Escape","mac+Escape"],Ei.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],Ei.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],Ei.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],Ei.prototype._moveToPrevious],[["Home","mac+Home"],Ei.prototype._moveToBeginning],[["End","mac+End"],Ei.prototype._moveToEnd]]))}constructor({editor:t=null,uiManager:r=null}){t?(this.#a=!1,this.#f=mr.HIGHLIGHT_COLOR,this.#o=t):(this.#a=!0,this.#f=mr.HIGHLIGHT_DEFAULT_COLOR),this.#l=t?._uiManager||r,this.#s=this.#l._eventBus,this.#r=t?.color?.toUpperCase()||this.#l?.highlightColors.values().next().value||"#FFFF98",Ei.#u||=Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"})}renderButton(){const t=this.#e=document.createElement("button");t.className="colorPicker",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),t.ariaHasPopup="true",this.#o&&(t.ariaControls=`${this.#o.id}_colorpicker_dropdown`);const r=this.#l._signal;t.addEventListener("click",this.#c.bind(this),{signal:r}),t.addEventListener("keydown",this.#m.bind(this),{signal:r});const n=this.#t=document.createElement("span");return n.className="swatch",n.ariaHidden="true",n.style.backgroundColor=this.#r,t.append(n),t}renderMainDropdown(){const t=this.#n=this.#h();return t.ariaOrientation="horizontal",t.ariaLabelledBy="highlightColorPickerLabel",t}#h(){const t=document.createElement("div"),r=this.#l._signal;t.addEventListener("contextmenu",ps,{signal:r}),t.className="dropdown",t.role="listbox",t.ariaMultiSelectable="false",t.ariaOrientation="vertical",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),this.#o&&(t.id=`${this.#o.id}_colorpicker_dropdown`);for(const[n,a]of this.#l.highlightColors){const i=document.createElement("button");i.tabIndex="0",i.role="option",i.setAttribute("data-color",a),i.title=n,i.setAttribute("data-l10n-id",Ei.#u[n]);const s=document.createElement("span");i.append(s),s.className="swatch",s.style.backgroundColor=a,i.ariaSelected=a===this.#r,i.addEventListener("click",this.#p.bind(this,a),{signal:r}),t.append(i)}return t.addEventListener("keydown",this.#m.bind(this),{signal:r}),t}#p(t,r){r.stopPropagation(),this.#s.dispatch("switchannotationeditorparams",{source:this,type:this.#f,value:t})}_colorSelectFromKeyboard(t){if(t.target===this.#e){this.#c(t);return}const r=t.target.getAttribute("data-color");r&&this.#p(r,t)}_moveToNext(t){if(!this.#v){this.#c(t);return}if(t.target===this.#e){this.#n.firstChild?.focus();return}t.target.nextSibling?.focus()}_moveToPrevious(t){if(t.target===this.#n?.firstChild||t.target===this.#e){this.#v&&this._hideDropdownFromKeyboard();return}this.#v||this.#c(t),t.target.previousSibling?.focus()}_moveToBeginning(t){if(!this.#v){this.#c(t);return}this.#n.firstChild?.focus()}_moveToEnd(t){if(!this.#v){this.#c(t);return}this.#n.lastChild?.focus()}#m(t){Ei._keyboardManager.exec(this,t)}#c(t){if(this.#v){this.hideDropdown();return}if(this.#i=t.detail===0,this.#d||(this.#d=new AbortController,window.addEventListener("pointerdown",this.#g.bind(this),{signal:this.#l.combinedSignal(this.#d)})),this.#e.ariaExpanded="true",this.#n){this.#n.classList.remove("hidden");return}const r=this.#n=this.#h();this.#e.append(r)}#g(t){this.#n?.contains(t.target)||this.hideDropdown()}hideDropdown(){this.#n?.classList.add("hidden"),this.#e.ariaExpanded="false",this.#d?.abort(),this.#d=null}get#v(){return this.#n&&!this.#n.classList.contains("hidden")}_hideDropdownFromKeyboard(){if(!this.#a){if(!this.#v){this.#o?.unselect();return}this.hideDropdown(),this.#e.focus({preventScroll:!0,focusVisible:this.#i})}}updateColor(t){if(this.#t&&(this.#t.style.backgroundColor=t),!this.#n)return;const r=this.#l.highlightColors.values();for(const n of this.#n.children)n.ariaSelected=r.next().value===t.toUpperCase()}destroy(){this.#e?.remove(),this.#e=null,this.#t=null,this.#n?.remove(),this.#n=null}}class wn extends Rt{#e=null;#t=0;#r;#n=null;#i=null;#a=null;#o=null;#s=0;#d=null;#l=null;#f=null;#u=!1;#h=null;#p;#m=null;#c="";#g;#v="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _type="highlight";static _editorType=Gt.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){const t=wn.prototype;return dr(this,"_keyboardManager",new sg([[["ArrowLeft","mac+ArrowLeft"],t._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],t._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],t._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],t._moveCaret,{args:[3]}]]))}constructor(t){super({...t,name:"highlightEditor"}),this.color=t.color||wn._defaultColor,this.#g=t.thickness||wn._defaultThickness,this.#p=t.opacity||wn._defaultOpacity,this.#r=t.boxes||null,this.#v=t.methodOfCreation||"",this.#c=t.text||"",this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",t.highlightId>-1?(this.#u=!0,this.#y(t),this.#N()):this.#r&&(this.#e=t.anchorNode,this.#t=t.anchorOffset,this.#o=t.focusNode,this.#s=t.focusOffset,this.#b(),this.#N(),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}get telemetryInitialData(){return{action:"added",type:this.#u?"free_highlight":"highlight",color:this._uiManager.highlightColorNames.get(this.color),thickness:this.#g,methodOfCreation:this.#v}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.highlightColorNames.get(this.color)}}static computeTelemetryFinalData(t){return{numberOfColors:t.get("color").size}}#b(){const t=new U6(this.#r,.001);this.#l=t.getOutlines(),[this.x,this.y,this.width,this.height]=this.#l.box;const r=new U6(this.#r,.0025,.001,this._uiManager.direction==="ltr");this.#a=r.getOutlines();const{lastPoint:n}=this.#a;this.#h=[(n[0]-this.x)/this.width,(n[1]-this.y)/this.height]}#y({highlightOutlines:t,highlightId:r,clipPathId:n}){this.#l=t;const a=1.5;if(this.#a=t.getNewOutline(this.#g/2+a,.0025),r>=0)this.#f=r,this.#n=n,this.parent.drawLayer.finalizeDraw(r,{bbox:t.box,path:{d:t.toSVGPath()}}),this.#m=this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:this.#a.box,path:{d:this.#a.toSVGPath()}},!0);else if(this.parent){const u=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(this.#f,{bbox:wn.#E(this.#l.box,(u-this.rotation+360)%360),path:{d:t.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#m,{bbox:wn.#E(this.#a.box,u),path:{d:this.#a.toSVGPath()}})}const[i,s,o,l]=t.box;switch(this.rotation){case 0:this.x=i,this.y=s,this.width=o,this.height=l;break;case 90:{const[u,f]=this.parentDimensions;this.x=s,this.y=1-i,this.width=o*f/u,this.height=l*u/f;break}case 180:this.x=1-i,this.y=1-s,this.width=o,this.height=l;break;case 270:{const[u,f]=this.parentDimensions;this.x=1-s,this.y=i,this.width=o*f/u,this.height=l*u/f;break}}const{lastPoint:c}=this.#a;this.#h=[(c[0]-i)/o,(c[1]-s)/l]}static initialize(t,r){Rt.initialize(t,r),wn._defaultColor||=r.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(t,r){switch(t){case mr.HIGHLIGHT_DEFAULT_COLOR:wn._defaultColor=r;break;case mr.HIGHLIGHT_THICKNESS:wn._defaultThickness=r;break}}translateInPage(t,r){}get toolbarPosition(){return this.#h}updateParams(t,r){switch(t){case mr.HIGHLIGHT_COLOR:this.#_(r);break;case mr.HIGHLIGHT_THICKNESS:this.#w(r);break}}static get defaultPropertiesToUpdate(){return[[mr.HIGHLIGHT_DEFAULT_COLOR,wn._defaultColor],[mr.HIGHLIGHT_THICKNESS,wn._defaultThickness]]}get propertiesToUpdate(){return[[mr.HIGHLIGHT_COLOR,this.color||wn._defaultColor],[mr.HIGHLIGHT_THICKNESS,this.#g||wn._defaultThickness],[mr.HIGHLIGHT_FREE,this.#u]]}#_(t){const r=(i,s)=>{this.color=i,this.#p=s,this.parent?.drawLayer.updateProperties(this.#f,{root:{fill:i,"fill-opacity":s}}),this.#i?.updateColor(i)},n=this.color,a=this.#p;this.addCommands({cmd:r.bind(this,t,wn._defaultOpacity),undo:r.bind(this,n,a),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:mr.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.highlightColorNames.get(t)},!0)}#w(t){const r=this.#g,n=a=>{this.#g=a,this.#C(a)};this.addCommands({cmd:n.bind(this,t),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:mr.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:t},!0)}get toolbarButtons(){return this._uiManager.highlightColors?[["colorPicker",this.#i=new Ei({editor:this})]]:super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#M())}getBaseTranslation(){return[0,0]}getRect(t,r){return super.getRect(t,r,this.#M())}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),t&&this.div.focus()}remove(){this.#A(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#N(),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){let r=!1;this.parent&&!t?this.#A():t&&(this.#N(t),r=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(t),this.show(this._isVisible),r&&this.select()}#C(t){if(!this.#u)return;this.#y({highlightOutlines:this.#l.getNewOutline(t/2)}),this.fixAndSetPosition();const[r,n]=this.parentDimensions;this.setDims(this.width*r,this.height*n)}#A(){this.#f===null||!this.parent||(this.parent.drawLayer.remove(this.#f),this.#f=null,this.parent.drawLayer.remove(this.#m),this.#m=null)}#N(t=this.parent){this.#f===null&&({id:this.#f,clipPathId:this.#n}=t.drawLayer.draw({bbox:this.#l.box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.#p},rootClass:{highlight:!0,free:this.#u},path:{d:this.#l.toSVGPath()}},!1,!0),this.#m=t.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:this.#u},bbox:this.#a.box,path:{d:this.#a.toSVGPath()}},this.#u),this.#d&&(this.#d.style.clipPath=this.#n))}static#E([t,r,n,a],i){switch(i){case 90:return[1-r-a,t,a,n];case 180:return[1-t-n,1-r-a,n,a];case 270:return[r,1-t-n,a,n]}return[t,r,n,a]}rotate(t){const{drawLayer:r}=this.parent;let n;this.#u?(t=(t-this.rotation+360)%360,n=wn.#E(this.#l.box,t)):n=wn.#E([this.x,this.y,this.width,this.height],t),r.updateProperties(this.#f,{bbox:n,root:{"data-main-rotation":t}}),r.updateProperties(this.#m,{bbox:wn.#E(this.#a.box,t),root:{"data-main-rotation":t}})}render(){if(this.div)return this.div;const t=super.render();this.#c&&(t.setAttribute("aria-label",this.#c),t.setAttribute("role","mark")),this.#u?t.classList.add("free"):this.div.addEventListener("keydown",this.#k.bind(this),{signal:this._uiManager._signal});const r=this.#d=document.createElement("div");t.append(r),r.setAttribute("aria-hidden","true"),r.className="internal",r.style.clipPath=this.#n;const[n,a]=this.parentDimensions;return this.setDims(this.width*n,this.height*a),lce(this,this.#d,["pointerover","pointerleave"]),this.enableEditing(),t}pointerover(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#m,{rootClass:{hovered:!0}})}pointerleave(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#m,{rootClass:{hovered:!1}})}#k(t){wn._keyboardManager.exec(this,t)}_moveCaret(t){switch(this.parent.unselect(this),t){case 0:case 2:this.#T(!0);break;case 1:case 3:this.#T(!1);break}}#T(t){if(!this.#e)return;const r=window.getSelection();t?r.setPosition(this.#e,this.#t):r.setPosition(this.#o,this.#s)}select(){super.select(),this.#m&&this.parent?.drawLayer.updateProperties(this.#m,{rootClass:{hovered:!1,selected:!0}})}unselect(){super.unselect(),this.#m&&(this.parent?.drawLayer.updateProperties(this.#m,{rootClass:{selected:!1}}),this.#u||this.#T(!1))}get _mustFixPosition(){return!this.#u}show(t=this._isVisible){super.show(t),this.parent&&(this.parent.drawLayer.updateProperties(this.#f,{rootClass:{hidden:!t}}),this.parent.drawLayer.updateProperties(this.#m,{rootClass:{hidden:!t}}))}#M(){return this.#u?this.rotation:0}#D(){if(this.#u)return null;const[t,r]=this.pageDimensions,[n,a]=this.pageTranslation,i=this.#r,s=new Float32Array(i.length*8);let o=0;for(const{x:l,y:c,width:u,height:f}of i){const p=l*t+n,m=(1-c)*r+a;s[o]=s[o+4]=p,s[o+1]=s[o+3]=m,s[o+2]=s[o+6]=p+u*t,s[o+5]=s[o+7]=m-f*r,o+=8}return s}#O(t){return this.#l.serialize(t,this.#M())}static startHighlighting(t,r,{target:n,x:a,y:i}){const{x:s,y:o,width:l,height:c}=n.getBoundingClientRect(),u=new AbortController,f=t.combinedSignal(u),p=m=>{u.abort(),this.#S(t,m)};window.addEventListener("blur",p,{signal:f}),window.addEventListener("pointerup",p,{signal:f}),window.addEventListener("pointerdown",En,{capture:!0,passive:!1,signal:f}),window.addEventListener("contextmenu",ps,{signal:f}),n.addEventListener("pointermove",this.#j.bind(this,t),{signal:f}),this._freeHighlight=new $6({x:a,y:i},[s,o,l,c],t.scale,this._defaultThickness/2,r,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=t.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static#j(t,r){this._freeHighlight.add(r)&&t.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#S(t,r){this._freeHighlight.isEmpty()?t.drawLayer.remove(this._freeHighlightId):t.createAndAddNewEditor(r,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static async deserialize(t,r,n){let a=null;if(t instanceof Mce){const{data:{quadPoints:b,rect:v,rotation:y,id:_,color:S,opacity:C,popupRef:T},parent:{page:{pageNumber:A}}}=t;a=t={annotationType:Gt.HIGHLIGHT,color:Array.from(S),opacity:C,quadPoints:b,boxes:null,pageIndex:A-1,rect:v.slice(0),rotation:y,annotationElementId:_,id:_,deleted:!1,popupRef:T}}else if(t instanceof QI){const{data:{inkLists:b,rect:v,rotation:y,id:_,color:S,borderStyle:{rawWidth:C},popupRef:T},parent:{page:{pageNumber:A}}}=t;a=t={annotationType:Gt.HIGHLIGHT,color:Array.from(S),thickness:C,inkLists:b,boxes:null,pageIndex:A-1,rect:v.slice(0),rotation:y,annotationElementId:_,id:_,deleted:!1,popupRef:T}}const{color:i,quadPoints:s,inkLists:o,opacity:l}=t,c=await super.deserialize(t,r,n);c.color=kt.makeHexColor(...i),c.#p=l||1,o&&(c.#g=t.thickness),c._initialData=a;const[u,f]=c.pageDimensions,[p,m]=c.pageTranslation;if(s){const b=c.#r=[];for(let v=0;v<s.length;v+=8)b.push({x:(s[v]-p)/u,y:1-(s[v+1]-m)/f,width:(s[v+2]-s[v])/u,height:(s[v+1]-s[v+5])/f});c.#b(),c.#N(),c.rotate(c.rotation)}else if(o){c.#u=!0;const b=o[0],v={x:b[0]-p,y:f-(b[1]-m)},y=new $6(v,[0,0,u,f],1,c.#g/2,!0,.001);for(let C=0,T=b.length;C<T;C+=2)v.x=b[C]-p,v.y=f-(b[C+1]-m),y.add(v);const{id:_,clipPathId:S}=r.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:c.color,"fill-opacity":c._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:y.toSVGPath()}},!0,!0);c.#y({highlightOutlines:y.getOutlines(),highlightId:_,clipPathId:S}),c.#N(),c.rotate(c.parentRotation)}return c}serialize(t=!1){if(this.isEmpty()||t)return null;if(this.deleted)return this.serializeDeleted();const r=this.getRect(0,0),n=Rt._colorManager.convert(this.color),a={annotationType:Gt.HIGHLIGHT,color:n,opacity:this.#p,thickness:this.#g,quadPoints:this.#D(),outlines:this.#O(r),pageIndex:this.pageIndex,rect:r,rotation:this.#M(),structTreeParentId:this._structTreeParentId};return this.annotationElementId&&!this.#x(a)?null:(a.id=this.annotationElementId,a)}#x(t){const{color:r}=this._initialData;return t.color.some((n,a)=>n!==r[a])}renderAnnotationElement(t){return t.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}}class Lce{#e=Object.create(null);updateProperty(t,r){this[t]=r,this.updateSVGProperty(t,r)}updateProperties(t){if(t)for(const[r,n]of Object.entries(t))r.startsWith("_")||this.updateProperty(r,n)}updateSVGProperty(t,r){this.#e[t]=r}toSVGProperties(){const t=this.#e;return this.#e=Object.create(null),{root:t}}reset(){this.#e=Object.create(null)}updateAll(t=this){this.updateProperties(t)}clone(){Br("Not implemented")}}class Bt extends Rt{#e=null;#t;_drawId=null;static _currentDrawId=-1;static _currentParent=null;static#r=null;static#n=null;static#i=null;static#a=NaN;static#o=null;static#s=null;static#d=NaN;static _INNER_MARGIN=3;constructor(t){super(t),this.#t=t.mustBeCommitted||!1,this._addOutlines(t)}_addOutlines(t){t.drawOutlines&&(this.#l(t),this.#h())}#l({drawOutlines:t,drawId:r,drawingOptions:n}){this.#e=t,this._drawingOptions||=n,this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),r>=0?(this._drawId=r,this.parent.drawLayer.finalizeDraw(r,t.defaultProperties)):this._drawId=this.#f(t,this.parent),this.#c(t.box)}#f(t,r){const{id:n}=r.drawLayer.draw(Bt._mergeSVGProperties(this._drawingOptions.toSVGProperties(),t.defaultSVGProperties),!1,!1);return n}static _mergeSVGProperties(t,r){const n=new Set(Object.keys(t));for(const[a,i]of Object.entries(r))n.has(a)?Object.assign(t[a],i):t[a]=i;return t}static getDefaultDrawingOptions(t){Br("Not implemented")}static get typesMap(){Br("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(t,r){const n=this.typesMap.get(t);n&&this._defaultDrawingOptions.updateProperty(n,r),this._currentParent&&(Bt.#r.updateProperty(n,r),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(t,r){const n=this.constructor.typesMap.get(t);n&&this._updateProperty(t,n,r)}static get defaultPropertiesToUpdate(){const t=[],r=this._defaultDrawingOptions;for(const[n,a]of this.typesMap)t.push([n,r[a]]);return t}get propertiesToUpdate(){const t=[],{_drawingOptions:r}=this;for(const[n,a]of this.constructor.typesMap)t.push([n,r[a]]);return t}_updateProperty(t,r,n){const a=this._drawingOptions,i=a[r],s=o=>{a.updateProperty(r,o);const l=this.#e.updateProperty(r,o);l&&this.#c(l),this.parent?.drawLayer.updateProperties(this._drawId,a.toSVGProperties())};this.addCommands({cmd:s.bind(this,n),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:t,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){this.parent?.drawLayer.updateProperties(this._drawId,Bt._mergeSVGProperties(this.#e.getPathResizingSVGProperties(this.#m()),{bbox:this.#g()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,Bt._mergeSVGProperties(this.#e.getPathResizedSVGProperties(this.#m()),{bbox:this.#g()}))}_onTranslating(t,r){this.parent?.drawLayer.updateProperties(this._drawId,{bbox:this.#g()})}_onTranslated(){this.parent?.drawLayer.updateProperties(this._drawId,Bt._mergeSVGProperties(this.#e.getPathTranslatedSVGProperties(this.#m(),this.parentDimensions),{bbox:this.#g()}))}_onStartDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,this.#t&&(this.#t=!1,this.commit(),this.parent.setSelected(this),t&&this.isOnScreen&&this.div.focus())}remove(){this.#u(),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#h(),this.#c(this.#e.box),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){let r=!1;this.parent&&!t?(this._uiManager.removeShouldRescale(this),this.#u()):t&&(this._uiManager.addShouldRescale(this),this.#h(t),r=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(t),r&&this.select()}#u(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())}#h(t=this.parent){if(!(this._drawId!==null&&this.parent===t)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,t.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=this.#f(this.#e,t)}}#p([t,r,n,a]){const{parentDimensions:[i,s],rotation:o}=this;switch(o){case 90:return[r,1-t,n*(s/i),a*(i/s)];case 180:return[1-t,1-r,n,a];case 270:return[1-r,t,n*(s/i),a*(i/s)];default:return[t,r,n,a]}}#m(){const{x:t,y:r,width:n,height:a,parentDimensions:[i,s],rotation:o}=this;switch(o){case 90:return[1-r,t,n*(i/s),a*(s/i)];case 180:return[1-t,1-r,n,a];case 270:return[r,1-t,n*(i/s),a*(s/i)];default:return[t,r,n,a]}}#c(t){if([this.x,this.y,this.width,this.height]=this.#p(t),this.div){this.fixAndSetPosition();const[r,n]=this.parentDimensions;this.setDims(this.width*r,this.height*n)}this._onResized()}#g(){const{x:t,y:r,width:n,height:a,rotation:i,parentRotation:s,parentDimensions:[o,l]}=this;switch((i*4+s)/90){case 1:return[1-r-a,t,a,n];case 2:return[1-t-n,1-r-a,n,a];case 3:return[r,1-t-n,a,n];case 4:return[t,r-n*(o/l),a*(l/o),n*(o/l)];case 5:return[1-r,t,n*(o/l),a*(l/o)];case 6:return[1-t-a*(l/o),1-r,a*(l/o),n*(o/l)];case 7:return[r-n*(o/l),1-t-a*(l/o),n*(o/l),a*(l/o)];case 8:return[t-n,r-a,n,a];case 9:return[1-r,t-n,a,n];case 10:return[1-t,1-r,n,a];case 11:return[r-a,1-t,a,n];case 12:return[t-a*(l/o),r,a*(l/o),n*(o/l)];case 13:return[1-r-n*(o/l),t-a*(l/o),n*(o/l),a*(l/o)];case 14:return[1-t,1-r-n*(o/l),a*(l/o),n*(o/l)];case 15:return[r,1-t,n*(o/l),a*(l/o)];default:return[t,r,n,a]}}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,Bt._mergeSVGProperties({bbox:this.#g()},this.#e.updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&this.#c(this.#e.updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let t,r;this._isCopy&&(t=this.x,r=this.y);const n=super.render();n.classList.add("draw");const a=document.createElement("div");n.append(a),a.setAttribute("aria-hidden","true"),a.className="internal";const[i,s]=this.parentDimensions;return this.setDims(this.width*i,this.height*s),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(t,r),n}static createDrawerInstance(t,r,n,a,i){Br("Not implemented")}static startDrawing(t,r,n,a){const{target:i,offsetX:s,offsetY:o,pointerId:l,pointerType:c}=a;if(Bt.#o&&Bt.#o!==c)return;const{viewport:{rotation:u}}=t,{width:f,height:p}=i.getBoundingClientRect(),m=Bt.#n=new AbortController,b=t.combinedSignal(m);if(Bt.#a||=l,Bt.#o??=c,window.addEventListener("pointerup",v=>{Bt.#a===v.pointerId?this._endDraw(v):Bt.#s?.delete(v.pointerId)},{signal:b}),window.addEventListener("pointercancel",v=>{Bt.#a===v.pointerId?this._currentParent.endDrawingSession():Bt.#s?.delete(v.pointerId)},{signal:b}),window.addEventListener("pointerdown",v=>{Bt.#o===v.pointerType&&((Bt.#s||=new Set).add(v.pointerId),Bt.#r.isCancellable()&&(Bt.#r.removeLastElement(),Bt.#r.isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:b}),window.addEventListener("contextmenu",ps,{signal:b}),i.addEventListener("pointermove",this._drawMove.bind(this),{signal:b}),i.addEventListener("touchmove",v=>{v.timeStamp===Bt.#d&&En(v)},{signal:b}),t.toggleDrawing(),r._editorUndoBar?.hide(),Bt.#r){t.drawLayer.updateProperties(this._currentDrawId,Bt.#r.startNew(s,o,f,p,u));return}r.updateUIForDefaultProperties(this),Bt.#r=this.createDrawerInstance(s,o,f,p,u),Bt.#i=this.getDefaultDrawingOptions(),this._currentParent=t,{id:this._currentDrawId}=t.drawLayer.draw(this._mergeSVGProperties(Bt.#i.toSVGProperties(),Bt.#r.defaultSVGProperties),!0,!1)}static _drawMove(t){if(Bt.#d=-1,!Bt.#r)return;const{offsetX:r,offsetY:n,pointerId:a}=t;if(Bt.#a===a){if(Bt.#s?.size>=1){this._endDraw(t);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,Bt.#r.add(r,n)),Bt.#d=t.timeStamp,En(t)}}static _cleanup(t){t&&(this._currentDrawId=-1,this._currentParent=null,Bt.#r=null,Bt.#i=null,Bt.#o=null,Bt.#d=NaN),Bt.#n&&(Bt.#n.abort(),Bt.#n=null,Bt.#a=NaN,Bt.#s=null)}static _endDraw(t){const r=this._currentParent;if(r){if(r.toggleDrawing(!0),this._cleanup(!1),t?.target===r.div&&r.drawLayer.updateProperties(this._currentDrawId,Bt.#r.end(t.offsetX,t.offsetY)),this.supportMultipleDrawings){const n=Bt.#r,a=this._currentDrawId,i=n.getLastElement();r.addCommands({cmd:()=>{r.drawLayer.updateProperties(a,n.setLastElement(i))},undo:()=>{r.drawLayer.updateProperties(a,n.removeLastElement())},mustExec:!1,type:mr.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(t){const r=this._currentParent;if(!r)return null;if(r.toggleDrawing(!0),r.cleanUndoStack(mr.DRAW_STEP),!Bt.#r.isEmpty()){const{pageDimensions:[n,a],scale:i}=r,s=r.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:Bt.#r.getOutlines(n*i,a*i,i,this._INNER_MARGIN),drawingOptions:Bt.#i,mustBeCommitted:!t});return this._cleanup(!0),s}return r.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(t){}static deserializeDraw(t,r,n,a,i,s){Br("Not implemented")}static async deserialize(t,r,n){const{rawDims:{pageWidth:a,pageHeight:i,pageX:s,pageY:o}}=r.viewport,l=this.deserializeDraw(s,o,a,i,this._INNER_MARGIN,t),c=await super.deserialize(t,r,n);return c.createDrawingOptions(t),c.#l({drawOutlines:l}),c.#h(),c.onScaleChanging(),c.rotate(),c}serializeDraw(t){const[r,n]=this.pageTranslation,[a,i]=this.pageDimensions;return this.#e.serialize([r,n,a,i],t)}renderAnnotationElement(t){return t.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}}class pWe{#e=new Float64Array(6);#t;#r;#n;#i;#a;#o="";#s=0;#d=new cg;#l;#f;constructor(t,r,n,a,i,s){this.#l=n,this.#f=a,this.#n=i,this.#i=s,[t,r]=this.#u(t,r);const o=this.#t=[NaN,NaN,NaN,NaN,t,r];this.#a=[t,r],this.#r=[{line:o,points:this.#a}],this.#e.set(o,0)}updateProperty(t,r){t==="stroke-width"&&(this.#i=r)}#u(t,r){return yt._normalizePoint(t,r,this.#l,this.#f,this.#n)}isEmpty(){return!this.#r||this.#r.length===0}isCancellable(){return this.#a.length<=10}add(t,r){[t,r]=this.#u(t,r);const[n,a,i,s]=this.#e.subarray(2,6),o=t-i,l=r-s;return Math.hypot(this.#l*o,this.#f*l)<=2?null:(this.#a.push(t,r),isNaN(n)?(this.#e.set([i,s,t,r],2),this.#t.push(NaN,NaN,NaN,NaN,t,r),{path:{d:this.toSVGPath()}}):(isNaN(this.#e[0])&&this.#t.splice(6,6),this.#e.set([n,a,i,s,t,r],0),this.#t.push(...yt.createBezierPoints(n,a,i,s,t,r)),{path:{d:this.toSVGPath()}}))}end(t,r){const n=this.add(t,r);return n||(this.#a.length===2?{path:{d:this.toSVGPath()}}:null)}startNew(t,r,n,a,i){this.#l=n,this.#f=a,this.#n=i,[t,r]=this.#u(t,r);const s=this.#t=[NaN,NaN,NaN,NaN,t,r];this.#a=[t,r];const o=this.#r.at(-1);return o&&(o.line=new Float32Array(o.line),o.points=new Float32Array(o.points)),this.#r.push({line:s,points:this.#a}),this.#e.set(s,0),this.#s=0,this.toSVGPath(),null}getLastElement(){return this.#r.at(-1)}setLastElement(t){return this.#r?(this.#r.push(t),this.#t=t.line,this.#a=t.points,this.#s=0,{path:{d:this.toSVGPath()}}):this.#d.setLastElement(t)}removeLastElement(){if(!this.#r)return this.#d.removeLastElement();this.#r.pop(),this.#o="";for(let t=0,r=this.#r.length;t<r;t++){const{line:n,points:a}=this.#r[t];this.#t=n,this.#a=a,this.#s=0,this.toSVGPath()}return{path:{d:this.#o}}}toSVGPath(){const t=yt.svgRound(this.#t[4]),r=yt.svgRound(this.#t[5]);if(this.#a.length===2)return this.#o=`${this.#o} M ${t} ${r} Z`,this.#o;if(this.#a.length<=6){const a=this.#o.lastIndexOf("M");this.#o=`${this.#o.slice(0,a)} M ${t} ${r}`,this.#s=6}if(this.#a.length===4){const a=yt.svgRound(this.#t[10]),i=yt.svgRound(this.#t[11]);return this.#o=`${this.#o} L ${a} ${i}`,this.#s=12,this.#o}const n=[];this.#s===0&&(n.push(`M ${t} ${r}`),this.#s=6);for(let a=this.#s,i=this.#t.length;a<i;a+=6){const[s,o,l,c,u,f]=this.#t.slice(a,a+6).map(yt.svgRound);n.push(`C${s} ${o} ${l} ${c} ${u} ${f}`)}return this.#o+=n.join(" "),this.#s=this.#t.length,this.#o}getOutlines(t,r,n,a){const i=this.#r.at(-1);return i.line=new Float32Array(i.line),i.points=new Float32Array(i.points),this.#d.build(this.#r,t,r,n,this.#n,this.#i,a),this.#e=null,this.#t=null,this.#r=null,this.#o=null,this.#d}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}class cg extends yt{#e;#t=0;#r;#n;#i;#a;#o;#s;#d;build(t,r,n,a,i,s,o){this.#i=r,this.#a=n,this.#o=a,this.#s=i,this.#d=s,this.#r=o??0,this.#n=t,this.#u()}get thickness(){return this.#d}setLastElement(t){return this.#n.push(t),{path:{d:this.toSVGPath()}}}removeLastElement(){return this.#n.pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const t=[];for(const{line:r}of this.#n){if(t.push(`M${yt.svgRound(r[4])} ${yt.svgRound(r[5])}`),r.length===6){t.push("Z");continue}if(r.length===12&&isNaN(r[6])){t.push(`L${yt.svgRound(r[10])} ${yt.svgRound(r[11])}`);continue}for(let n=6,a=r.length;n<a;n+=6){const[i,s,o,l,c,u]=r.subarray(n,n+6).map(yt.svgRound);t.push(`C${i} ${s} ${o} ${l} ${c} ${u}`)}}return t.join("")}serialize([t,r,n,a],i){const s=[],o=[],[l,c,u,f]=this.#f();let p,m,b,v,y,_,S,C,T;switch(this.#s){case 0:T=yt._rescale,p=t,m=r+a,b=n,v=-a,y=t+l*n,_=r+(1-c-f)*a,S=t+(l+u)*n,C=r+(1-c)*a;break;case 90:T=yt._rescaleAndSwap,p=t,m=r,b=n,v=a,y=t+c*n,_=r+l*a,S=t+(c+f)*n,C=r+(l+u)*a;break;case 180:T=yt._rescale,p=t+n,m=r,b=-n,v=a,y=t+(1-l-u)*n,_=r+c*a,S=t+(1-l)*n,C=r+(c+f)*a;break;case 270:T=yt._rescaleAndSwap,p=t+n,m=r+a,b=-n,v=-a,y=t+(1-c-f)*n,_=r+(1-l-u)*a,S=t+(1-c)*n,C=r+(1-l)*a;break}for(const{line:A,points:k}of this.#n)s.push(T(A,p,m,b,v,i?new Array(A.length):null)),o.push(T(k,p,m,b,v,i?new Array(k.length):null));return{lines:s,points:o,rect:[y,_,S,C]}}static deserialize(t,r,n,a,i,{paths:{lines:s,points:o},rotation:l,thickness:c}){const u=[];let f,p,m,b,v;switch(l){case 0:v=yt._rescale,f=-t/n,p=r/a+1,m=1/n,b=-1/a;break;case 90:v=yt._rescaleAndSwap,f=-r/a,p=-t/n,m=1/a,b=1/n;break;case 180:v=yt._rescale,f=t/n+1,p=-r/a,m=-1/n,b=1/a;break;case 270:v=yt._rescaleAndSwap,f=r/a+1,p=t/n+1,m=-1/a,b=-1/n;break}if(!s){s=[];for(const _ of o){const S=_.length;if(S===2){s.push(new Float32Array([NaN,NaN,NaN,NaN,_[0],_[1]]));continue}if(S===4){s.push(new Float32Array([NaN,NaN,NaN,NaN,_[0],_[1],NaN,NaN,NaN,NaN,_[2],_[3]]));continue}const C=new Float32Array(3*(S-2));s.push(C);let[T,A,k,N]=_.subarray(0,4);C.set([NaN,NaN,NaN,NaN,T,A],0);for(let L=4;L<S;L+=2){const I=_[L],P=_[L+1];C.set(yt.createBezierPoints(T,A,k,N,I,P),(L-2)*3),[T,A,k,N]=[k,N,I,P]}}}for(let _=0,S=s.length;_<S;_++)u.push({line:v(s[_].map(C=>C??NaN),f,p,m,b),points:v(o[_].map(C=>C??NaN),f,p,m,b)});const y=new this.prototype.constructor;return y.build(u,n,a,1,l,c,i),y}#l(t=this.#d){const r=this.#r+t/2*this.#o;return this.#s%180===0?[r/this.#i,r/this.#a]:[r/this.#a,r/this.#i]}#f(){const[t,r,n,a]=this.#e,[i,s]=this.#l(0);return[t+i,r+s,n-2*i,a-2*s]}#u(){const t=this.#e=new Float32Array([1/0,1/0,-1/0,-1/0]);for(const{line:a}of this.#n){if(a.length<=12){for(let o=4,l=a.length;o<l;o+=6)kt.pointBoundingBox(a[o],a[o+1],t);continue}let i=a[4],s=a[5];for(let o=6,l=a.length;o<l;o+=6){const[c,u,f,p,m,b]=a.subarray(o,o+6);kt.bezierBoundingBox(i,s,c,u,f,p,m,b,t),i=m,s=b}}const[r,n]=this.#l();t[0]=ga(t[0]-r,0,1),t[1]=ga(t[1]-n,0,1),t[2]=ga(t[2]+r,0,1),t[3]=ga(t[3]+n,0,1),t[2]-=t[0],t[3]-=t[1]}get box(){return this.#e}updateProperty(t,r){return t==="stroke-width"?this.#h(r):null}#h(t){const[r,n]=this.#l();this.#d=t;const[a,i]=this.#l(),[s,o]=[a-r,i-n],l=this.#e;return l[0]-=s,l[1]-=o,l[2]+=2*s,l[3]+=2*o,l}updateParentDimensions([t,r],n){const[a,i]=this.#l();this.#i=t,this.#a=r,this.#o=n;const[s,o]=this.#l(),l=s-a,c=o-i,u=this.#e;return u[0]-=l,u[1]-=c,u[2]+=2*l,u[3]+=2*c,u}updateRotation(t){return this.#t=t,{path:{transform:this.rotationTransform}}}get viewBox(){return this.#e.map(yt.svgRound).join(" ")}get defaultProperties(){const[t,r]=this.#e;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${yt.svgRound(t)} ${yt.svgRound(r)}`}}}get rotationTransform(){const[,,t,r]=this.#e;let n=0,a=0,i=0,s=0,o=0,l=0;switch(this.#t){case 90:a=r/t,i=-t/r,o=t;break;case 180:n=-1,s=-1,o=t,l=r;break;case 270:a=-r/t,i=t/r,l=r;break;default:return""}return`matrix(${n} ${a} ${i} ${s} ${yt.svgRound(o)} ${yt.svgRound(l)})`}getPathResizingSVGProperties([t,r,n,a]){const[i,s]=this.#l(),[o,l,c,u]=this.#e;if(Math.abs(c-i)<=yt.PRECISION||Math.abs(u-s)<=yt.PRECISION){const v=t+n/2-(o+c/2),y=r+a/2-(l+u/2);return{path:{"transform-origin":`${yt.svgRound(t)} ${yt.svgRound(r)}`,transform:`${this.rotationTransform} translate(${v} ${y})`}}}const f=(n-2*i)/(c-2*i),p=(a-2*s)/(u-2*s),m=c/n,b=u/a;return{path:{"transform-origin":`${yt.svgRound(o)} ${yt.svgRound(l)}`,transform:`${this.rotationTransform} scale(${m} ${b}) translate(${yt.svgRound(i)} ${yt.svgRound(s)}) scale(${f} ${p}) translate(${yt.svgRound(-i)} ${yt.svgRound(-s)})`}}}getPathResizedSVGProperties([t,r,n,a]){const[i,s]=this.#l(),o=this.#e,[l,c,u,f]=o;if(o[0]=t,o[1]=r,o[2]=n,o[3]=a,Math.abs(u-i)<=yt.PRECISION||Math.abs(f-s)<=yt.PRECISION){const y=t+n/2-(l+u/2),_=r+a/2-(c+f/2);for(const{line:S,points:C}of this.#n)yt._translate(S,y,_,S),yt._translate(C,y,_,C);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${yt.svgRound(t)} ${yt.svgRound(r)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const p=(n-2*i)/(u-2*i),m=(a-2*s)/(f-2*s),b=-p*(l+i)+t+i,v=-m*(c+s)+r+s;if(p!==1||m!==1||b!==0||v!==0)for(const{line:y,points:_}of this.#n)yt._rescale(y,b,v,p,m,y),yt._rescale(_,b,v,p,m,_);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${yt.svgRound(t)} ${yt.svgRound(r)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([t,r],n){const[a,i]=n,s=this.#e,o=t-s[0],l=r-s[1];if(this.#i===a&&this.#a===i)for(const{line:c,points:u}of this.#n)yt._translate(c,o,l,c),yt._translate(u,o,l,u);else{const c=this.#i/a,u=this.#a/i;this.#i=a,this.#a=i;for(const{line:f,points:p}of this.#n)yt._rescale(f,o,l,c,u,f),yt._rescale(p,o,l,c,u,p);s[2]*=c,s[3]*=u}return s[0]=t,s[1]=r,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${yt.svgRound(t)} ${yt.svgRound(r)}`}}}get defaultSVGProperties(){const t=this.#e;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${yt.svgRound(t[0])} ${yt.svgRound(t[1])}`,transform:this.rotationTransform||null},bbox:t}}}class vy extends Lce{constructor(t){super(),this._viewParameters=t,super.updateProperties({fill:"none",stroke:Rt._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(t,r){t==="stroke-width"&&(r??=this["stroke-width"],r*=this._viewParameters.realScale),super.updateSVGProperty(t,r)}clone(){const t=new vy(this._viewParameters);return t.updateAll(this),t}}class e8 extends Bt{static _type="ink";static _editorType=Gt.INK;static _defaultDrawingOptions=null;constructor(t){super({...t,name:"inkEditor"}),this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(t,r){Rt.initialize(t,r),this._defaultDrawingOptions=new vy(r.viewParameters)}static getDefaultDrawingOptions(t){const r=this._defaultDrawingOptions.clone();return r.updateProperties(t),r}static get supportMultipleDrawings(){return!0}static get typesMap(){return dr(this,"typesMap",new Map([[mr.INK_THICKNESS,"stroke-width"],[mr.INK_COLOR,"stroke"],[mr.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(t,r,n,a,i){return new pWe(t,r,n,a,i,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(t,r,n,a,i,s){return cg.deserialize(t,r,n,a,i,s)}static async deserialize(t,r,n){let a=null;if(t instanceof QI){const{data:{inkLists:s,rect:o,rotation:l,id:c,color:u,opacity:f,borderStyle:{rawWidth:p},popupRef:m},parent:{page:{pageNumber:b}}}=t;a=t={annotationType:Gt.INK,color:Array.from(u),thickness:p,opacity:f,paths:{points:s},boxes:null,pageIndex:b-1,rect:o.slice(0),rotation:l,annotationElementId:c,id:c,deleted:!1,popupRef:m}}const i=await super.deserialize(t,r,n);return i._initialData=a,i}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:t,_drawingOptions:r,parent:n}=this;r.updateSVGProperty("stroke-width"),n.drawLayer.updateProperties(t,r.toSVGProperties())}static onScaleChangingWhenDrawing(){const t=this._currentParent;t&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),t.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:t,thickness:r,opacity:n}){this._drawingOptions=e8.getDefaultDrawingOptions({stroke:kt.makeHexColor(...t),"stroke-width":r,"stroke-opacity":n})}serialize(t=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:r,points:n,rect:a}=this.serializeDraw(t),{_drawingOptions:{stroke:i,"stroke-opacity":s,"stroke-width":o}}=this,l={annotationType:Gt.INK,color:Rt._colorManager.convert(i),opacity:s,thickness:o,paths:{lines:r,points:n},pageIndex:this.pageIndex,rect:a,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return t?(l.isCopy=!0,l):this.annotationElementId&&!this.#e(l)?null:(l.id=this.annotationElementId,l)}#e(t){const{color:r,thickness:n,opacity:a,pageIndex:i}=this._initialData;return this._hasBeenMoved||this._hasBeenResized||t.color.some((s,o)=>s!==r[o])||t.thickness!==n||t.opacity!==a||t.pageIndex!==i}renderAnnotationElement(t){const{points:r,rect:n}=this.serializeDraw(!1);return t.updateEdited({rect:n,thickness:this._drawingOptions["stroke-width"],points:r}),null}}class H6 extends cg{toSVGPath(){let t=super.toSVGPath();return t.endsWith("Z")||(t+="Z"),t}}const w1=8,Qh=3;class Mu{static#e={maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16};static#t(t,r,n,a){return n-=t,a-=r,n===0?a>0?0:4:n===1?a+6:2-a}static#r=new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]);static#n(t,r,n,a,i,s,o){const l=this.#t(n,a,i,s);for(let c=0;c<8;c++){const u=(-c+l-o+16)%8,f=this.#r[2*u],p=this.#r[2*u+1];if(t[(n+f)*r+(a+p)]!==0)return u}return-1}static#i(t,r,n,a,i,s,o){const l=this.#t(n,a,i,s);for(let c=0;c<8;c++){const u=(c+l+o+16)%8,f=this.#r[2*u],p=this.#r[2*u+1];if(t[(n+f)*r+(a+p)]!==0)return u}return-1}static#a(t,r,n,a){const i=t.length,s=new Int32Array(i);for(let u=0;u<i;u++)s[u]=t[u]<=a?1:0;for(let u=1;u<n-1;u++)s[u*r]=s[u*r+r-1]=0;for(let u=0;u<r;u++)s[u]=s[r*n-1-u]=0;let o=1,l;const c=[];for(let u=1;u<n-1;u++){l=1;for(let f=1;f<r-1;f++){const p=u*r+f,m=s[p];if(m===0)continue;let b=u,v=f;if(m===1&&s[p-1]===0)o+=1,v-=1;else if(m>=1&&s[p+1]===0)o+=1,v+=1,m>1&&(l=m);else{m!==1&&(l=Math.abs(m));continue}const y=[f,u],_=v===f+1,S={isHole:_,points:y,id:o,parent:0};c.push(S);let C;for(const H of c)if(H.id===l){C=H;break}C?C.isHole?S.parent=_?C.parent:l:S.parent=_?l:C.parent:S.parent=_?l:0;const T=this.#n(s,r,u,f,b,v,0);if(T===-1){s[p]=-o,s[p]!==1&&(l=Math.abs(s[p]));continue}let A=this.#r[2*T],k=this.#r[2*T+1];const N=u+A,L=f+k;b=N,v=L;let I=u,P=f;for(;;){const H=this.#i(s,r,I,P,b,v,1);A=this.#r[2*H],k=this.#r[2*H+1];const B=I+A,K=P+k;y.push(K,B);const j=I*r+P;if(s[j+1]===0?s[j]=-o:s[j]===1&&(s[j]=o),B===u&&K===f&&I===N&&P===L){s[p]!==1&&(l=Math.abs(s[p]));break}else b=I,v=P,I=B,P=K}}}return c}static#o(t,r,n,a){if(n-r<=4){for(let N=r;N<n-2;N+=2)a.push(t[N],t[N+1]);return}const i=t[r],s=t[r+1],o=t[n-4]-i,l=t[n-3]-s,c=Math.hypot(o,l),u=o/c,f=l/c,p=u*s-f*i,m=l/o,b=1/c,v=Math.atan(m),y=Math.cos(v),_=Math.sin(v),S=b*(Math.abs(y)+Math.abs(_)),C=b*(1-S+S**2),T=Math.max(Math.atan(Math.abs(_+y)*C),Math.atan(Math.abs(_-y)*C));let A=0,k=r;for(let N=r+2;N<n-2;N+=2){const L=Math.abs(p-u*t[N+1]+f*t[N]);L>A&&(k=N,A=L)}A>(c*T)**2?(this.#o(t,r,k+2,a),this.#o(t,k,n,a)):a.push(i,s)}static#s(t){const r=[],n=t.length;return this.#o(t,0,n,r),r.push(t[n-2],t[n-1]),r.length<=4?null:r}static#d(t,r,n,a,i,s){const o=new Float32Array(s**2),l=-2*a**2,c=s>>1;for(let v=0;v<s;v++){const y=(v-c)**2;for(let _=0;_<s;_++)o[v*s+_]=Math.exp((y+(_-c)**2)/l)}const u=new Float32Array(256),f=-2*i**2;for(let v=0;v<256;v++)u[v]=Math.exp(v**2/f);const p=t.length,m=new Uint8Array(p),b=new Uint32Array(256);for(let v=0;v<n;v++)for(let y=0;y<r;y++){const _=v*r+y,S=t[_];let C=0,T=0;for(let k=0;k<s;k++){const N=v+k-c;if(!(N<0||N>=n))for(let L=0;L<s;L++){const I=y+L-c;if(I<0||I>=r)continue;const P=t[N*r+I],H=o[k*s+L]*u[Math.abs(P-S)];C+=P*H,T+=H}}const A=m[_]=Math.round(C/T);b[A]++}return[m,b]}static#l(t){const r=new Uint32Array(256);for(const n of t)r[n]++;return r}static#f(t){const r=t.length,n=new Uint8ClampedArray(r>>2);let a=-1/0,i=1/0;for(let o=0,l=n.length;o<l;o++){if(t[(o<<2)+3]===0){a=n[o]=255;continue}const u=n[o]=t[o<<2];u>a&&(a=u),u<i&&(i=u)}const s=255/(a-i);for(let o=0;o<r;o++)n[o]=(n[o]-i)*s;return n}static#u(t){let r,n=-1/0,a=-1/0;const i=t.findIndex(l=>l!==0);let s=i,o=i;for(r=i;r<256;r++){const l=t[r];l>n&&(r-s>a&&(a=r-s,o=r-1),n=l,s=r)}for(r=o-1;r>=0&&!(t[r]>t[r+1]);r--);return r}static#h(t){const r=t,{width:n,height:a}=t,{maxDim:i}=this.#e;let s=n,o=a;if(n>i||a>i){let p=n,m=a,b=Math.log2(Math.max(n,a)/i);const v=Math.floor(b);b=b===v?v-1:v;for(let _=0;_<b;_++){s=Math.ceil(p/2),o=Math.ceil(m/2);const S=new OffscreenCanvas(s,o);S.getContext("2d").drawImage(t,0,0,p,m,0,0,s,o),p=s,m=o,t!==r&&t.close(),t=S.transferToImageBitmap()}const y=Math.min(i/s,i/o);s=Math.round(s*y),o=Math.round(o*y)}const c=new OffscreenCanvas(s,o).getContext("2d",{willReadFrequently:!0});c.filter="grayscale(1)",c.drawImage(t,0,0,t.width,t.height,0,0,s,o);const u=c.getImageData(0,0,s,o).data;return[this.#f(u),s,o]}static extractContoursFromText(t,{fontFamily:r,fontStyle:n,fontWeight:a},i,s,o,l){let c=new OffscreenCanvas(1,1),u=c.getContext("2d",{alpha:!1});const f=200,p=u.font=`${n} ${a} ${f}px ${r}`,{actualBoundingBoxLeft:m,actualBoundingBoxRight:b,actualBoundingBoxAscent:v,actualBoundingBoxDescent:y,fontBoundingBoxAscent:_,fontBoundingBoxDescent:S,width:C}=u.measureText(t),T=1.5,A=Math.ceil(Math.max(Math.abs(m)+Math.abs(b)||0,C)*T),k=Math.ceil(Math.max(Math.abs(v)+Math.abs(y)||f,Math.abs(_)+Math.abs(S)||f)*T);c=new OffscreenCanvas(A,k),u=c.getContext("2d",{alpha:!0,willReadFrequently:!0}),u.font=p,u.filter="grayscale(1)",u.fillStyle="white",u.fillRect(0,0,A,k),u.fillStyle="black",u.fillText(t,A*(T-1)/2,k*(3-T)/2);const N=this.#f(u.getImageData(0,0,A,k).data),L=this.#l(N),I=this.#u(L),P=this.#a(N,A,k,I);return this.processDrawnLines({lines:{curves:P,width:A,height:k},pageWidth:i,pageHeight:s,rotation:o,innerMargin:l,mustSmooth:!0,areContours:!0})}static process(t,r,n,a,i){const[s,o,l]=this.#h(t),[c,u]=this.#d(s,o,l,Math.hypot(o,l)*this.#e.sigmaSFactor,this.#e.sigmaR,this.#e.kernelSize),f=this.#u(u),p=this.#a(c,o,l,f);return this.processDrawnLines({lines:{curves:p,width:o,height:l},pageWidth:r,pageHeight:n,rotation:a,innerMargin:i,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:t,pageWidth:r,pageHeight:n,rotation:a,innerMargin:i,mustSmooth:s,areContours:o}){a%180!==0&&([r,n]=[n,r]);const{curves:l,width:c,height:u}=t,f=t.thickness??0,p=[],m=Math.min(r/c,n/u),b=m/r,v=m/n,y=[];for(const{points:S}of l){const C=s?this.#s(S):S;if(!C)continue;y.push(C);const T=C.length,A=new Float32Array(T),k=new Float32Array(3*(T===2?2:T-2));if(p.push({line:k,points:A}),T===2){A[0]=C[0]*b,A[1]=C[1]*v,k.set([NaN,NaN,NaN,NaN,A[0],A[1]],0);continue}let[N,L,I,P]=C;N*=b,L*=v,I*=b,P*=v,A.set([N,L,I,P],0),k.set([NaN,NaN,NaN,NaN,N,L],0);for(let H=4;H<T;H+=2){const B=A[H]=C[H]*b,K=A[H+1]=C[H+1]*v;k.set(yt.createBezierPoints(N,L,I,P,B,K),(H-2)*3),[N,L,I,P]=[I,P,B,K]}}if(p.length===0)return null;const _=o?new H6:new cg;return _.build(p,r,n,1,a,o?0:f,i),{outline:_,newCurves:y,areContours:o,thickness:f,width:c,height:u}}static async compressSignature({outlines:t,areContours:r,thickness:n,width:a,height:i}){let s=1/0,o=-1/0,l=0;for(const C of t){l+=C.length;for(let T=2,A=C.length;T<A;T++){const k=C[T]-C[T-2];s=Math.min(s,k),o=Math.max(o,k)}}let c;s>=-128&&o<=127?c=Int8Array:s>=-32768&&o<=32767?c=Int16Array:c=Int32Array;const u=t.length,f=w1+Qh*u,p=new Uint32Array(f);let m=0;p[m++]=f*Uint32Array.BYTES_PER_ELEMENT+(l-2*u)*c.BYTES_PER_ELEMENT,p[m++]=0,p[m++]=a,p[m++]=i,p[m++]=r?0:1,p[m++]=Math.max(0,Math.floor(n??0)),p[m++]=u,p[m++]=c.BYTES_PER_ELEMENT;for(const C of t)p[m++]=C.length-2,p[m++]=C[0],p[m++]=C[1];const b=new CompressionStream("deflate-raw"),v=b.writable.getWriter();await v.ready,v.write(p);const y=c.prototype.constructor;for(const C of t){const T=new y(C.length-2);for(let A=2,k=C.length;A<k;A++)T[A-2]=C[A]-C[A-2];v.write(T)}v.close();const _=await new Response(b.readable).arrayBuffer(),S=new Uint8Array(_);return ace(S)}static async decompressSignature(t){try{const r=HGe(t),{readable:n,writable:a}=new DecompressionStream("deflate-raw"),i=a.getWriter();await i.ready,i.write(r).then(async()=>{await i.ready,await i.close()}).catch(()=>{});let s=null,o=0;for await(const C of n)s||=new Uint8Array(new Uint32Array(C.buffer,0,4)[0]),s.set(C,o),o+=C.length;const l=new Uint32Array(s.buffer,0,s.length>>2),c=l[1];if(c!==0)throw new Error(`Invalid version: ${c}`);const u=l[2],f=l[3],p=l[4]===0,m=l[5],b=l[6],v=l[7],y=[],_=(w1+Qh*b)*Uint32Array.BYTES_PER_ELEMENT;let S;switch(v){case Int8Array.BYTES_PER_ELEMENT:S=new Int8Array(s.buffer,_);break;case Int16Array.BYTES_PER_ELEMENT:S=new Int16Array(s.buffer,_);break;case Int32Array.BYTES_PER_ELEMENT:S=new Int32Array(s.buffer,_);break}o=0;for(let C=0;C<b;C++){const T=l[Qh*C+w1],A=new Float32Array(T+2);y.push(A);for(let k=0;k<Qh-1;k++)A[k]=l[Qh*C+w1+k+1];for(let k=0;k<T;k++)A[k+2]=A[k]+S[o++]}return{areContours:p,thickness:m,outlines:y,width:u,height:f}}catch(r){return Kt(`decompressSignature: ${r}`),null}}}class t8 extends Lce{constructor(){super(),super.updateProperties({fill:Rt._defaultLineColor,"stroke-width":0})}clone(){const t=new t8;return t.updateAll(this),t}}class r8 extends vy{constructor(t){super(t),super.updateProperties({stroke:Rt._defaultLineColor,"stroke-width":1})}clone(){const t=new r8(this._viewParameters);return t.updateAll(this),t}}class mo extends Bt{#e=!1;#t=null;#r=null;#n=null;static _type="signature";static _editorType=Gt.SIGNATURE;static _defaultDrawingOptions=null;constructor(t){super({...t,mustBeCommitted:!0,name:"signatureEditor"}),this._willKeepAspectRatio=!0,this.#r=t.signatureData||null,this.#t=null,this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(t,r){Rt.initialize(t,r),this._defaultDrawingOptions=new t8,this._defaultDrawnSignatureOptions=new r8(r.viewParameters)}static getDefaultDrawingOptions(t){const r=this._defaultDrawingOptions.clone();return r.updateProperties(t),r}static get supportMultipleDrawings(){return!1}static get typesMap(){return dr(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!this.#t}}static computeTelemetryFinalData(t){const r=t.get("hasDescription");return{hasAltText:r.get(!0)??0,hasNoAltText:r.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let t,r;const{_isCopy:n}=this;if(n&&(this._isCopy=!1,t=this.x,r=this.y),super.render(),this._drawId===null)if(this.#r){const{lines:a,mustSmooth:i,areContours:s,description:o,uuid:l,heightInPage:c}=this.#r,{rawDims:{pageWidth:u,pageHeight:f},rotation:p}=this.parent.viewport,m=Mu.processDrawnLines({lines:a,pageWidth:u,pageHeight:f,rotation:p,innerMargin:mo._INNER_MARGIN,mustSmooth:i,areContours:s});this.addSignature(m,c,o,l)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);return n&&(this._isCopy=!0,this._moveAfterPaste(t,r)),this.div}setUuid(t){this.#n=t,this.addEditToolbar()}getUuid(){return this.#n}get description(){return this.#t}set description(t){this.#t=t,super.addEditToolbar().then(r=>{r?.updateEditSignatureButton(t)})}getSignaturePreview(){const{newCurves:t,areContours:r,thickness:n,width:a,height:i}=this.#r,s=Math.max(a,i),o=Mu.processDrawnLines({lines:{curves:t.map(l=>({points:l})),thickness:n,width:a,height:i},pageWidth:s,pageHeight:s,rotation:0,innerMargin:0,mustSmooth:!1,areContours:r});return{areContours:r,outline:o.outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(t,r,n,a){const{x:i,y:s}=this,{outline:o}=this.#r=t;this.#e=o instanceof H6,this.description=n,this.div.setAttribute("data-l10n-args",JSON.stringify({description:n}));let l;this.#e?l=mo.getDefaultDrawingOptions():(l=mo._defaultDrawnSignatureOptions.clone(),l.updateProperties({"stroke-width":o.thickness})),this._addOutlines({drawOutlines:o,drawingOptions:l});const[c,u]=this.parentDimensions,[,f]=this.pageDimensions;let p=r/f;p=p>=1?.5:p,this.width*=p/this.height,this.width>=1&&(p*=.9/this.width,this.width=.9),this.height=p,this.setDims(c*this.width,u*this.height),this.x=i,this.y=s,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(a),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!a,hasDescription:!!n}}),this.div.hidden=!1}getFromImage(t){const{rawDims:{pageWidth:r,pageHeight:n},rotation:a}=this.parent.viewport;return Mu.process(t,r,n,a,mo._INNER_MARGIN)}getFromText(t,r){const{rawDims:{pageWidth:n,pageHeight:a},rotation:i}=this.parent.viewport;return Mu.extractContoursFromText(t,r,n,a,i,mo._INNER_MARGIN)}getDrawnSignature(t){const{rawDims:{pageWidth:r,pageHeight:n},rotation:a}=this.parent.viewport;return Mu.processDrawnLines({lines:t,pageWidth:r,pageHeight:n,rotation:a,innerMargin:mo._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:t,thickness:r}){t?this._drawingOptions=mo.getDefaultDrawingOptions():(this._drawingOptions=mo._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":r}))}serialize(t=!1){if(this.isEmpty())return null;const{lines:r,points:n,rect:a}=this.serializeDraw(t),{_drawingOptions:{"stroke-width":i}}=this,s={annotationType:Gt.SIGNATURE,isSignature:!0,areContours:this.#e,color:[0,0,0],thickness:this.#e?0:i,pageIndex:this.pageIndex,rect:a,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return t?(s.paths={lines:r,points:n},s.uuid=this.#n,s.isCopy=!0):s.lines=r,this.#t&&(s.accessibilityData={type:"Figure",alt:this.#t}),s}static deserializeDraw(t,r,n,a,i,s){return s.areContours?H6.deserialize(t,r,n,a,i,s):cg.deserialize(t,r,n,a,i,s)}static async deserialize(t,r,n){const a=await super.deserialize(t,r,n);return a.#e=t.areContours,a.#t=t.accessibilityData?.alt||"",a.#n=t.uuid,a}}class mWe extends Rt{#e=null;#t=null;#r=null;#n=null;#i=null;#a="";#o=null;#s=!1;#d=null;#l=!1;#f=!1;static _type="stamp";static _editorType=Gt.STAMP;constructor(t){super({...t,name:"stampEditor"}),this.#n=t.bitmapUrl,this.#i=t.bitmapFile,this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(t,r){Rt.initialize(t,r)}static isHandlingMimeForPasting(t){return Pb.includes(t)}static paste(t,r){r.pasteEditor({mode:Gt.STAMP},{bitmapFile:t.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(t){const r=t.get("hasAltText");return{hasAltText:r.get(!0)??0,hasNoAltText:r.get(!1)??0}}#u(t,r=!1){if(!t){this.remove();return}this.#e=t.bitmap,r||(this.#t=t.id,this.#l=t.isSvg),t.file&&(this.#a=t.file.name),this.#m()}#h(){if(this.#r=null,this._uiManager.enableWaiting(!1),!!this.#o){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#e){this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#e){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}async mlGuessAltText(t=null,r=!0){if(this.hasAltTextData())return null;const{mlManager:n}=this._uiManager;if(!n)throw new Error("No ML.");if(!await n.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:a,width:i,height:s}=t||this.copyCanvas(null,null,!0).imageData,o=await n.guess({name:"altText",request:{data:a,width:i,height:s,channels:a.length/(i*s)}});if(!o)throw new Error("No response from the AI service.");if(o.error)throw new Error("Error from the AI service.");if(o.cancel)return null;if(!o.output)throw new Error("No valid response from the AI service.");const l=o.output;return await this.setGuessedAltText(l),r&&!this.hasAltTextData()&&(this.altTextData={alt:l,decorative:!1}),l}#p(){if(this.#t){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(this.#t).then(n=>this.#u(n,!0)).finally(()=>this.#h());return}if(this.#n){const n=this.#n;this.#n=null,this._uiManager.enableWaiting(!0),this.#r=this._uiManager.imageManager.getFromUrl(n).then(a=>this.#u(a)).finally(()=>this.#h());return}if(this.#i){const n=this.#i;this.#i=null,this._uiManager.enableWaiting(!0),this.#r=this._uiManager.imageManager.getFromFile(n).then(a=>this.#u(a)).finally(()=>this.#h());return}const t=document.createElement("input");t.type="file",t.accept=Pb.join(",");const r=this._uiManager._signal;this.#r=new Promise(n=>{t.addEventListener("change",async()=>{if(!t.files||t.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const a=await this._uiManager.imageManager.getFromFile(t.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#u(a)}n()},{signal:r}),t.addEventListener("cancel",()=>{this.remove(),n()},{signal:r})}).finally(()=>this.#h()),t.click()}remove(){this.#t&&(this.#e=null,this._uiManager.imageManager.deleteId(this.#t),this.#o?.remove(),this.#o=null,this.#d&&(clearTimeout(this.#d),this.#d=null)),super.remove()}rebuild(){if(!this.parent){this.#t&&this.#p();return}super.rebuild(),this.div!==null&&(this.#t&&this.#o===null&&this.#p(),this.isAttachedToDOM||this.parent.add(this))}onceAdded(t){this._isDraggable=!0,t&&this.div.focus()}isEmpty(){return!(this.#r||this.#e||this.#n||this.#i||this.#t||this.#s)}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}render(){if(this.div)return this.div;let t,r;return this._isCopy&&(t=this.x,r=this.y),super.render(),this.div.hidden=!0,this.createAltText(),this.#s||(this.#e?this.#m():this.#p()),this._isCopy&&this._moveAfterPaste(t,r),this._uiManager.addShouldRescale(this),this.div}setCanvas(t,r){const{id:n,bitmap:a}=this._uiManager.imageManager.getFromCanvas(t,r);r.remove(),n&&this._uiManager.imageManager.isValidId(n)&&(this.#t=n,a&&(this.#e=a),this.#s=!1,this.#m())}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;this.#d!==null&&clearTimeout(this.#d);const t=200;this.#d=setTimeout(()=>{this.#d=null,this.#g()},t)}#m(){const{div:t}=this;let{width:r,height:n}=this.#e;const[a,i]=this.pageDimensions,s=.75;if(this.width)r=this.width*a,n=this.height*i;else if(r>s*a||n>s*i){const u=Math.min(s*a/r,s*i/n);r*=u,n*=u}const[o,l]=this.parentDimensions;this.setDims(r*o/a,n*l/i),this._uiManager.enableWaiting(!1);const c=this.#o=document.createElement("canvas");c.setAttribute("role","img"),this.addContainer(c),this.width=r/a,this.height=n/i,this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(t.hidden=!1),this.#g(),this.#f||(this.parent.addUndoableEditor(this),this.#f=!0),this._reportTelemetry({action:"inserted_image"}),this.#a&&this.div.setAttribute("aria-description",this.#a),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")}copyCanvas(t,r,n=!1){t||(t=224);const{width:a,height:i}=this.#e,s=new Gs;let o=this.#e,l=a,c=i,u=null;if(r){if(a>r||i>r){const k=Math.min(r/a,r/i);l=Math.floor(a*k),c=Math.floor(i*k)}u=document.createElement("canvas");const p=u.width=Math.ceil(l*s.sx),m=u.height=Math.ceil(c*s.sy);this.#l||(o=this.#c(p,m));const b=u.getContext("2d");b.filter=this._uiManager.hcmFilter;let v="white",y="#cfcfd8";this._uiManager.hcmFilter!=="none"?y="black":window.matchMedia?.("(prefers-color-scheme: dark)").matches&&(v="#8f8f9d",y="#42414d");const _=15,S=_*s.sx,C=_*s.sy,T=new OffscreenCanvas(S*2,C*2),A=T.getContext("2d");A.fillStyle=v,A.fillRect(0,0,S*2,C*2),A.fillStyle=y,A.fillRect(0,0,S,C),A.fillRect(S,C,S,C),b.fillStyle=b.createPattern(T,"repeat"),b.fillRect(0,0,p,m),b.drawImage(o,0,0,o.width,o.height,0,0,p,m)}let f=null;if(n){let p,m;if(s.symmetric&&o.width<t&&o.height<t)p=o.width,m=o.height;else if(o=this.#e,a>t||i>t){const y=Math.min(t/a,t/i);p=Math.floor(a*y),m=Math.floor(i*y),this.#l||(o=this.#c(p,m))}const v=new OffscreenCanvas(p,m).getContext("2d",{willReadFrequently:!0});v.drawImage(o,0,0,o.width,o.height,0,0,p,m),f={width:p,height:m,data:v.getImageData(0,0,p,m).data}}return{canvas:u,width:l,height:c,imageData:f}}#c(t,r){const{width:n,height:a}=this.#e;let i=n,s=a,o=this.#e;for(;i>2*t||s>2*r;){const l=i,c=s;i>2*t&&(i=i>=16384?Math.floor(i/2)-1:Math.ceil(i/2)),s>2*r&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2));const u=new OffscreenCanvas(i,s);u.getContext("2d").drawImage(o,0,0,l,c,0,0,i,s),o=u.transferToImageBitmap()}return o}#g(){const[t,r]=this.parentDimensions,{width:n,height:a}=this,i=new Gs,s=Math.ceil(n*t*i.sx),o=Math.ceil(a*r*i.sy),l=this.#o;if(!l||l.width===s&&l.height===o)return;l.width=s,l.height=o;const c=this.#l?this.#e:this.#c(s,o),u=l.getContext("2d");u.filter=this._uiManager.hcmFilter,u.drawImage(c,0,0,c.width,c.height,0,0,s,o)}#v(t){if(t){if(this.#l){const a=this._uiManager.imageManager.getSvgUrl(this.#t);if(a)return a}const r=document.createElement("canvas");return{width:r.width,height:r.height}=this.#e,r.getContext("2d").drawImage(this.#e,0,0),r.toDataURL()}if(this.#l){const[r,n]=this.pageDimensions,a=Math.round(this.width*r*ed.PDF_TO_CSS_UNITS),i=Math.round(this.height*n*ed.PDF_TO_CSS_UNITS),s=new OffscreenCanvas(a,i);return s.getContext("2d").drawImage(this.#e,0,0,this.#e.width,this.#e.height,0,0,a,i),s.transferToImageBitmap()}return structuredClone(this.#e)}static async deserialize(t,r,n){let a=null,i=!1;if(t instanceof Dce){const{data:{rect:v,rotation:y,id:_,structParent:S,popupRef:C},container:T,parent:{page:{pageNumber:A}},canvas:k}=t;let N,L;k?(delete t.canvas,{id:N,bitmap:L}=n.imageManager.getFromCanvas(T.id,k),k.remove()):(i=!0,t._hasNoCanvas=!0);const I=(await r._structTree.getAriaAttributes(`${zI}${_}`))?.get("aria-label")||"";a=t={annotationType:Gt.STAMP,bitmapId:N,bitmap:L,pageIndex:A-1,rect:v.slice(0),rotation:y,annotationElementId:_,id:_,deleted:!1,accessibilityData:{decorative:!1,altText:I},isSvg:!1,structParent:S,popupRef:C}}const s=await super.deserialize(t,r,n),{rect:o,bitmap:l,bitmapUrl:c,bitmapId:u,isSvg:f,accessibilityData:p}=t;i?(n.addMissingCanvas(t.id,s),s.#s=!0):u&&n.imageManager.isValidId(u)?(s.#t=u,l&&(s.#e=l)):s.#n=c,s.#l=f;const[m,b]=s.pageDimensions;return s.width=(o[2]-o[0])/m,s.height=(o[3]-o[1])/b,p&&(s.altTextData=p),s._initialData=a,s.#f=!!a,s}serialize(t=!1,r=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const n={annotationType:Gt.STAMP,bitmapId:this.#t,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#l,structTreeParentId:this._structTreeParentId};if(t)return n.bitmapUrl=this.#v(!0),n.accessibilityData=this.serializeAltText(!0),n.isCopy=!0,n;const{decorative:a,altText:i}=this.serializeAltText(!1);if(!a&&i&&(n.accessibilityData={type:"Figure",alt:i}),this.annotationElementId){const o=this.#b(n);if(o.isSame)return null;o.isSameAltText?delete n.accessibilityData:n.accessibilityData.structParent=this._initialData.structParent??-1}if(n.id=this.annotationElementId,r===null)return n;r.stamps||=new Map;const s=this.#l?(n.rect[2]-n.rect[0])*(n.rect[3]-n.rect[1]):null;if(!r.stamps.has(this.#t))r.stamps.set(this.#t,{area:s,serialized:n}),n.bitmap=this.#v(!1);else if(this.#l){const o=r.stamps.get(this.#t);s>o.area&&(o.area=s,o.serialized.bitmap.close(),o.serialized.bitmap=this.#v(!1))}return n}#b(t){const{pageIndex:r,accessibilityData:{altText:n}}=this._initialData,a=t.pageIndex===r,i=(t.accessibilityData?.alt||"")===n;return{isSame:!this._hasBeenMoved&&!this._hasBeenResized&&a&&i,isSameAltText:i}}renderAnnotationElement(t){return t.updateEdited({rect:this.getRect(0,0)}),null}}class bo{#e;#t=!1;#r=null;#n=null;#i=null;#a=new Map;#o=!1;#s=!1;#d=!1;#l=null;#f=null;#u=null;#h=null;#p=null;#m=-1;#c;static _initialized=!1;static#g=new Map([Un,e8,mWe,wn,mo].map(t=>[t._editorType,t]));constructor({uiManager:t,pageIndex:r,div:n,structTreeLayer:a,accessibilityManager:i,annotationLayer:s,drawLayer:o,textLayer:l,viewport:c,l10n:u}){const f=[...bo.#g.values()];if(!bo._initialized){bo._initialized=!0;for(const p of f)p.initialize(u,t)}t.registerEditorTypes(f),this.#c=t,this.pageIndex=r,this.div=n,this.#e=i,this.#r=s,this.viewport=c,this.#u=l,this.drawLayer=o,this._structTree=a,this.#c.addLayer(this)}get isEmpty(){return this.#a.size===0}get isInvisible(){return this.isEmpty&&this.#c.getMode()===Gt.NONE}updateToolbar(t){this.#c.updateToolbar(t)}updateMode(t=this.#c.getMode()){switch(this.#w(),t){case Gt.NONE:this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case Gt.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case Gt.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:r}=this.div;for(const n of bo.#g.values())r.toggle(`${n._type}Editing`,t===n._editorType);this.div.hidden=!1}hasTextLayer(t){return t===this.#u?.div}setEditingState(t){this.#c.setEditingState(t)}addCommands(t){this.#c.addCommands(t)}cleanUndoStack(t){this.#c.cleanUndoStack(t)}toggleDrawing(t=!1){this.div.classList.toggle("drawing",!t)}togglePointerEvents(t=!1){this.div.classList.toggle("disabled",!t)}toggleAnnotationLayerPointerEvents(t=!1){this.#r?.div.classList.toggle("disabled",!t)}async enable(){this.#d=!0,this.div.tabIndex=0,this.togglePointerEvents(!0),this.#p?.abort(),this.#p=null;const t=new Set;for(const n of this.#a.values())n.enableEditing(),n.show(!0),n.annotationElementId&&(this.#c.removeChangedExistingAnnotation(n),t.add(n.annotationElementId));if(!this.#r){this.#d=!1;return}const r=this.#r.getEditableAnnotations();for(const n of r){if(n.hide(),this.#c.isDeletedAnnotationElement(n.data.id)||t.has(n.data.id))continue;const a=await this.deserialize(n);a&&(this.addOrRebuild(a),a.enableEditing())}this.#d=!1}disable(){if(this.#s=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1),this.#u&&!this.#p){this.#p=new AbortController;const a=this.#c.combinedSignal(this.#p);this.#u.div.addEventListener("pointerdown",i=>{const{clientX:o,clientY:l,timeStamp:c}=i,u=this.#m;if(c-u>500){this.#m=c;return}this.#m=-1;const{classList:f}=this.div;f.toggle("getElements",!0);const p=document.elementsFromPoint(o,l);if(f.toggle("getElements",!1),!this.div.contains(p[0]))return;let m;const b=new RegExp(`^${Jle}[0-9]+$`);for(const y of p)if(b.test(y.id)){m=y.id;break}if(!m)return;const v=this.#a.get(m);v?.annotationElementId===null&&(i.stopPropagation(),i.preventDefault(),v.dblclick())},{signal:a,capture:!0})}const t=new Map,r=new Map;for(const a of this.#a.values())if(a.disableEditing(),!!a.annotationElementId){if(a.serialize()!==null){t.set(a.annotationElementId,a);continue}else r.set(a.annotationElementId,a);this.getEditableAnnotation(a.annotationElementId)?.show(),a.remove()}if(this.#r){const a=this.#r.getEditableAnnotations();for(const i of a){const{id:s}=i.data;if(this.#c.isDeletedAnnotationElement(s))continue;let o=r.get(s);if(o){o.resetAnnotationElement(i),o.show(!1),i.show();continue}o=t.get(s),o&&(this.#c.addChangedExistingAnnotation(o),o.renderAnnotationElement(i)&&o.show(!1)),i.show()}}this.#w(),this.isEmpty&&(this.div.hidden=!0);const{classList:n}=this.div;for(const a of bo.#g.values())n.remove(`${a._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#s=!1}getEditableAnnotation(t){return this.#r?.getEditableAnnotation(t)||null}setActiveEditor(t){this.#c.getActive()!==t&&this.#c.setActiveEditor(t)}enableTextSelection(){if(this.div.tabIndex=-1,this.#u?.div&&!this.#h){this.#h=new AbortController;const t=this.#c.combinedSignal(this.#h);this.#u.div.addEventListener("pointerdown",this.#v.bind(this),{signal:t}),this.#u.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#u?.div&&this.#h&&(this.#h.abort(),this.#h=null,this.#u.div.classList.remove("highlighting"))}#v(t){this.#c.unselectAll();const{target:r}=t;if(r===this.#u.div||(r.getAttribute("role")==="img"||r.classList.contains("endOfContent"))&&this.#u.div.contains(r)){const{isMac:n}=ea.platform;if(t.button!==0||t.ctrlKey&&n)return;this.#c.showAllEditors("highlight",!0,!0),this.#u.div.classList.add("free"),this.toggleDrawing(),wn.startHighlighting(this,this.#c.direction==="ltr",{target:this.#u.div,x:t.x,y:t.y}),this.#u.div.addEventListener("pointerup",()=>{this.#u.div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:this.#c._signal}),t.preventDefault()}}enableClick(){if(this.#n)return;this.#n=new AbortController;const t=this.#c.combinedSignal(this.#n);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t});const r=this.pointerup.bind(this);this.div.addEventListener("pointerup",r,{signal:t}),this.div.addEventListener("pointercancel",r,{signal:t})}disableClick(){this.#n?.abort(),this.#n=null}attach(t){this.#a.set(t.id,t);const{annotationElementId:r}=t;r&&this.#c.isDeletedAnnotationElement(r)&&this.#c.removeDeletedAnnotationElement(t)}detach(t){this.#a.delete(t.id),this.#e?.removePointerInTextLayer(t.contentDiv),!this.#s&&t.annotationElementId&&this.#c.addDeletedAnnotationElement(t)}remove(t){this.detach(t),this.#c.removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1}changeParent(t){t.parent!==this&&(t.parent&&t.annotationElementId&&(this.#c.addDeletedAnnotationElement(t.annotationElementId),Rt.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),t.parent?.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(!(t.parent===this&&t.isAttachedToDOM)){if(this.changeParent(t),this.#c.addEditor(t),this.attach(t),!t.isAttachedToDOM){const r=t.render();this.div.append(r),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(!this.#d),this.#c.addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}moveEditorInDOM(t){if(!t.isAttachedToDOM)return;const{activeElement:r}=document;t.div.contains(r)&&!this.#i&&(t._focusEventsAllowed=!1,this.#i=setTimeout(()=>{this.#i=null,t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this.#c._signal}),r.focus())},0)),t._structTreeParentId=this.#e?.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?(t.parent||=this,t.rebuild(),t.show()):this.add(t)}addUndoableEditor(t){const r=()=>t._uiManager.rebuild(t),n=()=>{t.remove()};this.addCommands({cmd:r,undo:n,mustExec:!1})}getNextId(){return this.#c.getId()}get#b(){return bo.#g.get(this.#c.getMode())}combinedSignal(t){return this.#c.combinedSignal(t)}#y(t){const r=this.#b;return r?new r.prototype.constructor(t):null}canCreateNewEmptyEditor(){return this.#b?.canCreateNewEmptyEditor()}async pasteEditor(t,r){this.updateToolbar(t),await this.#c.updateMode(t.mode);const{offsetX:n,offsetY:a}=this.#_(),i=this.getNextId(),s=this.#y({parent:this,id:i,x:n,y:a,uiManager:this.#c,isCentered:!0,...r});s&&this.add(s)}async deserialize(t){return await bo.#g.get(t.annotationType??t.annotationEditorType)?.deserialize(t,this,this.#c)||null}createAndAddNewEditor(t,r,n={}){const a=this.getNextId(),i=this.#y({parent:this,id:a,x:t.offsetX,y:t.offsetY,uiManager:this.#c,isCentered:r,...n});return i&&this.add(i),i}#_(){const{x:t,y:r,width:n,height:a}=this.div.getBoundingClientRect(),i=Math.max(0,t),s=Math.max(0,r),o=Math.min(window.innerWidth,t+n),l=Math.min(window.innerHeight,r+a),c=(i+o)/2-t,u=(s+l)/2-r,[f,p]=this.viewport.rotation%180===0?[c,u]:[u,c];return{offsetX:f,offsetY:p}}addNewEditor(t={}){this.createAndAddNewEditor(this.#_(),!0,t)}setSelected(t){this.#c.setSelected(t)}toggleSelected(t){this.#c.toggleSelected(t)}unselect(t){this.#c.unselect(t)}pointerup(t){const{isMac:r}=ea.platform;if(t.button!==0||t.ctrlKey&&r||t.target!==this.div||!this.#o||(this.#o=!1,this.#b?.isDrawer&&this.#b.supportMultipleDrawings))return;if(!this.#t){this.#t=!0;return}const n=this.#c.getMode();if(n===Gt.STAMP||n===Gt.SIGNATURE){this.#c.unselectAll();return}this.createAndAddNewEditor(t,!1)}pointerdown(t){if(this.#c.getMode()===Gt.HIGHLIGHT&&this.enableTextSelection(),this.#o){this.#o=!1;return}const{isMac:r}=ea.platform;if(t.button!==0||t.ctrlKey&&r||t.target!==this.div)return;if(this.#o=!0,this.#b?.isDrawer){this.startDrawingSession(t);return}const n=this.#c.getActive();this.#t=!n||n.isEmpty()}startDrawingSession(t){if(this.div.focus({preventScroll:!0}),this.#l){this.#b.startDrawing(this,this.#c,!1,t);return}this.#c.setCurrentDrawingSession(this),this.#l=new AbortController;const r=this.#c.combinedSignal(this.#l);this.div.addEventListener("blur",({relatedTarget:n})=>{n&&!this.div.contains(n)&&(this.#f=null,this.commitOrRemove())},{signal:r}),this.#b.startDrawing(this,this.#c,!1,t)}pause(t){if(t){const{activeElement:r}=document;this.div.contains(r)&&(this.#f=r);return}this.#f&&setTimeout(()=>{this.#f?.focus(),this.#f=null},0)}endDrawingSession(t=!1){return this.#l?(this.#c.setCurrentDrawingSession(null),this.#l.abort(),this.#l=null,this.#f=null,this.#b.endDrawing(t)):null}findNewParent(t,r,n){const a=this.#c.findParent(r,n);return a===null||a===this?!1:(a.changeParent(t),!0)}commitOrRemove(){return this.#l?(this.endDrawingSession(),!0):!1}onScaleChanging(){this.#l&&this.#b.onScaleChangingWhenDrawing(this)}destroy(){this.commitOrRemove(),this.#c.getActive()?.parent===this&&(this.#c.commitOrRemove(),this.#c.setActiveEditor(null)),this.#i&&(clearTimeout(this.#i),this.#i=null);for(const t of this.#a.values())this.#e?.removePointerInTextLayer(t.contentDiv),t.setParent(null),t.isAttachedToDOM=!1,t.div.remove();this.div=null,this.#a.clear(),this.#c.removeLayer(this)}#w(){for(const t of this.#a.values())t.isEmpty()&&t.remove()}render({viewport:t}){this.viewport=t,Wc(this.div,t);for(const r of this.#c.getEditors(this.pageIndex))this.add(r),r.rebuild();this.updateMode()}update({viewport:t}){this.#c.commitOrRemove(),this.#w();const r=this.viewport.rotation,n=t.rotation;if(this.viewport=t,Wc(this.div,{rotation:n}),r!==n)for(const a of this.#a.values())a.rotate(n)}get pageDimensions(){const{pageWidth:t,pageHeight:r}=this.viewport.rawDims;return[t,r]}get scale(){return this.#c.viewParameters.realScale}}class Qn{#e=null;#t=new Map;#r=new Map;static#n=0;constructor({pageIndex:t}){this.pageIndex=t}setParent(t){if(!this.#e){this.#e=t;return}if(this.#e!==t){if(this.#t.size>0)for(const r of this.#t.values())r.remove(),t.append(r);this.#e=t}}static get _svgFactory(){return dr(this,"_svgFactory",new fm)}static#i(t,[r,n,a,i]){const{style:s}=t;s.top=`${100*n}%`,s.left=`${100*r}%`,s.width=`${100*a}%`,s.height=`${100*i}%`}#a(){const t=Qn._svgFactory.create(1,1,!0);return this.#e.append(t),t.setAttribute("aria-hidden",!0),t}#o(t,r){const n=Qn._svgFactory.createElement("clipPath");t.append(n);const a=`clip_${r}`;n.setAttribute("id",a),n.setAttribute("clipPathUnits","objectBoundingBox");const i=Qn._svgFactory.createElement("use");return n.append(i),i.setAttribute("href",`#${r}`),i.classList.add("clip"),a}#s(t,r){for(const[n,a]of Object.entries(r))a===null?t.removeAttribute(n):t.setAttribute(n,a)}draw(t,r=!1,n=!1){const a=Qn.#n++,i=this.#a(),s=Qn._svgFactory.createElement("defs");i.append(s);const o=Qn._svgFactory.createElement("path");s.append(o);const l=`path_p${this.pageIndex}_${a}`;o.setAttribute("id",l),o.setAttribute("vector-effect","non-scaling-stroke"),r&&this.#r.set(a,o);const c=n?this.#o(s,l):null,u=Qn._svgFactory.createElement("use");return i.append(u),u.setAttribute("href",`#${l}`),this.updateProperties(i,t),this.#t.set(a,i),{id:a,clipPathId:`url(#${c})`}}drawOutline(t,r){const n=Qn.#n++,a=this.#a(),i=Qn._svgFactory.createElement("defs");a.append(i);const s=Qn._svgFactory.createElement("path");i.append(s);const o=`path_p${this.pageIndex}_${n}`;s.setAttribute("id",o),s.setAttribute("vector-effect","non-scaling-stroke");let l;if(r){const f=Qn._svgFactory.createElement("mask");i.append(f),l=`mask_p${this.pageIndex}_${n}`,f.setAttribute("id",l),f.setAttribute("maskUnits","objectBoundingBox");const p=Qn._svgFactory.createElement("rect");f.append(p),p.setAttribute("width","1"),p.setAttribute("height","1"),p.setAttribute("fill","white");const m=Qn._svgFactory.createElement("use");f.append(m),m.setAttribute("href",`#${o}`),m.setAttribute("stroke","none"),m.setAttribute("fill","black"),m.setAttribute("fill-rule","nonzero"),m.classList.add("mask")}const c=Qn._svgFactory.createElement("use");a.append(c),c.setAttribute("href",`#${o}`),l&&c.setAttribute("mask",`url(#${l})`);const u=c.cloneNode();return a.append(u),c.classList.add("mainOutline"),u.classList.add("secondaryOutline"),this.updateProperties(a,t),this.#t.set(n,a),n}finalizeDraw(t,r){this.#r.delete(t),this.updateProperties(t,r)}updateProperties(t,r){if(!r)return;const{root:n,bbox:a,rootClass:i,path:s}=r,o=typeof t=="number"?this.#t.get(t):t;if(o){if(n&&this.#s(o,n),a&&Qn.#i(o,a),i){const{classList:l}=o;for(const[c,u]of Object.entries(i))l.toggle(c,u)}if(s){const c=o.firstChild.firstChild;this.#s(c,s)}}}updateParent(t,r){if(r===this)return;const n=this.#t.get(t);n&&(r.#e.append(n),this.#t.delete(t),r.#t.set(t,n))}remove(t){this.#r.delete(t),this.#e!==null&&(this.#t.get(t).remove(),this.#t.delete(t))}destroy(){this.#e=null;for(const t of this.#t.values())t.remove();this.#t.clear(),this.#r.clear()}}globalThis._pdfjsTestingUtils={HighlightOutliner:U6};globalThis.pdfjsLib={AbortException:Il,AnnotationEditorLayer:bo,AnnotationEditorParamsType:mr,AnnotationEditorType:Gt,AnnotationEditorUIManager:Ll,AnnotationLayer:JI,AnnotationMode:_o,AnnotationType:_n,build:Tce,ColorPicker:Ei,createValidAbsoluteUrl:PI,DOMSVGFactory:fm,DrawLayer:Qn,FeatureTest:ea,fetchData:L0,getDocument:KI,getFilenameFromUrl:ice,getPdfFilenameFromUrl:sce,getUuid:BI,getXfaPageViewport:oce,GlobalWorkerOptions:_l,ImageKind:Rp,InvalidPDFException:Lb,isDataScheme:ig,isPdfFile:py,isValidExplicitDest:dce,MathClamp:ga,noContextMenu:ps,normalizeUnicode:nce,OPS:lm,OutputScale:Gs,PasswordResponses:tce,PDFDataRangeTransport:YI,PDFDateString:jI,PDFWorker:o0,PermissionFlag:ece,PixelsPerInch:ed,RenderingCancelledException:hy,ResponseException:cm,setLayerDimensions:Wc,shadow:dr,SignatureExtractor:Mu,stopEvent:En,SupportedImageMimeTypes:Pb,TextLayer:um,TouchManager:og,updateUrlHash:FI,Util:kt,VerbosityLevel:rg,version:gy,XfaLayer:ZI};const gWe=Object.freeze(Object.defineProperty({__proto__:null,AbortException:Il,AnnotationEditorLayer:bo,AnnotationEditorParamsType:mr,AnnotationEditorType:Gt,AnnotationEditorUIManager:Ll,AnnotationLayer:JI,AnnotationMode:_o,AnnotationType:_n,ColorPicker:Ei,DOMSVGFactory:fm,DrawLayer:Qn,FeatureTest:ea,GlobalWorkerOptions:_l,ImageKind:Rp,InvalidPDFException:Lb,MathClamp:ga,OPS:lm,OutputScale:Gs,PDFDataRangeTransport:YI,PDFDateString:jI,PDFWorker:o0,PasswordResponses:tce,PermissionFlag:ece,PixelsPerInch:ed,RenderingCancelledException:hy,ResponseException:cm,SignatureExtractor:Mu,SupportedImageMimeTypes:Pb,TextLayer:um,TouchManager:og,Util:kt,VerbosityLevel:rg,XfaLayer:ZI,build:Tce,createValidAbsoluteUrl:PI,fetchData:L0,getDocument:KI,getFilenameFromUrl:ice,getPdfFilenameFromUrl:sce,getUuid:BI,getXfaPageViewport:oce,isDataScheme:ig,isPdfFile:py,isValidExplicitDest:dce,noContextMenu:ps,normalizeUnicode:nce,setLayerDimensions:Wc,shadow:dr,stopEvent:En,updateUrlHash:FI,version:gy},Symbol.toStringTag,{value:"Module"}));var uQ=Object.prototype.hasOwnProperty;function dQ(e,t,r){for(r of e.keys())if($f(r,t))return r}function $f(e,t){var r,n,a;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&$f(e[n],t[n]););return n===-1}if(r===Set){if(e.size!==t.size)return!1;for(n of e)if(a=n,a&&typeof a=="object"&&(a=dQ(t,a),!a)||!t.has(a))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(n of e)if(a=n[0],a&&typeof a=="object"&&(a=dQ(t,a),!a)||!$f(n[1],t.get(a)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(uQ.call(e,r)&&++n&&!uQ.call(t,r)||!(r in t)||!$f(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}function ug(e){let t=!1;return{promise:new Promise((n,a)=>{e.then(i=>!t&&n(i)).catch(i=>!t&&a(i))}),cancel(){t=!0}}}const vWe=["onCopy","onCut","onPaste"],bWe=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],xWe=["onFocus","onBlur"],yWe=["onInput","onInvalid","onReset","onSubmit"],_We=["onLoad","onError"],wWe=["onKeyDown","onKeyPress","onKeyUp"],EWe=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],SWe=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],CWe=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],TWe=["onSelect"],AWe=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],kWe=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],NWe=["onScroll"],RWe=["onWheel"],MWe=["onAnimationStart","onAnimationEnd","onAnimationIteration"],DWe=["onTransitionEnd"],OWe=["onToggle"],IWe=["onChange"],LWe=[...vWe,...bWe,...xWe,...yWe,..._We,...wWe,...EWe,...SWe,...CWe,...TWe,...AWe,...kWe,...NWe,...RWe,...MWe,...DWe,...IWe,...OWe];function Pce(e,t){const r={};for(const n of LWe){const a=e[n];a&&(t?r[n]=(i=>a(i,t(n))):r[n]=a)}return r}var PWe="Invariant failed";function jr(e,t){if(!e)throw new Error(PWe)}var BM,fQ;function FWe(){if(fQ)return BM;fQ=1;var e=function(){};return BM=e,BM}var BWe=FWe();const ya=Fl(BWe),Fce=E.createContext(null),zWe="noopener noreferrer nofollow";class jWe{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(t){this.pdfDocument=t}setViewer(t){this.pdfViewer=t}setExternalLinkRel(t){this.externalLinkRel=t}setExternalLinkTarget(t){this.externalLinkTarget=t}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return jr(this.pdfViewer),this.pdfViewer.currentPageNumber||0}set page(t){jr(this.pdfViewer),this.pdfViewer.currentPageNumber=t}get rotation(){return 0}set rotation(t){}goToDestination(t){return new Promise(r=>{jr(this.pdfDocument),jr(t),typeof t=="string"?this.pdfDocument.getDestination(t).then(r):Array.isArray(t)?r(t):t.then(r)}).then(r=>{jr(Array.isArray(r));const n=r[0];new Promise(a=>{jr(this.pdfDocument),n instanceof Object?this.pdfDocument.getPageIndex(n).then(i=>{a(i)}).catch(()=>{jr(!1)}):typeof n=="number"?a(n):jr(!1)}).then(a=>{const i=a+1;jr(this.pdfViewer),jr(i>=1&&i<=this.pagesCount),this.pdfViewer.scrollPageIntoView({dest:r,pageIndex:a,pageNumber:i})})})}navigateTo(t){this.goToDestination(t)}goToPage(t){const r=t-1;jr(this.pdfViewer),jr(t>=1&&t<=this.pagesCount),this.pdfViewer.scrollPageIntoView({pageIndex:r,pageNumber:t})}addLinkAttributes(t,r,n){t.href=r,t.rel=this.externalLinkRel||zWe,t.target=n?"_blank":this.externalLinkTarget||""}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}}function Hf({children:e,type:t}){return g.jsx("div",{className:`react-pdf__message react-pdf__message--${t}`,children:e})}const hQ={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};function qWe(e,t){switch(t.type){case"RESOLVE":return{value:t.value,error:void 0};case"REJECT":return{value:!1,error:t.error};case"RESET":return{value:void 0,error:void 0};default:return e}}function l0(){return E.useReducer(qWe,{value:void 0,error:void 0})}const by=typeof window<"u",Bce=by&&window.location.protocol==="file:";function UWe(e){return typeof e<"u"}function Su(e){return UWe(e)&&e!==null}function $We(e){return typeof e=="string"}function HWe(e){return e instanceof ArrayBuffer}function GWe(e){return jr(by),e instanceof Blob}function G6(e){return $We(e)&&/^data:/.test(e)}function pQ(e){jr(G6(e));const[t="",r=""]=e.split(",");return t.split(";").indexOf("base64")!==-1?atob(r):unescape(r)}function VWe(){return by&&window.devicePixelRatio||1}const zce="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function mQ(){ya(!Bce,`Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ${zce}`)}function WWe(){ya(!Bce,`Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ${zce}`)}function rd(e){e?.cancel&&e.cancel()}function V6(e,t){return Object.defineProperty(e,"width",{get(){return this.view[2]*t},configurable:!0}),Object.defineProperty(e,"height",{get(){return this.view[3]*t},configurable:!0}),Object.defineProperty(e,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(e,"originalHeight",{get(){return this.view[3]},configurable:!0}),e}function KWe(e){return e.name==="RenderingCancelledException"}function XWe(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{if(!n.result)return r(new Error("Error while reading a file."));t(n.result)},n.onerror=a=>{if(!a.target)return r(new Error("Error while reading a file."));const{error:i}=a.target;if(!i)return r(new Error("Error while reading a file."));switch(i.code){case i.NOT_FOUND_ERR:return r(new Error("Error while reading a file: File not found."));case i.SECURITY_ERR:return r(new Error("Error while reading a file: Security error."));case i.ABORT_ERR:return r(new Error("Error while reading a file: Aborted."));default:return r(new Error("Error while reading a file."))}},n.readAsArrayBuffer(e)})}const{PDFDataRangeTransport:YWe}=gWe,ZWe=(e,t)=>{switch(t){case hQ.NEED_PASSWORD:{const r=prompt("Enter the password to open this PDF file.");e(r);break}case hQ.INCORRECT_PASSWORD:{const r=prompt("Invalid password. Please try again.");e(r);break}}};function gQ(e){return typeof e=="object"&&e!==null&&("data"in e||"range"in e||"url"in e)}const W6=E.forwardRef(function({children:t,className:r,error:n="Failed to load PDF file.",externalLinkRel:a,externalLinkTarget:i,file:s,inputRef:o,imageResourcesPath:l,loading:c="Loading PDF…",noData:u="No PDF file specified.",onItemClick:f,onLoadError:p,onLoadProgress:m,onLoadSuccess:b,onPassword:v=ZWe,onSourceError:y,onSourceSuccess:_,options:S,renderMode:C,rotate:T,scale:A,...k},N){const[L,I]=l0(),{value:P,error:H}=L,[B,K]=l0(),{value:j,error:W}=B,D=E.useRef(new jWe),U=E.useRef([]),Y=E.useRef(void 0),z=E.useRef(void 0);s&&s!==Y.current&&gQ(s)&&(ya(!$f(s,Y.current),`File prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.`),Y.current=s),S&&S!==z.current&&(ya(!$f(S,z.current),`Options prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.`),z.current=S);const M=E.useRef({scrollPageIntoView:qe=>{const{dest:$e,pageNumber:Pe,pageIndex:Ce=Pe-1}=qe;if(f){f({dest:$e,pageIndex:Ce,pageNumber:Pe});return}const xe=U.current[Ce];if(xe){xe.scrollIntoView();return}ya(!1,`An internal link leading to page ${Pe} was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>.`)}});E.useImperativeHandle(N,()=>({linkService:D,pages:U,viewer:M}),[]);function Q(){_&&_()}function q(){H&&(ya(!1,H.toString()),y&&y(H))}function F(){I({type:"RESET"})}E.useEffect(F,[s,I]);const V=E.useCallback(async()=>{if(!s)return null;if(typeof s=="string")return G6(s)?{data:pQ(s)}:(mQ(),{url:s});if(s instanceof YWe)return{range:s};if(HWe(s))return{data:s};if(by&&GWe(s))return{data:await XWe(s)};if(jr(typeof s=="object"),jr(gQ(s)),"url"in s&&typeof s.url=="string"){if(G6(s.url)){const{url:qe,...$e}=s;return{data:pQ(qe),...$e}}mQ()}return s},[s]);E.useEffect(()=>{const qe=ug(V());return qe.promise.then($e=>{I({type:"RESOLVE",value:$e})}).catch($e=>{I({type:"REJECT",error:$e})}),()=>{rd(qe)}},[V,I]),E.useEffect(()=>{if(!(typeof P>"u")){if(P===!1){q();return}Q()}},[P]);function Z(){j&&(b&&b(j),U.current=new Array(j.numPages),D.current.setDocument(j))}function ee(){W&&(ya(!1,W.toString()),p&&p(W))}E.useEffect(function(){K({type:"RESET"})},[K,P]),E.useEffect(function(){if(!P)return;const $e=S?{...P,...S}:P,Pe=KI($e);m&&(Pe.onProgress=m),v&&(Pe.onPassword=v);const Ce=Pe,xe=Ce.promise.then(ve=>{K({type:"RESOLVE",value:ve})}).catch(ve=>{Ce.destroyed||K({type:"REJECT",error:ve})});return()=>{xe.finally(()=>Ce.destroy())}},[S,K,P]),E.useEffect(()=>{if(!(typeof j>"u")){if(j===!1){ee();return}Z()}},[j]),E.useEffect(function(){D.current.setViewer(M.current),D.current.setExternalLinkRel(a),D.current.setExternalLinkTarget(i)},[a,i]);const te=E.useCallback((qe,$e)=>{U.current[qe]=$e},[]),oe=E.useCallback(qe=>{delete U.current[qe]},[]),pe=E.useMemo(()=>({imageResourcesPath:l,linkService:D.current,onItemClick:f,pdf:j,registerPage:te,renderMode:C,rotate:T,scale:A,unregisterPage:oe}),[l,f,j,te,C,T,A,oe]),he=E.useMemo(()=>Pce(k,()=>j),[k,j]);function ke(){function qe(Pe){return!!Pe?.pdf}if(!qe(pe))throw new Error("pdf is undefined");const $e=typeof t=="function"?t(pe):t;return g.jsx(Fce.Provider,{value:pe,children:$e})}function se(){return s?j==null?g.jsx(Hf,{type:"loading",children:typeof c=="function"?c():c}):j===!1?g.jsx(Hf,{type:"error",children:typeof n=="function"?n():n}):ke():g.jsx(Hf,{type:"no-data",children:typeof u=="function"?u():u})}return g.jsx("div",{className:v0("react-pdf__Document",r),ref:o,...he,children:se()})});function jce(){return E.useContext(Fce)}function qce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.filter(Boolean);if(r.length<=1){var n=r[0];return n||null}return function(i){for(var s=0,o=r;s<o.length;s++){var l=o[s];typeof l=="function"?l(i):l&&(l.current=i)}}}const Uce=E.createContext(null);function xy(){return E.useContext(Uce)}function QWe(){const e=jce(),t=xy();jr(t);const r={...e,...t},{imageResourcesPath:n,linkService:a,onGetAnnotationsError:i,onGetAnnotationsSuccess:s,onRenderAnnotationLayerError:o,onRenderAnnotationLayerSuccess:l,page:c,pdf:u,renderForms:f,rotate:p,scale:m=1}=r;jr(u),jr(c),jr(a);const[b,v]=l0(),{value:y,error:_}=b,S=E.useRef(null);ya(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10)===1,"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations");function C(){y&&s&&s(y)}function T(){_&&(ya(!1,_.toString()),i&&i(_))}E.useEffect(function(){v({type:"RESET"})},[v,c]),E.useEffect(function(){if(!c)return;const I=ug(c.getAnnotations()),P=I;return I.promise.then(H=>{v({type:"RESOLVE",value:H})}).catch(H=>{v({type:"REJECT",error:H})}),()=>{rd(P)}},[v,c]),E.useEffect(()=>{if(y!==void 0){if(y===!1){T();return}C()}},[y]);function A(){l&&l()}function k(L){ya(!1,`${L}`),o&&o(L)}const N=E.useMemo(()=>c.getViewport({scale:m,rotation:p}),[c,p,m]);return E.useEffect(function(){if(!u||!c||!a||!y)return;const{current:I}=S;if(!I)return;const P=N.clone({dontFlip:!0}),H={accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:I,l10n:null,page:c,structTreeLayer:null,viewport:P},B={annotations:y,annotationStorage:u.annotationStorage,div:I,imageResourcesPath:n,linkService:a,page:c,renderForms:f,viewport:P};I.innerHTML="";try{new JI(H).render(B),A()}catch(K){k(K)}return()=>{}},[y,n,a,c,u,f,N]),g.jsx("div",{className:v0("react-pdf__Page__annotations","annotationLayer"),ref:S})}const $ce={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},JWe=/^H(\d+)$/;function eKe(e){return e in $ce}function yy(e){return"children"in e}function Hce(e){return yy(e)?e.children.length===1&&0 in e.children&&"id"in e.children[0]:!1}function tKe(e){const t={};if(yy(e)){const{role:r}=e,n=r.match(JWe);if(n)t.role="heading",t["aria-level"]=Number(n[1]);else if(eKe(r)){const a=$ce[r];a&&(t.role=a)}}return t}function Gce(e){const t={};if(yy(e)){if(e.alt!==void 0&&(t["aria-label"]=e.alt),e.lang!==void 0&&(t.lang=e.lang),Hce(e)){const[r]=e.children;if(r){const n=Gce(r);return{...t,...n}}}}else"id"in e&&(t["aria-owns"]=e.id);return t}function rKe(e){return e?{...tKe(e),...Gce(e)}:null}function Vce({className:e,node:t}){const r=E.useMemo(()=>rKe(t),[t]),n=E.useMemo(()=>!yy(t)||Hce(t)?null:t.children.map((a,i)=>g.jsx(Vce,{node:a},i)),[t]);return g.jsx("span",{className:e,...r,children:n})}function nKe(){const e=xy();jr(e);const{onGetStructTreeError:t,onGetStructTreeSuccess:r}=e,[n,a]=l0(),{value:i,error:s}=n,{customTextRenderer:o,page:l}=e;function c(){i&&r&&r(i)}function u(){s&&(ya(!1,s.toString()),t&&t(s))}return E.useEffect(function(){a({type:"RESET"})},[a,l]),E.useEffect(function(){if(o||!l)return;const p=ug(l.getStructTree()),m=p;return p.promise.then(b=>{a({type:"RESOLVE",value:b})}).catch(b=>{a({type:"REJECT",error:b})}),()=>rd(m)},[o,l,a]),E.useEffect(()=>{if(i!==void 0){if(i===!1){u();return}c()}},[i]),i?g.jsx(Vce,{className:"react-pdf__Page__structTree structTree",node:i}):null}const vQ=_o;function aKe(e){const t=xy();jr(t);const r={...t,...e},{_className:n,canvasBackground:a,devicePixelRatio:i=VWe(),onRenderError:s,onRenderSuccess:o,page:l,renderForms:c,renderTextLayer:u,rotate:f,scale:p}=r,{canvasRef:m}=e;jr(l);const b=E.useRef(null);function v(){l&&o&&o(V6(l,p))}function y(T){KWe(T)||(ya(!1,T.toString()),s&&s(T))}const _=E.useMemo(()=>l.getViewport({scale:p*i,rotation:f}),[i,l,f,p]),S=E.useMemo(()=>l.getViewport({scale:p,rotation:f}),[l,f,p]);E.useEffect(function(){if(!l)return;l.cleanup();const{current:A}=b;if(!A)return;A.width=_.width,A.height=_.height,A.style.width=`${Math.floor(S.width)}px`,A.style.height=`${Math.floor(S.height)}px`,A.style.visibility="hidden";const k={annotationMode:c?vQ.ENABLE_FORMS:vQ.ENABLE,canvasContext:A.getContext("2d",{alpha:!1}),viewport:_};a&&(k.background=a);const N=l.render(k),L=N;return N.promise.then(()=>{A.style.visibility="",v()}).catch(y),()=>rd(L)},[a,l,c,_,S]);const C=E.useCallback(()=>{const{current:T}=b;T&&(T.width=0,T.height=0)},[]);return E.useEffect(()=>C,[C]),g.jsx("canvas",{className:`${n}__canvas`,dir:"ltr",ref:qce(m,b),style:{display:"block",userSelect:"none"},children:u?g.jsx(nKe,{}):null})}function iKe(e){return"str"in e}function sKe(){const e=xy();jr(e);const{customTextRenderer:t,onGetTextError:r,onGetTextSuccess:n,onRenderTextLayerError:a,onRenderTextLayerSuccess:i,page:s,pageIndex:o,pageNumber:l,rotate:c,scale:u}=e;jr(s);const[f,p]=l0(),{value:m,error:b}=f,v=E.useRef(null);ya(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10)===1,"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer");function y(){m&&n&&n(m)}function _(){b&&(ya(!1,b.toString()),r&&r(b))}E.useEffect(function(){p({type:"RESET"})},[s,p]),E.useEffect(function(){if(!s)return;const L=ug(s.getTextContent()),I=L;return L.promise.then(P=>{p({type:"RESOLVE",value:P})}).catch(P=>{p({type:"REJECT",error:P})}),()=>rd(I)},[s,p]),E.useEffect(()=>{if(m!==void 0){if(m===!1){_();return}y()}},[m]);const S=E.useCallback(()=>{i&&i()},[i]),C=E.useCallback(N=>{ya(!1,N.toString()),a&&a(N)},[a]);function T(){const N=v.current;N&&N.classList.add("selecting")}function A(){const N=v.current;N&&N.classList.remove("selecting")}const k=E.useMemo(()=>s.getViewport({scale:u,rotation:c}),[s,c,u]);return E.useLayoutEffect(function(){if(!s||!m)return;const{current:L}=v;if(!L)return;L.innerHTML="";const I=s.streamTextContent({includeMarkedContent:!0}),P={container:L,textContentSource:I,viewport:k},H=new um(P),B=H;return H.render().then(()=>{const K=document.createElement("div");K.className="endOfContent",L.append(K);const j=L.querySelectorAll('[role="presentation"]');if(t){let W=0;m.items.forEach((D,U)=>{if(!iKe(D))return;const Y=j[W];if(!Y)return;const z=t({pageIndex:o,pageNumber:l,itemIndex:U,...D});Y.innerHTML=z,W+=D.str&&D.hasEOL?2:1})}S()}).catch(C),()=>rd(B)},[t,C,S,s,o,l,m,k]),g.jsx("div",{className:v0("react-pdf__Page__textContent","textLayer"),onMouseUp:A,onMouseDown:T,ref:v})}const bQ=1;function K6(e){const r={...jce(),...e},{_className:n="react-pdf__Page",_enableRegisterUnregisterPage:a=!0,canvasBackground:i,canvasRef:s,children:o,className:l,customRenderer:c,customTextRenderer:u,devicePixelRatio:f,error:p="Failed to load the page.",height:m,inputRef:b,loading:v="Loading page…",noData:y="No page specified.",onGetAnnotationsError:_,onGetAnnotationsSuccess:S,onGetStructTreeError:C,onGetStructTreeSuccess:T,onGetTextError:A,onGetTextSuccess:k,onLoadError:N,onLoadSuccess:L,onRenderAnnotationLayerError:I,onRenderAnnotationLayerSuccess:P,onRenderError:H,onRenderSuccess:B,onRenderTextLayerError:K,onRenderTextLayerSuccess:j,pageIndex:W,pageNumber:D,pdf:U,registerPage:Y,renderAnnotationLayer:z=!0,renderForms:M=!1,renderMode:Q="canvas",renderTextLayer:q=!0,rotate:F,scale:V=bQ,unregisterPage:Z,width:ee,...te}=r,[oe,pe]=l0(),{value:he,error:ke}=oe,se=E.useRef(null);jr(U);const qe=Su(D)?D-1:W??null,$e=D??(Su(W)?W+1:null),Pe=F??(he?he.rotate:null),Ce=E.useMemo(()=>{if(!he)return null;let Ae=1;const Ze=V??bQ;if(ee||m){const rt=he.getViewport({scale:1,rotation:Pe});ee?Ae=ee/rt.width:m&&(Ae=m/rt.height)}return Ze*Ae},[m,he,Pe,V,ee]);E.useEffect(function(){return()=>{Su(qe)&&a&&Z&&Z(qe)}},[a,U,qe,Z]);function xe(){if(L){if(!he||!Ce)return;L(V6(he,Ce))}if(a&&Y){if(!Su(qe)||!se.current)return;Y(qe,se.current)}}function ve(){ke&&(ya(!1,ke.toString()),N&&N(ke))}E.useEffect(function(){pe({type:"RESET"})},[pe,U,qe]),E.useEffect(function(){if(!U||!$e)return;const Ze=ug(U.getPage($e)),rt=Ze;return Ze.promise.then(at=>{pe({type:"RESOLVE",value:at})}).catch(at=>{pe({type:"REJECT",error:at})}),()=>rd(rt)},[pe,U,$e]),E.useEffect(()=>{if(he!==void 0){if(he===!1){ve();return}xe()}},[he,Ce]);const Ne=E.useMemo(()=>Su(qe)&&$e&&Su(Pe)&&Su(Ce)?{_className:n,canvasBackground:i,customTextRenderer:u,devicePixelRatio:f,onGetAnnotationsError:_,onGetAnnotationsSuccess:S,onGetStructTreeError:C,onGetStructTreeSuccess:T,onGetTextError:A,onGetTextSuccess:k,onRenderAnnotationLayerError:I,onRenderAnnotationLayerSuccess:P,onRenderError:H,onRenderSuccess:B,onRenderTextLayerError:K,onRenderTextLayerSuccess:j,page:he,pageIndex:qe,pageNumber:$e,renderForms:M,renderTextLayer:q,rotate:Pe,scale:Ce}:null,[n,i,u,f,_,S,C,T,A,k,I,P,H,B,K,j,he,qe,$e,M,q,Pe,Ce]),Ue=E.useMemo(()=>Pce(te,()=>he&&(Ce?V6(he,Ce):void 0)),[te,he,Ce]),Le=`${qe}@${Ce}/${Pe}`;function Ye(){switch(Q){case"custom":return jr(c),g.jsx(c,{},`${Le}_custom`);case"none":return null;case"canvas":default:return g.jsx(aKe,{canvasRef:s},`${Le}_canvas`)}}function De(){return q?g.jsx(sKe,{},`${Le}_text`):null}function Ve(){return z?g.jsx(QWe,{},`${Le}_annotations`):null}function lt(){function Ae(rt){return!!rt?.page}if(!Ae(Ne))throw new Error("page is undefined");const Ze=typeof o=="function"?o(Ne):o;return g.jsxs(Uce.Provider,{value:Ne,children:[Ye(),De(),Ve(),Ze]})}function Ee(){return $e?U===null||he===void 0||he===null?g.jsx(Hf,{type:"loading",children:typeof v=="function"?v():v}):U===!1||he===!1?g.jsx(Hf,{type:"error",children:typeof p=="function"?p():p}):lt():g.jsx(Hf,{type:"no-data",children:typeof y=="function"?y():y})}return g.jsx("div",{className:v0(n,l),"data-page-number":$e,ref:qce(b,se),style:{"--scale-round-x":"1px","--scale-round-y":"1px","--scale-factor":"1","--user-unit":`${Ce}`,"--total-scale-factor":"calc(var(--scale-factor) * var(--user-unit))",backgroundColor:i||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"},...Ue,children:Ee()})}WWe();_l.workerSrc="pdf.worker.mjs";const oKe=()=>{try{_l.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${gy}/pdf.worker.min.js`,console.log("PDF.js worker configured")}catch(e){console.warn("PDF.js worker configuration failed, will use fallback:",e)}};oKe();function Wce({open:e,onClose:t,fileUrl:r,fileName:n}){const[a,i]=E.useState(0),[s,o]=E.useState(1),[l,c]=E.useState(null),[u,f]=E.useState(0),[p,m]=E.useState(!0),[b,v]=E.useState(1),[y,_]=E.useState(!1);function S({numPages:T}){i(T),o(1),c(null),_(!0)}function C(T){if(console.error("PDF load error:",T),T.message.includes("fake worker")||T.message.includes("worker")){console.log("Worker error detected, PDF.js will retry automatically");return}T.message.includes("Failed to fetch")?c("Unable to load PDF file. Please check your internet connection and try again."):c("Failed to load PDF. Please check the file URL or try again.")}return E.useEffect(()=>{if(!e)return;const T=A=>{A.key==="Escape"?t():A.key==="ArrowLeft"&&s>1?o(k=>k-1):A.key==="ArrowRight"&&s<a?o(k=>k+1):A.key==="+"||A.key==="="?(A.preventDefault(),v(k=>Math.min(k+.25,3))):A.key==="-"&&(A.preventDefault(),v(k=>Math.max(k-.25,.5)))};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[e,t,s,a]),g.jsx(si,{open:e,onOpenChange:t,children:g.jsxs(oi,{className:"min-w-screen max-w-screen w-screen h-screen flex flex-col rounded-none p-0 gap-0",showCloseButton:!1,children:[g.jsx(Pi,{children:g.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200",children:[g.jsx(ds,{children:n||"PDF Viewer"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>m(!p),className:"px-3 py-1 text-sm bg-gray-100 hover:bg-gray-200 rounded transition-colors",title:p?"Hide thumbnails":"Show thumbnails",children:p?"Hide Sidebar":"Show Sidebar"}),g.jsx(hAe,{asChild:!0,children:g.jsx(wp,{className:"size-10 p-2 text-gray-400 hover:text-gray-900 rounded-md hover:bg-gray-100 transition-colors cursor-pointer"})})]})]})}),g.jsx("div",{className:"flex-1 flex bg-gray-50",children:l?g.jsxs("div",{className:"flex flex-col items-center justify-center text-center p-8 w-full",children:[g.jsx("div",{className:"text-red-500 text-lg font-medium mb-2",children:"PDF Loading Error"}),g.jsx("div",{className:"text-gray-600 mb-4",children:l}),g.jsx("button",{onClick:()=>{c(null),f(T=>T+1)},className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors",children:"Retry"})]}):g.jsxs(g.Fragment,{children:[p&&g.jsxs("div",{className:"w-64 bg-white border-r border-gray-200 overflow-y-auto",children:[g.jsx("div",{className:"px-4 h-12 flex items-center border-b border-gray-200",children:g.jsxs("h3",{className:"text-sm font-medium text-gray-700",children:["Pages ",y?`(${a})`:""]})}),g.jsx("div",{className:"p-2",children:y?Array.from(new Array(a),(T,A)=>g.jsxs("div",{onClick:()=>o(A+1),className:`mb-2 p-2 rounded cursor-pointer transition-colors ${s===A+1?"bg-blue-100 border border-blue-300":"hover:bg-gray-100"}`,children:[g.jsx(W6,{file:r,children:g.jsx(K6,{pageNumber:A+1,width:120,className:"border border-gray-200 rounded"})}),g.jsxs("div",{className:"text-xs text-center mt-1 text-gray-600",children:["Page ",A+1]})]},A+1)):g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsx("div",{className:"text-sm text-gray-500",children:"Loading pages..."})})})]}),g.jsxs("div",{className:"flex-1 flex flex-col",children:[g.jsxs("div",{className:"bg-white border-b border-gray-200 h-12 flex items-center justify-between ",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>o(T=>Math.max(1,T-1)),disabled:s<=1,className:"p-2 text-gray-600 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed rounded hover:bg-gray-100",title:"Previous page",children:g.jsx(wD,{className:"w-5 h-5"})}),g.jsxs("span",{className:"text-sm text-gray-700 min-w-[80px] text-center",children:[s," of ",a]}),g.jsx("button",{onClick:()=>o(T=>Math.min(a,T+1)),disabled:s>=a,className:"p-2 text-gray-600 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed rounded hover:bg-gray-100",title:"Next page",children:g.jsx(nx,{className:"w-5 h-5"})})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>v(T=>Math.max(T-.25,.5)),disabled:b<=.5,className:"p-2 text-gray-600 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed rounded hover:bg-gray-100",title:"Zoom out",children:g.jsx(Eve,{className:"w-4 h-4"})}),g.jsxs("span",{className:"text-sm text-gray-700 min-w-[60px] text-center",children:[Math.round(b*100),"%"]}),g.jsx("button",{onClick:()=>v(T=>Math.min(T+.25,3)),disabled:b>=3,className:"p-2 text-gray-600 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed rounded hover:bg-gray-100",title:"Zoom in",children:g.jsx(_ve,{className:"w-4 h-4"})})]})]}),g.jsx("div",{className:"flex-1 overflow-auto flex justify-center items-start p-4",children:g.jsx(W6,{file:r,onLoadSuccess:S,onLoadError:C,loading:"Loading PDF...",children:g.jsx(K6,{pageNumber:s,width:Math.min((window.innerWidth-(p?320:100))*b,1200*b)})},u)})]})]})})]})})}const lKe=e=>{const t=e.original_filename.split(".").pop()||"";return{id:e.id.toString(),name:e.original_filename,type:"file",size:e.file_size,extension:t,lastModified:new Date(e.updated_at),path:`/documents/${e.id}`,topicId:e.topic_id}},cKe=()=>{const{agent_id:e}=gs(),[t,r]=E.useState(""),[n,a]=E.useState([]),[i,s]=E.useState(!1),[o,l]=E.useState(null),[c,u]=E.useState(!1),[f,p]=E.useState(null),[m,b]=E.useState(void 0),[v,y]=E.useState(!1),_=E.useRef(null),{documents:S,isLoading:C,fetchDocuments:T}=NI(),A=()=>{s(!1),l(null)};E.useEffect(()=>{e&&T({agent_id:parseInt(e)})},[e,T]);const k=async z=>{if(z.preventDefault(),z.stopPropagation(),!z.dataTransfer.files||z.dataTransfer.files.length===0||!e)return;const M=Array.from(z.dataTransfer.files),Q=M.map(q=>q.name);a(Q);try{for(const q of M)await gt.uploadAgentDocument(e,q),a(F=>F.filter(V=>V!==q.name));await T({agent_id:parseInt(e)})}catch(q){console.error("Failed to upload files:",q),a([])}},N=z=>{r(z.target.value)},L=()=>{_.current?.click()},I=()=>{y(!0)},P=async z=>{if(!e){Fr.error("No agent selected");return}try{const M=z.map(q=>parseInt(q));console.log("🔗 Associating documents:",{agent_id:e,documentIds:M});const Q=await gt.associateDocumentsWithAgent(e,M);console.log("✅ Association result:",Q),Fr.success(`Successfully added ${z.length} file(s) to agent`),await T({agent_id:parseInt(e)}),y(!1)}catch(M){console.error("❌ Failed to add files to agent:",M),console.error("❌ Error details:",{message:M.message,status:M.response?.status,data:M.response?.data,stack:M.stack}),Fr.error("Failed to add files to agent")}},H=async z=>{const M=z.target.files;if(!M||M.length===0||!e)return;const Q=Array.from(M),q=Q.map(F=>F.name);a(q);try{for(const F of Q)await gt.uploadAgentDocument(e,F),a(V=>V.filter(Z=>Z!==F.name)),await T({agent_id:parseInt(e)})}catch(F){console.error("Failed to upload file:",F),a([]),await T({agent_id:parseInt(e)})}finally{_.current&&(_.current.value=""),a([])}},B=z=>{if(z.type==="file"&&z.extension?.toLowerCase()==="pdf"){const Q=`http://localhost:8080/api/documents/${parseInt(z.id)}/download`;p(Q),b(z.name),u(!0)}else console.log("View document:",z)},K=async z=>{console.log("🗑️ Delete item requested:",{itemId:z.id,itemName:z.name}),l(z),s(!0)},j=async()=>{if(o)try{const z=parseInt(o.id);await gt.disassociateDocumentFromAgent(e,z),Fr.success(`"${o.name}" removed successfully.`),console.log("🔄 Refreshing documents after disassociation..."),await T({agent_id:parseInt(e)}),console.log("✅ Document disassociation and refresh completed")}catch(z){console.error("❌ Failed to remove document from agent:",z),Fr.error("Failed to remove document from agent")}finally{s(!1),l(null)}},W=()=>{const[z,M]=E.useState(!1),Q=V=>{V.preventDefault(),V.stopPropagation(),M(!0)},q=V=>{V.preventDefault(),V.stopPropagation(),M(!1)},F=V=>{V.preventDefault(),V.stopPropagation(),M(!1),k(V)};return g.jsxs("div",{className:`flex flex-col items-center justify-center h-[100%] border-2 border-dashed rounded-lg transition-colors ${z?"border-blue-500 bg-blue-50":"border-gray-300 hover:border-gray-400"}`,onDragOver:Q,onDragLeave:q,onDrop:F,children:[g.jsx("div",{className:`flex flex-col items-center justify-center mb-4 w-22 h-22 rounded-full ${z?"bg-white":"bg-gray-100"}`,children:g.jsx(Lwe,{className:"w-10 h-10 text-gray-400"})}),g.jsxs("div",{className:"space-y-2 text-center",children:[g.jsx("h3",{className:"text-lg font-semibold text-gray-700",children:"No documents yet"}),g.jsx("p",{className:"text-sm text-gray-500",children:"Drag and drop files here to upload"})]}),g.jsx(mt,{onClick:L,className:"mt-4 font-semibold cursor-pointer",disabled:n.length>0,children:n.length>0?g.jsxs(g.Fragment,{children:[g.jsx(Jf,{className:"mr-2 w-4 h-4 animate-spin"}),"Uploading..."]}):g.jsxs(g.Fragment,{children:[g.jsx(hwe,{className:"mr-2 w-4 h-4"}),"Browse Files"]})})]})},U=S.filter(z=>z.agent_id?.toString()===e).map(lKe),Y=U.filter(z=>z.name.toLowerCase().includes(t.toLowerCase()));return e?g.jsxs("div",{className:"flex flex-col gap-4 px-6 pb-6 h-full bg-white rounded-lg",children:[g.jsx("input",{type:"file",ref:_,style:{display:"none"},multiple:!0,onChange:H}),g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-lg font-semibold text-gray-700",children:"Documents"}),U.length>0&&g.jsxs("div",{className:"text-sm text-gray-500",children:[U.length," document",U.length!==1?"s":""]})]}),g.jsx("div",{className:"flex items-center space-x-2"})]}),g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsxs("div",{className:"relative flex-1 max-w-sm",children:[g.jsx(ub,{className:"absolute left-3 top-1/2 w-4 h-4 text-gray-400 transform -translate-y-1/2"}),g.jsx(Bl,{placeholder:"Search documents...",value:t,onChange:N,className:"pl-10"})]}),g.jsxs(mt,{onClick:I,disabled:n.length>0,variant:"outline",children:[g.jsx(_2e,{className:"mr-2 w-4 h-4"}),"Add from Library"]})]}),n.length>0&&g.jsx("div",{className:"p-4 mb-4 bg-blue-50 rounded-lg border border-blue-200",children:g.jsxs("div",{className:"flex items-center space-x-3",children:[g.jsx(lSe,{className:"w-5 h-5 text-blue-600"}),g.jsxs("div",{className:"flex-1",children:[g.jsxs("div",{className:"font-medium text-blue-900",children:["Uploading ",n.length," file",n.length>1?"s":"","..."]}),g.jsx("div",{className:"mt-1 text-sm text-blue-700",children:n.map((z,M)=>g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(Jf,{className:"w-3 h-3 animate-spin"}),g.jsx("span",{children:z})]},M))})]})]})}),g.jsx("div",{className:"flex-1",children:Y.length===0&&!C?g.jsx(W,{}):g.jsx(Zle,{data:Y,loading:C,mode:"library",onViewItem:B,onDeleteItem:K})}),g.jsx(Qle,{isOpen:i,onClose:A,onConfirm:j,title:"Remove from Agent",description:`Are you sure you want to remove "${o?.name}" from this agent? The document will remain in the library and can be added to other agents.`,confirmText:"Remove from Agent",cancelText:"Cancel",variant:"default"}),g.jsx(Wce,{open:c,onClose:()=>u(!1),fileUrl:f||"",fileName:m}),g.jsx(RGe,{isOpen:v,onClose:()=>y(!1),onConfirm:P,currentAgentId:e||""})]}):g.jsx("div",{className:"flex justify-center items-center h-full",children:g.jsx("div",{className:"text-gray-500",children:"No agent selected"})})},hr={IDLE:"idle",RUNNING:"running",COMPLETED:"completed",FAILED:"failed",PAUSED:"paused",CANCELLED:"cancelled"},uKe=()=>{const{agent_id:e}=gs(),[t,r]=E.useState(null),[n,a]=E.useState(!0),[i,s]=E.useState(null),[o,l]=E.useState(new Map),[c,u]=E.useState(null),[f,p]=E.useState("");E.useEffect(()=>{const A=setInterval(async()=>{l(k=>{const N=new Map(k);for(const[L,I]of N.entries())I.status===hr.RUNNING&&gt.getWorkflowExecutionStatus(L).then(P=>{console.log(`Updating execution ${L}:`,P),I.status=P.status,I.currentStep=P.current_step,I.executionTime=P.execution_time,I.stepResults=P.step_results.map(H=>({stepIndex:H.step_index,stepName:H.step_name,status:H.status,startTime:H.start_time?new Date(H.start_time):void 0,endTime:H.end_time?new Date(H.end_time):void 0,executionTime:H.execution_time,result:H.result,errorMessage:H.error})),P.status===hr.COMPLETED&&(I.endTime=new Date),console.log(`Updated execution ${L}:`,I),console.log(`📊 Step ${I.currentStep+1} completed with result:`,I.stepResults[I.currentStep]?.result),l(new Map(N))}).catch(P=>{console.error(`Failed to get status for execution ${L}:`,P)});return N})},1e3);return()=>clearInterval(A)},[]);const m=async T=>{try{a(!0),s(null);const A=await gt.getAgentFileContent(T,"workflows.na"),k=b(A.content);r(k)}catch(A){console.error("Error fetching workflows:",A),s("Failed to load workflows")}finally{a(!1)}};E.useEffect(()=>{console.log({agentId:e}),e&&m(parseInt(e))},[e]);const b=T=>{const A=T.split(`
`).map(N=>N.trim()).filter(N=>N&&!N.startsWith("#")),k=[];console.log({content:T});for(const N of A)if(console.log({line:N}),N.startsWith("def ")&&N.includes(" = ")&&N.includes("|")){const L=N.substring(4),I=L.indexOf("(");if(I>0){const P=L.substring(0,I).trim(),H=N.substring(N.indexOf(" = ")+3),B=H.split("|").map(K=>K.trim());k.push({name:P,steps:B,pipeline:H.trim(),description:`${B.join(" → ")}`,executionStatus:hr.IDLE})}}return{workflow_definitions:k,function_definitions:[],has_pipeline_workflows:k.length>0,total_workflows:k.length}},v=(T,A,k)=>{const N={query:k||"How can I help you today?",context:"General inquiry",timestamp:new Date().toISOString(),user_id:"user_123",session_id:`session_${Date.now()}`};switch(T){case 1:return{...N,query:k||"What can you help me with today?",context:"General assistance request",agent_type:"general_purpose",capabilities:["information_retrieval","task_execution","problem_solving"]};case 2:return{...N,query:k||"I need help with my specific domain",context:"Domain-specific inquiry",agent_type:"specialized",domain:"business_operations",priority:"medium"};case 3:return{...N,query:k||"I have a customer service question",context:"Customer support inquiry",agent_type:"customer_service",customer_tier:"premium",issue_category:"general_support"};default:return{...N,query:k||"How can I assist you?",context:"Standard inquiry",agent_type:"unknown",workflow_name:A}}},y=async T=>{try{const A=v(parseInt(e||"0"),T.name,f),k={agent_id:parseInt(e||"0"),workflow_name:T.name,input_data:A,execution_mode:"step-by-step"};console.log(`🚀 Starting workflow '${T.name}' with agent-specific input:`,k.input_data);const N=await gt.startWorkflowExecution(k);if(!N.success){console.error("Failed to start workflow execution:",N.error);return}const L={workflowId:T.name,status:hr.RUNNING,currentStep:N.current_step,totalSteps:N.total_steps,startTime:new Date,lastUpdateTime:new Date,executionTime:N.execution_time,stepResults:N.step_results.map(I=>({stepIndex:I.step_index,stepName:I.step_name,status:I.status,startTime:void 0,endTime:void 0,executionTime:I.execution_time,errorMessage:I.error,input:I.input,result:I.result}))};L.stepResults.length>0&&(L.stepResults[0].status="running"),l(I=>new Map(I).set(N.execution_id,L)),r(I=>I&&{...I,workflow_definitions:I.workflow_definitions.map(P=>P.name===T.name?{...P,executionStatus:hr.RUNNING,startTime:new Date}:P)}),console.log(`✅ Started workflow execution: ${N.execution_id}`),console.log("📊 Initial execution state:",L)}catch(A){console.error("Failed to start workflow execution:",A)}},_=async T=>{try{const A={execution_id:T,action:"stop"},k=await gt.controlWorkflowExecution(A);if(!k.success){console.error("Failed to stop workflow execution:",k.error);return}l(N=>{const L=new Map(N),I=L.get(T);return I&&(I.status=hr.CANCELLED,I.endTime=new Date),L}),console.log(`Stopped workflow execution: ${T}`)}catch(A){console.error("Failed to stop workflow execution:",A)}},S=T=>{switch(T){case hr.RUNNING:return g.jsx(aE,{className:"w-4 h-4 text-blue-600 animate-spin"});case hr.COMPLETED:return g.jsx(nE,{className:"w-4 h-4 text-green-600"});case hr.FAILED:return g.jsx(Bh,{className:"w-4 h-4 text-red-600"});case hr.PAUSED:return g.jsx(uAe,{className:"w-4 h-4 text-yellow-600"});case hr.CANCELLED:return g.jsx(Bh,{className:"w-4 h-4 text-gray-600"});default:return g.jsx(_z,{className:"w-4 h-4 text-gray-400"})}},C=T=>{switch(T){case hr.RUNNING:return"bg-blue-100 text-blue-800 border-blue-200";case hr.COMPLETED:return"bg-green-100 text-green-800 border-green-200";case hr.FAILED:return"bg-red-100 text-red-800 border-red-200";case hr.PAUSED:return"bg-yellow-100 text-yellow-800 border-yellow-200";case hr.CANCELLED:return"bg-gray-100 text-gray-800 border-gray-200";default:return"bg-gray-100 text-gray-600 border-gray-200"}};return n?g.jsx("div",{className:"flex justify-center items-center h-64",children:g.jsx("div",{className:"w-8 h-8 rounded-full border-b-2 border-blue-600 animate-spin"})}):i?g.jsx("div",{className:"p-8",children:g.jsx("div",{className:"p-4 bg-red-50 rounded-lg border border-red-200",children:g.jsxs("div",{className:"flex",children:[g.jsx("div",{className:"flex-shrink-0",children:g.jsx("svg",{className:"w-5 h-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),g.jsxs("div",{className:"ml-3",children:[g.jsx("h3",{className:"text-sm font-medium text-red-800",children:"Error loading workflows"}),g.jsx("div",{className:"mt-2 text-sm text-red-700",children:i})]})]})})}):!t||t.workflow_definitions.length===0?g.jsx("div",{className:"p-8",children:g.jsxs("div",{className:"text-center",children:[g.jsx(Sz,{className:"mx-auto w-12 h-12 text-gray-400"}),g.jsx("h3",{className:"mt-2 text-sm font-medium text-gray-900",children:"No workflows found"}),g.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"This agent doesn't have any workflow definitions yet."})]})}):g.jsxs("div",{className:"px-6 pb-6",children:[g.jsxs("div",{className:"mb-6",children:[g.jsx("h2",{className:"mb-4 text-2xl font-bold text-gray-900",children:"🔄 Workflow Execution Dashboard"}),g.jsxs("div",{className:"p-6 mb-6 bg-gradient-to-br via-blue-50 to-indigo-50 rounded-xl border shadow-sm from-slate-50 border-slate-200",children:[g.jsxs("div",{className:"flex justify-between items-center mb-4",children:[g.jsxs("div",{className:"flex items-center space-x-3",children:[g.jsx("div",{className:"flex justify-center items-center w-10 h-10 bg-gradient-to-br from-blue-500 to-indigo-600 rounded-lg",children:g.jsx("svg",{className:"w-6 h-6 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})})}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-xl font-semibold text-slate-800",children:"🧪 AI Engineer Test Suite"}),g.jsx("p",{className:"text-sm text-slate-600",children:"Configure test parameters for workflow validation"})]})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsxs("span",{className:"px-3 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-full",children:["Agent ",e]}),g.jsx("span",{className:"px-3 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full",children:"Runtime: Dana"})]})]}),g.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[g.jsx("div",{className:"lg:col-span-2",children:g.jsxs("div",{className:"p-4 bg-white rounded-lg border shadow-sm border-slate-200",children:[g.jsx("label",{className:"block mb-3 text-sm font-semibold text-slate-700",children:g.jsxs("span",{className:"flex items-center space-x-2",children:[g.jsx("svg",{className:"w-4 h-4 text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),g.jsx("span",{children:"Test Query Input"})]})}),g.jsx("textarea",{value:f,onChange:T=>p(T.target.value),placeholder:"Enter custom test query or leave empty for agent-specific defaults...",rows:3,className:"px-4 py-3 w-full font-mono text-sm rounded-lg border resize-none border-slate-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),g.jsxs("div",{className:"flex justify-between items-center mt-2",children:[g.jsxs("p",{className:"text-xs text-slate-500",children:["💡 ",g.jsx("span",{className:"font-medium",children:"Pro tip:"})," Use specific queries to test edge cases and workflow robustness"]}),g.jsx("div",{className:"flex items-center space-x-2",children:g.jsxs("button",{onClick:()=>p(""),className:"px-3 py-1.5 bg-slate-100 text-slate-700 text-xs font-medium rounded-md hover:bg-slate-200 transition-colors flex items-center space-x-1",children:[g.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),g.jsx("span",{children:"Reset"})]})})]})]})}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"p-4 bg-white rounded-lg border shadow-sm border-slate-200",children:[g.jsxs("h4",{className:"flex items-center mb-3 space-x-2 text-sm font-semibold text-slate-700",children:[g.jsxs("svg",{className:"w-4 h-4 text-indigo-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),g.jsx("span",{children:"Test Configuration"})]}),g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("span",{className:"text-xs text-slate-600",children:"Execution Mode:"}),g.jsx("span",{className:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded",children:"Step-by-Step"})]}),g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("span",{className:"text-xs text-slate-600",children:"Runtime:"}),g.jsx("span",{className:"px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded",children:"Dana Engine"})]}),g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("span",{className:"text-xs text-slate-600",children:"Validation:"}),g.jsx("span",{className:"px-2 py-1 text-xs font-medium text-purple-800 bg-purple-100 rounded",children:"Real-time"})]})]})]}),g.jsxs("div",{className:"p-4 bg-white rounded-lg border shadow-sm border-slate-200",children:[g.jsxs("h4",{className:"flex items-center mb-3 space-x-2 text-sm font-semibold text-slate-700",children:[g.jsx("svg",{className:"w-4 h-4 text-emerald-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),g.jsx("span",{children:"Quick Actions"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("button",{onClick:()=>p("Test edge case with empty input"),className:"px-3 py-2 w-full text-xs font-medium text-left text-emerald-700 bg-emerald-50 rounded-md transition-colors hover:bg-emerald-100",children:"🧪 Edge Case Test"}),g.jsx("button",{onClick:()=>p("Performance test with complex query"),className:"px-3 py-2 w-full text-xs font-medium text-left text-blue-700 bg-blue-50 rounded-md transition-colors hover:bg-blue-100",children:"⚡ Performance Test"}),g.jsx("button",{onClick:()=>p("Integration test with external data"),className:"px-3 py-2 w-full text-xs font-medium text-left text-purple-700 bg-purple-50 rounded-md transition-colors hover:bg-purple-100",children:"🔗 Integration Test"})]})]})]})]})]})]}),g.jsxs("div",{className:"grid grid-cols-1 gap-4 mb-6 md:grid-cols-4",children:[g.jsx("div",{className:"p-4 bg-white rounded-lg border border-gray-200 shadow-sm",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:g.jsx(Sz,{className:"w-5 h-5 text-blue-600"})}),g.jsxs("div",{className:"ml-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Workflows"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900",children:t.total_workflows})]})]})}),g.jsx("div",{className:"p-4 bg-white rounded-lg border border-gray-200 shadow-sm",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:g.jsx(nE,{className:"w-5 h-5 text-green-600"})}),g.jsxs("div",{className:"ml-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Completed"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900",children:Array.from(o.values()).filter(T=>T.status===hr.COMPLETED).length})]})]})}),g.jsx("div",{className:"p-4 bg-white rounded-lg border border-gray-200 shadow-sm",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:g.jsx(aE,{className:"w-5 h-5 text-blue-600"})}),g.jsxs("div",{className:"ml-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Running"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900",children:Array.from(o.values()).filter(T=>T.status===hr.RUNNING).length})]})]})}),g.jsx("div",{className:"p-4 bg-white rounded-lg border border-gray-200 shadow-sm",children:g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:g.jsx(Bh,{className:"w-5 h-5 text-red-600"})}),g.jsxs("div",{className:"ml-3",children:[g.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Failed"}),g.jsx("p",{className:"text-2xl font-bold text-gray-900",children:Array.from(o.values()).filter(T=>T.status===hr.FAILED).length})]})]})})]}),g.jsx("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:t.workflow_definitions.map(T=>{const A=Array.from(o.values()).find(N=>N.workflowId===T.name||N.workflowId.startsWith(T.name));console.log(`Workflow ${T.name}:`,{execution:A,executingWorkflowsSize:o.size,allExecutions:Array.from(o.entries())});const k=A&&A.status===hr.RUNNING;return g.jsxs("div",{className:ut("p-6 bg-gradient-to-br from-white to-gray-50 rounded-xl border border-gray-200 shadow-sm transition-all duration-300 transform hover:shadow-xl hover:-translate-y-1",k?"ring-2 ring-blue-500":""),children:[g.jsxs("div",{className:"flex justify-between items-start mb-4",children:[g.jsxs("div",{children:[g.jsx("h3",{className:"mb-2 text-xl font-bold text-gray-900",children:T.name}),g.jsx("div",{className:"inline-block px-3 py-2 bg-white rounded-lg border border-gray-100",children:g.jsx("span",{className:"text-sm text-gray-600",children:T.description})})]}),g.jsxs("div",{className:`inline-flex items-center px-3 py-1.5 rounded-full text-xs font-semibold border ${C(A?.status||hr.IDLE)}`,children:[S(A?.status||hr.IDLE),g.jsx("span",{className:"ml-2 capitalize",children:A?.status||hr.IDLE})]})]}),A&&g.jsxs("div",{className:"p-4 mb-4 bg-gray-50 rounded-lg",children:[g.jsxs("div",{className:"flex justify-between items-center mb-2",children:[g.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Execution Progress"}),g.jsxs("span",{className:"text-sm text-gray-500",children:["Step ",Math.min(A.currentStep+1,A.totalSteps)," of"," ",A.totalSteps]})]}),g.jsx("div",{className:"overflow-hidden w-full h-2 bg-gray-200 rounded-full",children:g.jsx("div",{className:"h-2 bg-blue-600 rounded-full transition-all duration-300",style:{width:`${Math.min(100,Math.max(0,(A.currentStep+1)/A.totalSteps*100))}%`}})}),g.jsxs("div",{className:"flex items-center mt-2 text-sm text-gray-500",children:[g.jsx(_z,{className:"mr-1 w-4 h-4"}),A.executionTime>0?`${Math.round(A.executionTime)}s`:"Starting..."]}),g.jsxs("div",{className:"p-3 mt-3 bg-gradient-to-r from-blue-50 to-indigo-50 rounded-lg border border-blue-200",children:[g.jsxs("div",{className:"flex items-center mb-2 text-xs font-medium text-blue-800",children:[g.jsx("span",{className:"mr-1",children:"🔄"})," Real-time Data Flow"]}),g.jsx("div",{className:"p-2 mb-2 bg-white rounded border border-blue-100",children:g.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-blue-600",children:"Status:"}),g.jsx("span",{className:`ml-1 px-1 py-0.5 text-xs rounded ${A.status===hr.COMPLETED?"bg-green-100 text-green-700":A.status===hr.RUNNING?"bg-blue-100 text-blue-700":A.status===hr.FAILED?"bg-red-100 text-red-700":"bg-gray-100 text-gray-700"}`,children:A.status})]}),g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-blue-600",children:"Runtime:"}),g.jsx("span",{className:"ml-1 text-blue-700",children:A.executionTime>0?`${Math.round(A.executionTime)}s`:"Starting..."})]})]})}),g.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-blue-600",children:"📥 Input:"}),g.jsx("div",{className:"p-1 mt-1 text-blue-700 truncate bg-blue-100 rounded border border-blue-200",children:A.stepResults[0]?.input?typeof A.stepResults[0].input=="object"?JSON.stringify(A.stepResults[0].input).substring(0,60)+"...":String(A.stepResults[0].input).substring(0,60)+"...":"No input data"})]}),g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-green-600",children:"📤 Output:"}),g.jsx("div",{className:"p-1 mt-1 text-green-700 truncate bg-green-100 rounded border border-green-200",children:A.stepResults[A.stepResults.length-1]?.result?typeof A.stepResults[A.stepResults.length-1].result=="object"?JSON.stringify(A.stepResults[A.stepResults.length-1].result).substring(0,60)+"...":String(A.stepResults[A.stepResults.length-1].result).substring(0,60)+"...":"No output data"})]})]}),A.execution_metadata&&Object.keys(A.execution_metadata).length>0&&g.jsxs("div",{className:"p-2 mt-2 bg-white rounded border border-blue-100",children:[g.jsx("div",{className:"mb-1 text-xs font-medium text-blue-600",children:"⚡ Runtime Metrics"}),g.jsxs("div",{className:"grid grid-cols-2 gap-1 text-xs",children:[g.jsxs("div",{children:[g.jsx("span",{className:"text-gray-600",children:"Memory:"}),g.jsx("span",{className:"ml-1 text-gray-700",children:A.execution_metadata.memory_usage?`${A.execution_metadata.memory_usage}MB`:"N/A"})]}),g.jsxs("div",{children:[g.jsx("span",{className:"text-gray-600",children:"Steps:"}),g.jsx("span",{className:"ml-1 text-gray-700",children:A.execution_metadata.steps_executed||0})]})]})]}),g.jsx("button",{onClick:()=>u(T),className:"px-2 py-1 mt-2 w-full text-xs text-blue-800 bg-blue-100 rounded transition-colors hover:bg-blue-200",children:"🔍 View Full Execution Details"})]})]}),g.jsxs("div",{className:"mb-6",children:[g.jsxs("h5",{className:"flex items-center mb-4 text-sm font-medium text-gray-700",children:[g.jsx(Ez,{className:"mr-2 w-4 h-4"}),"Workflow Steps"]}),g.jsxs("div",{className:"relative",children:[T.steps.map((N,L)=>{const P=A?.stepResults[L]?.status||"pending";return g.jsxs("div",{className:"relative",children:[g.jsxs("div",{className:"flex items-center mb-3",children:[g.jsx("div",{className:`flex-shrink-0 w-10 h-10 rounded-full flex items-center justify-center mr-4 z-10 relative ${P==="completed"?"bg-gradient-to-br from-green-500 to-green-600":P==="running"?"bg-gradient-to-br from-blue-500 to-blue-600 animate-pulse":P==="failed"?"bg-gradient-to-br from-red-500 to-red-600":"bg-gradient-to-br from-gray-400 to-gray-500"} shadow-lg`,children:P==="running"?g.jsx(aE,{className:"w-5 h-5 text-white animate-spin"}):P==="completed"?g.jsx(nE,{className:"w-5 h-5 text-white"}):P==="failed"?g.jsx(Bh,{className:"w-5 h-5 text-white"}):g.jsx("span",{className:"text-sm font-bold text-white",children:L+1})}),g.jsxs("div",{className:"flex-1 px-5 py-4 bg-gradient-to-r from-gray-50 to-white rounded-xl border border-gray-200 shadow-sm transition-all duration-300 transform hover:shadow-lg hover:-translate-y-1",children:[g.jsxs("div",{className:"flex justify-between items-center mb-2",children:[g.jsx("span",{className:"font-mono text-sm font-medium text-gray-800",children:N}),g.jsx("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${P==="completed"?"bg-green-100 text-green-800":P==="running"?"bg-blue-100 text-blue-800":P==="failed"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-600"}`,children:P==="completed"?"Completed":P==="running"?"Running":P==="failed"?"Failed":"Pending"})]}),g.jsxs("div",{className:"flex items-center",children:[g.jsx("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${L===0?"bg-green-100 text-green-800":L===T.steps.length-1?"bg-purple-100 text-purple-800":"bg-blue-100 text-blue-800"}`,children:L===0?"Input":L===T.steps.length-1?"Output":"Process"}),g.jsx("span",{className:"ml-2 text-xs text-gray-500",children:L===0?"Initial data processing":L===T.steps.length-1?"Final result generation":"Data transformation step"})]})]})]}),L<T.steps.length-1&&g.jsx("div",{className:"absolute left-5 top-10 w-0.5 h-8 bg-gradient-to-b from-blue-400 to-blue-200"})]},L)}),g.jsx("div",{className:"absolute left-5 top-0 bottom-0 w-0.5 bg-gradient-to-b from-blue-600 via-blue-400 to-blue-200 opacity-30"})]})]}),g.jsxs("div",{className:"flex space-x-3",children:[!A||A.status===hr.IDLE||A.status===hr.COMPLETED||A.status===hr.FAILED?g.jsxs("button",{onClick:()=>y(T),className:"inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md border border-transparent transition-colors hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:[g.jsx(dAe,{className:"mr-2 w-4 h-4"}),"Execute Workflow"]}):A.status===hr.RUNNING?g.jsxs("button",{onClick:()=>_(A.workflowId),className:"inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-red-600 rounded-md border border-transparent transition-colors hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500",children:[g.jsx(Bh,{className:"mr-2 w-4 h-4"}),"Stop Execution"]}):null,g.jsxs("button",{onClick:()=>u(T),className:"inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white rounded-md border border-gray-300 transition-colors hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:[g.jsx(Ez,{className:"mr-2 w-4 h-4"}),"View Details"]})]})]},T.name)})}),c&&g.jsx("div",{className:"overflow-y-auto fixed inset-0 z-50 w-full h-full bg-gray-600 bg-opacity-50",children:g.jsx("div",{className:"relative top-20 p-5 mx-auto w-11/12 bg-white rounded-md border shadow-lg md:w-3/4 lg:w-1/2",children:g.jsxs("div",{className:"mt-3",children:[g.jsxs("h3",{className:"mb-4 text-lg font-medium text-gray-900",children:["Workflow Details: ",c.name]}),(()=>{const T=Array.from(o.values()).find(A=>A.workflowId===c.name);return T?g.jsxs("div",{className:"p-4 mb-4 bg-blue-50 rounded-lg border border-blue-200",children:[g.jsx("h4",{className:"mb-2 text-sm font-medium text-blue-800",children:"Execution Summary"}),g.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-blue-600",children:"Status:"}),g.jsx("span",{className:`ml-2 px-2 py-1 text-xs rounded-full ${T.status===hr.COMPLETED?"bg-green-100 text-green-800":T.status===hr.RUNNING?"bg-blue-100 text-blue-800":T.status===hr.FAILED?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:T.status})]}),g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-blue-600",children:"Progress:"}),g.jsxs("span",{className:"ml-2 text-blue-700",children:[T.currentStep+1," / ",T.totalSteps]})]}),g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-blue-600",children:"Execution Time:"}),g.jsx("span",{className:"ml-2 text-blue-700",children:T.executionTime?`${Math.round(T.executionTime)}s`:"Starting..."})]}),g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-blue-600",children:"Started:"}),g.jsx("span",{className:"ml-2 text-blue-700",children:T.startTime?T.startTime.toLocaleTimeString():"Unknown"})]})]})]}):null})(),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-700",children:"Code"}),g.jsx("div",{className:"p-3 bg-gray-50 rounded-lg",children:g.jsx("code",{className:"font-mono text-sm text-gray-800",children:c.pipeline})})]}),g.jsxs("div",{children:[g.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-700",children:"Input Data"}),g.jsx("div",{className:"p-3 bg-gray-50 rounded-lg",children:g.jsx("div",{className:"text-sm text-gray-800",children:(()=>{const T=Array.from(o.values()).find(k=>k.workflowId===c.name);if(T&&T.stepResults.length>0){const k=T.stepResults[0];if(k&&k.input)return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Query:"}),' "',k.input.query||"N/A",'"']}),g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Context:"})," ",k.input.context||"N/A"]}),k.input.agent_type&&g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Agent Type:"})," ",k.input.agent_type]}),k.input.capabilities&&g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Capabilities:"}),g.jsx("div",{className:"ml-4 text-gray-600",children:k.input.capabilities.map((N,L)=>g.jsxs("div",{children:["• ",N]},L))})]}),k.input.customer_tier&&g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Customer Tier:"})," ",k.input.customer_tier]}),k.input.domain&&g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Domain:"})," ",k.input.domain]}),g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Timestamp:"})," ",k.input.timestamp?new Date(k.input.timestamp).toLocaleString():new Date().toLocaleString()]})]})}const A=v(parseInt(e||"0"),c.name,f);return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Query:"}),' "',A.query,'"']}),g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Context:"})," ",A.context]}),A.agent_type&&g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Agent Type:"})," ",A.agent_type]}),"capabilities"in A&&A.capabilities&&g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Capabilities:"}),g.jsx("div",{className:"ml-4 text-gray-600",children:A.capabilities.map((k,N)=>g.jsxs("div",{children:["• ",k]},N))})]}),"customer_tier"in A&&A.customer_tier&&g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Customer Tier:"})," ",A.customer_tier]}),"domain"in A&&A.domain&&g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Domain:"})," ",A.domain]}),g.jsxs("div",{className:"mb-2",children:[g.jsx("span",{className:"font-medium",children:"Timestamp:"})," ",A.timestamp?new Date(A.timestamp).toLocaleString():new Date().toLocaleString()]})]})})()})})]}),g.jsxs("div",{children:[g.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-700",children:"Steps"}),g.jsx("div",{className:"space-y-2",children:c.steps.map((T,A)=>g.jsxs("div",{className:"flex items-center space-x-3",children:[g.jsx("div",{className:"flex justify-center items-center w-6 h-6 bg-blue-100 rounded-full",children:g.jsx("span",{className:"text-xs font-medium text-blue-600",children:A+1})}),g.jsx("span",{className:"font-mono text-sm text-gray-800",children:T})]},A))})]}),(()=>{const T=Array.from(o.values()).find(A=>A.workflowId===c.name);return T&&T.stepResults.length>0?g.jsxs("div",{children:[g.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-700",children:"Execution Data"}),g.jsxs("div",{className:"p-3 mb-4 bg-gradient-to-r from-blue-50 to-indigo-50 rounded-lg border border-blue-200",children:[g.jsxs("div",{className:"flex justify-between items-center mb-2",children:[g.jsx("span",{className:"text-sm font-medium text-blue-800",children:"🔄 Real-time Execution"}),g.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${T.status===hr.COMPLETED?"bg-green-100 text-green-800":T.status===hr.RUNNING?"bg-blue-100 text-blue-800":T.status===hr.FAILED?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:T.status})]}),T.execution_metadata&&Object.keys(T.execution_metadata).length>0&&g.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-blue-600",children:"Runtime:"}),g.jsx("span",{className:"ml-1 text-blue-700",children:T.execution_metadata.execution_time?`${T.execution_metadata.execution_time.toFixed(2)}s`:"N/A"})]}),g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-blue-600",children:"Memory:"}),g.jsx("span",{className:"ml-1 text-blue-700",children:T.execution_metadata.memory_usage?`${T.execution_metadata.memory_usage}MB`:"N/A"})]}),g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-blue-600",children:"Steps:"}),g.jsx("span",{className:"ml-1 text-blue-700",children:T.execution_metadata.steps_executed||0})]}),g.jsxs("div",{children:[g.jsx("span",{className:"font-medium text-blue-600",children:"Errors:"}),g.jsx("span",{className:"ml-1 text-blue-700",children:T.execution_metadata.errors?T.execution_metadata.errors.length:0})]})]})]}),g.jsx("div",{className:"space-y-3",children:T.stepResults.map((A,k)=>g.jsxs("div",{className:"p-3 rounded-lg border border-gray-200 transition-shadow hover:shadow-md",children:[g.jsxs("div",{className:"flex justify-between items-center mb-3",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("div",{className:"flex justify-center items-center w-6 h-6 bg-blue-100 rounded-full",children:g.jsx("span",{className:"text-xs font-medium text-blue-600",children:k+1})}),g.jsx("span",{className:"text-sm font-medium text-gray-800",children:A.stepName})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${A.status==="completed"?"bg-green-100 text-green-800":A.status==="running"?"bg-blue-100 text-blue-800":A.status==="failed"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:A.status}),A.executionTime&&g.jsxs("span",{className:"px-2 py-1 text-xs text-gray-500 bg-gray-100 rounded",children:[A.executionTime.toFixed(2),"s"]})]})]}),g.jsxs("div",{className:"space-y-3",children:[A.input?g.jsxs("div",{children:[g.jsx("span",{className:"text-xs font-medium text-gray-600",children:"📥 Input:"}),g.jsx("div",{className:"overflow-y-auto p-2 mt-1 max-h-32 font-mono text-xs text-blue-700 bg-blue-50 rounded border border-blue-200",children:typeof A.input=="object"?JSON.stringify(A.input,null,2):String(A.input)})]}):g.jsxs("div",{children:[g.jsx("span",{className:"text-xs font-medium text-gray-600",children:"📥 Input:"}),g.jsx("div",{className:"p-2 mt-1 font-mono text-xs text-gray-500 bg-gray-50 rounded border border-gray-200",children:"No input data available for this step"})]}),A.result?g.jsxs("div",{children:[g.jsx("span",{className:"text-xs font-medium text-gray-600",children:"📤 Output:"}),g.jsx("div",{className:"overflow-y-auto p-2 mt-1 max-h-32 font-mono text-xs text-green-700 bg-green-50 rounded border border-green-200",children:typeof A.result=="object"?JSON.stringify(A.result,null,2):String(A.result)})]}):g.jsxs("div",{children:[g.jsx("span",{className:"text-xs font-medium text-gray-600",children:"📤 Output:"}),g.jsx("div",{className:"p-2 mt-1 font-mono text-xs text-gray-500 bg-gray-50 rounded border border-gray-200",children:"No output data available for this step"})]}),g.jsxs("div",{className:"flex justify-between items-center text-xs",children:[g.jsx("span",{className:"text-gray-600",children:"Step Status:"}),g.jsx("span",{className:`px-2 py-1 rounded ${A.status==="completed"?"bg-green-100 text-green-700":A.status==="running"?"bg-blue-100 text-blue-700":A.status==="failed"?"bg-red-100 text-red-700":"bg-gray-100 text-gray-600"}`,children:A.status})]}),A.executionTime&&A.executionTime>0&&g.jsxs("div",{className:"px-2 py-1 text-xs text-gray-500 bg-gray-100 rounded",children:["⏱️ Execution time: ",A.executionTime.toFixed(3),"s"]}),A.error&&g.jsxs("div",{children:[g.jsx("span",{className:"text-xs font-medium text-red-600",children:"❌ Error:"}),g.jsx("div",{className:"overflow-y-auto p-2 mt-1 max-h-32 font-mono text-xs text-red-700 bg-red-50 rounded border border-red-200",children:A.error})]}),A.startTime&&A.endTime&&g.jsxs("div",{className:"flex justify-between items-center text-xs text-gray-500",children:[g.jsxs("span",{children:["Started: ",A.startTime.toLocaleTimeString()]}),g.jsxs("span",{children:["Ended: ",A.endTime.toLocaleTimeString()]})]})]})]},k))}),T.result&&g.jsxs("div",{className:"p-3 mt-4 bg-gradient-to-r from-green-50 to-emerald-50 rounded-lg border border-green-200",children:[g.jsx("h5",{className:"mb-2 text-sm font-medium text-green-800",children:"🎯 Final Result"}),g.jsx("div",{className:"overflow-y-auto p-2 max-h-32 font-mono text-xs text-green-800 bg-green-100 rounded",children:typeof T.result=="object"?JSON.stringify(T.result,null,2):String(T.result)})]}),T.error&&g.jsxs("div",{className:"p-3 mt-4 bg-gradient-to-r from-red-50 to-pink-50 rounded-lg border border-red-200",children:[g.jsx("h5",{className:"mb-2 text-sm font-medium text-red-800",children:"❌ Execution Error"}),g.jsx("div",{className:"overflow-y-auto p-2 max-h-32 font-mono text-xs text-red-800 bg-red-100 rounded",children:T.error})]})]}):g.jsxs("div",{className:"py-8 text-center text-gray-500",children:[g.jsx("div",{className:"mb-2 text-4xl",children:"🚀"}),g.jsx("p",{className:"text-sm",children:"No execution data available yet."}),g.jsx("p",{className:"mt-1 text-xs text-gray-400",children:"Execute the workflow to see real-time data flow!"})]})})()]}),g.jsx("div",{className:"flex justify-end mt-6 space-x-3",children:g.jsx("button",{onClick:()=>u(null),className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white rounded-md border border-gray-300 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Close"})})]})})})]})},dKe=["Domain Knowledge","Documents","Workflows"],fKe={"Domain Knowledge":g.jsx(eAe,{className:"w-4 h-4"}),Documents:g.jsx(oAe,{className:"w-4 h-4"}),Workflows:g.jsx(cAe,{className:"w-4 h-4"})},hKe=()=>{const{agent_id:e}=gs(),{knowledgeBaseActiveSubTab:t,setKnowledgeBaseActiveSubTab:r}=ud(),[n,a]=E.useState("Domain Knowledge"),i=t||n,s=l=>{r(l),a(l)},o=()=>{switch(i){case"Domain Knowledge":return g.jsx(zZ,{});case"Documents":return g.jsx(cKe,{});case"Workflows":return g.jsx(uKe,{});default:return g.jsx(zZ,{})}};return e?g.jsxs("div",{className:"flex flex-col h-full bg-white rounded-lg",children:[g.jsx("div",{className:"flex gap-2 px-4 py-4",children:dKe.map(l=>g.jsxs("button",{className:`cursor-pointer px-3 py-2 font-medium text-sm flex items-center gap-2 rounded-full transition-colors ${i===l?"text-primary shadow-sm border bg-gray-100 border-gray-200":"text-gray-500 border border-gray-200 hover:text-gray-800 hover:bg-gray-100"}`,onClick:()=>s(l),children:[fKe[l],l]},l))}),g.jsx("div",{className:"overflow-auto flex-1 custom-scrollbar",children:o()})]}):g.jsx("div",{className:"flex justify-center items-center h-full",children:g.jsx("div",{className:"text-gray-500",children:"No agent selected"})})},pKe=[{id:1,name:"Google Patents",description:"Connect to Google Patents to retrieve Patent document",icon:g.jsx("img",{src:"https://www.google.com/favicon.ico",alt:"Google",className:"w-6 h-6"})},{id:2,name:"Calendar Integration",description:"Connect to Google Patents to retrieve Patent document",icon:g.jsx(_ge,{className:"w-6 h-6 text-blue-500"})},{id:3,name:"Internal Storage Access",description:"Connect to Google Patents to retrieve Patent document",icon:g.jsx(Fge,{className:"w-6 h-6 text-indigo-500"})},{id:4,name:"Web Search",description:"Connect to Google Patents to retrieve Patent document",icon:g.jsx(bve,{className:"w-6 h-6 text-gray-500"})},{id:5,name:"Big Query",description:"Connect to Google Patents to retrieve Patent document",icon:g.jsx(G9,{className:"w-6 h-6 text-purple-500"})},{id:6,name:"Big Query",description:"Connect to Google Patents to retrieve Patent document",icon:g.jsx(G9,{className:"w-6 h-6 text-purple-500"})},{id:7,name:"Scheduling events",description:"Connect to Google Patents to retrieve Patent document",icon:g.jsx(Vw,{className:"w-6 h-6 text-green-500"})},{id:8,name:"Scheduling events",description:"Connect to Google Patents to retrieve Patent document",icon:g.jsx(Vw,{className:"w-6 h-6 text-green-500"})},{id:9,name:"Scheduling events",description:"Connect to Google Patents to retrieve Patent document",icon:g.jsx(Vw,{className:"w-6 h-6 text-green-500"})}],mKe=()=>{const[e,t]=E.useState(""),r=pKe.filter(n=>n.name.toLowerCase().includes(e.toLowerCase()));return g.jsxs("div",{className:"flex flex-col p-6 h-full bg-white",children:[g.jsx("div",{className:"flex justify-between items-center mb-6",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex gap-3 items-center",children:[g.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Tools"}),g.jsx("span",{className:"px-2 py-1 text-xs font-medium text-blue-700 bg-blue-100 rounded-full",children:"Coming Soon"})]}),g.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"External tool connections are on the way."})]})}),g.jsx("div",{className:"mb-6 max-w-sm",children:g.jsxs("div",{className:"relative",children:[g.jsx(jee,{className:"absolute left-3 top-1/2 w-4 h-4 text-gray-400 transform -translate-y-1/2"}),g.jsx(Bl,{placeholder:"Search",value:e,onChange:n=>t(n.target.value),className:"pl-10"})]})}),g.jsx("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 md:grid-cols-3",children:r.map(n=>g.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-6 flex flex-col shadow-sm hover:shadow-md transition-shadow min-h-[140px]",children:[g.jsxs("div",{className:"flex flex-col mb-4",children:[g.jsx("div",{className:"flex justify-center items-center w-12 h-12 bg-gray-100 rounded-full",children:n.icon}),g.jsx("span",{className:"mt-4 text-lg font-semibold text-gray-900",children:n.name})]}),g.jsx("p",{className:"flex-1 text-sm text-gray-600",children:n.description})]},n.id))})]})};function gKe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yQ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xQ(Object(r),!0).forEach(function(n){gKe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xQ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vKe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function bKe(e,t){if(e==null)return{};var r=vKe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xKe(e,t){return yKe(e)||_Ke(e,t)||wKe(e,t)||EKe()}function yKe(e){if(Array.isArray(e))return e}function _Ke(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var s=e[Symbol.iterator](),o;!(n=(o=s.next()).done)&&(r.push(o.value),!(t&&r.length===t));n=!0);}catch(l){a=!0,i=l}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw i}}return r}}function wKe(e,t){if(e){if(typeof e=="string")return _Q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _Q(e,t)}}function _Q(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function EKe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SKe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function EQ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wQ(Object(r),!0).forEach(function(n){SKe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wQ(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CKe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(a,i){return i(a)},n)}}function mp(e){return function t(){for(var r=this,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return a.length>=e.length?e.apply(this,a):function(){for(var s=arguments.length,o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];return t.apply(r,[].concat(a,o))}}}function Fb(e){return{}.toString.call(e).includes("Object")}function TKe(e){return!Object.keys(e).length}function hm(e){return typeof e=="function"}function AKe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function kKe(e,t){return Fb(t)||Bc("changeType"),Object.keys(t).some(function(r){return!AKe(e,r)})&&Bc("changeField"),t}function NKe(e){hm(e)||Bc("selectorType")}function RKe(e){hm(e)||Fb(e)||Bc("handlerType"),Fb(e)&&Object.values(e).some(function(t){return!hm(t)})&&Bc("handlersType")}function MKe(e){e||Bc("initialIsRequired"),Fb(e)||Bc("initialType"),TKe(e)&&Bc("initialContent")}function DKe(e,t){throw new Error(e[t]||e.default)}var OKe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Bc=mp(DKe)(OKe),E1={changes:kKe,selector:NKe,handler:RKe,initial:MKe};function IKe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E1.initial(e),E1.handler(t);var r={current:e},n=mp(FKe)(r,t),a=mp(PKe)(r),i=mp(E1.changes)(e),s=mp(LKe)(r);function o(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return E1.selector(c),c(r.current)}function l(c){CKe(n,a,i,s)(c)}return[o,l]}function LKe(e,t){return hm(t)?t(e.current):t}function PKe(e,t){return e.current=EQ(EQ({},e.current),t),t}function FKe(e,t,r){return hm(t)?t(e.current):Object.keys(r).forEach(function(n){var a;return(a=t[n])===null||a===void 0?void 0:a.call(t,e.current[n])}),r}var BKe={create:IKe},zKe={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function jKe(e){return function t(){for(var r=this,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return a.length>=e.length?e.apply(this,a):function(){for(var s=arguments.length,o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];return t.apply(r,[].concat(a,o))}}}function qKe(e){return{}.toString.call(e).includes("Object")}function UKe(e){return e||SQ("configIsRequired"),qKe(e)||SQ("configType"),e.urls?($Ke(),{paths:{vs:e.urls.monacoBase}}):e}function $Ke(){console.warn(Kce.deprecation)}function HKe(e,t){throw new Error(e[t]||e.default)}var Kce={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
    You are using deprecated way of configuration.

    Instead of using
      monaco.config({ urls: { monacoBase: '...' } })
    use
      monaco.config({ paths: { vs: '...' } })

    For more please check the link https://github.com/suren-atoyan/monaco-loader#config
  `},SQ=jKe(HKe)(Kce),GKe={config:UKe},VKe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(a){return r.reduceRight(function(i,s){return s(i)},a)}};function Xce(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],Xce(e[r],t[r]))}),yQ(yQ({},e),t)}var WKe={type:"cancelation",msg:"operation is manually canceled"};function zM(e){var t=!1,r=new Promise(function(n,a){e.then(function(i){return t?a(WKe):n(i)}),e.catch(a)});return r.cancel=function(){return t=!0},r}var KKe=BKe.create({config:zKe,isInitialized:!1,resolve:null,reject:null,monaco:null}),Yce=xKe(KKe,2),dg=Yce[0],_y=Yce[1];function XKe(e){var t=GKe.config(e),r=t.monaco,n=bKe(t,["monaco"]);_y(function(a){return{config:Xce(a.config,n),monaco:r}})}function YKe(){var e=dg(function(t){var r=t.monaco,n=t.isInitialized,a=t.resolve;return{monaco:r,isInitialized:n,resolve:a}});if(!e.isInitialized){if(_y({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),zM(jM);if(window.monaco&&window.monaco.editor)return Zce(window.monaco),e.resolve(window.monaco),zM(jM);VKe(ZKe,JKe)(eXe)}return zM(jM)}function ZKe(e){return document.body.appendChild(e)}function QKe(e){var t=document.createElement("script");return e&&(t.src=e),t}function JKe(e){var t=dg(function(n){var a=n.config,i=n.reject;return{config:a,reject:i}}),r=QKe("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function eXe(){var e=dg(function(r){var n=r.config,a=r.resolve,i=r.reject;return{config:n,resolve:a,reject:i}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){Zce(r),e.resolve(r)},function(r){e.reject(r)})}function Zce(e){dg().monaco||_y({monaco:e})}function tXe(){return dg(function(e){var t=e.monaco;return t})}var jM=new Promise(function(e,t){return _y({resolve:e,reject:t})}),Bb={config:XKe,init:YKe,__getMonacoInstance:tXe},rXe={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},qM=rXe,nXe={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},aXe=nXe;function iXe({children:e}){return ye.createElement("div",{style:aXe.container},e)}var sXe=iXe,oXe=sXe;function lXe({width:e,height:t,isEditorReady:r,loading:n,_ref:a,className:i,wrapperProps:s}){return ye.createElement("section",{style:{...qM.wrapper,width:e,height:t},...s},!r&&ye.createElement(oXe,null,n),ye.createElement("div",{ref:a,style:{...qM.fullWidth,...!r&&qM.hide},className:i}))}var cXe=lXe,Qce=E.memo(cXe);function uXe(e){E.useEffect(e,[])}var n8=uXe;function dXe(e,t,r=!0){let n=E.useRef(!0);E.useEffect(n.current||!r?()=>{n.current=!1}:e,t)}var ki=dXe;function Dp(){}function Mf(e,t,r,n){return fXe(e,n)||hXe(e,t,r,n)}function fXe(e,t){return e.editor.getModel(Jce(e,t))}function hXe(e,t,r,n){return e.editor.createModel(t,r,n?Jce(e,n):void 0)}function Jce(e,t){return e.Uri.parse(t)}function pXe({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:a,originalModelPath:i,modifiedModelPath:s,keepCurrentOriginalModel:o=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:u="Loading...",options:f={},height:p="100%",width:m="100%",className:b,wrapperProps:v={},beforeMount:y=Dp,onMount:_=Dp}){let[S,C]=E.useState(!1),[T,A]=E.useState(!0),k=E.useRef(null),N=E.useRef(null),L=E.useRef(null),I=E.useRef(_),P=E.useRef(y),H=E.useRef(!1);n8(()=>{let W=Bb.init();return W.then(D=>(N.current=D)&&A(!1)).catch(D=>D?.type!=="cancelation"&&console.error("Monaco initialization: error:",D)),()=>k.current?j():W.cancel()}),ki(()=>{if(k.current&&N.current){let W=k.current.getOriginalEditor(),D=Mf(N.current,e||"",n||r||"text",i||"");D!==W.getModel()&&W.setModel(D)}},[i],S),ki(()=>{if(k.current&&N.current){let W=k.current.getModifiedEditor(),D=Mf(N.current,t||"",a||r||"text",s||"");D!==W.getModel()&&W.setModel(D)}},[s],S),ki(()=>{let W=k.current.getModifiedEditor();W.getOption(N.current.editor.EditorOption.readOnly)?W.setValue(t||""):t!==W.getValue()&&(W.executeEdits("",[{range:W.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),W.pushUndoStop())},[t],S),ki(()=>{k.current?.getModel()?.original.setValue(e||"")},[e],S),ki(()=>{let{original:W,modified:D}=k.current.getModel();N.current.editor.setModelLanguage(W,n||r||"text"),N.current.editor.setModelLanguage(D,a||r||"text")},[r,n,a],S),ki(()=>{N.current?.editor.setTheme(c)},[c],S),ki(()=>{k.current?.updateOptions(f)},[f],S);let B=E.useCallback(()=>{if(!N.current)return;P.current(N.current);let W=Mf(N.current,e||"",n||r||"text",i||""),D=Mf(N.current,t||"",a||r||"text",s||"");k.current?.setModel({original:W,modified:D})},[r,t,a,e,n,i,s]),K=E.useCallback(()=>{!H.current&&L.current&&(k.current=N.current.editor.createDiffEditor(L.current,{automaticLayout:!0,...f}),B(),N.current?.editor.setTheme(c),C(!0),H.current=!0)},[f,c,B]);E.useEffect(()=>{S&&I.current(k.current,N.current)},[S]),E.useEffect(()=>{!T&&!S&&K()},[T,S,K]);function j(){let W=k.current?.getModel();o||W?.original?.dispose(),l||W?.modified?.dispose(),k.current?.dispose()}return ye.createElement(Qce,{width:m,height:p,isEditorReady:S,loading:u,_ref:L,className:b,wrapperProps:v})}var mXe=pXe;E.memo(mXe);function gXe(){let[e,t]=E.useState(Bb.__getMonacoInstance());return n8(()=>{let r;return e||(r=Bb.init(),r.then(n=>{t(n)})),()=>r?.cancel()}),e}var vXe=gXe;function bXe(e){let t=E.useRef();return E.useEffect(()=>{t.current=e},[e]),t.current}var xXe=bXe,S1=new Map;function yXe({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:a,path:i,theme:s="light",line:o,loading:l="Loading...",options:c={},overrideServices:u={},saveViewState:f=!0,keepCurrentModel:p=!1,width:m="100%",height:b="100%",className:v,wrapperProps:y={},beforeMount:_=Dp,onMount:S=Dp,onChange:C,onValidate:T=Dp}){let[A,k]=E.useState(!1),[N,L]=E.useState(!0),I=E.useRef(null),P=E.useRef(null),H=E.useRef(null),B=E.useRef(S),K=E.useRef(_),j=E.useRef(),W=E.useRef(n),D=xXe(i),U=E.useRef(!1),Y=E.useRef(!1);n8(()=>{let Q=Bb.init();return Q.then(q=>(I.current=q)&&L(!1)).catch(q=>q?.type!=="cancelation"&&console.error("Monaco initialization: error:",q)),()=>P.current?M():Q.cancel()}),ki(()=>{let Q=Mf(I.current,e||n||"",t||a||"",i||r||"");Q!==P.current?.getModel()&&(f&&S1.set(D,P.current?.saveViewState()),P.current?.setModel(Q),f&&P.current?.restoreViewState(S1.get(i)))},[i],A),ki(()=>{P.current?.updateOptions(c)},[c],A),ki(()=>{!P.current||n===void 0||(P.current.getOption(I.current.editor.EditorOption.readOnly)?P.current.setValue(n):n!==P.current.getValue()&&(Y.current=!0,P.current.executeEdits("",[{range:P.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),P.current.pushUndoStop(),Y.current=!1))},[n],A),ki(()=>{let Q=P.current?.getModel();Q&&a&&I.current?.editor.setModelLanguage(Q,a)},[a],A),ki(()=>{o!==void 0&&P.current?.revealLine(o)},[o],A),ki(()=>{I.current?.editor.setTheme(s)},[s],A);let z=E.useCallback(()=>{if(!(!H.current||!I.current)&&!U.current){K.current(I.current);let Q=i||r,q=Mf(I.current,n||e||"",t||a||"",Q||"");P.current=I.current?.editor.create(H.current,{model:q,automaticLayout:!0,...c},u),f&&P.current.restoreViewState(S1.get(Q)),I.current.editor.setTheme(s),o!==void 0&&P.current.revealLine(o),k(!0),U.current=!0}},[e,t,r,n,a,i,c,u,f,s,o]);E.useEffect(()=>{A&&B.current(P.current,I.current)},[A]),E.useEffect(()=>{!N&&!A&&z()},[N,A,z]),W.current=n,E.useEffect(()=>{A&&C&&(j.current?.dispose(),j.current=P.current?.onDidChangeModelContent(Q=>{Y.current||C(P.current.getValue(),Q)}))},[A,C]),E.useEffect(()=>{if(A){let Q=I.current.editor.onDidChangeMarkers(q=>{let F=P.current.getModel()?.uri;if(F&&q.find(V=>V.path===F.path)){let V=I.current.editor.getModelMarkers({resource:F});T?.(V)}});return()=>{Q?.dispose()}}return()=>{}},[A,T]);function M(){j.current?.dispose(),p?f&&S1.set(i,P.current.saveViewState()):P.current.getModel()?.dispose(),P.current.dispose()}return ye.createElement(Qce,{width:m,height:b,isEditorReady:A,loading:l,_ref:H,className:v,wrapperProps:y})}var _Xe=yXe,wXe=E.memo(_Xe);const EXe=({value:e,onChange:t,placeholder:r,enableValidation:n=!1,onValidationChange:a,onSave:i,readOnly:s=!1,enableAnimation:o=!1,animationSpeed:l=30,className:c,enableAutoValidation:u=!0,autoValidationDelay:f=1e3})=>{const p=vXe(),m=!1,[b,v]=E.useState(!1),[,y]=E.useState(""),_=E.useRef(e),S=E.useRef(null),C=E.useRef(null),[,T]=E.useState({isChecking:!1,hasErrors:!1,errorMessage:"",lastValidationResult:null}),A=E.useRef(null),k=E.useCallback(H=>{if(!n)return{hasQuery:!0,hasResponse:!0,isValid:!0};const B=H.split(`
`);let K=!1,j=!1,W="",D="";for(const z of B){const M=z.trim();if(!(!M||M.startsWith("#"))){if(M.startsWith("query =")||M.startsWith("query=")){K=!0;const Q=M.match(/^query\s*=\s*(.+)$/);Q&&(W=Q[1].trim(),W=W.replace(/^["']|["']$/g,""))}if(M.startsWith("response =")||M.startsWith("response=")){j=!0;const Q=M.match(/^response\s*=\s*(.+)$/);Q&&(D=Q[1].trim(),D=D.replace(/^["']|["']$/g,""))}}}const U=K&&W.length>0,Y=j&&D.length>0;return{hasQuery:U,hasResponse:Y,isValid:U&&Y,queryValue:U?W:void 0,responseValue:Y?D:void 0}},[n]),N=E.useMemo(()=>k(e),[e,k]);E.useEffect(()=>{a&&a(N)},[N,a]);const L=E.useCallback(async H=>{if(!u||!H.trim()){T(B=>({...B,isChecking:!1,hasErrors:!1,errorMessage:""}));return}T(B=>({...B,isChecking:!0}));try{const B=await gt.validateCode({code:H,agent_name:"Custom Agent",description:"Agent created via UI"});if(B.is_valid)T({isChecking:!1,hasErrors:!1,errorMessage:"",lastValidationResult:null});else{const K=B.error||"Syntax errors detected";T({isChecking:!1,hasErrors:!0,errorMessage:K,lastValidationResult:B})}}catch(B){console.error("Error performing auto-validation:",B),T({isChecking:!1,hasErrors:!1,errorMessage:"",lastValidationResult:null})}},[u]);E.useEffect(()=>{if(u)return A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{L(e)},f),()=>{A.current&&clearTimeout(A.current)}},[e,L,f,u]),E.useEffect(()=>{if(!o||!S.current)return;if(e!==_.current&&e.length>_.current.length+30&&!b){v(!0),y(e),_.current=e;const K=1e3/(l||30);let j=0;const W=()=>{if(j<e.length&&b&&S.current){const D=e.slice(0,j+1),U=S.current.getModel();U&&U.setValue(D),j++,C.current=setTimeout(W,K)}else v(!1),y(""),C.current&&(clearTimeout(C.current),C.current=null)};C.current=setTimeout(W,100)}else e!==_.current&&(_.current=e)},[e,o,b,l]),E.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]),E.useEffect(()=>{if(!p)return;const H={base:"vs",inherit:!0,rules:[{token:"keyword",foreground:"0969da",fontStyle:"bold"},{token:"string",foreground:"0550ae"},{token:"comment",foreground:"6e7781",fontStyle:"italic"},{token:"number",foreground:"0969da"},{token:"operator",foreground:"cf222e"},{token:"identifier",foreground:"24292f"},{token:"variable",foreground:"953800"},{token:"variable.private",foreground:"8250df",fontStyle:"bold"},{token:"variable.private.name",foreground:"cf222e",fontStyle:"bold"},{token:"variable.interpolation",foreground:"953800",background:"f6f8fa"},{token:"mention-agent",foreground:"8250df",fontStyle:"bold"},{token:"mention-mcp",foreground:"1f883d",fontStyle:"bold"},{token:"mention-resource",foreground:"cf222e",fontStyle:"bold"},{token:"mention",foreground:"0969da",background:"ddf4ff",fontStyle:"bold"},{token:"function",foreground:"8250df"},{token:"function.special",foreground:"1f883d",fontStyle:"bold"},{token:"function.log",foreground:"1f883d",fontStyle:"bold"},{token:"method",foreground:"8250df"},{token:"property",foreground:"953800"},{token:"string.escape",foreground:"0969da"},{token:"entity.name.type.class",foreground:"8250df",fontStyle:"bold"}],colors:{"editor.background":"#ffffff","editor.foreground":"#24292f","editor.lineHighlightBackground":"#f6f8fa","editor.selectionBackground":"#0969da26","editor.inactiveSelectionBackground":"#0969da1a","editorLineNumber.foreground":"#8c959f","editorLineNumber.activeForeground":"#24292f","editorCursor.foreground":"#24292f","editorWhitespace.foreground":"#afb8c133","editorIndentGuide.background":"#d1d9e0b3","editorIndentGuide.activeBackground":"#8c959f","editorBracketMatch.background":"#0969da26","editorBracketMatch.border":"#0969da"}},B={base:"vs-dark",inherit:!0,rules:[{token:"keyword",foreground:"79c0ff",fontStyle:"bold"},{token:"string",foreground:"a5d6ff"},{token:"comment",foreground:"8b949e",fontStyle:"italic"},{token:"number",foreground:"79c0ff"},{token:"operator",foreground:"ff7b72"},{token:"identifier",foreground:"f0f6fc"},{token:"variable",foreground:"ffa657"},{token:"variable.private",foreground:"d2a8ff",fontStyle:"bold"},{token:"variable.private.name",foreground:"ff7b72",fontStyle:"bold"},{token:"variable.interpolation",foreground:"ffa657",background:"21262d"},{token:"mention-agent",foreground:"d2a8ff",fontStyle:"bold"},{token:"mention-mcp",foreground:"7ee787",fontStyle:"bold"},{token:"mention-resource",foreground:"ff7b72",fontStyle:"bold"},{token:"mention",foreground:"79c0ff",background:"1c2128",fontStyle:"bold"},{token:"function",foreground:"d2a8ff"},{token:"function.special",foreground:"7ee787",fontStyle:"bold"},{token:"function.log",foreground:"7ee787",fontStyle:"bold"},{token:"method",foreground:"d2a8ff"},{token:"property",foreground:"ffa657"},{token:"string.escape",foreground:"79c0ff"},{token:"entity.name.type.class",foreground:"d2a8ff",fontStyle:"bold"}],colors:{"editor.background":"#0c111d","editor.foreground":"#f0f6fc","editor.lineHighlightBackground":"#21262d","editor.selectionBackground":"#264f78","editor.inactiveSelectionBackground":"#264f7840","editorLineNumber.foreground":"#6e7681","editorLineNumber.activeForeground":"#f0f6fc","editorCursor.foreground":"#f0f6fc","editorWhitespace.foreground":"#484f58","editorIndentGuide.background":"#30363d","editorIndentGuide.activeBackground":"#6e7681","editorBracketMatch.background":"#264f7840","editorBracketMatch.border":"#79c0ff"}};p.editor.defineTheme("professional-light",H),p.editor.defineTheme("professional-dark",B),p.editor.setTheme("professional-light");const K=document.getElementById("agent-editor-styles");K&&K.remove();const j=document.createElement("style");j.id="agent-editor-styles",j.textContent=`
      .mention-agent-box {
        color: #8250df !important;
        border-radius: 3px !important;
        padding: 1px 4px !important;
        font-weight: bold !important;
        border: 1px solid #6f42c1 !important;
        display: inline !important;
        line-height: normal !important;
        vertical-align: baseline !important;
        margin: 0 !important;
        box-decoration-break: clone !important;
      }
      .mention-mcp-box {
        color: #1f883d !important;
        border-radius: 3px !important;
        padding: 1px 4px !important;
        font-weight: bold !important;
        border: 1px solid #1a7f37 !important;
        display: inline !important;
        line-height: normal !important;
        vertical-align: baseline !important;
        margin: 0 !important;
        box-decoration-break: clone !important;
      }
      .mention-resource-box {
        color: #cf222e !important;
        border-radius: 3px !important;
        padding: 1px 4px !important;
        font-weight: bold !important;
        border: 1px solid #a40e26 !important;
        display: inline !important;
        line-height: normal !important;
        vertical-align: baseline !important;
        margin: 0 !important;
        box-decoration-break: clone !important;
      }
    `,document.head.appendChild(j)},[p,m]);const I=E.useCallback((H,B)=>{if(S.current=H,!B){console.warn("Monaco instance not available");return}if(B.languages.register({id:"na"}),B.languages.setMonarchTokensProvider("na",{keywords:["with","as","private","log","while","True","False","None","break","continue","if","elif","else","for","in","return","input","print","def","class","import","from","try","except","finally","raise","and","or","not","knowledge","resources","format","agent","struct","use","export"],tokenizer:{root:[[/\bwith\s+knowledge\s*\(/,{token:"keyword",next:"@knowledge_block"}],[/\bagent_blueprint\s+([a-zA-Z_]\w*)\s*:/,{token:"keyword",next:"@agent_declaration"}],[/\bagent\s+([a-zA-Z_]\w*)\s*:/,{token:"keyword",next:"@agent_declaration"}],[/\bstruct\s+([a-zA-Z_]\w*)\s*:/,{token:"keyword",next:"@struct_declaration"}],[/@[a-zA-Z_]\w*:?/,"mention"],[/\bprivate\.[a-zA-Z_]\w*/,"variable.private.name"],[/\blog\.(info|debug|warning|error|critical)/,"function.log"],[/\b(call_resources|reason|plan)\s*(?=\()/,"function.special"],[/\b(?:with|as|private|log|while|True|False|None|break|continue|if|elif|else|for|in|return|input|print|def|class|import|from|try|except|finally|raise|and|or|not|agent|agent_blueprint|struct|use|export)\b/,"keyword"],[/\b[a-zA-Z_]\w*(?=\s*\()/,"function"],[/\.[a-zA-Z_]\w*(?=\s*\()/,"method"],[/\.[a-zA-Z_]\w*/,"property"],[/[a-zA-Z_]\w*(?=\s*=)/,"variable"],[/f"/,{token:"string",next:"@fstring_double"}],[/f'/,{token:"string",next:"@fstring_single"}],[/"/,{token:"string",next:"@string_double"}],[/'/,{token:"string",next:"@string_single"}],[/"""/,{token:"string",next:"@string_triple_double"}],[/'''/,{token:"string",next:"@string_triple_single"}],[/#.*$/,"comment"],[/\b\d+\.?\d*\b/,"number"],[/[+\-*/=<>!&|%^~]/,"operator"],[/[(){}[\]]/,"delimiter.bracket"],[/[a-zA-Z_]\w*/,"identifier"],[/\s+/,"white"]],agent_declaration:[[/[a-zA-Z_]\w*/,"entity.name.type.class"],[/:/,"delimiter.bracket","@pop"],[/\s+/,"white"]],struct_declaration:[[/[a-zA-Z_]\w*/,"entity.name.type.class"],[/:/,"delimiter.bracket","@pop"],[/\s+/,"white"]],knowledge_block:[[/"[^"]*"/,"string"],[/'[^']*'/,"string"],[/\)/,{token:"delimiter.bracket",next:"@pop"}],[/[^)"']+/,"white"]],fstring_double:[[/\{[^}]*\}/,"variable.interpolation"],[/[^"\\{]+/,"string"],[/\\./,"string.escape"],[/"/,{token:"string",next:"@pop"}]],fstring_single:[[/\{[^}]*\}/,"variable.interpolation"],[/[^'\\{]+/,"string"],[/\\./,"string.escape"],[/'/,{token:"string",next:"@pop"}]],string_double:[[/[^"\\]+/,"string"],[/\\./,"string.escape"],[/"/,{token:"string",next:"@pop"}]],string_single:[[/[^'\\]+/,"string"],[/\\./,"string.escape"],[/'/,{token:"string",next:"@pop"}]],string_triple_double:[[/[^"\\]+/,"string"],[/\\./,"string.escape"],[/"""/,{token:"string",next:"@pop"}],[/"/,"string"]],string_triple_single:[[/[^'\\]+/,"string"],[/\\./,"string.escape"],[/'''/,{token:"string",next:"@pop"}],[/'/,"string"]]}}),s){H.updateOptions({fontSize:14,lineHeight:20,fontFamily:'"Fira Code", "SF Mono", Monaco, Inconsolata, "Roboto Mono", Consolas, "Courier New", monospace',lineNumbers:"on",minimap:{enabled:!0},scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",wordWrapColumn:120,wordWrapBreakAfterCharacters:"all",wordWrapBreakBeforeCharacters:"all",renderLineHighlight:"line",renderWhitespace:"selection",bracketPairColorization:{enabled:!0},guides:{indentation:!0,bracketPairs:!0},smoothScrolling:!0,cursorSmoothCaretAnimation:"on",padding:{top:16,bottom:16},readOnly:!0});return}const K=["agent 1","agent 2"],j=["mcp client 1","mcp client 2"],W=["resource 1","resource 2","resource 3","resource 4","resource 5","resource 6","resource 7","resource 8","resource 9"],D=()=>{const Y=H.getModel();if(!Y)return;const z=[],M=Y.getValue(),Q=/\[@(agent|mcp|resource):[^\]]+\]/g;let q;for(;(q=Q.exec(M))!==null;){const F=Y.getPositionAt(q.index),V=Y.getPositionAt(q.index+q[0].length);let Z="mention-box";q[1]==="agent"?Z="mention-agent-box":q[1]==="mcp"?Z="mention-mcp-box":q[1]==="resource"&&(Z="mention-resource-box"),z.push({range:new B.Range(F.lineNumber,F.column,V.lineNumber,V.column),options:{className:Z,stickiness:B.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}})}H.deltaDecorations([],z)},U=()=>{let Y=[];const z=()=>{const M=H.getModel();if(!M)return;Y=[];const Q=M.getValue(),q=/\[@(?:agent|mcp|resource):[^\]]+\]/g;let F;for(;(F=q.exec(Q))!==null;){const V=M.getPositionAt(F.index),Z=M.getPositionAt(F.index+F[0].length);Y.push({startLine:V.lineNumber,startColumn:V.column,endLine:Z.lineNumber,endColumn:Z.column,range:new B.Range(V.lineNumber,V.column,Z.lineNumber,Z.column)})}};H.addCommand(B.KeyMod.chord(B.KeyCode.Backspace),()=>{const M=H.getPosition();if(M){for(const Q of Y)if(M.lineNumber===Q.startLine&&M.column>Q.startColumn&&M.column<=Q.endColumn){H.executeEdits("",[{range:Q.range,text:""}]);return}H.trigger("keyboard","deleteLeft")}}),H.addCommand(B.KeyMod.chord(B.KeyCode.Delete),()=>{const M=H.getPosition();if(M){for(const Q of Y)if(M.lineNumber===Q.startLine&&M.column>=Q.startColumn&&M.column<Q.endColumn){H.executeEdits("",[{range:Q.range,text:""}]);return}H.trigger("keyboard","deleteRight")}}),H.onWillType(M=>{console.log("onWillType",M);const Q=H.getPosition();if(Q){for(const q of Y)if(Q.lineNumber===q.startLine&&Q.column>q.startColumn&&Q.column<q.endColumn)return}}),H.onDidChangeModelContent(()=>{setTimeout(()=>{z(),D()},0)}),H.onDidChangeCursorPosition(M=>{const Q=M.position;for(const q of Y)if(Q.lineNumber===q.startLine&&Q.column>q.startColumn&&Q.column<q.endColumn){H.setPosition({lineNumber:q.endLine,column:q.endColumn});break}}),z(),B.languages.registerCompletionItemProvider("na",{triggerCharacters:["@"],provideCompletionItems:(M,Q)=>{const q=M.getWordUntilPosition(Q),F={startLineNumber:Q.lineNumber,endLineNumber:Q.lineNumber,startColumn:q.startColumn,endColumn:q.endColumn},Z=M.getLineContent(Q.lineNumber).substring(0,Q.column-1);if(Z.endsWith("@")||/@\w*$/.test(Z)){const ee=[];return K.forEach(te=>{ee.push({label:`@agent: ${te}`,kind:B.languages.CompletionItemKind.User,insertText:`[agent: ${te}]`,documentation:`AI Agent: ${te}`,range:F,detail:"AI Agent"})}),j.forEach(te=>{ee.push({label:`@mcp: ${te}`,kind:B.languages.CompletionItemKind.Module,insertText:`[mcp: ${te}]`,documentation:`MCP Client: ${te}`,range:F,detail:"MCP Client"})}),W.forEach(te=>{ee.push({label:`@resource: ${te}`,kind:B.languages.CompletionItemKind.Reference,insertText:`[resource: ${te}]`,documentation:`Resource: ${te}`,range:F,detail:"Resource"})}),{suggestions:ee}}return{suggestions:[]}}}),i&&H.addCommand(B.KeyMod.CtrlCmd|B.KeyCode.KeyS,()=>{event?.preventDefault(),i()})};H.updateOptions({fontSize:14,lineHeight:20,fontFamily:'"Fira Code", "SF Mono", Monaco, Inconsolata, "Roboto Mono", Consolas, "Courier New", monospace',lineNumbers:"on",minimap:{enabled:!0},scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",wordWrapColumn:120,wordWrapBreakAfterCharacters:"all",wordWrapBreakBeforeCharacters:"all",renderLineHighlight:"line",renderWhitespace:"selection",bracketPairColorization:{enabled:!0},guides:{indentation:!0,bracketPairs:!0},smoothScrolling:!0,cursorSmoothCaretAnimation:"on",suggestOnTriggerCharacters:!0,acceptSuggestionOnCommitCharacter:!0,tabCompletion:"on",padding:{top:16,bottom:16}}),U(),D()},[s,i]),P={placeholder:r,readOnly:s};return g.jsx("div",{className:ut("flex flex-col w-full h-full",c),children:g.jsxs("div",{className:"relative flex-1 min-h-0",children:[g.jsx(wXe,{height:"100%",defaultLanguage:"na",value:e,onChange:H=>t(H||""),theme:"professional-light",onMount:I,width:"100%",options:P}),b&&g.jsxs("div",{className:"flex absolute top-4 right-4 z-10 gap-2 items-center px-3 py-1 bg-blue-50 rounded-lg border border-blue-200",children:[g.jsx("div",{className:"w-2 h-2 bg-blue-600 rounded-full animate-pulse"}),g.jsx("span",{className:"text-sm font-medium text-blue-700",children:"Generating..."}),g.jsxs("div",{className:"flex gap-1",children:[g.jsx("div",{className:"w-1 h-1 bg-blue-600 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),g.jsx("div",{className:"w-1 h-1 bg-blue-600 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),g.jsx("div",{className:"w-1 h-1 bg-blue-600 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})]})]})})},SXe=()=>{const{selectedAgent:e}=Ii(),[t,r]=E.useState(""),[n,a]=E.useState([]),[i,s]=E.useState(!0),[o,l]=E.useState(null),c=n.find(m=>m.id===t)||n[0];E.useEffect(()=>{u()},[e]);const u=async()=>{if(e?.id){s(!0),l(null);try{const b=(await gt.getAgentFiles(e.id)).files.filter(y=>y.type==="dana"),v=await Promise.all(b.map(async(y,_)=>{try{const S=await gt.getAgentFileContent(e.id,y.path);return{id:`${_}`,name:y.name,path:y.path,content:S.content,type:y.type,size:y.size,modified:y.modified}}catch(S){return console.error(`Failed to load content for ${y.name}:`,S),{id:`${_}`,name:y.name,path:y.path,content:`// Error loading file: ${S}`,type:y.type,size:y.size,modified:y.modified}}}));a(v),v.length>0&&r(v[0].id)}catch(m){console.error("Failed to load agent files:",m),l(m instanceof Error?m.message:"Failed to load files")}finally{s(!1)}}},f=m=>{r(m)},p=async m=>{const b=n.find(v=>v.id===t);if(!(!b||!e?.id)){a(v=>v.map(y=>y.id===t?{...y,content:m}:y));try{await gt.updateAgentFileContent(e.id,b.path,m)}catch(v){console.error("Failed to save file:",v)}}};return i?g.jsx("div",{className:"flex justify-center items-center h-full bg-white rounded-lg shadow",children:g.jsxs("div",{className:"text-center",children:[g.jsx(B1,{className:"mx-auto mb-4 w-8 h-8 text-blue-500 animate-spin"}),g.jsx("p",{className:"text-gray-600",children:"Loading agent files..."})]})}):o?g.jsx("div",{className:"flex justify-center items-center h-full bg-white rounded-lg shadow",children:g.jsxs("div",{className:"text-center",children:[g.jsxs("p",{className:"mb-4 text-red-600",children:["Error: ",o]}),g.jsxs("button",{onClick:u,className:"flex gap-2 items-center px-4 py-2 mx-auto text-white bg-blue-500 rounded hover:bg-blue-600",children:[g.jsx(B1,{className:"w-4 h-4"}),"Retry"]})]})}):n.length===0?g.jsx("div",{className:"flex justify-center items-center h-full bg-white rounded-lg shadow",children:g.jsxs("div",{className:"text-center",children:[g.jsx(V9,{className:"mx-auto mb-4 w-12 h-12 text-gray-400"}),g.jsx("p",{className:"mb-2 text-gray-600",children:"No Dana files found"}),g.jsx("p",{className:"text-sm text-gray-500",children:"Dana files (.na) will appear here once the agent is created"})]})}):g.jsxs("div",{className:"flex overflow-hidden h-full bg-white rounded-lg shadow",children:[g.jsxs("div",{className:"flex flex-col w-56 bg-white border-r",children:[g.jsxs("div",{className:"flex justify-between items-center px-4 py-2 h-12 border-b",children:[g.jsx("span",{className:"text-sm font-semibold text-gray-800",children:"Dana Files"}),g.jsx("button",{onClick:u,className:"p-1 text-gray-500 rounded hover:text-gray-700",title:"Refresh files",children:g.jsx(B1,{className:"w-4 h-4"})})]}),g.jsx("div",{className:"overflow-y-auto flex-1 custom-scrollbar",children:n.map(m=>g.jsxs("button",{className:`w-full flex items-center px-4 py-2 text-left text-sm transition-colors ${m.id===t?"bg-gray-100 text-gray-700 font-semibold border-none":"border-transparent text-gray-600 hover:bg-gray-100"}`,onClick:()=>f(m.id),children:[g.jsx(V9,{className:"mr-2 w-4 h-4"}),m.name]},m.id))})]}),g.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[g.jsx("div",{className:"flex justify-between items-center px-6 py-2 h-12 bg-white border-b",children:g.jsx("span",{className:"text-md font-medium text-gray-900",children:c?.name||"No file selected"})}),g.jsx("div",{className:"flex-1 min-h-0",children:c?g.jsx(EXe,{value:c.content,onChange:p,placeholder:`Edit ${c.name}...`,enableValidation:c.name==="main.na",enableAutoValidation:c.name==="main.na",className:"h-full text-xs"}):g.jsx("div",{className:"flex justify-center items-center h-full text-gray-500",children:"Select a file to start editing"})})]})]})};var UM={},yi={},$M={},CQ;function qo(){return CQ||(CQ=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isEventSourceSupported=e.isReactNative=e.ReadyState=e.DEFAULT_HEARTBEAT=e.UNPARSABLE_JSON_OBJECT=e.DEFAULT_RECONNECT_INTERVAL_MS=e.DEFAULT_RECONNECT_LIMIT=e.SOCKET_IO_PING_CODE=e.SOCKET_IO_PATH=e.SOCKET_IO_PING_INTERVAL=e.DEFAULT_EVENT_SOURCE_OPTIONS=e.EMPTY_EVENT_HANDLERS=e.DEFAULT_OPTIONS=void 0;var t=1,r=1e3*t;e.DEFAULT_OPTIONS={},e.EMPTY_EVENT_HANDLERS={},e.DEFAULT_EVENT_SOURCE_OPTIONS={withCredentials:!1,events:e.EMPTY_EVENT_HANDLERS},e.SOCKET_IO_PING_INTERVAL=25*r,e.SOCKET_IO_PATH="/socket.io/?EIO=3&transport=websocket",e.SOCKET_IO_PING_CODE="2",e.DEFAULT_RECONNECT_LIMIT=20,e.DEFAULT_RECONNECT_INTERVAL_MS=5e3,e.UNPARSABLE_JSON_OBJECT={},e.DEFAULT_HEARTBEAT={message:"ping",timeout:6e4,interval:25e3};var n;(function(i){i[i.UNINSTANTIATED=-1]="UNINSTANTIATED",i[i.CONNECTING=0]="CONNECTING",i[i.OPEN=1]="OPEN",i[i.CLOSING=2]="CLOSING",i[i.CLOSED=3]="CLOSED"})(n||(e.ReadyState=n={}));var a=function(){try{return"EventSource"in globalThis}catch{return!1}};e.isReactNative=typeof navigator<"u"&&navigator.product==="ReactNative",e.isEventSourceSupported=!e.isReactNative&&a()})($M)),$M}var Jh={},HM={},TQ;function a8(){return TQ||(TQ=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetWebSockets=e.sharedWebSockets=void 0,e.sharedWebSockets={};var t=function(r){if(r&&e.sharedWebSockets.hasOwnProperty(r))delete e.sharedWebSockets[r];else for(var n in e.sharedWebSockets)e.sharedWebSockets.hasOwnProperty(n)&&delete e.sharedWebSockets[n]};e.resetWebSockets=t})(HM)),HM}var Cu={},ol={},AQ;function i8(){if(AQ)return ol;AQ=1,Object.defineProperty(ol,"__esModule",{value:!0}),ol.setUpSocketIOPing=ol.appendQueryParams=ol.parseSocketIOUrl=void 0;var e=qo(),t=function(a){if(a){var i=/^https|wss/.test(a),s=a.replace(/^(https?|wss?)(:\/\/)?/,""),o=s.replace(/\/$/,""),l=i?"wss":"ws";return"".concat(l,"://").concat(o).concat(e.SOCKET_IO_PATH)}else if(a===""){var i=/^https/.test(window.location.protocol),l=i?"wss":"ws",c=window.location.port?":".concat(window.location.port):"";return"".concat(l,"://").concat(window.location.hostname).concat(c).concat(e.SOCKET_IO_PATH)}return a};ol.parseSocketIOUrl=t;var r=function(a,i){i===void 0&&(i={});var s=/\?([\w]+=[\w]+)/,o=s.test(a),l="".concat(Object.entries(i).reduce(function(c,u){var f=u[0],p=u[1];return c+"".concat(f,"=").concat(p,"&")},"").slice(0,-1));return"".concat(a).concat(o?"&":"?").concat(l)};ol.appendQueryParams=r;var n=function(a,i){i===void 0&&(i=e.SOCKET_IO_PING_INTERVAL);var s=function(){return a(e.SOCKET_IO_PING_CODE)};return window.setInterval(s,i)};return ol.setUpSocketIOPing=n,ol}var C1={},kQ;function eue(){if(kQ)return C1;kQ=1,Object.defineProperty(C1,"__esModule",{value:!0}),C1.heartbeat=r;var e=qo();function t(n){return Array.isArray(n)?n.reduce(function(a,i){return a.current>i.current?a:i}).current:n.current}function r(n,a,i){var s=i||{},o=s.interval,l=o===void 0?e.DEFAULT_HEARTBEAT.interval:o,c=s.timeout,u=c===void 0?e.DEFAULT_HEARTBEAT.timeout:c,f=s.message,p=f===void 0?e.DEFAULT_HEARTBEAT.message:f,m=Math.max(100,l/10),b=Date.now(),v=setInterval(function(){var y=Date.now(),_=t(a);if(_+u<=y)console.warn("Heartbeat timed out, closing connection, last message received ".concat(y-_,"ms ago, last ping sent ").concat(y-b,"ms ago")),n.close();else if(_+l<=y&&b+l<=y)try{typeof p=="function"?n.send(p()):n.send(p),b=y}catch(S){console.error("Heartbeat failed, closing connection",S instanceof Error?S.message:S),n.close()}},m);return n.addEventListener("close",function(){clearInterval(v)}),function(){}}return C1}var ep={},GM={},NQ;function s8(){return NQ||(NQ=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetSubscribers=e.removeSubscriber=e.addSubscriber=e.hasSubscribers=e.getSubscribers=void 0;var t={},r=[],n=function(l){return(0,e.hasSubscribers)(l)?Array.from(t[l]):r};e.getSubscribers=n;var a=function(l){var c;return((c=t[l])===null||c===void 0?void 0:c.size)>0};e.hasSubscribers=a;var i=function(l,c){t[l]=t[l]||new Set,t[l].add(c)};e.addSubscriber=i;var s=function(l,c){t[l].delete(c)};e.removeSubscriber=s;var o=function(l){if(l&&t.hasOwnProperty(l))delete t[l];else for(var c in t)t.hasOwnProperty(c)&&delete t[c]};e.resetSubscribers=o})(GM)),GM}var RQ;function o8(){if(RQ)return ep;RQ=1,Object.defineProperty(ep,"__esModule",{value:!0}),ep.assertIsWebSocket=r,ep.resetGlobalState=n;var e=a8(),t=s8();function r(a,i){if(!i&&!(a instanceof WebSocket))throw new Error("")}function n(a){(0,t.resetSubscribers)(a),(0,e.resetWebSockets)(a)}return ep}var MQ;function CXe(){if(MQ)return Cu;MQ=1;var e=Cu&&Cu.__assign||function(){return e=Object.assign||function(u){for(var f,p=1,m=arguments.length;p<m;p++){f=arguments[p];for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&(u[b]=f[b])}return u},e.apply(this,arguments)};Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.attachListeners=void 0;var t=i8(),r=eue(),n=qo(),a=o8(),i=function(u,f,p,m){u.onmessage=function(b){var v;f.current.onMessage&&f.current.onMessage(b),typeof m?.current=="number"&&(m.current=Date.now()),!(typeof f.current.filter=="function"&&f.current.filter(b)!==!0)&&(f.current.heartbeat&&typeof f.current.heartbeat!="boolean"&&((v=f.current.heartbeat)===null||v===void 0?void 0:v.returnMessage)===b.data||p(b))}},s=function(u,f,p,m,b){u.onopen=function(v){if(f.current.onOpen&&f.current.onOpen(v),m.current=0,p(n.ReadyState.OPEN),f.current.heartbeat&&u instanceof WebSocket){var y=typeof f.current.heartbeat=="boolean"?void 0:f.current.heartbeat;b.current=Date.now(),(0,r.heartbeat)(u,b,y)}}},o=function(u,f,p,m,b){if(n.isEventSourceSupported&&u instanceof EventSource)return function(){};(0,a.assertIsWebSocket)(u,f.current.skipAssert);var v;return u.onclose=function(y){var _;if(f.current.onClose&&f.current.onClose(y),p(n.ReadyState.CLOSED),f.current.shouldReconnect&&f.current.shouldReconnect(y)){var S=(_=f.current.reconnectAttempts)!==null&&_!==void 0?_:n.DEFAULT_RECONNECT_LIMIT;if(b.current<S){var C=typeof f.current.reconnectInterval=="function"?f.current.reconnectInterval(b.current):f.current.reconnectInterval;v=window.setTimeout(function(){b.current++,m()},C??n.DEFAULT_RECONNECT_INTERVAL_MS)}else f.current.onReconnectStop&&f.current.onReconnectStop(S),console.warn("Max reconnect attempts of ".concat(S," exceeded"))}},function(){return v&&window.clearTimeout(v)}},l=function(u,f,p,m,b){var v;return u.onerror=function(y){var _;if(f.current.onError&&f.current.onError(y),n.isEventSourceSupported&&u instanceof EventSource&&(f.current.onClose&&f.current.onClose(e(e({},y),{code:1006,reason:"An error occurred with the EventSource: ".concat(y),wasClean:!1})),p(n.ReadyState.CLOSED),u.close()),f.current.retryOnError)if(b.current<((_=f.current.reconnectAttempts)!==null&&_!==void 0?_:n.DEFAULT_RECONNECT_LIMIT)){var S=typeof f.current.reconnectInterval=="function"?f.current.reconnectInterval(b.current):f.current.reconnectInterval;v=window.setTimeout(function(){b.current++,m()},S??n.DEFAULT_RECONNECT_INTERVAL_MS)}else f.current.onReconnectStop&&f.current.onReconnectStop(f.current.reconnectAttempts),console.warn("Max reconnect attempts of ".concat(f.current.reconnectAttempts," exceeded"))},function(){return v&&window.clearTimeout(v)}},c=function(u,f,p,m,b,v,y){var _=f.setLastMessage,S=f.setReadyState,C,T,A;return p.current.fromSocketIO&&(C=(0,t.setUpSocketIOPing)(y)),i(u,p,_,v),s(u,p,S,b,v),T=o(u,p,S,m,b),A=l(u,p,S,m,b),function(){S(n.ReadyState.CLOSING),T(),A(),u.close(),C&&clearInterval(C)}};return Cu.attachListeners=c,Cu}var Tu={},DQ;function TXe(){if(DQ)return Tu;DQ=1;var e=Tu&&Tu.__assign||function(){return e=Object.assign||function(f){for(var p,m=1,b=arguments.length;m<b;m++){p=arguments[m];for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(f[v]=p[v])}return f},e.apply(this,arguments)};Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.attachSharedListeners=void 0;var t=a8(),r=qo(),n=s8(),a=i8(),i=eue(),s=function(f,p,m){f.onmessage=function(b){(0,n.getSubscribers)(p).forEach(function(v){var y;v.optionsRef.current.onMessage&&v.optionsRef.current.onMessage(b),typeof((y=v?.lastMessageTime)===null||y===void 0?void 0:y.current)=="number"&&(v.lastMessageTime.current=Date.now()),!(typeof v.optionsRef.current.filter=="function"&&v.optionsRef.current.filter(b)!==!0)&&(m&&typeof m!="boolean"&&m?.returnMessage===b.data||v.setLastMessage(b))})}},o=function(f,p,m){f.onopen=function(b){var v=(0,n.getSubscribers)(p);v.forEach(function(y){y.reconnectCount.current=0,y.optionsRef.current.onOpen&&y.optionsRef.current.onOpen(b),y.setReadyState(r.ReadyState.OPEN),m&&f instanceof WebSocket&&(y.lastMessageTime.current=Date.now())}),m&&f instanceof WebSocket&&(0,i.heartbeat)(f,v.map(function(y){return y.lastMessageTime}),typeof m=="boolean"?void 0:m)}},l=function(f,p){f instanceof WebSocket&&(f.onclose=function(m){(0,n.getSubscribers)(p).forEach(function(b){b.optionsRef.current.onClose&&b.optionsRef.current.onClose(m),b.setReadyState(r.ReadyState.CLOSED)}),delete t.sharedWebSockets[p],(0,n.getSubscribers)(p).forEach(function(b){var v;if(b.optionsRef.current.shouldReconnect&&b.optionsRef.current.shouldReconnect(m)){var y=(v=b.optionsRef.current.reconnectAttempts)!==null&&v!==void 0?v:r.DEFAULT_RECONNECT_LIMIT;if(b.reconnectCount.current<y){var _=typeof b.optionsRef.current.reconnectInterval=="function"?b.optionsRef.current.reconnectInterval(b.reconnectCount.current):b.optionsRef.current.reconnectInterval;setTimeout(function(){b.reconnectCount.current++,b.reconnect.current()},_??r.DEFAULT_RECONNECT_INTERVAL_MS)}else b.optionsRef.current.onReconnectStop&&b.optionsRef.current.onReconnectStop(b.optionsRef.current.reconnectAttempts),console.warn("Max reconnect attempts of ".concat(y," exceeded"))}})})},c=function(f,p){f.onerror=function(m){(0,n.getSubscribers)(p).forEach(function(b){b.optionsRef.current.onError&&b.optionsRef.current.onError(m),r.isEventSourceSupported&&f instanceof EventSource&&(b.optionsRef.current.onClose&&b.optionsRef.current.onClose(e(e({},m),{code:1006,reason:"An error occurred with the EventSource: ".concat(m),wasClean:!1})),b.setReadyState(r.ReadyState.CLOSED))}),r.isEventSourceSupported&&f instanceof EventSource&&f.close()}},u=function(f,p,m,b){var v;return m.current.fromSocketIO&&(v=(0,a.setUpSocketIOPing)(b)),s(f,p,m.current.heartbeat),l(f,p),o(f,p,m.current.heartbeat),c(f,p),function(){v&&clearInterval(v)}};return Tu.attachSharedListeners=u,Tu}var OQ;function AXe(){if(OQ)return Jh;OQ=1,Object.defineProperty(Jh,"__esModule",{value:!0}),Jh.createOrJoinSocket=void 0;var e=a8(),t=qo(),r=CXe(),n=TXe(),a=s8(),i=function(o,l,c,u,f){return function(){if((0,a.removeSubscriber)(o,l),!(0,a.hasSubscribers)(o)){try{var p=e.sharedWebSockets[o];p instanceof WebSocket&&(p.onclose=function(m){c.current.onClose&&c.current.onClose(m),u(t.ReadyState.CLOSED)}),p.close()}catch{}f&&f(),delete e.sharedWebSockets[o]}}},s=function(o,l,c,u,f,p,m,b,v){if(!t.isEventSourceSupported&&u.current.eventSourceOptions)throw t.isReactNative?new Error("EventSource is not supported in ReactNative"):new Error("EventSource is not supported");if(u.current.share){var y=null;e.sharedWebSockets[l]===void 0?(e.sharedWebSockets[l]=u.current.eventSourceOptions?new EventSource(l,u.current.eventSourceOptions):new WebSocket(l,u.current.protocols),o.current=e.sharedWebSockets[l],c(t.ReadyState.CONNECTING),y=(0,n.attachSharedListeners)(e.sharedWebSockets[l],l,u,v)):(o.current=e.sharedWebSockets[l],c(e.sharedWebSockets[l].readyState));var _={setLastMessage:f,setReadyState:c,optionsRef:u,reconnectCount:m,lastMessageTime:b,reconnect:p};return(0,a.addSubscriber)(l,_),i(l,_,u,c,y)}else{if(o.current=u.current.eventSourceOptions?new EventSource(l,u.current.eventSourceOptions):new WebSocket(l,u.current.protocols),c(t.ReadyState.CONNECTING),!o.current)throw new Error("WebSocket failed to be created");return(0,r.attachListeners)(o.current,{setLastMessage:f,setReadyState:c},u,p.current,m,b,v)}};return Jh.createOrJoinSocket=s,Jh}var ll={},IQ;function kXe(){return IQ||(IQ=1,(function(e){var t=ll&&ll.__awaiter||function(l,c,u,f){function p(m){return m instanceof u?m:new u(function(b){b(m)})}return new(u||(u=Promise))(function(m,b){function v(S){try{_(f.next(S))}catch(C){b(C)}}function y(S){try{_(f.throw(S))}catch(C){b(C)}}function _(S){S.done?m(S.value):p(S.value).then(v,y)}_((f=f.apply(l,c||[])).next())})},r=ll&&ll.__generator||function(l,c){var u={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},f,p,m,b=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return b.next=v(0),b.throw=v(1),b.return=v(2),typeof Symbol=="function"&&(b[Symbol.iterator]=function(){return this}),b;function v(_){return function(S){return y([_,S])}}function y(_){if(f)throw new TypeError("Generator is already executing.");for(;b&&(b=0,_[0]&&(u=0)),u;)try{if(f=1,p&&(m=_[0]&2?p.return:_[0]?p.throw||((m=p.return)&&m.call(p),0):p.next)&&!(m=m.call(p,_[1])).done)return m;switch(p=0,m&&(_=[_[0]&2,m.value]),_[0]){case 0:case 1:m=_;break;case 4:return u.label++,{value:_[1],done:!1};case 5:u.label++,p=_[1],_=[0];continue;case 7:_=u.ops.pop(),u.trys.pop();continue;default:if(m=u.trys,!(m=m.length>0&&m[m.length-1])&&(_[0]===6||_[0]===2)){u=0;continue}if(_[0]===3&&(!m||_[1]>m[0]&&_[1]<m[3])){u.label=_[1];break}if(_[0]===6&&u.label<m[1]){u.label=m[1],m=_;break}if(m&&u.label<m[2]){u.label=m[2],u.ops.push(_);break}m[2]&&u.ops.pop(),u.trys.pop();continue}_=c.call(l,u)}catch(S){_=[6,S],p=0}finally{f=m=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},n=ll&&ll.__spreadArray||function(l,c,u){if(u||arguments.length===2)for(var f=0,p=c.length,m;f<p;f++)(m||!(f in c))&&(m||(m=Array.prototype.slice.call(c,0,f)),m[f]=c[f]);return l.concat(m||Array.prototype.slice.call(c))};Object.defineProperty(e,"__esModule",{value:!0}),e.getUrl=void 0;var a=i8(),i=qo(),s=function(l){return new Promise(function(c){return window.setTimeout(c,l)})},o=function(l,c){for(var u=[],f=2;f<arguments.length;f++)u[f-2]=arguments[f];return t(void 0,n([l,c],u,!0),void 0,function(p,m,b){var v,y,_,S,C,T,A,k;return b===void 0&&(b=0),r(this,function(N){switch(N.label){case 0:if(typeof p!="function")return[3,10];N.label=1;case 1:return N.trys.push([1,3,,9]),[4,p()];case 2:return v=N.sent(),[3,9];case 3:return N.sent(),m.current.retryOnError?(y=(T=m.current.reconnectAttempts)!==null&&T!==void 0?T:i.DEFAULT_RECONNECT_LIMIT,b<y?(_=typeof m.current.reconnectInterval=="function"?m.current.reconnectInterval(b):m.current.reconnectInterval,[4,s(_??i.DEFAULT_RECONNECT_INTERVAL_MS)]):[3,5]):[3,7];case 4:return N.sent(),[2,(0,e.getUrl)(p,m,b+1)];case 5:return(k=(A=m.current).onReconnectStop)===null||k===void 0||k.call(A,b),[2,null];case 6:return[3,8];case 7:return[2,null];case 8:return[3,9];case 9:return[3,11];case 10:v=p,N.label=11;case 11:return S=m.current.fromSocketIO?(0,a.parseSocketIOUrl)(v):v,C=m.current.queryParams?(0,a.appendQueryParams)(S,m.current.queryParams):S,[2,C]}})})};e.getUrl=o})(ll)),ll}var VM={},LQ;function NXe(){return LQ||(LQ=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.websocketWrapper=void 0;var t=function(r,n){return new Proxy(r,{get:function(a,i){var s=a[i];return i==="reconnect"?n:typeof s=="function"?(console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."),function(){}):s},set:function(a,i,s){return/^on/.test(i)?(console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."),!1):(a[i]=s,!0)}})};e.websocketWrapper=t,e.default=e.websocketWrapper})(VM)),VM}var PQ;function l8(){if(PQ)return yi;PQ=1;var e=yi&&yi.__assign||function(){return e=Object.assign||function(p){for(var m,b=1,v=arguments.length;b<v;b++){m=arguments[b];for(var y in m)Object.prototype.hasOwnProperty.call(m,y)&&(p[y]=m[y])}return p},e.apply(this,arguments)},t=yi&&yi.__awaiter||function(p,m,b,v){function y(_){return _ instanceof b?_:new b(function(S){S(_)})}return new(b||(b=Promise))(function(_,S){function C(k){try{A(v.next(k))}catch(N){S(N)}}function T(k){try{A(v.throw(k))}catch(N){S(N)}}function A(k){k.done?_(k.value):y(k.value).then(C,T)}A((v=v.apply(p,m||[])).next())})},r=yi&&yi.__generator||function(p,m){var b={label:0,sent:function(){if(_[0]&1)throw _[1];return _[1]},trys:[],ops:[]},v,y,_,S=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return S.next=C(0),S.throw=C(1),S.return=C(2),typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function C(A){return function(k){return T([A,k])}}function T(A){if(v)throw new TypeError("Generator is already executing.");for(;S&&(S=0,A[0]&&(b=0)),b;)try{if(v=1,y&&(_=A[0]&2?y.return:A[0]?y.throw||((_=y.return)&&_.call(y),0):y.next)&&!(_=_.call(y,A[1])).done)return _;switch(y=0,_&&(A=[A[0]&2,_.value]),A[0]){case 0:case 1:_=A;break;case 4:return b.label++,{value:A[1],done:!1};case 5:b.label++,y=A[1],A=[0];continue;case 7:A=b.ops.pop(),b.trys.pop();continue;default:if(_=b.trys,!(_=_.length>0&&_[_.length-1])&&(A[0]===6||A[0]===2)){b=0;continue}if(A[0]===3&&(!_||A[1]>_[0]&&A[1]<_[3])){b.label=A[1];break}if(A[0]===6&&b.label<_[1]){b.label=_[1],_=A;break}if(_&&b.label<_[2]){b.label=_[2],b.ops.push(A);break}_[2]&&b.ops.pop(),b.trys.pop();continue}A=m.call(p,b)}catch(k){A=[6,k],y=0}finally{v=_=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}},n=yi&&yi.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(yi,"__esModule",{value:!0}),yi.useWebSocket=void 0;var a=Do(),i=uD(),s=qo(),o=AXe(),l=kXe(),c=n(NXe()),u=o8(),f=function(p,m,b){m===void 0&&(m=s.DEFAULT_OPTIONS),b===void 0&&(b=!0);var v=(0,a.useState)(null),y=v[0],_=v[1],S=(0,a.useState)({}),C=S[0],T=S[1],A=(0,a.useMemo)(function(){if(!m.disableJson&&y)try{return JSON.parse(y.data)}catch{return s.UNPARSABLE_JSON_OBJECT}return null},[y,m.disableJson]),k=(0,a.useRef)(null),N=(0,a.useRef)(null),L=(0,a.useRef)(function(){}),I=(0,a.useRef)(0),P=(0,a.useRef)(Date.now()),H=(0,a.useRef)([]),B=(0,a.useRef)(null),K=(0,a.useRef)(m);K.current=m;var j=k.current&&C[k.current]!==void 0?C[k.current]:p!==null&&b===!0?s.ReadyState.CONNECTING:s.ReadyState.UNINSTANTIATED,W=m.queryParams?JSON.stringify(m.queryParams):null,D=(0,a.useCallback)(function(z,M){var Q;if(M===void 0&&(M=!0),s.isEventSourceSupported&&N.current instanceof EventSource){console.warn("Unable to send a message from an eventSource");return}((Q=N.current)===null||Q===void 0?void 0:Q.readyState)===s.ReadyState.OPEN?((0,u.assertIsWebSocket)(N.current,K.current.skipAssert),N.current.send(z)):M&&H.current.push(z)},[]),U=(0,a.useCallback)(function(z,M){M===void 0&&(M=!0),D(JSON.stringify(z),M)},[D]),Y=(0,a.useCallback)(function(){return K.current.share!==!0||s.isEventSourceSupported&&N.current instanceof EventSource?N.current:(B.current===null&&N.current&&((0,u.assertIsWebSocket)(N.current,K.current.skipAssert),B.current=(0,c.default)(N.current,L)),B.current)},[]);return(0,a.useEffect)(function(){if(p!==null&&b===!0){var z,M=!1,Q=!0,q=function(){return t(void 0,void 0,void 0,function(){var F,V,Z;return r(this,function(ee){switch(ee.label){case 0:return F=k,[4,(0,l.getUrl)(p,K)];case 1:return F.current=ee.sent(),k.current===null?(console.error("Failed to get a valid URL. WebSocket connection aborted."),k.current="ABORTED",(0,i.flushSync)(function(){return T(function(te){return e(e({},te),{ABORTED:s.ReadyState.CLOSED})})}),[2]):(V=function(te){M||(0,i.flushSync)(function(){return _(te)})},Z=function(te){M||(0,i.flushSync)(function(){return T(function(oe){var pe;return e(e({},oe),k.current&&(pe={},pe[k.current]=te,pe))})})},Q&&(z=(0,o.createOrJoinSocket)(N,k.current,Z,K,V,L,I,P,D)),[2])}})})};return L.current=function(){M||(B.current&&(B.current=null),z?.(),q())},q(),function(){M=!0,Q=!1,B.current&&(B.current=null),z?.(),_(null)}}else(p===null||b===!1)&&(I.current=0,T(function(F){var V;return e(e({},F),k.current&&(V={},V[k.current]=s.ReadyState.CLOSED,V))}))},[p,b,W,D]),(0,a.useEffect)(function(){j===s.ReadyState.OPEN&&H.current.splice(0).forEach(function(z){D(z)})},[j]),{sendMessage:D,sendJsonMessage:U,lastMessage:y,lastJsonMessage:A,readyState:j,getWebSocket:Y}};return yi.useWebSocket=f,yi}var Au={},FQ;function RXe(){if(FQ)return Au;FQ=1;var e=Au&&Au.__assign||function(){return e=Object.assign||function(o){for(var l,c=1,u=arguments.length;c<u;c++){l=arguments[c];for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(o[f]=l[f])}return o},e.apply(this,arguments)};Object.defineProperty(Au,"__esModule",{value:!0}),Au.useSocketIO=void 0;var t=Do(),r=l8(),n=qo(),a={type:"empty",payload:null},i=function(o){if(!o||!o.data)return a;var l=o.data.match(/\[.*]/);if(!l)return a;var c=JSON.parse(l);return!Array.isArray(c)||!c[1]?a:{type:c[0],payload:c[1]}},s=function(o,l,c){l===void 0&&(l=n.DEFAULT_OPTIONS),c===void 0&&(c=!0);var u=(0,t.useMemo)(function(){return e(e({},l),{fromSocketIO:!0})},[]),f=(0,r.useWebSocket)(o,u,c),p=f.sendMessage,m=f.sendJsonMessage,b=f.lastMessage,v=f.readyState,y=f.getWebSocket,_=(0,t.useMemo)(function(){return i(b)},[b]);return{sendMessage:p,sendJsonMessage:m,lastMessage:_,lastJsonMessage:_,readyState:v,getWebSocket:y}};return Au.useSocketIO=s,Au}var cl={},BQ;function MXe(){if(BQ)return cl;BQ=1;var e=cl&&cl.__assign||function(){return e=Object.assign||function(s){for(var o,l=1,c=arguments.length;l<c;l++){o=arguments[l];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(s[u]=o[u])}return s},e.apply(this,arguments)},t=cl&&cl.__rest||function(s,o){var l={};for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&o.indexOf(c)<0&&(l[c]=s[c]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,c=Object.getOwnPropertySymbols(s);u<c.length;u++)o.indexOf(c[u])<0&&Object.prototype.propertyIsEnumerable.call(s,c[u])&&(l[c[u]]=s[c[u]]);return l};Object.defineProperty(cl,"__esModule",{value:!0}),cl.useEventSource=void 0;var r=Do(),n=l8(),a=qo(),i=function(s,o,l){o===void 0&&(o=a.DEFAULT_EVENT_SOURCE_OPTIONS);var c=o.withCredentials,u=o.events,f=t(o,["withCredentials","events"]);l===void 0&&(l=!0);var p=e(e({},f),{eventSourceOptions:{withCredentials:c}}),m=(0,r.useRef)(a.EMPTY_EVENT_HANDLERS);u&&(m.current=u);var b=(0,n.useWebSocket)(s,p,l),v=b.lastMessage,y=b.readyState,_=b.getWebSocket;return(0,r.useEffect)(function(){v?.type&&Object.entries(m.current).forEach(function(S){var C=S[0],T=S[1];C===v.type&&T(v)})},[v]),{lastEvent:v,readyState:y,getEventSource:_}};return cl.useEventSource=i,cl}var zQ;function DXe(){return zQ||(zQ=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetGlobalState=e.useEventSource=e.ReadyState=e.useSocketIO=e.default=void 0;var t=l8();Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.useWebSocket}});var r=RXe();Object.defineProperty(e,"useSocketIO",{enumerable:!0,get:function(){return r.useSocketIO}});var n=qo();Object.defineProperty(e,"ReadyState",{enumerable:!0,get:function(){return n.ReadyState}});var a=MXe();Object.defineProperty(e,"useEventSource",{enumerable:!0,get:function(){return a.useEventSource}});var i=o8();Object.defineProperty(e,"resetGlobalState",{enumerable:!0,get:function(){return i.resetGlobalState}})})(UM)),UM}var OXe=DXe();const IXe=Fl(OXe);function tue(e,t={}){const{maxUpdates:r=100,autoConnect:n=!0}=t,[a,i]=E.useState([]),[s,o]=E.useState([]),[l,c]=E.useState(!1),[u,f]=E.useState(null),[p,m]=E.useState([]),b=E.useRef(0),v=E.useRef(0),y=E.useRef(0),_=`ws://localhost:8080/api/agent-test/ws/${e}`,S=E.useCallback(W=>{try{const D=JSON.parse(W);if(D.type==="variable_change"&&D.variable==="step"){const U=D,Y={id:`update-${++b.current}`,scope:U.scope,variable:U.variable,oldValue:U.old_value,newValue:U.new_value,timestamp:new Date(U.timestamp*1e3)};i(z=>{const M=[...z,Y];return M.length>r?M.slice(-r):M})}else if(D.type==="log_message"){const U=D,Y={id:`log-${++v.current}`,level:U.level,message:U.message,timestamp:new Date(U.timestamp*1e3)};o(z=>{const M=[...z,Y];return M.length>r?M.slice(-r):M})}else if(D.type==="bulk_evaluation_progress"){const U=D;f({progress:U.progress,current_question:U.current_question,total_questions:U.total_questions,successful_count:U.successful_count,failed_count:U.failed_count,estimated_time_remaining:U.estimated_time_remaining,timestamp:new Date(U.timestamp*1e3)})}else if(D.type==="bulk_evaluation_result"){const U=D,Y={id:`bulk-result-${++y.current}`,question_index:U.question_index,question:U.question,response:U.response,response_time:U.response_time,status:U.status,error:U.error,timestamp:new Date(U.timestamp*1e3)};m(z=>{const M=[...z,Y];return M.length>r?M.slice(-r):M})}else D.type==="echo"&&(console.log("WebSocket connection confirmed:",D.message),c(!0))}catch(D){console.error("Failed to parse WebSocket message:",D)}},[r]),{sendMessage:C,readyState:T,getWebSocket:A}=IXe(_,{onMessage:W=>{S(W.data)},shouldReconnect:W=>W.code!==1e3,reconnectAttempts:5,reconnectInterval:W=>Math.min(1e3*Math.pow(2,W),3e4)}),k=E.useCallback(()=>{i([])},[]),N=E.useCallback(()=>{o([])},[]),L=E.useCallback(()=>{f(null),m([])},[]),I=E.useCallback(W=>a.filter(D=>D.scope===W),[a]),P=E.useCallback(W=>a.filter(D=>D.variable===W),[a]),H=E.useCallback((W,D)=>a.filter(U=>U.scope===W&&U.variable===D).slice(-1)[0]||null,[a]),B=E.useCallback(W=>{T===1&&C(W)},[C,T]),K=E.useCallback(()=>{},[n]),j=E.useCallback(()=>{const W=A();W&&W.close(1e3,"Manual disconnect"),c(!1)},[A]);return E.useEffect(()=>{c(T===1)},[T]),E.useEffect(()=>{n&&T===1&&C(JSON.stringify({type:"ping",websocket_id:e}))},[C,e,n,T]),{updates:a,logUpdates:s,bulkEvaluationProgress:u,bulkEvaluationResults:p,isConnected:l,clearUpdates:k,clearLogUpdates:N,clearBulkEvaluationData:L,getUpdatesByScope:I,getUpdatesByVariable:P,getLatestUpdateForVariable:H,connect:K,disconnect:j,send:B,readyState:T}}const rue=({logs:e,className:t="",showTimestamps:r=!1,autoScroll:n=!0,maxHeight:a="300px"})=>{const i=E.useRef(null);E.useEffect(()=>{n&&i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e,n]);const s=l=>{switch(l.toLowerCase()){case"error":return"text-red-600 dark:text-red-400";case"warning":case"warn":return"text-yellow-600 dark:text-yellow-400";case"debug":return"text-blue-600 dark:text-blue-400";case"info":default:return"text-gray-700 dark:text-gray-300"}},o=l=>l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3});return e.length===0?g.jsx("div",{className:`flex justify-center items-center h-16 text-sm text-gray-500 dark:text-gray-400 ${t}`,children:"No logs yet..."}):g.jsxs("div",{className:`bg-gray-50 rounded-lg border border-gray-200 dark:bg-gray-800 dark:border-gray-700 ${t}`,children:[g.jsxs("div",{className:"px-3 py-2 text-xs font-medium text-gray-600 bg-gray-100 rounded-t-lg border-b border-gray-200 dark:bg-gray-700 dark:border-gray-600 dark:text-gray-300",children:["Agent Logs (",e.length,")"]}),g.jsx("div",{ref:i,className:"overflow-y-auto p-3 font-mono text-xs bg-gray-50 dark:bg-gray-800 custom-scrollbar",style:{maxHeight:a},children:e.map(l=>g.jsxs("div",{className:"flex gap-2 items-start mb-1",children:[r&&g.jsx("span",{className:"text-gray-400 dark:text-gray-500 shrink-0 text-[10px]",children:o(l.timestamp)}),g.jsxs("span",{className:`shrink-0 uppercase text-[10px] font-medium ${s(l.level)}`,children:[l.level,":"]}),g.jsx("span",{className:"min-w-0 text-gray-800 break-words dark:text-gray-200",children:l.message})]},l.id))})]})},X6=380,Y6=800,nue=420,LXe=2,PXe=({onResize:e,isResizing:t,setIsResizing:r})=>{const n=E.useRef(null),a=E.useRef(0),i=E.useRef(0),s=E.useCallback(o=>{if(o.preventDefault(),o.stopPropagation(),!n.current)return;r(!0),a.current=o.clientX,i.current=n.current.parentElement?.offsetWidth||nue;const l=u=>{const f=a.current-u.clientX,p=Math.max(X6,Math.min(Y6,i.current+f));e(p)},c=()=>{r(!1),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)},[e,r]);return E.useEffect(()=>()=>{t&&r(!1)},[t,r]),g.jsx("div",{ref:n,className:`
        absolute top-0 left-0 h-full z-50
        hover:bg-gray-200 hover:shadow-sm transition-all duration-200
        ${t?"bg-primary":"hover:bg-gray-200"}
        group
      `,onMouseDown:s,style:{width:`${LXe}px`,cursor:"col-resize"},title:"Drag to resize chat panel",children:g.jsx("div",{className:`
          absolute top-1/2 left-1/2 transform -translate-x-2/3 -translate-y-1/2
          w-2 h-8 rounded-full transition-all duration-200 border border-gray-300
          ${t?"shadow-sm bg-primary":"bg-white shadow-sm group-hover:bg-primary"}
        `,style:{zIndex:60,pointerEvents:"none"}})})},FXe=({agentName:e="Agent",onClose:t,isVisible:r})=>{const{agent_id:n}=gs(),[a,i]=E.useState([]),[s,o]=E.useState(""),[l,c]=E.useState(!1),[u,f]=E.useState(!1),[p,m]=E.useState(""),[b,v]=E.useState(!1),[y,_]=E.useState(!1),S=E.useRef(null),[C,T]=E.useState("individual"),[,A]=E.useState(null),[k,N]=E.useState(null),[L,I]=E.useState(""),[P,H]=E.useState(5),[B,K]=E.useState({isRunning:!1,results:[],progress:{current:0,total:0,successful:0,failed:0,progress:0,estimatedTimeRemaining:0}}),j=E.useRef(null),[W,D]=E.useState(()=>{const ve=localStorage.getItem("chat-pane-width");if(ve){const Ne=parseInt(ve,10);return Math.max(X6,Math.min(Y6,Ne))}return nue}),[U,Y]=E.useState(!1);E.useEffect(()=>{localStorage.setItem("chat-pane-width",W.toString())},[W]);const z=E.useCallback(ve=>{D(ve)},[]),[M]=E.useState(()=>`chatpane-${Date.now()}-${Math.random().toString(36).substring(2,11)}`),{updates:Q,logUpdates:q,bulkEvaluationProgress:F,bulkEvaluationResults:V,disconnect:Z,clearLogUpdates:ee,clearBulkEvaluationData:te}=tue(M,{maxUpdates:50,autoConnect:!0});E.useEffect(()=>{if(Q.length>0){const ve=Q[Q.length-1];if(ve.variable==="step"){const Ne=ve.newValue||"";if(Ne)try{console.log("=============================================="),console.log("stepValue",Ne);const Ue=JSON.parse(Ne.replaceAll("'",'"'));console.log("stepObject",Ue);const Le=Ue.action||Ue.description||Ue.name||"";console.log("=============================================="),m(Le)}catch(Ue){console.error("Error parsing step object:",Ue),console.log(`📝 Failed to parse step object, using raw value: "${Ne}"`),m(Ne)}}}},[Q]),E.useEffect(()=>{F&&K(ve=>({...ve,progress:{current:F.current_question,total:F.total_questions,successful:F.successful_count,failed:F.failed_count,progress:F.progress,estimatedTimeRemaining:F.estimated_time_remaining}}))},[F]),E.useEffect(()=>{if(V.length>0){const ve=V.map(Ne=>({question:Ne.question,response:Ne.response,response_time:Ne.response_time,status:Ne.status,error:Ne.error,expected_answer:void 0,question_index:Ne.question_index}));K(Ne=>({...Ne,results:ve}))}},[V]);const oe=()=>{S.current?.scrollIntoView({behavior:"smooth"})};E.useEffect(()=>{oe()},[a]),E.useEffect(()=>{(async()=>{if(!(!n||!r)){f(!0);try{const Ne=await gt.getTestChatHistory(n);if(Ne&&Ne.length>0){const Ue=Ne.map((Le,Ye)=>({id:`history-${Ye}`,text:Le.text,sender:Le.sender,timestamp:new Date(Le.created_at)})).sort((Le,Ye)=>Le.timestamp.getTime()-Ye.timestamp.getTime());i(Ue)}else i([]),i([{id:"welcome",text:`Hello! I'm ${e}. How can I help you today?`,sender:"agent",timestamp:new Date}])}catch(Ne){console.error("Error loading chat history:",Ne),i([{id:"welcome",text:`Hello! I'm ${e}. How can I help you today?`,sender:"agent",timestamp:new Date}])}finally{f(!1)}}})()},[n,e,r]);const pe=ve=>{const Ne=ve.trim().split(`
`);if(Ne.length<2)throw new Error("CSV must have at least a header row and one data row");const Ue=Ne[0].split(",").map(De=>De.trim().replace(/^"|"$/g,"")),Le=Ue.findIndex(De=>De.toLowerCase().includes("question"));if(Le===-1)throw new Error('CSV must have a column with "question" in the header');const Ye=[];for(let De=1;De<Ne.length;De++){const Ve=Ne[De].split(",").map(Ee=>Ee.trim().replace(/^"|"$/g,""));if(Ve.length!==Ue.length)continue;const lt={question:Ve[Le]||"",expected_answer:Ve[Ue.findIndex(Ee=>Ee.toLowerCase().includes("expected"))]||void 0,category:Ve[Ue.findIndex(Ee=>Ee.toLowerCase().includes("category"))]||void 0,context:Ve[Ue.findIndex(Ee=>Ee.toLowerCase().includes("context"))]||void 0};lt.question.trim()&&Ye.push(lt)}if(Ye.length===0)throw new Error("No valid questions found in CSV");return{data:Ye,headers:Ue,preview:Ye.slice(0,5)}},he=async ve=>{I(""),A(ve);try{const Ne=await ve.text(),Ue=pe(Ne);N(Ue)}catch(Ne){I(Ne instanceof Error?Ne.message:"Failed to parse CSV"),N(null)}},ke=ve=>{ve.preventDefault();const Ue=Array.from(ve.dataTransfer.files).find(Le=>Le.name.toLowerCase().endsWith(".csv"));Ue&&he(Ue)},se=ve=>{const Ne=ve.target.files?.[0];Ne&&he(Ne)},qe=()=>{if(B.results.length===0)return;const Ne=[["question","response","status","response_time_ms","error"].join(","),...B.results.map(De=>[`"${De.question.replace(/"/g,'""')}"`,`"${De.response.replace(/"/g,'""')}"`,De.status,De.response_time.toFixed(2),De.error?`"${De.error.replace(/"/g,'""')}"`:""].join(","))].join(`
`),Ue=new Blob([Ne],{type:"text/csv"}),Le=URL.createObjectURL(Ue),Ye=document.createElement("a");Ye.href=Le,Ye.download=`bulk-evaluation-results-${new Date().toISOString().split("T")[0]}.csv`,Ye.click(),URL.revokeObjectURL(Le)},$e=()=>{const Ne=[["question","expected_answer","category"],["What is 2+2?","4","Math"],["What is the capital of France?","Paris","Geography"],["Who wrote Romeo and Juliet?","William Shakespeare","Literature"],["What is the largest planet in our solar system?","Jupiter","Astronomy"],["What is the chemical symbol for water?","H2O","Chemistry"]].map(De=>De.map(Ve=>`"${Ve}"`).join(",")).join(`
`),Ue=new Blob([Ne],{type:"text/csv"}),Le=URL.createObjectURL(Ue),Ye=document.createElement("a");Ye.href=Le,Ye.download="sample-questions.csv",Ye.click(),URL.revokeObjectURL(Le)},Pe=async()=>{if(!(!k||!n||B.isRunning)){K(ve=>({...ve,isRunning:!0,results:[],progress:{current:0,total:k.data.length,successful:0,failed:0,progress:0,estimatedTimeRemaining:0}})),ee(),te(),_(!1);try{const ve=k.data.map(De=>({question:De.question,expected_answer:De.expected_answer,context:De.context,category:De.category})),Ne=await gt.getAgent(parseInt(n)),Ue={agent_code:"",questions:ve,agent_name:e,context:{user_id:"bulk_evaluation_user",session_id:`bulk_${Date.now()}`},websocket_id:M,batch_size:P,folder_path:Ne.folder_path},Le=await gt.bulkEvaluateAgent(Ue);K(De=>({...De,isRunning:!1,results:Le.results,progress:{...De.progress,current:Le.total_questions,successful:Le.successful_count,failed:Le.failed_count,progress:100,estimatedTimeRemaining:0}}));const Ye={id:Date.now().toString(),text:`**Bulk Evaluation Complete**

- Total Questions: ${Le.total_questions}
- Successful: ${Le.successful_count}
- Failed: ${Le.failed_count}
- Total Time: ${Le.total_time.toFixed(2)}s
- Average Response Time: ${Le.average_response_time.toFixed(2)}ms`,sender:"agent",timestamp:new Date};i(De=>[...De,Ye])}catch(ve){console.error("Bulk evaluation error:",ve),K(Ue=>({...Ue,isRunning:!1}));const Ne={id:Date.now().toString(),text:`**Bulk Evaluation Failed**

Error: ${ve.message||"Unknown error occurred"}`,sender:"agent",timestamp:new Date};i(Ue=>[...Ue,Ne])}}};E.useEffect(()=>(r||Z(),()=>{Z()}),[r,Z]),E.useEffect(()=>(window.handleSendMessage=()=>{s.trim()&&!l&&n&&!B.isRunning&&Ce()},window.setInputText=ve=>{o(ve)},()=>{delete window.handleSendMessage,delete window.setInputText}),[s,l,n,B.isRunning]);const Ce=async()=>{if(!s.trim()||l||!n||B.isRunning)return;const ve={id:Date.now().toString(),text:s.trim(),sender:"user",timestamp:new Date};i(Ne=>[...Ne,ve]),o(""),c(!0),m(""),ee(),_(!1);try{const Ne=await gt.testAgentById(n,ve.text,{user_id:"chat_pane_user",session_id:`chatpane_${Date.now()}`},M),Ue={id:(Date.now()+1).toString(),text:Ne.success?Ne.agent_response:`Error: ${Ne.error||"Unknown error occurred"}`,sender:"agent",timestamp:new Date};i(Le=>[...Le,Ue])}catch(Ne){console.error("Error testing agent:",Ne);const Ue={id:(Date.now()+1).toString(),text:`Sorry, I encountered an error while processing your message: ${Ne.message||"Please try again."}`,sender:"agent",timestamp:new Date};i(Le=>[...Le,Ue])}finally{c(!1),m("")}},xe=ve=>{ve.key==="Enter"&&!ve.shiftKey&&(ve.preventDefault(),Ce())};return g.jsxs("div",{className:`relative bg-white max-h-[calc(100vh-64px)] border-l border-gray-200 overflow-visible flex flex-col transform transition-transform duration-300 ease-in-out z-50 ${r?"translate-x-0":"translate-x-full"}`,style:{width:`${W}px`,minWidth:`${X6}px`,maxWidth:`${Y6}px`},children:[g.jsx(PXe,{onResize:z,isResizing:U,setIsResizing:Y}),g.jsxs("div",{className:"border-b border-gray-200",children:[g.jsxs("div",{className:"flex justify-between items-center p-4 h-14",children:[g.jsxs("div",{className:"flex gap-3 items-center",children:[g.jsx("div",{className:"flex overflow-hidden justify-center items-center w-8 h-8 rounded-full",children:g.jsx("img",{src:$s(n||"0"),alt:`${e} avatar`,className:"object-cover w-full h-full",onError:ve=>{const Ne=ve.target;Ne.style.display="none"}})}),g.jsx("h3",{className:"font-semibold text-gray-900",children:e})]}),g.jsx("button",{onClick:t,className:"p-1 text-gray-400 transition-colors cursor-pointer hover:text-gray-600",children:g.jsx(NEe,{width:20,height:20})})]}),g.jsx("div",{className:"px-4 pb-4",children:g.jsxs("div",{className:"flex p-1 bg-gray-100 rounded-lg",children:[g.jsx("button",{onClick:()=>T("individual"),className:`flex-1 py-2 px-3 rounded-md text-sm font-medium transition-colors ${C==="individual"?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-800"}`,children:"Chat"}),g.jsx("button",{onClick:()=>T("bulk"),className:`flex-1 py-2 px-3 rounded-md text-sm font-medium transition-colors ${C==="bulk"?"bg-white text-gray-900 shadow-sm":"text-gray-600 hover:text-gray-800"}`,children:"Bulk Evaluation"})]})})]}),g.jsx("div",{className:"flex overflow-y-auto flex-col flex-1 custom-scrollbar",children:C==="individual"?g.jsxs("div",{className:"flex overflow-y-auto flex-col flex-1 p-4 space-y-4 custom-scrollbar",children:[u?g.jsx("div",{className:"flex justify-center items-center h-full",children:g.jsxs("div",{className:"grid grid-cols-[max-content_1fr] gap-2 items-center",children:[g.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-gray-600 animate-spin border-t-transparent"}),g.jsx("div",{className:"text-sm text-gray-700",children:g.jsx("span",{className:"font-medium",children:"Loading chat history..."})})]})}):g.jsxs(g.Fragment,{children:[a.map(ve=>g.jsx("div",{className:`flex ${ve.sender==="user"?"justify-end":"justify-start"}`,children:g.jsxs("div",{className:` px-4 py-2 rounded-lg ${ve.sender==="user"?"bg-gray-50 text-gray-900 border border-gray-100":"text-gray-900"}`,children:[g.jsx(n0,{content:ve.text??"Empty message",backgroundContext:"agent"}),g.jsx("p",{className:"mt-1 text-xs opacity-70",children:ve.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})},ve.id)),l&&g.jsx("div",{className:"flex justify-start",children:g.jsxs("div",{className:"grid grid-cols-[max-content_1fr] gap-2 items-center",children:[g.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-gray-600 animate-spin border-t-transparent"}),g.jsxs("div",{className:"text-sm text-gray-700",children:[g.jsx("span",{className:"font-medium",children:"Thinking..."}),p&&g.jsx("div",{className:"mt-1 text-xs italic text-blue-600",children:p})]})]})})]}),g.jsx("div",{ref:S})]}):g.jsx("div",{className:"flex flex-col flex-1 p-4 space-y-4 custom-scrollbar",children:k?g.jsxs("div",{className:"space-y-4",children:[g.jsx("div",{className:"p-4 bg-green-50 rounded-md border border-green-200",children:g.jsxs("div",{className:"flex justify-between items-start",children:[g.jsxs("div",{children:[g.jsx("h4",{className:"font-medium text-green-800",children:"✓ CSV Loaded Successfully"}),g.jsxs("p",{className:"mt-1 text-sm text-green-600",children:[k.data.length," questions found"]})]}),g.jsx("button",{onClick:()=>{A(null),N(null),I("")},className:"text-green-600 hover:text-green-800",children:g.jsx(db,{className:"w-4 h-4"})})]})}),g.jsxs("div",{className:"rounded-lg border border-gray-200",children:[g.jsx("div",{className:"px-4 py-3 bg-gray-50 border-b border-gray-200",children:g.jsx("h4",{className:"font-medium text-gray-900",children:"Preview (First 5 rows)"})}),g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full",children:[g.jsx("thead",{className:"bg-gray-50",children:g.jsx("tr",{children:k.headers.map((ve,Ne)=>g.jsx("th",{className:"px-4 py-2 text-xs font-medium tracking-wider text-left text-gray-500 uppercase",children:ve},Ne))})}),g.jsx("tbody",{className:"divide-y divide-gray-200",children:k.preview.map((ve,Ne)=>g.jsxs("tr",{className:"hover:bg-gray-50",children:[g.jsx("td",{className:"px-4 py-3 max-w-xs text-sm text-gray-900 truncate",children:ve.question}),ve.expected_answer!==void 0&&g.jsx("td",{className:"px-4 py-3 max-w-xs text-sm text-gray-900 truncate",children:ve.expected_answer}),ve.category!==void 0&&g.jsx("td",{className:"px-4 py-3 text-sm text-gray-900",children:ve.category}),ve.context!==void 0&&g.jsx("td",{className:"px-4 py-3 max-w-xs text-sm text-gray-900 truncate",children:ve.context})]},Ne))})]})})]}),g.jsxs("div",{className:"p-4 rounded-lg border border-gray-200",children:[g.jsx("h4",{className:"mb-3 font-medium text-gray-900",children:"Configuration"}),g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{children:[g.jsx("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"Batch Size"}),g.jsxs("select",{value:P,onChange:ve=>H(parseInt(ve.target.value)),className:"px-3 py-2 w-full rounded-md border border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[g.jsx("option",{value:1,children:"1 (Sequential)"}),g.jsx("option",{value:3,children:"3"}),g.jsx("option",{value:5,children:"5 (Recommended)"}),g.jsx("option",{value:10,children:"10"}),g.jsx("option",{value:20,children:"20"})]})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block mb-2 text-sm font-medium text-gray-700",children:"Total Questions"}),g.jsx("p",{className:"px-3 py-2 text-gray-900 bg-gray-50 rounded-md border border-gray-300",children:k.data.length})]})]})]}),g.jsx("button",{onClick:Pe,disabled:B.isRunning,className:`w-full py-3 px-4 rounded-lg font-medium transition-colors ${B.isRunning?"bg-gray-400 text-gray-600 cursor-not-allowed":"bg-blue-600 text-white hover:bg-blue-700"}`,children:B.isRunning?"Running Evaluation...":"Start Bulk Evaluation"}),B.isRunning&&g.jsxs("div",{className:"p-4 bg-blue-50 rounded-lg border border-blue-200",children:[g.jsxs("div",{className:"flex justify-between items-center mb-2",children:[g.jsx("span",{className:"text-sm font-medium text-blue-800",children:"Progress"}),g.jsxs("span",{className:"text-sm text-blue-600",children:[B.progress.current," /"," ",B.progress.total]})]}),g.jsx("div",{className:"mb-3 w-full h-2 bg-blue-200 rounded-full",children:g.jsx("div",{className:"h-2 bg-blue-600 rounded-full transition-all duration-300",style:{width:`${B.progress.progress}%`}})}),g.jsxs("div",{className:"grid grid-cols-3 gap-4 text-sm",children:[g.jsxs("div",{children:[g.jsxs("span",{className:"font-medium text-green-600",children:["✓ ",B.progress.successful]}),g.jsx("span",{className:"ml-1 text-gray-600",children:"successful"})]}),g.jsxs("div",{children:[g.jsxs("span",{className:"font-medium text-red-600",children:["✗ ",B.progress.failed]}),g.jsx("span",{className:"ml-1 text-gray-600",children:"failed"})]}),g.jsxs("div",{children:[g.jsxs("span",{className:"font-medium text-blue-600",children:[Math.ceil(B.progress.estimatedTimeRemaining),"s"]}),g.jsx("span",{className:"ml-1 text-gray-600",children:"remaining"})]})]})]}),B.results.length>0&&g.jsxs("div",{className:"rounded-lg border border-gray-200",children:[g.jsxs("div",{className:"flex justify-between items-center px-4 py-3 bg-gray-50 border-b border-gray-200",children:[g.jsxs("h4",{className:"font-medium text-gray-900",children:["Results (",B.results.length,")"]}),g.jsxs("button",{onClick:qe,className:"flex gap-2 items-center px-3 py-1 text-sm text-white bg-green-600 rounded-md transition-colors hover:bg-green-700",children:[g.jsx(wre,{className:"w-4 h-4"}),"Export CSV"]})]}),g.jsx("div",{className:"overflow-y-auto max-h-96 custom-scrollbar",children:B.results.map((ve,Ne)=>g.jsxs("div",{className:`p-4 border-b border-gray-200 last:border-b-0 ${ve.status==="error"?"bg-red-50":"bg-white"}`,children:[g.jsxs("div",{className:"flex justify-between items-start mb-2",children:[g.jsxs("h5",{className:"text-sm font-medium text-gray-900",children:["Q",Ne+1,": ",ve.question]}),g.jsxs("span",{className:`text-xs px-2 py-1 rounded-full ${ve.status==="success"?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:[ve.status," (",ve.response_time.toFixed(0),"ms)"]})]}),ve.status==="success"?g.jsx("div",{className:"text-sm text-gray-700",children:g.jsx(n0,{content:ve.response,backgroundContext:"agent"})}):g.jsxs("div",{className:"text-sm text-red-600",children:["Error: ",ve.error||"Unknown error"]})]},Ne))})]})]}):g.jsxs("div",{className:"flex flex-col flex-1 justify-center items-center p-8 rounded-lg border-2 border-gray-300 border-dashed",children:[g.jsxs("div",{className:"text-center cursor-pointer",onClick:()=>j.current?.click(),onDrop:ke,onDragOver:ve=>ve.preventDefault(),children:[g.jsx(jEe,{className:"mx-auto mb-4 w-12 h-12 text-gray-400"}),g.jsx("h3",{className:"mb-2 text-lg font-medium text-gray-900",children:"Add Evaluation File (.csv)"}),g.jsx("p",{className:"mb-4 text-sm text-gray-600",children:"Drop your CSV file here or click to browse."}),g.jsx("p",{className:"mb-4 text-xs text-gray-500",children:"Required: 'question' column. Optional: 'expected_answer', 'category', 'context'"}),g.jsxs(mt,{variant:"ghost",onClick:ve=>{ve.stopPropagation(),$e()},className:"inline-flex gap-2 items-center px-3 py-2 text-sm text-blue-600 rounded-md transition-colors hover:text-blue-800 hover:bg-blue-50",children:[g.jsx(nEe,{className:"w-4 h-4"}),"Get Sample CSV"]}),g.jsx("input",{ref:j,type:"file",accept:".csv",onChange:se,className:"hidden"})]}),L&&g.jsx("div",{className:"p-3 mt-4 bg-red-50 rounded-md border border-red-200",children:g.jsx("p",{className:"text-sm text-red-600",children:L})})]})})}),(l||q.length>0)&&!y&&g.jsxs("div",{className:"border-t border-gray-200 dark:border-gray-700",children:[g.jsxs("div",{className:"flex justify-between items-center px-4 py-3 transition-colors hover:bg-gray-50 dark:hover:bg-gray-800",children:[g.jsxs("div",{className:"flex flex-1 gap-2 items-center cursor-pointer",onClick:()=>v(!b),children:[g.jsx("span",{className:"text-sm font-medium text-gray-600 dark:text-gray-300",children:"Backend Logs"}),l&&g.jsxs("div",{className:"flex gap-1 items-center",children:[g.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-pulse"}),g.jsx("span",{className:"text-xs text-blue-600 dark:text-blue-400",children:"Live"})]}),q.length>0&&g.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-0.5 rounded-full font-medium",children:q.length}),b?g.jsx(z2e,{className:"w-4 h-4 text-gray-400 dark:text-gray-500"}):g.jsx(A2e,{className:"w-4 h-4 text-gray-400 dark:text-gray-500"})]}),!l&&g.jsx("button",{onClick:()=>{_(!0),v(!1)},className:"p-1 rounded transition-colors hover:bg-gray-200 dark:hover:bg-gray-700",title:"Hide logs",children:g.jsx(db,{className:"w-3 h-3 text-gray-400 dark:text-gray-500"})})]}),b&&g.jsx("div",{className:"px-4 pb-3",children:g.jsx(rue,{logs:q,showTimestamps:!0,autoScroll:!0,maxHeight:"150px"})})]}),C==="individual"&&g.jsx("div",{className:"p-4",children:g.jsxs("div",{className:"flex relative",children:[g.jsx("textarea",{value:s,onChange:ve=>o(ve.target.value),onKeyDown:xe,placeholder:"Type your message",className:`w-full min-h-[100px] max-h-[120px] pl-3 pr-12 py-3 text-sm rounded-lg bg-gray-100 border-gray-300
                focus:outline-none focus:ring-1 focus:ring-gray-500 focus:border-transparent resize-none overflow-y-auto custom-scrollbar`,rows:2,disabled:l||B.isRunning}),s.trim()&&g.jsx("button",{onClick:Ce,className:"absolute bottom-3 right-4 p-2 text-white bg-gray-700 rounded-full transition-colors hover:text-blue-600",title:"Send message",disabled:l||B.isRunning,children:g.jsx(qD,{className:"w-4 h-4",strokeWidth:1.5})})]})})]})},BXe=["Overview","Knowledge Base","Tools","Code"],zXe={Overview:g.jsx(lAe,{className:"w-4 h-4"}),"Knowledge Base":g.jsx(J4e,{className:"w-4 h-4"}),Tools:g.jsx(Are,{className:"w-4 h-4"}),Code:g.jsx(sAe,{className:"w-4 h-4"})},jXe=({children:e,activeTab:t,setActiveTab:r,navigate:n})=>{const{selectedAgent:a}=Ii(),{isChatSidebarOpen:i,openChatSidebar:s,closeChatSidebar:o,agentDetailActiveTab:l,setAgentDetailActiveTab:c}=ud(),u=l||t||"Overview",f=p=>{c(p),r&&r(p)};return g.jsxs("div",{className:"grid grid-cols-[1fr_max-content] h-full relative overflow-hidden",children:[g.jsxs("div",{className:"overflow-auto grid grid-cols-1 grid-rows-[max-content_1fr] flex-1 h-full custom-scrollbar",children:[g.jsxs("div",{className:"flex justify-between items-center border-b border-gray-200 max-w-screen",children:[g.jsx("div",{className:"flex",children:BXe.map(p=>g.jsxs("button",{className:`cursor-pointer px-4 py-4 h-14 font-medium text-sm flex items-center gap-2 transition-colors relative ${u===p?'text-primary bg-white before:absolute before:bottom-[-1px] before:left-0 before:right-0 before:h-1 before:bg-white before:content-[""]':"text-gray-500"}`,onClick:()=>f(p),children:[zXe[p],p]},p))}),g.jsx("div",{className:"flex gap-2 items-center pr-2",children:!i&&g.jsxs(mt,{variant:"link",className:"flex gap-2 items-center px-2 py-2 text-gray-700 border-gray-200 hover:bg-brand-100 hover:text-gray-900",onClick:()=>s(),children:[g.jsx("div",{className:"flex overflow-hidden justify-center items-center w-6 h-6 rounded-full",children:g.jsx("img",{src:$s(a?.id||0),alt:`${a?.name||"Agent"} avatar`,className:"object-cover w-full h-full",onError:p=>{const m=p.target;m.style.display="none";const b=m.parentElement;b&&(b.className="flex justify-center items-center w-6 h-6 rounded-full bg-brand-100",b.innerHTML=`<span className="text-xs font-medium text-brand-700">${a?.name?.[0]||"A"}</span>`)}})}),g.jsxs("span",{className:"text-sm font-semibold",children:[a?.name||"Agent"," Playground"]})]})})]}),u==="Overview"&&g.jsx(iHe,{navigate:n}),u==="Knowledge Base"&&g.jsx(hKe,{}),u==="Tools"&&g.jsx(mKe,{}),u==="Code"&&g.jsx(SXe,{}),e]}),i&&g.jsx(FXe,{agentName:a?.name||"Agent",isVisible:i,onClose:()=>o()})]})};function qXe(){const{agent_id:e}=gs(),t=Oo(),{fetchAgent:r,deleteAgent:n,updateAgent:a,isLoading:i,error:s,selectedAgent:o}=Ii(),[l,c]=E.useState(!1),[u,f]=E.useState(!1),[p,m]=E.useState(!1),[b,v]=E.useState("Overview"),y=async()=>{if(!e||isNaN(Number(e))||!o){t("/agents");return}try{await a(parseInt(e),{name:o.name,description:o.description,config:{...o.config,status:"success"}}),t(`/agents/${e}/chat`)}catch(T){console.error("Failed to deploy agent:",T)}},_=async()=>{if(!e||isNaN(Number(e))||!o){t("/agents");return}try{const T={...o,config:{...o.config,status:"success"}};await a(parseInt(e),T),t("/agents")}catch(T){console.error("Failed to deploy agent:",T)}},S=()=>{if(o&&o.config&&o.config.status==="success")return t(-1);f(!0)},C=async()=>{if(!e){f(!1),t("/agents");return}m(!0);try{try{await H5(e),console.log(`[Storage Cleanup] Cleared smart-chat-storage for agent ${e}`)}catch(T){console.warn("Failed to clear chat storage:",T)}isNaN(Number(e))||await n(parseInt(e)),f(!1),t("/agents")}catch(T){console.error("Failed to delete agent:",T),Fr.error("Failed to delete agent")}finally{m(!1)}};return E.useEffect(()=>{e&&(isNaN(Number(e))?console.log("Prebuilt agent detected:",e):r(parseInt(e)).catch(console.error))},[e,r]),E.useEffect(()=>()=>{if(e)try{H5(e)}catch(T){console.warn("Failed to clear storage on unmount:",T)}},[e]),i?g.jsx("div",{className:"flex justify-center items-center w-full h-full",children:g.jsx("div",{className:"p-8 w-full max-w-2xl",children:g.jsxs("div",{className:"space-y-6 animate-pulse",children:[g.jsx("div",{className:"mb-4 w-1/3 h-8 bg-gray-200 rounded"}),g.jsx("div",{className:"mb-2 w-1/2 h-6 bg-gray-200 rounded"}),g.jsx("div",{className:"mb-2 w-2/3 h-4 bg-gray-200 rounded"}),g.jsx("div",{className:"mb-2 w-1/2 h-4 bg-gray-200 rounded"}),g.jsx("div",{className:"mb-2 w-1/4 h-4 bg-gray-200 rounded"}),g.jsx("div",{className:"w-full h-64 bg-gray-200 rounded"})]})})}):s||!i&&!o?g.jsx("div",{className:"flex justify-center items-center w-full h-full",children:g.jsxs("div",{className:"flex flex-col items-center max-w-md text-center",children:[g.jsx("h1",{className:"py-4 text-2xl font-semibold text-gray-900",children:"Agent Not Found"}),g.jsx("p",{className:"mb-8 leading-relaxed text-gray-600",children:s||"The agent you're looking for doesn't exist or has been removed."}),g.jsx("button",{onClick:()=>t("/agents"),className:"text-blue-600 underline",children:"Back to Agents"})]})}):g.jsxs("div",{className:"flex overflow-hidden flex-col w-full h-screen bg-gray-50",children:[g.jsx(kAe,{title:"Train Your Agent",onDeploy:y,onCancel:S}),g.jsxs("div",{className:"flex overflow-hidden flex-1 w-full h-full",children:[g.jsx(Z7e,{}),g.jsx("div",{className:"flex-1 min-w-0",children:g.jsx(jXe,{activeTab:b,setActiveTab:v,navigate:t})})]}),g.jsx(AAe,{open:l,onClose:()=>c(!1)}),g.jsx(si,{open:u,onOpenChange:f,children:g.jsxs(oi,{className:"sm:max-w-md",showCloseButton:!1,children:[g.jsxs("div",{className:"grid grid-cols-[1fr_max-content] items-center",children:[g.jsx("div",{className:"bg-[#FEF0C7] p-2 rounded-full max-w-max",children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[g.jsx("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"#F79009","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),g.jsx("path",{d:"M9 9C9 5.49997 14.5 5.5 14.5 9C14.5 11.5 12 10.9999 12 13.9999",stroke:"#F79009","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),g.jsx("path",{d:"M12 18.01L12.01 17.9989",stroke:"#F79009","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})}),g.jsx(jm,{className:"text-gray-700 cursor-pointer",onClick:()=>f(!1)})]}),g.jsxs(e0,{className:"flex flex-col gap-2",children:[g.jsx("div",{className:"text-lg font-semibold text-gray-900",children:"Save to your agents before close?"}),g.jsx("div",{className:"mb-4 text-sm text-gray-600",children:"You haven’t made any changes. If you close now, the agent will not be saved to your agents."})]}),g.jsxs(C0,{className:"grid grid-cols-2 gap-2 sm:gap-2",children:[g.jsx(mt,{variant:"outline",onClick:C,disabled:p,children:"Do not save"}),g.jsx(mt,{variant:"default",onClick:_,disabled:p,children:"Save & Close"})]})]})})]})}var UXe="Label",aue=E.forwardRef((e,t)=>g.jsx(Mr.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));aue.displayName=UXe;var iue=aue;const $Xe=rx({base:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"}),nd=E.forwardRef(({className:e,...t},r)=>g.jsx(iue,{ref:r,className:ut($Xe(),e),...t}));nd.displayName=iue.displayName;function HXe({isOpen:e,onClose:t,onCreateFolder:r,currentPath:n="/"}){const[a,i]=E.useState(""),[s,o]=E.useState(null),l=f=>{if(f.preventDefault(),!a.trim()){o("Folder name is required");return}if(a.includes("/")||a.includes("\\")){o("Folder name cannot contain slashes");return}if(a.length>255){o("Folder name is too long");return}r(a.trim()),i(""),o(null),t()},c=()=>{i(""),o(null),t()},u=f=>{f||c()};return g.jsx(si,{open:e,onOpenChange:u,children:g.jsxs(oi,{className:"w-full max-w-md",children:[g.jsx(Pi,{children:g.jsxs(ds,{className:"flex items-center space-x-2",children:[g.jsx(zee,{className:"h-5 w-5 text-blue-500"}),g.jsx("span",{children:"Create New Folder"})]})}),g.jsxs("form",{onSubmit:l,className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx(nd,{htmlFor:"folderName",className:"text-sm font-medium text-gray-700",children:"Folder Name"}),g.jsx(Bl,{id:"folderName",type:"text",value:a,onChange:f=>{i(f.target.value),o(null)},placeholder:"Enter folder name",className:"mt-1",autoFocus:!0}),s&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:s})]}),g.jsxs("div",{children:[g.jsx(nd,{className:"text-sm font-medium text-gray-700",children:"Location"}),g.jsx("p",{className:"mt-1 text-sm text-gray-500",children:n})]}),g.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[g.jsx(mt,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),g.jsx(mt,{type:"submit",children:"Create Folder"})]})]})]})})}const c8=E.forwardRef(({className:e,...t},r)=>g.jsx("textarea",{className:ut("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));c8.displayName="Textarea";function GXe({topic:e,isOpen:t,onClose:r,onSave:n,isLoading:a=!1}){const[i,s]=E.useState(""),[o,l]=E.useState(""),[c,u]=E.useState({});E.useEffect(()=>{e&&(s(e.name),l(e.description||""),u({}))},[e]);const f=()=>{const b={};return i.trim()?i.trim().length<2?b.name="Topic name must be at least 2 characters":i.trim().length>100&&(b.name="Topic name must be less than 100 characters"):b.name="Topic name is required",o.trim().length>500&&(b.description="Description must be less than 500 characters"),u(b),Object.keys(b).length===0},p=async()=>{if(!(!e||!f()))try{await n(e.id,{name:i.trim(),description:o.trim()||""}),Fr.success("Topic has been updated successfully."),r()}catch{Fr.error("Failed to update topic. Please try again.")}},m=()=>{e&&(s(e.name),l(e.description||"")),u({}),r()};return g.jsx(si,{open:t,onOpenChange:r,children:g.jsxs(oi,{className:"sm:max-w-[425px]",children:[g.jsxs(Pi,{children:[g.jsx(ds,{children:"Edit Topic"}),g.jsx(e0,{children:"Update the topic name and description. Click save when you're done."})]}),g.jsxs("div",{className:"grid gap-4 py-4",children:[g.jsxs("div",{className:"grid gap-2",children:[g.jsx(nd,{htmlFor:"name",children:"Name"}),g.jsx(Bl,{id:"name",value:i,onChange:b=>s(b.target.value),placeholder:"Enter topic name",className:c.name?"border-red-500":""}),c.name&&g.jsx("p",{className:"text-sm text-red-500",children:c.name})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(nd,{htmlFor:"description",children:"Description"}),g.jsx(c8,{id:"description",value:o,onChange:b=>l(b.target.value),placeholder:"Enter topic description (optional)",rows:3,className:c.description?"border-red-500":""}),c.description&&g.jsx("p",{className:"text-sm text-red-500",children:c.description})]})]}),g.jsxs(C0,{children:[g.jsx(mt,{variant:"outline",onClick:m,disabled:a,children:"Cancel"}),g.jsx(mt,{onClick:p,disabled:a,children:a?"Saving...":"Save Changes"})]})]})})}function VXe({document:e,topics:t,isOpen:r,onClose:n,onSave:a,isLoading:i=!1}){const[s,o]=E.useState(""),[l,c]=E.useState(""),[u,f]=E.useState({});E.useEffect(()=>{e&&(o(e.original_filename),c(e.topic_id?.toString()||""),f({}))},[e]);const p=()=>{const v={};return s.trim()?s.trim().length<1?v.filename="Document name must be at least 1 character":s.trim().length>255&&(v.filename="Document name must be less than 255 characters"):v.filename="Document name is required",f(v),Object.keys(v).length===0},m=async()=>{if(!(!e||!p()))try{const v={original_filename:s.trim()};l!==e.topic_id?.toString()&&(v.topic_id=l?parseInt(l):void 0),await a(e.id,v),Fr.success("Document has been updated successfully."),n()}catch{Fr.error("Failed to update document. Please try again.")}},b=()=>{e&&(o(e.original_filename),c(e.topic_id?.toString()||"")),f({}),n()};return g.jsx(si,{open:r,onOpenChange:n,children:g.jsxs(oi,{className:"sm:max-w-[425px]",children:[g.jsxs(Pi,{children:[g.jsx(ds,{children:"Edit Document"}),g.jsx(e0,{children:"Update the document name and topic assignment. Click save when you're done."})]}),g.jsxs("div",{className:"grid gap-4 py-4",children:[g.jsxs("div",{className:"grid gap-2",children:[g.jsx(nd,{htmlFor:"filename",children:"Document Name"}),g.jsx(Bl,{id:"filename",value:s,onChange:v=>o(v.target.value),placeholder:"Enter document name",className:u.filename?"border-red-500":""}),u.filename&&g.jsx("p",{className:"text-sm text-red-500",children:u.filename})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(nd,{htmlFor:"topic",children:"Topic (Optional)"}),g.jsxs(Fm,{children:[g.jsx(Bm,{asChild:!0,children:g.jsxs(mt,{variant:"outline",className:"justify-between",children:[l?t.find(v=>v.id.toString()===l)?.name||"Select a topic":"No Topic",g.jsx(Iee,{className:"h-4 w-4"})]})}),g.jsxs(zm,{children:[g.jsx(is,{onClick:()=>c(""),children:"No Topic"}),t.map(v=>g.jsx(is,{onClick:()=>c(v.id.toString()),children:v.name},v.id))]})]})]})]}),g.jsxs(C0,{children:[g.jsx(mt,{variant:"outline",onClick:b,disabled:i,children:"Cancel"}),g.jsx(mt,{onClick:m,disabled:i,children:i?"Saving...":"Save Changes"})]})]})})}function WXe({open:e,onClose:t,fileUrl:r,fileName:n}){const[a,i]=E.useState(null),[s,o]=E.useState(""),[l,c]=E.useState(!1),[u,f]=E.useState(null),[p,m]=E.useState("formatted");E.useEffect(()=>{e&&r&&b()},[e,r]);const b=async()=>{c(!0),f(null);try{const S=await fetch(r);if(!S.ok)throw new Error(`Failed to load file: ${S.statusText}`);const C=await S.text();o(C);try{const T=JSON.parse(C);i(T)}catch(T){console.warn("Failed to parse JSON, will show raw content:",T),i(null)}}catch(S){f(S instanceof Error?S.message:"Failed to load JSON file")}finally{c(!1)}},v=async()=>{try{const S=p==="formatted"&&a?JSON.stringify(a,null,2):s;await navigator.clipboard.writeText(S),Fr.success("JSON content copied to clipboard")}catch{Fr.error("Failed to copy content")}},y=()=>{try{const S=p==="formatted"&&a?JSON.stringify(a,null,2):s,C=new Blob([S],{type:"application/json"}),T=URL.createObjectURL(C),A=document.createElement("a");A.href=T,A.download=n||"download.json",document.body.appendChild(A),A.click(),document.body.removeChild(A),URL.revokeObjectURL(T),Fr.success("JSON file downloaded")}catch{Fr.error("Failed to download file")}},_=()=>l?g.jsx("div",{className:"flex justify-center items-center h-64",children:g.jsx("div",{className:"text-muted-foreground",children:"Loading JSON file..."})}):u?g.jsx("div",{className:"flex justify-center items-center h-64",children:g.jsxs("div",{className:"text-center text-destructive",children:[g.jsx("p",{className:"font-medium",children:"Error loading JSON file"}),g.jsx("p",{className:"mt-1 text-sm",children:u})]})}):p==="raw"?g.jsx("pre",{className:"overflow-auto p-4 h-full font-mono text-sm whitespace-pre rounded-md bg-muted",children:s||"No content"}):a?g.jsx("pre",{className:"overflow-auto p-4 h-full font-mono text-sm whitespace-pre rounded-md bg-muted",children:JSON.stringify(a,null,2)}):g.jsxs("div",{className:"flex flex-col space-y-2 h-full",children:[g.jsx("p",{className:"text-sm text-muted-foreground shrink-0",children:"Could not parse as JSON. Showing raw content:"}),g.jsx("pre",{className:"overflow-auto flex-1 p-4 font-mono text-sm whitespace-pre rounded-md bg-muted",children:s||"No content"})]});return g.jsx(si,{open:e,onOpenChange:t,children:g.jsx(oi,{className:"flex flex-col gap-0 p-0 w-screen h-screen rounded-none min-w-screen max-w-screen",showCloseButton:!1,children:g.jsxs("div",{className:"flex overflow-hidden flex-col h-full",children:[g.jsx(Pi,{className:"flex flex-row justify-between items-center p-6 border-b shrink-0",children:g.jsx(ds,{className:"text-lg font-semibold",children:n||"JSON Viewer"})}),g.jsxs("div",{className:"flex justify-between items-center p-4 border-b shrink-0 bg-background",children:[g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(mt,{variant:p==="formatted"?"default":"outline",size:"sm",onClick:()=>m("formatted"),children:"Formatted"}),g.jsx(mt,{variant:p==="raw"?"default":"outline",size:"sm",onClick:()=>m("raw"),children:"Raw"})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsxs(mt,{variant:"outline",size:"sm",onClick:v,disabled:l,children:[g.jsx(Lge,{className:"mr-2 w-4 h-4"}),"Copy"]}),g.jsxs(mt,{variant:"outline",size:"sm",onClick:y,disabled:l,children:[g.jsx(Pee,{className:"mr-2 w-4 h-4"}),"Download"]})]})]}),g.jsx("div",{className:"overflow-hidden flex-1 p-4",children:g.jsx("div",{className:"overflow-auto h-full",children:_()})})]})})})}function WM(e){if(!e)return"";const t=/^```(?:markdown|md)?\n([\s\S]*?)\n```\s*$/i,r=e.match(t);return r?r[1]:e}function KXe(e){const t=e.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","bmp","tiff","tif","pdf","docx","doc","pptx","ppt","xlsx","xls","txt","md","rtf"].includes(t)}const wy=Ys((e,t)=>({isExtractionPopupOpen:!1,selectedFile:null,showConfirmDiscard:!1,isExtracting:!1,extractionProgress:0,extractedFiles:[],currentExtractionStep:"upload",onSaveCompletedCallback:void 0,error:null,openExtractionPopup:()=>{e({isExtractionPopupOpen:!0,currentExtractionStep:"upload",error:null})},closeExtractionPopup:async()=>{const{extractedFiles:r,deleteTopicsForFiles:n,currentExtractionStep:a}=t();if(a!=="complete"){const i=r.map(s=>s.id);await n(i)}e({isExtractionPopupOpen:!1,selectedFile:null,showConfirmDiscard:!1,error:null,extractedFiles:[],extractionProgress:0,currentExtractionStep:"upload"})},setSelectedFile:r=>{e({selectedFile:r})},setShowConfirmDiscard:r=>{e({showConfirmDiscard:r})},setOnSaveCompletedCallback:r=>{e({onSaveCompletedCallback:r})},addFile:r=>{const n={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:r,original_filename:r.name,filename:r.name,file_size:r.size,mime_type:r.type,created_at:new Date().toISOString(),status:void 0};if(e(a=>({extractedFiles:[...a.extractedFiles,n],selectedFile:a.selectedFile||n})),KXe(r.name)){const a=n.id;(async()=>{let i;try{e(u=>({extractedFiles:u.extractedFiles.map(f=>f.id===a?{...f,status:"uploading"}:f)})),i=(await gt.uploadDocumentRaw(r)).id,e(u=>({extractedFiles:u.extractedFiles.map(f=>f.id===a?{...f,status:"extracting"}:f)}));const o={document_id:i,use_deep_extraction:!1},c=((await gt.deepExtract(o)).file_object?.pages||[]).map(u=>({text:WM(u.page_content),page_content:u.page_content,page_number:u.page_number}));e(u=>{const f=u.extractedFiles.map(b=>b.id===a?{...b,document_id:i,is_deep_extracted:!1,documents:c,updated_at:new Date().toISOString(),status:"ready"}:b),p=f.find(b=>b.id===a),m=u.selectedFile?.id===a?p:u.selectedFile;return{extractedFiles:f,selectedFile:m}})}catch(s){e({error:s instanceof Error?s.message:"Auto extraction failed"}),e(o=>({extractedFiles:o.extractedFiles.map(l=>l.id===a?{...l,document_id:i,status:void 0}:l)}))}})()}},removeFile:async r=>{const{deleteTopicsForFiles:n}=t();await n([r]),e(a=>({extractedFiles:a.extractedFiles.filter(i=>i.id!==r),selectedFile:a.selectedFile?.id===r?null:a.selectedFile}))},clearFiles:async()=>{const{extractedFiles:r,deleteTopicsForFiles:n}=t(),a=r.map(i=>i.id);await n(a),e({extractedFiles:[],selectedFile:null})},startExtraction:async()=>{const{extractedFiles:r}=t();if(r.length===0){e({error:"No files to extract"});return}e({isExtracting:!0,extractionProgress:0,currentExtractionStep:"extract",error:null});try{const n=r.length;let a=0;for(const i of r)try{const o=(await gt.uploadDocumentRaw(i.file)).id,c=((await gt.deepExtract({document_id:o,prompt:i.prompt,use_deep_extraction:!1})).file_object?.pages||[]).map(u=>({text:WM(u.page_content),page_content:u.page_content,page_number:u.page_number}));e(u=>{const f=u.extractedFiles.map(m=>m.id===i.id?{...m,document_id:o,is_deep_extracted:!1,documents:c,updated_at:new Date().toISOString()}:m),p=u.selectedFile?.id===i.id?f.find(m=>m.id===i.id):u.selectedFile;return{extractedFiles:f,selectedFile:p}})}catch(s){e({error:s instanceof Error?s.message:"Extraction failed for a file"})}finally{a+=1,e({extractionProgress:Math.round(a/n*100)})}e({currentExtractionStep:"review",isExtracting:!1})}catch(n){e({error:n instanceof Error?n.message:"Extraction failed",isExtracting:!1,extractionProgress:0})}},updateExtractionProgress:r=>{e({extractionProgress:r})},setExtractionStep:r=>{e({currentExtractionStep:r})},completeExtraction:()=>{e({currentExtractionStep:"complete",isExtracting:!1,extractionProgress:100})},saveAndFinish:async()=>{const{extractedFiles:r}=t(),n=r.filter(a=>(a.status==="ready"||a.documents)&&(a.is_deep_extracted||a.documents)&&a.documents&&a.documents.length>0);if(n.length===0){e({error:"No successfully extracted files to save"});return}e({isExtracting:!0,error:null,currentExtractionStep:"saving"});try{const a=n.length;let i=0;for(const s of n)try{if(!s.document_id){console.error(`No document ID found for file ${s.original_filename}`);continue}console.log(`Saving extraction data for file "${s.original_filename}" (Document ID: ${s.document_id})`);const o={original_filename:s.original_filename,extraction_date:new Date().toISOString(),total_pages:s.documents?.length||0,documents:s.documents||[]},l=await gt.saveExtractionData({original_filename:s.original_filename,extraction_results:o,source_document_id:s.document_id});console.log(`Successfully saved extraction JSON file with ID: ${l.id}`),e(c=>({extractedFiles:c.extractedFiles.map(u=>u.id===s.id?{...u,extraction_file_id:l.id}:u)})),i+=1,e({extractionProgress:Math.round(i/a*100)})}catch(o){console.error(`Error saving file ${s.original_filename}:`,o)}e({currentExtractionStep:"complete",isExtracting:!1,extractionProgress:100}),setTimeout(async()=>{const{onSaveCompletedCallback:s}=t();s&&s(),await t().closeExtractionPopup()},1e3)}catch(a){console.error("Error in saveAndFinish:",a),e({error:a instanceof Error?a.message:"Failed to save extraction results",isExtracting:!1,extractionProgress:0})}},deleteTopicsForFiles:async r=>{const{extractedFiles:n}=t(),a=n.filter(i=>r.includes(i.id)&&i.topic_id);if(a.length===0){console.log("No topics to delete for the specified files");return}console.log(`Deleting ${a.length} topics for files:`,a.map(i=>i.original_filename));for(const i of a)try{i.topic_id&&(console.log(`Deleting topic (ID: ${i.topic_id}) for file "${i.original_filename}"`),await gt.deleteTopic(i.topic_id,!0),console.log(`Successfully deleted topic for file "${i.original_filename}"`))}catch(s){console.error(`Error deleting topic for file "${i.original_filename}":`,s)}e(i=>({extractedFiles:i.extractedFiles.map(s=>r.includes(s.id)?{...s,topic_id:void 0}:s)}))},deepExtract:async(r,n=!0,a)=>{console.log("Deep extraction called:",{fileId:r,useDeepExtraction:n,prompt:a});const{extractedFiles:i}=t(),s=i.find(o=>o.id===r);if(e({error:null}),!s){console.log("File not found:",{fileId:r}),e({error:"File not found"});return}if(!s.document_id){console.log("No document ID available for file:",{fileId:r,fileName:s.original_filename}),e({error:"Document ID not available. Please try uploading the file again."});return}try{e(c=>{const u=c.extractedFiles.map(p=>p.id===r?{...p,status:"extracting"}:p),f=c.selectedFile?.id===r?{...c.selectedFile,status:"extracting"}:c.selectedFile;return{extractedFiles:u,selectedFile:f}});const l=((await gt.deepExtract({document_id:s.document_id,prompt:a,use_deep_extraction:n})).file_object?.pages||[]).map(c=>({text:WM(c.page_content),page_content:c.page_content,page_number:c.page_number}));e(c=>{const u=c.extractedFiles.map(m=>m.id===r?{...m,is_deep_extracted:!0,documents:l,updated_at:new Date().toISOString(),status:"ready"}:m),f=u.find(m=>m.id===r),p=c.selectedFile?.id===r?f:c.selectedFile;return{extractedFiles:u,selectedFile:p}})}catch(o){e({error:o?.message||"Deep extraction failed"}),e(l=>{const c=l.extractedFiles.map(f=>f.id===r?{...f,status:"ready"}:f),u=l.selectedFile?.id===r?{...l.selectedFile,status:"ready"}:l.selectedFile;return{extractedFiles:c,selectedFile:u}})}},setError:r=>{e({error:r})},clearError:()=>{e({error:null})},reset:()=>{e({isExtractionPopupOpen:!1,selectedFile:null,showConfirmDiscard:!1,isExtracting:!1,extractionProgress:0,extractedFiles:[],currentExtractionStep:"upload",error:null})}})),XXe=`
  .react-pdf__Page__textContent {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }

  .react-pdf__Page__textContent--hidden {
    opacity: 0.2;
  }

  .react-pdf__Page__annotations {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }

  .react-pdf__Page__annotations--hidden {
    opacity: 0.2;
  }

  .react-pdf__Page__textContent,
  .react-pdf__Page__annotations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.2;
    line-height: 1.0;
  }

  .react-pdf__Page__textContent:hover,
  .react-pdf__Page__annotations:hover {
    opacity: 1;
  }

  .react-pdf__Page__textContent span,
  .react-pdf__Page__annotations span {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
  }

  .react-pdf__Page__textContent span:hover,
  .react-pdf__Page__annotations span:hover {
    color: rgba(0, 0, 0, 0.8);
  }
`;if(typeof document<"u"&&!document.getElementById("react-pdf-styles")){const t=document.createElement("style");t.id="react-pdf-styles",t.textContent=XXe,document.head.appendChild(t)}_l.workerSrc=new URL("/static/static/pdf.worker.min--PgD6g2g.mjs",import.meta.url).toString();const YXe={cMapUrl:`https://unpkg.com/pdfjs-dist@${gy}/cmaps/`,cMapPacked:!0},jQ=2,ZXe=({blobUrl:e,currentPage:t,setCurrentPage:r})=>{const[n,a]=E.useState(0),[i,s]=E.useState(new Set([1])),[o,l]=E.useState(null),[c,u]=E.useState(450),f=E.useRef(null),p=E.useRef(new Map),m=E.useRef(null),b=E.useRef(null),[v,y]=E.useState(1),_=E.useRef(t),S=E.useCallback(()=>{if(!f.current)return;const N=f.current.clientWidth,L=Math.max(300,Math.min(N*.9,800));Math.abs(L-c)>10&&u(L)},[c]),C=E.useCallback(()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{S()},100)},[S]),T=E.useCallback(()=>{if(!f.current||n===0)return;const L=f.current.getBoundingClientRect(),I=L.top,P=L.bottom;let H=n,B=1,K=1,j=0;for(let Y=1;Y<=n;Y++){const z=p.current.get(Y);if(z){const M=z.getBoundingClientRect(),Q=Math.max(M.top,I),q=Math.min(M.bottom,P),F=Math.max(0,q-Q);M.bottom>I&&M.top<P&&(H=Math.min(H,Y),B=Math.max(B,Y),F>j&&(j=F,K=Y))}}if(H>B)return;const W=Math.max(1,H-jQ),D=Math.min(n,B+jQ),U=new Set;for(let Y=W;Y<=D;Y++)U.add(Y);(U.size!==i.size||[...U].some(Y=>!i.has(Y)))&&s(U),K!==v&&(y(K),t!==K&&t===_.current&&(r(K),_.current=K))},[n,i,v,t,r]),A=N=>{if(!N||typeof N.numPages!="number"||isNaN(N.numPages)||N.numPages<1){l("Failed to load PDF: Invalid document"),a(0),s(new Set([1])),y(1);return}a(N.numPages);const L=new Set;for(let I=1;I<=Math.min(3,N.numPages);I++)L.add(I);s(L),l(null),y(1)},k=N=>{l(N?.message?`Failed to load PDF: ${N.message}`:"Failed to load PDF"),a(0),s(new Set([1])),y(1)};return E.useEffect(()=>{const N=f.current;if(!N)return;let L;const I=()=>{L&&clearTimeout(L),L=setTimeout(T,100)};return N.addEventListener("scroll",I,{passive:!0}),setTimeout(T,100),()=>{N.removeEventListener("scroll",I),L&&clearTimeout(L)}},[T]),E.useEffect(()=>{if(f.current&&t!==v){const N=p.current.get(t);N&&i.has(t)&&N.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}),_.current=t}},[t,i]),E.useEffect(()=>{S(),window.addEventListener("resize",C);const N=new ResizeObserver(()=>{C()});return f.current&&N.observe(f.current),()=>{window.removeEventListener("resize",C),N.disconnect(),m.current&&clearTimeout(m.current),b.current&&clearTimeout(b.current)}},[S,C]),e?o?g.jsx("div",{className:"flex flex-col gap-4 justify-center items-center p-8 h-full text-red-500",children:g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"font-medium",children:"Error Loading PDF"}),g.jsx("p",{className:"text-sm",children:o})]})}):g.jsx("div",{className:"flex overflow-auto flex-col items-center w-full transition-all duration-200 ease-in-out scrollbar-hide",ref:f,style:{scrollBehavior:"smooth"},children:g.jsx(W6,{className:"w-full transition-all duration-200 ease-in-out",options:YXe,file:e,onLoadSuccess:A,onLoadError:k,error:g.jsx("div",{className:"flex flex-col gap-4 justify-center items-center p-8 text-red-500",children:g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"font-medium",children:"Error Loading PDF"}),g.jsx("p",{className:"text-sm",children:"Failed to load PDF"})]})}),loading:g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center p-8 text-gray-500",children:[g.jsx(jc,{className:"animate-spin size-8"}),g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"font-medium",children:"Loading PDF"}),g.jsx("p",{className:"text-sm",children:"Please wait while the document loads..."})]})]}),children:typeof n=="number"&&n>0?Array.from({length:n}).map((N,L)=>{const I=L+1,P=i.has(I),H=c*11/8.5;return g.jsx("div",{ref:B=>{B?p.current.set(I,B):p.current.delete(I)},id:`page-${I}`,"data-page-number":I,className:"flex my-1 w-full border-b border-gray-200 transition-all ease-in-out",style:{minHeight:P?"auto":H,maxHeight:P?"auto":H,width:c},children:P?g.jsx("div",{className:"transition-all ease-in-out",children:g.jsx(K6,{pageNumber:I,width:c,renderMode:"canvas",renderTextLayer:!0,renderAnnotationLayer:!0})}):g.jsx("div",{className:"flex justify-center items-center bg-gray-100 rounded transition-all ease-in-out",style:{height:H,width:c},children:g.jsxs("div",{className:"text-sm text-gray-400",children:["Page ",I]})})},I)}):null})}):g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center p-8 h-full text-gray-500",children:[g.jsx(jc,{className:"animate-spin size-8"}),g.jsx("div",{className:"text-center",children:g.jsx("p",{className:"font-medium",children:"Preparing PDF..."})})]})};/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var sue=1252,QXe=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],u8={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},d8=function(e){QXe.indexOf(e)!=-1&&(sue=u8[0]=e)};function JXe(){d8(1252)}var Ls=function(e){d8(e)};function oue(){Ls(1200),JXe()}function qQ(e){for(var t=[],r=0,n=e.length;r<n;++r)t[r]=e.charCodeAt(r);return t}function eYe(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return t.join("")}function lue(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var gp=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return t==255&&r==254?eYe(e.slice(2)):t==254&&r==255?lue(e.slice(2)):t==65279?e.slice(1):e},T1=function(t){return String.fromCharCode(t)},UQ=function(t){return String.fromCharCode(t)},pm,Dc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function $Q(e){for(var t="",r=0,n=0,a=0,i=0,s=0,o=0,l=0,c=0;c<e.length;)r=e.charCodeAt(c++),i=r>>2,n=e.charCodeAt(c++),s=(r&3)<<4|n>>4,a=e.charCodeAt(c++),o=(n&15)<<2|a>>6,l=a&63,isNaN(n)?o=l=64:isNaN(a)&&(l=64),t+=Dc.charAt(i)+Dc.charAt(s)+Dc.charAt(o)+Dc.charAt(l);return t}function zi(e){var t="",r=0,n=0,a=0,i=0,s=0,o=0,l=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var c=0;c<e.length;)i=Dc.indexOf(e.charAt(c++)),s=Dc.indexOf(e.charAt(c++)),r=i<<2|s>>4,t+=String.fromCharCode(r),o=Dc.indexOf(e.charAt(c++)),n=(s&15)<<4|o>>2,o!==64&&(t+=String.fromCharCode(n)),l=Dc.indexOf(e.charAt(c++)),a=(o&3)<<6|l,l!==64&&(t+=String.fromCharCode(a));return t}var gr=(function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node})(),yd=(function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,r){return r?new Buffer(t,r):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}})();function Kc(e){return gr?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function HQ(e){return gr?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Is=function(t){return gr?yd(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)&255})};function _d(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function f8(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return f8(new Uint8Array(e));for(var t=new Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t}var Tc=gr?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:yd(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,r=0;for(t=0;t<e.length;++t)r+=e[t].length;var n=new Uint8Array(r),a=0;for(t=0,r=0;t<e.length;r+=a,++t)if(a=e[t].length,e[t]instanceof Uint8Array)n.set(e[t],r);else{if(typeof e[t]=="string")throw"wtf";n.set(new Uint8Array(e[t]),r)}return n}return[].concat.apply([],e.map(function(i){return Array.isArray(i)?i:[].slice.call(i)}))};function tYe(e){for(var t=[],r=0,n=e.length+250,a=Kc(e.length+255),i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s<128)a[r++]=s;else if(s<2048)a[r++]=192|s>>6&31,a[r++]=128|s&63;else if(s>=55296&&s<57344){s=(s&1023)+64;var o=e.charCodeAt(++i)&1023;a[r++]=240|s>>8&7,a[r++]=128|s>>2&63,a[r++]=128|o>>6&15|(s&3)<<4,a[r++]=128|o&63}else a[r++]=224|s>>12&15,a[r++]=128|s>>6&63,a[r++]=128|s&63;r>n&&(t.push(a.slice(0,r)),r=0,a=Kc(65535),n=65530)}return t.push(a.slice(0,r)),Tc(t)}var Fa=/\u0000/g,vp=/[\u0001-\u0006]/g;function Gf(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function Ps(e,t){var r=""+e;return r.length>=t?r:dn("0",t-r.length)+r}function h8(e,t){var r=""+e;return r.length>=t?r:dn(" ",t-r.length)+r}function zb(e,t){var r=""+e;return r.length>=t?r:r+dn(" ",t-r.length)}function rYe(e,t){var r=""+Math.round(e);return r.length>=t?r:dn("0",t-r.length)+r}function nYe(e,t){var r=""+e;return r.length>=t?r:dn("0",t-r.length)+r}var GQ=Math.pow(2,32);function _f(e,t){if(e>GQ||e<-GQ)return rYe(e,t);var r=Math.round(e);return nYe(r,t)}function jb(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var VQ=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],KM=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function aYe(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var Yt={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},WQ={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},iYe={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function qb(e,t,r){for(var n=e<0?-1:1,a=e*n,i=0,s=1,o=0,l=1,c=0,u=0,f=Math.floor(a);c<t&&(f=Math.floor(a),o=f*s+i,u=f*c+l,!(a-f<5e-8));)a=1/(a-f),i=s,s=o,l=c,c=u;if(u>t&&(c>t?(u=l,o=i):(u=c,o=s)),!r)return[0,n*o,u];var p=Math.floor(n*o/u);return[p,n*o-p*u,u]}function Bu(e,t,r){if(e>2958465||e<0)return null;var n=e|0,a=Math.floor(86400*(e-n)),i=0,s=[],o={D:n,T:a,u:86400*(e-n)-a,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(o.u)<1e-6&&(o.u=0),t&&t.date1904&&(n+=1462),o.u>.9999&&(o.u=0,++a==86400&&(o.T=a=0,++n,++o.D)),n===60)s=r?[1317,10,29]:[1900,2,29],i=3;else if(n===0)s=r?[1317,8,29]:[1900,1,0],i=6;else{n>60&&--n;var l=new Date(1900,0,1);l.setDate(l.getDate()+n-1),s=[l.getFullYear(),l.getMonth()+1,l.getDate()],i=l.getDay(),n<60&&(i=(i+6)%7),r&&(i=dYe(l,s))}return o.y=s[0],o.m=s[1],o.d=s[2],o.S=a%60,a=Math.floor(a/60),o.M=a%60,a=Math.floor(a/60),o.H=a,o.q=i,o}var cue=new Date(1899,11,31,0,0,0),sYe=cue.getTime(),oYe=new Date(1900,2,1,0,0,0);function uue(e,t){var r=e.getTime();return t?r-=1461*24*60*60*1e3:e>=oYe&&(r+=1440*60*1e3),(r-(sYe+(e.getTimezoneOffset()-cue.getTimezoneOffset())*6e4))/(1440*60*1e3)}function p8(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function lYe(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function cYe(e){var t=e<0?12:11,r=p8(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10),r.length<=t)?r:e.toExponential(5)}function uYe(e){var t=p8(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function mm(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return t>=-4&&t<=-1?r=e.toPrecision(10+t):Math.abs(t)<=9?r=cYe(e):t===10?r=e.toFixed(10).substr(0,12):r=uYe(e),p8(lYe(r.toUpperCase()))}function ad(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):mm(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return ms(14,uue(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function dYe(e,t){t[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function fYe(e,t,r,n){var a="",i=0,s=0,o=r.y,l,c=0;switch(e){case 98:o=r.y+543;case 121:switch(t.length){case 1:case 2:l=o%100,c=2;break;default:l=o%1e4,c=4;break}break;case 109:switch(t.length){case 1:case 2:l=r.m,c=t.length;break;case 3:return KM[r.m-1][1];case 5:return KM[r.m-1][0];default:return KM[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:l=r.d,c=t.length;break;case 3:return VQ[r.q][0];default:return VQ[r.q][1]}break;case 104:switch(t.length){case 1:case 2:l=1+(r.H+11)%12,c=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:l=r.H,c=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:l=r.M,c=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return r.u===0&&(t=="s"||t=="ss")?Ps(r.S,t.length):(n>=2?s=n===3?1e3:100:s=n===1?10:1,i=Math.round(s*(r.S+r.u)),i>=60*s&&(i=0),t==="s"?i===0?"0":""+i/s:(a=Ps(i,2+n),t==="ss"?a.substr(0,2):"."+a.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":l=r.D*24+r.H;break;case"[m]":case"[mm]":l=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":l=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}c=t.length===3?1:2;break;case 101:l=o,c=1;break}var u=c>0?Ps(l,c):"";return u}function Oc(e){var t=3;if(e.length<=t)return e;for(var r=e.length%t,n=e.substr(0,r);r!=e.length;r+=t)n+=(n.length>0?",":"")+e.substr(r,t);return n}var due=/%/g;function hYe(e,t,r){var n=t.replace(due,""),a=t.length-n.length;return wl(e,n,r*Math.pow(10,2*a))+dn("%",a)}function pYe(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return wl(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function fue(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+fue(e,-t);var a=e.indexOf(".");a===-1&&(a=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%a;if(i<0&&(i+=a),r=(t/Math.pow(10,i)).toPrecision(n+1+(a+i)%a),r.indexOf("e")===-1){var s=Math.floor(Math.log(t)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,a)+"."+r.substr(2+a),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,l,c,u){return l+c+u.substr(0,(a+i)%a)+"."+u.substr(i)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var hue=/# (\?+)( ?)\/( ?)(\d+)/;function mYe(e,t,r){var n=parseInt(e[4],10),a=Math.round(t*n),i=Math.floor(a/n),s=a-i*n,o=n;return r+(i===0?"":""+i)+" "+(s===0?dn(" ",e[1].length+1+e[4].length):h8(s,e[1].length)+e[2]+"/"+e[3]+Ps(o,e[4].length))}function gYe(e,t,r){return r+(t===0?"":""+t)+dn(" ",e[1].length+2+e[4].length)}var pue=/^#*0*\.([0#]+)/,mue=/\).*[0#]/,gue=/\(###\) ###\\?-####/;function Ma(e){for(var t="",r,n=0;n!=e.length;++n)switch(r=e.charCodeAt(n)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(r)}return t}function KQ(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function XQ(e,t){var r=e-Math.floor(e),n=Math.pow(10,t);return t<(""+Math.round(r*n)).length?0:Math.round(r*n)}function vYe(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function bYe(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function ts(e,t,r){if(e.charCodeAt(0)===40&&!t.match(mue)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?ts("n",n,r):"("+ts("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return pYe(e,t,r);if(t.indexOf("%")!==-1)return hYe(e,t,r);if(t.indexOf("E")!==-1)return fue(t,r);if(t.charCodeAt(0)===36)return"$"+ts(e,t.substr(t.charAt(1)==" "?2:1),r);var a,i,s,o,l=Math.abs(r),c=r<0?"-":"";if(t.match(/^00+$/))return c+_f(l,t.length);if(t.match(/^[#?]+$/))return a=_f(r,0),a==="0"&&(a=""),a.length>t.length?a:Ma(t.substr(0,t.length-a.length))+a;if(i=t.match(hue))return mYe(i,l,c);if(t.match(/^#+0+$/))return c+_f(l,t.length-t.indexOf("0"));if(i=t.match(pue))return a=KQ(r,i[1].length).replace(/^([^\.]+)$/,"$1."+Ma(i[1])).replace(/\.$/,"."+Ma(i[1])).replace(/\.(\d*)$/,function(b,v){return"."+v+dn("0",Ma(i[1]).length-v.length)}),t.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return c+KQ(l,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return c+Oc(_f(l,0));if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+ts(e,t,-r):Oc(""+(Math.floor(r)+vYe(r,i[1].length)))+"."+Ps(XQ(r,i[1].length),i[1].length);if(i=t.match(/^#,#*,#0/))return ts(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return a=Gf(ts(e,t.replace(/[\\-]/g,""),r)),s=0,Gf(Gf(t.replace(/\\/g,"")).replace(/[0#]/g,function(b){return s<a.length?a.charAt(s++):b==="0"?"0":""}));if(t.match(gue))return a=ts(e,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var u="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),o=qb(l,Math.pow(10,s)-1,!1),a=""+c,u=wl("n",i[1],o[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),a+=u+i[2]+"/"+i[3],u=zb(o[2],s),u.length<i[4].length&&(u=Ma(i[4].substr(i[4].length-u.length))+u),a+=u,a;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),o=qb(l,Math.pow(10,s)-1,!0),c+(o[0]||(o[1]?"":"0"))+" "+(o[1]?h8(o[1],s)+i[2]+"/"+i[3]+zb(o[2],s):dn(" ",2*s+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return a=_f(r,0),t.length<=a.length?a:Ma(t.substr(0,t.length-a.length))+a;if(i=t.match(/^([#0?]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=a.indexOf(".");var f=t.indexOf(".")-s,p=t.length-a.length-f;return Ma(t.substr(0,f)+a+t.substr(t.length-p))}if(i=t.match(/^00,000\.([#0]*0)$/))return s=XQ(r,i[1].length),r<0?"-"+ts(e,t,-r):Oc(bYe(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(b){return"00,"+(b.length<3?Ps(0,3-b.length):"")+b})+"."+Ps(s,i[1].length);switch(t){case"###,##0.00":return ts(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var m=Oc(_f(l,0));return m!=="0"?c+m:"";case"###,###.00":return ts(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return ts(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function xYe(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return wl(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function yYe(e,t,r){var n=t.replace(due,""),a=t.length-n.length;return wl(e,n,r*Math.pow(10,2*a))+dn("%",a)}function vue(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+vue(e,-t);var a=e.indexOf(".");a===-1&&(a=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%a;if(i<0&&(i+=a),r=(t/Math.pow(10,i)).toPrecision(n+1+(a+i)%a),!r.match(/[Ee]/)){var s=Math.floor(Math.log(t)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,l,c,u){return l+c+u.substr(0,(a+i)%a)+"."+u.substr(i)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function ho(e,t,r){if(e.charCodeAt(0)===40&&!t.match(mue)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?ho("n",n,r):"("+ho("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return xYe(e,t,r);if(t.indexOf("%")!==-1)return yYe(e,t,r);if(t.indexOf("E")!==-1)return vue(t,r);if(t.charCodeAt(0)===36)return"$"+ho(e,t.substr(t.charAt(1)==" "?2:1),r);var a,i,s,o,l=Math.abs(r),c=r<0?"-":"";if(t.match(/^00+$/))return c+Ps(l,t.length);if(t.match(/^[#?]+$/))return a=""+r,r===0&&(a=""),a.length>t.length?a:Ma(t.substr(0,t.length-a.length))+a;if(i=t.match(hue))return gYe(i,l,c);if(t.match(/^#+0+$/))return c+Ps(l,t.length-t.indexOf("0"));if(i=t.match(pue))return a=(""+r).replace(/^([^\.]+)$/,"$1."+Ma(i[1])).replace(/\.$/,"."+Ma(i[1])),a=a.replace(/\.(\d*)$/,function(b,v){return"."+v+dn("0",Ma(i[1]).length-v.length)}),t.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return c+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return c+Oc(""+l);if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+ho(e,t,-r):Oc(""+r)+"."+dn("0",i[1].length);if(i=t.match(/^#,#*,#0/))return ho(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return a=Gf(ho(e,t.replace(/[\\-]/g,""),r)),s=0,Gf(Gf(t.replace(/\\/g,"")).replace(/[0#]/g,function(b){return s<a.length?a.charAt(s++):b==="0"?"0":""}));if(t.match(gue))return a=ho(e,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var u="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),o=qb(l,Math.pow(10,s)-1,!1),a=""+c,u=wl("n",i[1],o[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),a+=u+i[2]+"/"+i[3],u=zb(o[2],s),u.length<i[4].length&&(u=Ma(i[4].substr(i[4].length-u.length))+u),a+=u,a;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),o=qb(l,Math.pow(10,s)-1,!0),c+(o[0]||(o[1]?"":"0"))+" "+(o[1]?h8(o[1],s)+i[2]+"/"+i[3]+zb(o[2],s):dn(" ",2*s+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return a=""+r,t.length<=a.length?a:Ma(t.substr(0,t.length-a.length))+a;if(i=t.match(/^([#0]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=a.indexOf(".");var f=t.indexOf(".")-s,p=t.length-a.length-f;return Ma(t.substr(0,f)+a+t.substr(t.length-p))}if(i=t.match(/^00,000\.([#0]*0)$/))return r<0?"-"+ho(e,t,-r):Oc(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(b){return"00,"+(b.length<3?Ps(0,3-b.length):"")+b})+"."+Ps(0,i[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=Oc(""+l);return m!=="0"?c+m:"";default:if(t.match(/\.[0#?]*$/))return ho(e,t.slice(0,t.lastIndexOf(".")),r)+Ma(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function wl(e,t,r){return(r|0)===r?ho(e,t,r):ts(e,t,r)}function _Ye(e){for(var t=[],r=!1,n=0,a=0;n<e.length;++n)switch(e.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:t[t.length]=e.substr(a,n-a),a=n+1}if(t[t.length]=e.substr(a),r===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var bue=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function P0(e){for(var t=0,r="",n="";t<e.length;)switch(r=e.charAt(t)){case"G":jb(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(n=r;e.charAt(t++)!=="]"&&t<e.length;)n+=e.charAt(t);if(n.match(bue))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++t))>-1||r=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===r;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function wYe(e,t,r,n){for(var a=[],i="",s=0,o="",l="t",c,u,f,p="H";s<e.length;)switch(o=e.charAt(s)){case"G":if(!jb(e,s))throw new Error("unrecognized character "+o+" in "+e);a[a.length]={t:"G",v:"General"},s+=7;break;case'"':for(i="";(f=e.charCodeAt(++s))!==34&&s<e.length;)i+=String.fromCharCode(f);a[a.length]={t:"t",v:i},++s;break;case"\\":var m=e.charAt(++s),b=m==="("||m===")"?m:"t";a[a.length]={t:b,v:m},++s;break;case"_":a[a.length]={t:"t",v:" "},s+=2;break;case"@":a[a.length]={t:"T",v:t},++s;break;case"B":case"b":if(e.charAt(s+1)==="1"||e.charAt(s+1)==="2"){if(c==null&&(c=Bu(t,r,e.charAt(s+1)==="2"),c==null))return"";a[a.length]={t:"X",v:e.substr(s,2)},l=o,s+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":o=o.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||c==null&&(c=Bu(t,r),c==null))return"";for(i=o;++s<e.length&&e.charAt(s).toLowerCase()===o;)i+=o;o==="m"&&l.toLowerCase()==="h"&&(o="M"),o==="h"&&(o=p),a[a.length]={t:o,v:i},l=o;break;case"A":case"a":case"上":var v={t:o,v:o};if(c==null&&(c=Bu(t,r)),e.substr(s,3).toUpperCase()==="A/P"?(c!=null&&(v.v=c.H>=12?"P":"A"),v.t="T",p="h",s+=3):e.substr(s,5).toUpperCase()==="AM/PM"?(c!=null&&(v.v=c.H>=12?"PM":"AM"),v.t="T",s+=5,p="h"):e.substr(s,5).toUpperCase()==="上午/下午"?(c!=null&&(v.v=c.H>=12?"下午":"上午"),v.t="T",s+=5,p="h"):(v.t="t",++s),c==null&&v.t==="T")return"";a[a.length]=v,l=o;break;case"[":for(i=o;e.charAt(s++)!=="]"&&s<e.length;)i+=e.charAt(s);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match(bue)){if(c==null&&(c=Bu(t,r),c==null))return"";a[a.length]={t:"Z",v:i.toLowerCase()},l=i.charAt(1)}else i.indexOf("$")>-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",P0(e)||(a[a.length]={t:"t",v:i}));break;case".":if(c!=null){for(i=o;++s<e.length&&(o=e.charAt(s))==="0";)i+=o;a[a.length]={t:"s",v:i};break}case"0":case"#":for(i=o;++s<e.length&&"0#?.,E+-%".indexOf(o=e.charAt(s))>-1;)i+=o;a[a.length]={t:"n",v:i};break;case"?":for(i=o;e.charAt(++s)===o;)i+=o;a[a.length]={t:o,v:i},l=o;break;case"*":++s,(e.charAt(s)==" "||e.charAt(s)=="*")&&++s;break;case"(":case")":a[a.length]={t:n===1?"t":o,v:o},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=o;s<e.length&&"0123456789".indexOf(e.charAt(++s))>-1;)i+=e.charAt(s);a[a.length]={t:"D",v:i};break;case" ":a[a.length]={t:o,v:o},++s;break;case"$":a[a.length]={t:"t",v:"$"},++s;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(o)===-1)throw new Error("unrecognized character "+o+" in "+e);a[a.length]={t:"t",v:o},++s;break}var y=0,_=0,S;for(s=a.length-1,l="t";s>=0;--s)switch(a[s].t){case"h":case"H":a[s].t=p,l="h",y<1&&(y=1);break;case"s":(S=a[s].v.match(/\.0+$/))&&(_=Math.max(_,S[0].length-1)),y<3&&(y=3);case"d":case"y":case"M":case"e":l=a[s].t;break;case"m":l==="s"&&(a[s].t="M",y<2&&(y=2));break;case"X":break;case"Z":y<1&&a[s].v.match(/[Hh]/)&&(y=1),y<2&&a[s].v.match(/[Mm]/)&&(y=2),y<3&&a[s].v.match(/[Ss]/)&&(y=3)}switch(y){case 0:break;case 1:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M),c.M>=60&&(c.M=0,++c.H);break;case 2:c.u>=.5&&(c.u=0,++c.S),c.S>=60&&(c.S=0,++c.M);break}var C="",T;for(s=0;s<a.length;++s)switch(a[s].t){case"t":case"T":case" ":case"D":break;case"X":a[s].v="",a[s].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":a[s].v=fYe(a[s].t.charCodeAt(0),a[s].v,c,_),a[s].t="t";break;case"n":case"?":for(T=s+1;a[T]!=null&&((o=a[T].t)==="?"||o==="D"||(o===" "||o==="t")&&a[T+1]!=null&&(a[T+1].t==="?"||a[T+1].t==="t"&&a[T+1].v==="/")||a[s].t==="("&&(o===" "||o==="n"||o===")")||o==="t"&&(a[T].v==="/"||a[T].v===" "&&a[T+1]!=null&&a[T+1].t=="?"));)a[s].v+=a[T].v,a[T]={v:"",t:";"},++T;C+=a[s].v,s=T-1;break;case"G":a[s].t="t",a[s].v=ad(t,r);break}var A="",k,N;if(C.length>0){C.charCodeAt(0)==40?(k=t<0&&C.charCodeAt(0)===45?-t:t,N=wl("n",C,k)):(k=t<0&&n>1?-t:t,N=wl("n",C,k),k<0&&a[0]&&a[0].t=="t"&&(N=N.substr(1),a[0].v="-"+a[0].v)),T=N.length-1;var L=a.length;for(s=0;s<a.length;++s)if(a[s]!=null&&a[s].t!="t"&&a[s].v.indexOf(".")>-1){L=s;break}var I=a.length;if(L===a.length&&N.indexOf("E")===-1){for(s=a.length-1;s>=0;--s)a[s]==null||"n?".indexOf(a[s].t)===-1||(T>=a[s].v.length-1?(T-=a[s].v.length,a[s].v=N.substr(T+1,a[s].v.length)):T<0?a[s].v="":(a[s].v=N.substr(0,T+1),T=-1),a[s].t="t",I=s);T>=0&&I<a.length&&(a[I].v=N.substr(0,T+1)+a[I].v)}else if(L!==a.length&&N.indexOf("E")===-1){for(T=N.indexOf(".")-1,s=L;s>=0;--s)if(!(a[s]==null||"n?".indexOf(a[s].t)===-1)){for(u=a[s].v.indexOf(".")>-1&&s===L?a[s].v.indexOf(".")-1:a[s].v.length-1,A=a[s].v.substr(u+1);u>=0;--u)T>=0&&(a[s].v.charAt(u)==="0"||a[s].v.charAt(u)==="#")&&(A=N.charAt(T--)+A);a[s].v=A,a[s].t="t",I=s}for(T>=0&&I<a.length&&(a[I].v=N.substr(0,T+1)+a[I].v),T=N.indexOf(".")+1,s=L;s<a.length;++s)if(!(a[s]==null||"n?(".indexOf(a[s].t)===-1&&s!==L)){for(u=a[s].v.indexOf(".")>-1&&s===L?a[s].v.indexOf(".")+1:0,A=a[s].v.substr(0,u);u<a[s].v.length;++u)T<N.length&&(A+=N.charAt(T++));a[s].v=A,a[s].t="t",I=s}}}for(s=0;s<a.length;++s)a[s]!=null&&"n?".indexOf(a[s].t)>-1&&(k=n>1&&t<0&&s>0&&a[s-1].v==="-"?-t:t,a[s].v=wl(a[s].t,a[s].v,k),a[s].t="t");var P="";for(s=0;s!==a.length;++s)a[s]!=null&&(P+=a[s].v);return P}var YQ=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function ZQ(e,t){if(t==null)return!1;var r=parseFloat(t[2]);switch(t[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function EYe(e,t){var r=_Ye(e),n=r.length,a=r[n-1].indexOf("@");if(n<4&&a>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof t!="number")return[4,r.length===4||a>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=a>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=a>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=a>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var i=t>0?r[0]:t<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,i];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var s=r[0].match(YQ),o=r[1].match(YQ);return ZQ(t,s)?[n,r[0]]:ZQ(t,o)?[n,r[1]]:[n,r[s!=null&&o!=null?2:1]]}return[n,i]}function ms(e,t,r){r==null&&(r={});var n="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?n=r.dateNF:n=e;break;case"number":e==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:Yt)[e],n==null&&(n=r.table&&r.table[WQ[e]]||Yt[WQ[e]]),n==null&&(n=iYe[e]||"General");break}if(jb(n,0))return ad(t,r);t instanceof Date&&(t=uue(t,r.date1904));var a=EYe(n,t);if(jb(a[1]))return ad(t,r);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return wYe(a[1],t,r,a[0])}function Hu(e,t){if(typeof t!="number"){t=+t||-1;for(var r=0;r<392;++r){if(Yt[r]==null){t<0&&(t=r);continue}if(Yt[r]==e){t=r;break}}t<0&&(t=391)}return Yt[t]=e,t}function xue(){Yt=aYe()}var SYe={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},yue=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function CYe(e){var t=typeof e=="number"?Yt[e]:e;return t=t.replace(yue,"(\\d+)"),new RegExp("^"+t+"$")}function TYe(e,t,r){var n=-1,a=-1,i=-1,s=-1,o=-1,l=-1;(t.match(yue)||[]).forEach(function(f,p){var m=parseInt(r[p+1],10);switch(f.toLowerCase().charAt(0)){case"y":n=m;break;case"d":i=m;break;case"h":s=m;break;case"s":l=m;break;case"m":s>=0?o=m:a=m;break}}),l>=0&&o==-1&&a>=0&&(o=a,a=-1);var c=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(a>=1?a:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);c.length==7&&(c="0"+c),c.length==8&&(c="20"+c);var u=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return s==-1&&o==-1&&l==-1?c:n==-1&&a==-1&&i==-1?u:c+"T"+u}var AYe=(function(){var e={};e.version="1.2.0";function t(){for(var N=0,L=new Array(256),I=0;I!=256;++I)N=I,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,L[I]=N;return typeof Int32Array<"u"?new Int32Array(L):L}var r=t();function n(N){var L=0,I=0,P=0,H=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(P=0;P!=256;++P)H[P]=N[P];for(P=0;P!=256;++P)for(I=N[P],L=256+P;L<4096;L+=256)I=H[L]=I>>>8^N[I&255];var B=[];for(P=1;P!=16;++P)B[P-1]=typeof Int32Array<"u"?H.subarray(P*256,P*256+256):H.slice(P*256,P*256+256);return B}var a=n(r),i=a[0],s=a[1],o=a[2],l=a[3],c=a[4],u=a[5],f=a[6],p=a[7],m=a[8],b=a[9],v=a[10],y=a[11],_=a[12],S=a[13],C=a[14];function T(N,L){for(var I=L^-1,P=0,H=N.length;P<H;)I=I>>>8^r[(I^N.charCodeAt(P++))&255];return~I}function A(N,L){for(var I=L^-1,P=N.length-15,H=0;H<P;)I=C[N[H++]^I&255]^S[N[H++]^I>>8&255]^_[N[H++]^I>>16&255]^y[N[H++]^I>>>24]^v[N[H++]]^b[N[H++]]^m[N[H++]]^p[N[H++]]^f[N[H++]]^u[N[H++]]^c[N[H++]]^l[N[H++]]^o[N[H++]]^s[N[H++]]^i[N[H++]]^r[N[H++]];for(P+=15;H<P;)I=I>>>8^r[(I^N[H++])&255];return~I}function k(N,L){for(var I=L^-1,P=0,H=N.length,B=0,K=0;P<H;)B=N.charCodeAt(P++),B<128?I=I>>>8^r[(I^B)&255]:B<2048?(I=I>>>8^r[(I^(192|B>>6&31))&255],I=I>>>8^r[(I^(128|B&63))&255]):B>=55296&&B<57344?(B=(B&1023)+64,K=N.charCodeAt(P++)&1023,I=I>>>8^r[(I^(240|B>>8&7))&255],I=I>>>8^r[(I^(128|B>>2&63))&255],I=I>>>8^r[(I^(128|K>>6&15|(B&3)<<4))&255],I=I>>>8^r[(I^(128|K&63))&255]):(I=I>>>8^r[(I^(224|B>>12&15))&255],I=I>>>8^r[(I^(128|B>>6&63))&255],I=I>>>8^r[(I^(128|B&63))&255]);return~I}return e.table=r,e.bstr=T,e.buf=A,e.str=k,e})(),br=(function(){var t={};t.version="1.2.1";function r(ne,de){for(var le=ne.split("/"),ce=de.split("/"),ue=0,fe=0,Oe=Math.min(le.length,ce.length);ue<Oe;++ue){if(fe=le[ue].length-ce[ue].length)return fe;if(le[ue]!=ce[ue])return le[ue]<ce[ue]?-1:1}return le.length-ce.length}function n(ne){if(ne.charAt(ne.length-1)=="/")return ne.slice(0,-1).indexOf("/")===-1?ne:n(ne.slice(0,-1));var de=ne.lastIndexOf("/");return de===-1?ne:ne.slice(0,de+1)}function a(ne){if(ne.charAt(ne.length-1)=="/")return a(ne.slice(0,-1));var de=ne.lastIndexOf("/");return de===-1?ne:ne.slice(de+1)}function i(ne,de){typeof de=="string"&&(de=new Date(de));var le=de.getHours();le=le<<6|de.getMinutes(),le=le<<5|de.getSeconds()>>>1,ne.write_shift(2,le);var ce=de.getFullYear()-1980;ce=ce<<4|de.getMonth()+1,ce=ce<<5|de.getDate(),ne.write_shift(2,ce)}function s(ne){var de=ne.read_shift(2)&65535,le=ne.read_shift(2)&65535,ce=new Date,ue=le&31;le>>>=5;var fe=le&15;le>>>=4,ce.setMilliseconds(0),ce.setFullYear(le+1980),ce.setMonth(fe-1),ce.setDate(ue);var Oe=de&31;de>>>=5;var Ge=de&63;return de>>>=6,ce.setHours(de),ce.setMinutes(Ge),ce.setSeconds(Oe<<1),ce}function o(ne){la(ne,0);for(var de={},le=0;ne.l<=ne.length-4;){var ce=ne.read_shift(2),ue=ne.read_shift(2),fe=ne.l+ue,Oe={};switch(ce){case 21589:le=ne.read_shift(1),le&1&&(Oe.mtime=ne.read_shift(4)),ue>5&&(le&2&&(Oe.atime=ne.read_shift(4)),le&4&&(Oe.ctime=ne.read_shift(4))),Oe.mtime&&(Oe.mt=new Date(Oe.mtime*1e3));break}ne.l=fe,de[ce]=Oe}return de}var l;function c(){return l||(l={})}function u(ne,de){if(ne[0]==80&&ne[1]==75)return qa(ne,de);if((ne[0]|32)==109&&(ne[1]|32)==105)return na(ne,de);if(ne.length<512)throw new Error("CFB file size "+ne.length+" < 512");var le=3,ce=512,ue=0,fe=0,Oe=0,Ge=0,Te=0,Fe=[],ze=ne.slice(0,512);la(ze,0);var Qe=f(ze);switch(le=Qe[0],le){case 3:ce=512;break;case 4:ce=4096;break;case 0:if(Qe[1]==0)return qa(ne,de);default:throw new Error("Major Version: Expected 3 or 4 saw "+le)}ce!==512&&(ze=ne.slice(0,ce),la(ze,28));var ot=ne.slice(0,ce);p(ze,le);var pt=ze.read_shift(4,"i");if(le===3&&pt!==0)throw new Error("# Directory Sectors: Expected 0 saw "+pt);ze.l+=4,Oe=ze.read_shift(4,"i"),ze.l+=4,ze.chk("00100000","Mini Stream Cutoff Size: "),Ge=ze.read_shift(4,"i"),ue=ze.read_shift(4,"i"),Te=ze.read_shift(4,"i"),fe=ze.read_shift(4,"i");for(var it=-1,dt=0;dt<109&&(it=ze.read_shift(4,"i"),!(it<0));++dt)Fe[dt]=it;var Ht=m(ne,ce);y(Te,fe,Ht,ce,Fe);var Ar=S(Ht,Oe,Fe,ce);Ar[Oe].name="!Directory",ue>0&&Ge!==K&&(Ar[Ge].name="!MiniFAT"),Ar[Fe[0]].name="!FAT",Ar.fat_addrs=Fe,Ar.ssz=ce;var kr={},Or=[],Ui=[],eo=[];C(Oe,Ar,Ht,Or,ue,kr,Ui,Ge),b(Ui,eo,Or),Or.shift();var $a={FileIndex:Ui,FullPaths:eo};return de&&de.raw&&($a.raw={header:ot,sectors:Ht}),$a}function f(ne){if(ne[ne.l]==80&&ne[ne.l+1]==75)return[0,0];ne.chk(j,"Header Signature: "),ne.l+=16;var de=ne.read_shift(2,"u");return[ne.read_shift(2,"u"),de]}function p(ne,de){var le=9;switch(ne.l+=2,le=ne.read_shift(2)){case 9:if(de!=3)throw new Error("Sector Shift: Expected 9 saw "+le);break;case 12:if(de!=4)throw new Error("Sector Shift: Expected 12 saw "+le);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+le)}ne.chk("0600","Mini Sector Shift: "),ne.chk("000000000000","Reserved: ")}function m(ne,de){for(var le=Math.ceil(ne.length/de)-1,ce=[],ue=1;ue<le;++ue)ce[ue-1]=ne.slice(ue*de,(ue+1)*de);return ce[le-1]=ne.slice(le*de),ce}function b(ne,de,le){for(var ce=0,ue=0,fe=0,Oe=0,Ge=0,Te=le.length,Fe=[],ze=[];ce<Te;++ce)Fe[ce]=ze[ce]=ce,de[ce]=le[ce];for(;Ge<ze.length;++Ge)ce=ze[Ge],ue=ne[ce].L,fe=ne[ce].R,Oe=ne[ce].C,Fe[ce]===ce&&(ue!==-1&&Fe[ue]!==ue&&(Fe[ce]=Fe[ue]),fe!==-1&&Fe[fe]!==fe&&(Fe[ce]=Fe[fe])),Oe!==-1&&(Fe[Oe]=ce),ue!==-1&&ce!=Fe[ce]&&(Fe[ue]=Fe[ce],ze.lastIndexOf(ue)<Ge&&ze.push(ue)),fe!==-1&&ce!=Fe[ce]&&(Fe[fe]=Fe[ce],ze.lastIndexOf(fe)<Ge&&ze.push(fe));for(ce=1;ce<Te;++ce)Fe[ce]===ce&&(fe!==-1&&Fe[fe]!==fe?Fe[ce]=Fe[fe]:ue!==-1&&Fe[ue]!==ue&&(Fe[ce]=Fe[ue]));for(ce=1;ce<Te;++ce)if(ne[ce].type!==0){if(Ge=ce,Ge!=Fe[Ge])do Ge=Fe[Ge],de[ce]=de[Ge]+"/"+de[ce];while(Ge!==0&&Fe[Ge]!==-1&&Ge!=Fe[Ge]);Fe[ce]=-1}for(de[0]+="/",ce=1;ce<Te;++ce)ne[ce].type!==2&&(de[ce]+="/")}function v(ne,de,le){for(var ce=ne.start,ue=ne.size,fe=[],Oe=ce;le&&ue>0&&Oe>=0;)fe.push(de.slice(Oe*B,Oe*B+B)),ue-=B,Oe=Du(le,Oe*4);return fe.length===0?$n(0):Tc(fe).slice(0,ne.size)}function y(ne,de,le,ce,ue){var fe=K;if(ne===K){if(de!==0)throw new Error("DIFAT chain shorter than expected")}else if(ne!==-1){var Oe=le[ne],Ge=(ce>>>2)-1;if(!Oe)return;for(var Te=0;Te<Ge&&(fe=Du(Oe,Te*4))!==K;++Te)ue.push(fe);y(Du(Oe,ce-4),de-1,le,ce,ue)}}function _(ne,de,le,ce,ue){var fe=[],Oe=[];ue||(ue=[]);var Ge=ce-1,Te=0,Fe=0;for(Te=de;Te>=0;){ue[Te]=!0,fe[fe.length]=Te,Oe.push(ne[Te]);var ze=le[Math.floor(Te*4/ce)];if(Fe=Te*4&Ge,ce<4+Fe)throw new Error("FAT boundary crossed: "+Te+" 4 "+ce);if(!ne[ze])break;Te=Du(ne[ze],Fe)}return{nodes:fe,data:oJ([Oe])}}function S(ne,de,le,ce){var ue=ne.length,fe=[],Oe=[],Ge=[],Te=[],Fe=ce-1,ze=0,Qe=0,ot=0,pt=0;for(ze=0;ze<ue;++ze)if(Ge=[],ot=ze+de,ot>=ue&&(ot-=ue),!Oe[ot]){Te=[];var it=[];for(Qe=ot;Qe>=0;){it[Qe]=!0,Oe[Qe]=!0,Ge[Ge.length]=Qe,Te.push(ne[Qe]);var dt=le[Math.floor(Qe*4/ce)];if(pt=Qe*4&Fe,ce<4+pt)throw new Error("FAT boundary crossed: "+Qe+" 4 "+ce);if(!ne[dt]||(Qe=Du(ne[dt],pt),it[Qe]))break}fe[ot]={nodes:Ge,data:oJ([Te])}}return fe}function C(ne,de,le,ce,ue,fe,Oe,Ge){for(var Te=0,Fe=ce.length?2:0,ze=de[ne].data,Qe=0,ot=0,pt;Qe<ze.length;Qe+=128){var it=ze.slice(Qe,Qe+128);la(it,64),ot=it.read_shift(2),pt=x8(it,0,ot-Fe),ce.push(pt);var dt={name:pt,type:it.read_shift(1),color:it.read_shift(1),L:it.read_shift(4,"i"),R:it.read_shift(4,"i"),C:it.read_shift(4,"i"),clsid:it.read_shift(16),state:it.read_shift(4,"i"),start:0,size:0},Ht=it.read_shift(2)+it.read_shift(2)+it.read_shift(2)+it.read_shift(2);Ht!==0&&(dt.ct=T(it,it.l-8));var Ar=it.read_shift(2)+it.read_shift(2)+it.read_shift(2)+it.read_shift(2);Ar!==0&&(dt.mt=T(it,it.l-8)),dt.start=it.read_shift(4,"i"),dt.size=it.read_shift(4,"i"),dt.size<0&&dt.start<0&&(dt.size=dt.type=0,dt.start=K,dt.name=""),dt.type===5?(Te=dt.start,ue>0&&Te!==K&&(de[Te].name="!StreamData")):dt.size>=4096?(dt.storage="fat",de[dt.start]===void 0&&(de[dt.start]=_(le,dt.start,de.fat_addrs,de.ssz)),de[dt.start].name=dt.name,dt.content=de[dt.start].data.slice(0,dt.size)):(dt.storage="minifat",dt.size<0?dt.size=0:Te!==K&&dt.start!==K&&de[Te]&&(dt.content=v(dt,de[Te].data,(de[Ge]||{}).data))),dt.content&&la(dt.content,0),fe[pt]=dt,Oe.push(dt)}}function T(ne,de){return new Date((Ri(ne,de+4)/1e7*Math.pow(2,32)+Ri(ne,de)/1e7-11644473600)*1e3)}function A(ne,de){return c(),u(l.readFileSync(ne),de)}function k(ne,de){var le=de&&de.type;switch(le||gr&&Buffer.isBuffer(ne)&&(le="buffer"),le||"base64"){case"file":return A(ne,de);case"base64":return u(Is(zi(ne)),de);case"binary":return u(Is(ne),de)}return u(ne,de)}function N(ne,de){var le=de||{},ce=le.root||"Root Entry";if(ne.FullPaths||(ne.FullPaths=[]),ne.FileIndex||(ne.FileIndex=[]),ne.FullPaths.length!==ne.FileIndex.length)throw new Error("inconsistent CFB structure");ne.FullPaths.length===0&&(ne.FullPaths[0]=ce+"/",ne.FileIndex[0]={name:ce,type:5}),le.CLSID&&(ne.FileIndex[0].clsid=le.CLSID),L(ne)}function L(ne){var de="Sh33tJ5";if(!br.find(ne,"/"+de)){var le=$n(4);le[0]=55,le[1]=le[3]=50,le[2]=54,ne.FileIndex.push({name:de,type:2,content:le,size:4,L:69,R:69,C:69}),ne.FullPaths.push(ne.FullPaths[0]+de),I(ne)}}function I(ne,de){N(ne);for(var le=!1,ce=!1,ue=ne.FullPaths.length-1;ue>=0;--ue){var fe=ne.FileIndex[ue];switch(fe.type){case 0:ce?le=!0:(ne.FileIndex.pop(),ne.FullPaths.pop());break;case 1:case 2:case 5:ce=!0,isNaN(fe.R*fe.L*fe.C)&&(le=!0),fe.R>-1&&fe.L>-1&&fe.R==fe.L&&(le=!0);break;default:le=!0;break}}if(!(!le&&!de)){var Oe=new Date(1987,1,19),Ge=0,Te=Object.create?Object.create(null):{},Fe=[];for(ue=0;ue<ne.FullPaths.length;++ue)Te[ne.FullPaths[ue]]=!0,ne.FileIndex[ue].type!==0&&Fe.push([ne.FullPaths[ue],ne.FileIndex[ue]]);for(ue=0;ue<Fe.length;++ue){var ze=n(Fe[ue][0]);ce=Te[ze],ce||(Fe.push([ze,{name:a(ze).replace("/",""),type:1,clsid:D,ct:Oe,mt:Oe,content:null}]),Te[ze]=!0)}for(Fe.sort(function(pt,it){return r(pt[0],it[0])}),ne.FullPaths=[],ne.FileIndex=[],ue=0;ue<Fe.length;++ue)ne.FullPaths[ue]=Fe[ue][0],ne.FileIndex[ue]=Fe[ue][1];for(ue=0;ue<Fe.length;++ue){var Qe=ne.FileIndex[ue],ot=ne.FullPaths[ue];if(Qe.name=a(ot).replace("/",""),Qe.L=Qe.R=Qe.C=-(Qe.color=1),Qe.size=Qe.content?Qe.content.length:0,Qe.start=0,Qe.clsid=Qe.clsid||D,ue===0)Qe.C=Fe.length>1?1:-1,Qe.size=0,Qe.type=5;else if(ot.slice(-1)=="/"){for(Ge=ue+1;Ge<Fe.length&&n(ne.FullPaths[Ge])!=ot;++Ge);for(Qe.C=Ge>=Fe.length?-1:Ge,Ge=ue+1;Ge<Fe.length&&n(ne.FullPaths[Ge])!=n(ot);++Ge);Qe.R=Ge>=Fe.length?-1:Ge,Qe.type=1}else n(ne.FullPaths[ue+1]||"")==n(ot)&&(Qe.R=ue+1),Qe.type=2}}}function P(ne,de){var le=de||{};if(le.fileType=="mad")return vn(ne,le);switch(I(ne),le.fileType){case"zip":return Ua(ne,le)}var ce=(function(pt){for(var it=0,dt=0,Ht=0;Ht<pt.FileIndex.length;++Ht){var Ar=pt.FileIndex[Ht];if(Ar.content){var kr=Ar.content.length;kr>0&&(kr<4096?it+=kr+63>>6:dt+=kr+511>>9)}}for(var Or=pt.FullPaths.length+3>>2,Ui=it+7>>3,eo=it+127>>7,$a=Ui+dt+Or+eo,fi=$a+127>>7,ws=fi<=109?0:Math.ceil((fi-109)/127);$a+fi+ws+127>>7>fi;)ws=++fi<=109?0:Math.ceil((fi-109)/127);var Es=[1,ws,fi,eo,Or,dt,it,0];return pt.FileIndex[0].size=it<<6,Es[7]=(pt.FileIndex[0].start=Es[0]+Es[1]+Es[2]+Es[3]+Es[4]+Es[5])+(Es[6]+7>>3),Es})(ne),ue=$n(ce[7]<<9),fe=0,Oe=0;{for(fe=0;fe<8;++fe)ue.write_shift(1,W[fe]);for(fe=0;fe<8;++fe)ue.write_shift(2,0);for(ue.write_shift(2,62),ue.write_shift(2,3),ue.write_shift(2,65534),ue.write_shift(2,9),ue.write_shift(2,6),fe=0;fe<3;++fe)ue.write_shift(2,0);for(ue.write_shift(4,0),ue.write_shift(4,ce[2]),ue.write_shift(4,ce[0]+ce[1]+ce[2]+ce[3]-1),ue.write_shift(4,0),ue.write_shift(4,4096),ue.write_shift(4,ce[3]?ce[0]+ce[1]+ce[2]-1:K),ue.write_shift(4,ce[3]),ue.write_shift(-4,ce[1]?ce[0]-1:K),ue.write_shift(4,ce[1]),fe=0;fe<109;++fe)ue.write_shift(-4,fe<ce[2]?ce[1]+fe:-1)}if(ce[1])for(Oe=0;Oe<ce[1];++Oe){for(;fe<236+Oe*127;++fe)ue.write_shift(-4,fe<ce[2]?ce[1]+fe:-1);ue.write_shift(-4,Oe===ce[1]-1?K:Oe+1)}var Ge=function(pt){for(Oe+=pt;fe<Oe-1;++fe)ue.write_shift(-4,fe+1);pt&&(++fe,ue.write_shift(-4,K))};for(Oe=fe=0,Oe+=ce[1];fe<Oe;++fe)ue.write_shift(-4,U.DIFSECT);for(Oe+=ce[2];fe<Oe;++fe)ue.write_shift(-4,U.FATSECT);Ge(ce[3]),Ge(ce[4]);for(var Te=0,Fe=0,ze=ne.FileIndex[0];Te<ne.FileIndex.length;++Te)ze=ne.FileIndex[Te],ze.content&&(Fe=ze.content.length,!(Fe<4096)&&(ze.start=Oe,Ge(Fe+511>>9)));for(Ge(ce[6]+7>>3);ue.l&511;)ue.write_shift(-4,U.ENDOFCHAIN);for(Oe=fe=0,Te=0;Te<ne.FileIndex.length;++Te)ze=ne.FileIndex[Te],ze.content&&(Fe=ze.content.length,!(!Fe||Fe>=4096)&&(ze.start=Oe,Ge(Fe+63>>6)));for(;ue.l&511;)ue.write_shift(-4,U.ENDOFCHAIN);for(fe=0;fe<ce[4]<<2;++fe){var Qe=ne.FullPaths[fe];if(!Qe||Qe.length===0){for(Te=0;Te<17;++Te)ue.write_shift(4,0);for(Te=0;Te<3;++Te)ue.write_shift(4,-1);for(Te=0;Te<12;++Te)ue.write_shift(4,0);continue}ze=ne.FileIndex[fe],fe===0&&(ze.start=ze.size?ze.start-1:K);var ot=fe===0&&le.root||ze.name;if(Fe=2*(ot.length+1),ue.write_shift(64,ot,"utf16le"),ue.write_shift(2,Fe),ue.write_shift(1,ze.type),ue.write_shift(1,ze.color),ue.write_shift(-4,ze.L),ue.write_shift(-4,ze.R),ue.write_shift(-4,ze.C),ze.clsid)ue.write_shift(16,ze.clsid,"hex");else for(Te=0;Te<4;++Te)ue.write_shift(4,0);ue.write_shift(4,ze.state||0),ue.write_shift(4,0),ue.write_shift(4,0),ue.write_shift(4,0),ue.write_shift(4,0),ue.write_shift(4,ze.start),ue.write_shift(4,ze.size),ue.write_shift(4,0)}for(fe=1;fe<ne.FileIndex.length;++fe)if(ze=ne.FileIndex[fe],ze.size>=4096)if(ue.l=ze.start+1<<9,gr&&Buffer.isBuffer(ze.content))ze.content.copy(ue,ue.l,0,ze.size),ue.l+=ze.size+511&-512;else{for(Te=0;Te<ze.size;++Te)ue.write_shift(1,ze.content[Te]);for(;Te&511;++Te)ue.write_shift(1,0)}for(fe=1;fe<ne.FileIndex.length;++fe)if(ze=ne.FileIndex[fe],ze.size>0&&ze.size<4096)if(gr&&Buffer.isBuffer(ze.content))ze.content.copy(ue,ue.l,0,ze.size),ue.l+=ze.size+63&-64;else{for(Te=0;Te<ze.size;++Te)ue.write_shift(1,ze.content[Te]);for(;Te&63;++Te)ue.write_shift(1,0)}if(gr)ue.l=ue.length;else for(;ue.l<ue.length;)ue.write_shift(1,0);return ue}function H(ne,de){var le=ne.FullPaths.map(function(Te){return Te.toUpperCase()}),ce=le.map(function(Te){var Fe=Te.split("/");return Fe[Fe.length-(Te.slice(-1)=="/"?2:1)]}),ue=!1;de.charCodeAt(0)===47?(ue=!0,de=le[0].slice(0,-1)+de):ue=de.indexOf("/")!==-1;var fe=de.toUpperCase(),Oe=ue===!0?le.indexOf(fe):ce.indexOf(fe);if(Oe!==-1)return ne.FileIndex[Oe];var Ge=!fe.match(vp);for(fe=fe.replace(Fa,""),Ge&&(fe=fe.replace(vp,"!")),Oe=0;Oe<le.length;++Oe)if((Ge?le[Oe].replace(vp,"!"):le[Oe]).replace(Fa,"")==fe||(Ge?ce[Oe].replace(vp,"!"):ce[Oe]).replace(Fa,"")==fe)return ne.FileIndex[Oe];return null}var B=64,K=-2,j="d0cf11e0a1b11ae1",W=[208,207,17,224,161,177,26,225],D="00000000000000000000000000000000",U={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:K,FREESECT:-1,HEADER_SIGNATURE:j,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:D,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function Y(ne,de,le){c();var ce=P(ne,le);l.writeFileSync(de,ce)}function z(ne){for(var de=new Array(ne.length),le=0;le<ne.length;++le)de[le]=String.fromCharCode(ne[le]);return de.join("")}function M(ne,de){var le=P(ne,de);switch(de&&de.type||"buffer"){case"file":return c(),l.writeFileSync(de.filename,le),le;case"binary":return typeof le=="string"?le:z(le);case"base64":return $Q(typeof le=="string"?le:z(le));case"buffer":if(gr)return Buffer.isBuffer(le)?le:yd(le);case"array":return typeof le=="string"?Is(le):le}return le}var Q;function q(ne){try{var de=ne.InflateRaw,le=new de;if(le._processChunk(new Uint8Array([3,0]),le._finishFlushFlag),le.bytesRead)Q=ne;else throw new Error("zlib does not expose bytesRead")}catch(ce){console.error("cannot use native zlib: "+(ce.message||ce))}}function F(ne,de){if(!Q)return on(ne,de);var le=Q.InflateRaw,ce=new le,ue=ce._processChunk(ne.slice(ne.l),ce._finishFlushFlag);return ne.l+=ce.bytesRead,ue}function V(ne){return Q?Q.deflateRawSync(ne):at(ne)}var Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ee=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],te=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function oe(ne){var de=(ne<<1|ne<<11)&139536|(ne<<5|ne<<15)&558144;return(de>>16|de>>8|de)&255}for(var pe=typeof Uint8Array<"u",he=pe?new Uint8Array(256):[],ke=0;ke<256;++ke)he[ke]=oe(ke);function se(ne,de){var le=he[ne&255];return de<=8?le>>>8-de:(le=le<<8|he[ne>>8&255],de<=16?le>>>16-de:(le=le<<8|he[ne>>16&255],le>>>24-de))}function qe(ne,de){var le=de&7,ce=de>>>3;return(ne[ce]|(le<=6?0:ne[ce+1]<<8))>>>le&3}function $e(ne,de){var le=de&7,ce=de>>>3;return(ne[ce]|(le<=5?0:ne[ce+1]<<8))>>>le&7}function Pe(ne,de){var le=de&7,ce=de>>>3;return(ne[ce]|(le<=4?0:ne[ce+1]<<8))>>>le&15}function Ce(ne,de){var le=de&7,ce=de>>>3;return(ne[ce]|(le<=3?0:ne[ce+1]<<8))>>>le&31}function xe(ne,de){var le=de&7,ce=de>>>3;return(ne[ce]|(le<=1?0:ne[ce+1]<<8))>>>le&127}function ve(ne,de,le){var ce=de&7,ue=de>>>3,fe=(1<<le)-1,Oe=ne[ue]>>>ce;return le<8-ce||(Oe|=ne[ue+1]<<8-ce,le<16-ce)||(Oe|=ne[ue+2]<<16-ce,le<24-ce)||(Oe|=ne[ue+3]<<24-ce),Oe&fe}function Ne(ne,de,le){var ce=de&7,ue=de>>>3;return ce<=5?ne[ue]|=(le&7)<<ce:(ne[ue]|=le<<ce&255,ne[ue+1]=(le&7)>>8-ce),de+3}function Ue(ne,de,le){var ce=de&7,ue=de>>>3;return le=(le&1)<<ce,ne[ue]|=le,de+1}function Le(ne,de,le){var ce=de&7,ue=de>>>3;return le<<=ce,ne[ue]|=le&255,le>>>=8,ne[ue+1]=le,de+8}function Ye(ne,de,le){var ce=de&7,ue=de>>>3;return le<<=ce,ne[ue]|=le&255,le>>>=8,ne[ue+1]=le&255,ne[ue+2]=le>>>8,de+16}function De(ne,de){var le=ne.length,ce=2*le>de?2*le:de+5,ue=0;if(le>=de)return ne;if(gr){var fe=HQ(ce);if(ne.copy)ne.copy(fe);else for(;ue<ne.length;++ue)fe[ue]=ne[ue];return fe}else if(pe){var Oe=new Uint8Array(ce);if(Oe.set)Oe.set(ne);else for(;ue<le;++ue)Oe[ue]=ne[ue];return Oe}return ne.length=ce,ne}function Ve(ne){for(var de=new Array(ne),le=0;le<ne;++le)de[le]=0;return de}function lt(ne,de,le){var ce=1,ue=0,fe=0,Oe=0,Ge=0,Te=ne.length,Fe=pe?new Uint16Array(32):Ve(32);for(fe=0;fe<32;++fe)Fe[fe]=0;for(fe=Te;fe<le;++fe)ne[fe]=0;Te=ne.length;var ze=pe?new Uint16Array(Te):Ve(Te);for(fe=0;fe<Te;++fe)Fe[ue=ne[fe]]++,ce<ue&&(ce=ue),ze[fe]=0;for(Fe[0]=0,fe=1;fe<=ce;++fe)Fe[fe+16]=Ge=Ge+Fe[fe-1]<<1;for(fe=0;fe<Te;++fe)Ge=ne[fe],Ge!=0&&(ze[fe]=Fe[Ge+16]++);var Qe=0;for(fe=0;fe<Te;++fe)if(Qe=ne[fe],Qe!=0)for(Ge=se(ze[fe],ce)>>ce-Qe,Oe=(1<<ce+4-Qe)-1;Oe>=0;--Oe)de[Ge|Oe<<Qe]=Qe&15|fe<<4;return ce}var Ee=pe?new Uint16Array(512):Ve(512),Ae=pe?new Uint16Array(32):Ve(32);if(!pe){for(var Ze=0;Ze<512;++Ze)Ee[Ze]=0;for(Ze=0;Ze<32;++Ze)Ae[Ze]=0}(function(){for(var ne=[],de=0;de<32;de++)ne.push(5);lt(ne,Ae,32);var le=[];for(de=0;de<=143;de++)le.push(8);for(;de<=255;de++)le.push(9);for(;de<=279;de++)le.push(7);for(;de<=287;de++)le.push(8);lt(le,Ee,288)})();var rt=(function(){for(var de=pe?new Uint8Array(32768):[],le=0,ce=0;le<te.length-1;++le)for(;ce<te[le+1];++ce)de[ce]=le;for(;ce<32768;++ce)de[ce]=29;var ue=pe?new Uint8Array(259):[];for(le=0,ce=0;le<ee.length-1;++le)for(;ce<ee[le+1];++ce)ue[ce]=le;function fe(Ge,Te){for(var Fe=0;Fe<Ge.length;){var ze=Math.min(65535,Ge.length-Fe),Qe=Fe+ze==Ge.length;for(Te.write_shift(1,+Qe),Te.write_shift(2,ze),Te.write_shift(2,~ze&65535);ze-- >0;)Te[Te.l++]=Ge[Fe++]}return Te.l}function Oe(Ge,Te){for(var Fe=0,ze=0,Qe=pe?new Uint16Array(32768):[];ze<Ge.length;){var ot=Math.min(65535,Ge.length-ze);if(ot<10){for(Fe=Ne(Te,Fe,+(ze+ot==Ge.length)),Fe&7&&(Fe+=8-(Fe&7)),Te.l=Fe/8|0,Te.write_shift(2,ot),Te.write_shift(2,~ot&65535);ot-- >0;)Te[Te.l++]=Ge[ze++];Fe=Te.l*8;continue}Fe=Ne(Te,Fe,+(ze+ot==Ge.length)+2);for(var pt=0;ot-- >0;){var it=Ge[ze];pt=(pt<<5^it)&32767;var dt=-1,Ht=0;if((dt=Qe[pt])&&(dt|=ze&-32768,dt>ze&&(dt-=32768),dt<ze))for(;Ge[dt+Ht]==Ge[ze+Ht]&&Ht<250;)++Ht;if(Ht>2){it=ue[Ht],it<=22?Fe=Le(Te,Fe,he[it+1]>>1)-1:(Le(Te,Fe,3),Fe+=5,Le(Te,Fe,he[it-23]>>5),Fe+=3);var Ar=it<8?0:it-4>>2;Ar>0&&(Ye(Te,Fe,Ht-ee[it]),Fe+=Ar),it=de[ze-dt],Fe=Le(Te,Fe,he[it]>>3),Fe-=3;var kr=it<4?0:it-2>>1;kr>0&&(Ye(Te,Fe,ze-dt-te[it]),Fe+=kr);for(var Or=0;Or<Ht;++Or)Qe[pt]=ze&32767,pt=(pt<<5^Ge[ze])&32767,++ze;ot-=Ht-1}else it<=143?it=it+48:Fe=Ue(Te,Fe,1),Fe=Le(Te,Fe,he[it]),Qe[pt]=ze&32767,++ze}Fe=Le(Te,Fe,0)-1}return Te.l=(Fe+7)/8|0,Te.l}return function(Te,Fe){return Te.length<8?fe(Te,Fe):Oe(Te,Fe)}})();function at(ne){var de=$n(50+Math.floor(ne.length*1.1)),le=rt(ne,de);return de.slice(0,le)}var bt=pe?new Uint16Array(32768):Ve(32768),et=pe?new Uint16Array(32768):Ve(32768),ft=pe?new Uint16Array(128):Ve(128),zt=1,Cr=1;function Xt(ne,de){var le=Ce(ne,de)+257;de+=5;var ce=Ce(ne,de)+1;de+=5;var ue=Pe(ne,de)+4;de+=4;for(var fe=0,Oe=pe?new Uint8Array(19):Ve(19),Ge=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Te=1,Fe=pe?new Uint8Array(8):Ve(8),ze=pe?new Uint8Array(8):Ve(8),Qe=Oe.length,ot=0;ot<ue;++ot)Oe[Z[ot]]=fe=$e(ne,de),Te<fe&&(Te=fe),Fe[fe]++,de+=3;var pt=0;for(Fe[0]=0,ot=1;ot<=Te;++ot)ze[ot]=pt=pt+Fe[ot-1]<<1;for(ot=0;ot<Qe;++ot)(pt=Oe[ot])!=0&&(Ge[ot]=ze[pt]++);var it=0;for(ot=0;ot<Qe;++ot)if(it=Oe[ot],it!=0){pt=he[Ge[ot]]>>8-it;for(var dt=(1<<7-it)-1;dt>=0;--dt)ft[pt|dt<<it]=it&7|ot<<3}var Ht=[];for(Te=1;Ht.length<le+ce;)switch(pt=ft[xe(ne,de)],de+=pt&7,pt>>>=3){case 16:for(fe=3+qe(ne,de),de+=2,pt=Ht[Ht.length-1];fe-- >0;)Ht.push(pt);break;case 17:for(fe=3+$e(ne,de),de+=3;fe-- >0;)Ht.push(0);break;case 18:for(fe=11+xe(ne,de),de+=7;fe-- >0;)Ht.push(0);break;default:Ht.push(pt),Te<pt&&(Te=pt);break}var Ar=Ht.slice(0,le),kr=Ht.slice(le);for(ot=le;ot<286;++ot)Ar[ot]=0;for(ot=ce;ot<30;++ot)kr[ot]=0;return zt=lt(Ar,bt,286),Cr=lt(kr,et,30),de}function $r(ne,de){if(ne[0]==3&&!(ne[1]&3))return[Kc(de),2];for(var le=0,ce=0,ue=HQ(de||1<<18),fe=0,Oe=ue.length>>>0,Ge=0,Te=0;(ce&1)==0;){if(ce=$e(ne,le),le+=3,ce>>>1)ce>>1==1?(Ge=9,Te=5):(le=Xt(ne,le),Ge=zt,Te=Cr);else{le&7&&(le+=8-(le&7));var Fe=ne[le>>>3]|ne[(le>>>3)+1]<<8;if(le+=32,Fe>0)for(!de&&Oe<fe+Fe&&(ue=De(ue,fe+Fe),Oe=ue.length);Fe-- >0;)ue[fe++]=ne[le>>>3],le+=8;continue}for(;;){!de&&Oe<fe+32767&&(ue=De(ue,fe+32767),Oe=ue.length);var ze=ve(ne,le,Ge),Qe=ce>>>1==1?Ee[ze]:bt[ze];if(le+=Qe&15,Qe>>>=4,(Qe>>>8&255)===0)ue[fe++]=Qe;else{if(Qe==256)break;Qe-=257;var ot=Qe<8?0:Qe-4>>2;ot>5&&(ot=0);var pt=fe+ee[Qe];ot>0&&(pt+=ve(ne,le,ot),le+=ot),ze=ve(ne,le,Te),Qe=ce>>>1==1?Ae[ze]:et[ze],le+=Qe&15,Qe>>>=4;var it=Qe<4?0:Qe-2>>1,dt=te[Qe];for(it>0&&(dt+=ve(ne,le,it),le+=it),!de&&Oe<pt&&(ue=De(ue,pt+100),Oe=ue.length);fe<pt;)ue[fe]=ue[fe-dt],++fe}}}return de?[ue,le+7>>>3]:[ue.slice(0,fe),le+7>>>3]}function on(ne,de){var le=ne.slice(ne.l||0),ce=$r(le,de);return ne.l+=ce[1],ce[0]}function qi(ne,de){if(ne)typeof console<"u"&&console.error(de);else throw new Error(de)}function qa(ne,de){var le=ne;la(le,0);var ce=[],ue=[],fe={FileIndex:ce,FullPaths:ue};N(fe,{root:de.root});for(var Oe=le.length-4;(le[Oe]!=80||le[Oe+1]!=75||le[Oe+2]!=5||le[Oe+3]!=6)&&Oe>=0;)--Oe;le.l=Oe+4,le.l+=4;var Ge=le.read_shift(2);le.l+=6;var Te=le.read_shift(4);for(le.l=Te,Oe=0;Oe<Ge;++Oe){le.l+=20;var Fe=le.read_shift(4),ze=le.read_shift(4),Qe=le.read_shift(2),ot=le.read_shift(2),pt=le.read_shift(2);le.l+=8;var it=le.read_shift(4),dt=o(le.slice(le.l+Qe,le.l+Qe+ot));le.l+=Qe+ot+pt;var Ht=le.l;le.l=it+4,_s(le,Fe,ze,fe,dt),le.l=Ht}return fe}function _s(ne,de,le,ce,ue){ne.l+=2;var fe=ne.read_shift(2),Oe=ne.read_shift(2),Ge=s(ne);if(fe&8257)throw new Error("Unsupported ZIP encryption");for(var Te=ne.read_shift(4),Fe=ne.read_shift(4),ze=ne.read_shift(4),Qe=ne.read_shift(2),ot=ne.read_shift(2),pt="",it=0;it<Qe;++it)pt+=String.fromCharCode(ne[ne.l++]);if(ot){var dt=o(ne.slice(ne.l,ne.l+ot));(dt[21589]||{}).mt&&(Ge=dt[21589].mt),((ue||{})[21589]||{}).mt&&(Ge=ue[21589].mt)}ne.l+=ot;var Ht=ne.slice(ne.l,ne.l+Fe);switch(Oe){case 8:Ht=F(ne,ze);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+Oe)}var Ar=!1;fe&8&&(Te=ne.read_shift(4),Te==134695760&&(Te=ne.read_shift(4),Ar=!0),Fe=ne.read_shift(4),ze=ne.read_shift(4)),Fe!=de&&qi(Ar,"Bad compressed size: "+de+" != "+Fe),ze!=le&&qi(Ar,"Bad uncompressed size: "+le+" != "+ze),Er(ce,pt,Ht,{unsafe:!0,mt:Ge})}function Ua(ne,de){var le=de||{},ce=[],ue=[],fe=$n(1),Oe=le.compression?8:0,Ge=0,Te=0,Fe=0,ze=0,Qe=0,ot=ne.FullPaths[0],pt=ot,it=ne.FileIndex[0],dt=[],Ht=0;for(Te=1;Te<ne.FullPaths.length;++Te)if(pt=ne.FullPaths[Te].slice(ot.length),it=ne.FileIndex[Te],!(!it.size||!it.content||pt=="Sh33tJ5")){var Ar=ze,kr=$n(pt.length);for(Fe=0;Fe<pt.length;++Fe)kr.write_shift(1,pt.charCodeAt(Fe)&127);kr=kr.slice(0,kr.l),dt[Qe]=AYe.buf(it.content,0);var Or=it.content;Oe==8&&(Or=V(Or)),fe=$n(30),fe.write_shift(4,67324752),fe.write_shift(2,20),fe.write_shift(2,Ge),fe.write_shift(2,Oe),it.mt?i(fe,it.mt):fe.write_shift(4,0),fe.write_shift(-4,dt[Qe]),fe.write_shift(4,Or.length),fe.write_shift(4,it.content.length),fe.write_shift(2,kr.length),fe.write_shift(2,0),ze+=fe.length,ce.push(fe),ze+=kr.length,ce.push(kr),ze+=Or.length,ce.push(Or),fe=$n(46),fe.write_shift(4,33639248),fe.write_shift(2,0),fe.write_shift(2,20),fe.write_shift(2,Ge),fe.write_shift(2,Oe),fe.write_shift(4,0),fe.write_shift(-4,dt[Qe]),fe.write_shift(4,Or.length),fe.write_shift(4,it.content.length),fe.write_shift(2,kr.length),fe.write_shift(2,0),fe.write_shift(2,0),fe.write_shift(2,0),fe.write_shift(2,0),fe.write_shift(4,0),fe.write_shift(4,Ar),Ht+=fe.l,ue.push(fe),Ht+=kr.length,ue.push(kr),++Qe}return fe=$n(22),fe.write_shift(4,101010256),fe.write_shift(2,0),fe.write_shift(2,0),fe.write_shift(2,Qe),fe.write_shift(2,Qe),fe.write_shift(4,Ht),fe.write_shift(4,ze),fe.write_shift(2,0),Tc([Tc(ce),Tc(ue),fe])}var tn={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function Gl(ne,de){if(ne.ctype)return ne.ctype;var le=ne.name||"",ce=le.match(/\.([^\.]+)$/);return ce&&tn[ce[1]]||de&&(ce=(le=de).match(/[\.\\]([^\.\\])+$/),ce&&tn[ce[1]])?tn[ce[1]]:"application/octet-stream"}function Pt(ne){for(var de=$Q(ne),le=[],ce=0;ce<de.length;ce+=76)le.push(de.slice(ce,ce+76));return le.join(`\r
`)+`\r
`}function fr(ne){var de=ne.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(Fe){var ze=Fe.charCodeAt(0).toString(16).toUpperCase();return"="+(ze.length==1?"0"+ze:ze)});de=de.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),de.charAt(0)==`
`&&(de="=0D"+de.slice(1)),de=de.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var le=[],ce=de.split(`\r
`),ue=0;ue<ce.length;++ue){var fe=ce[ue];if(fe.length==0){le.push("");continue}for(var Oe=0;Oe<fe.length;){var Ge=76,Te=fe.slice(Oe,Oe+Ge);Te.charAt(Ge-1)=="="?Ge--:Te.charAt(Ge-2)=="="?Ge-=2:Te.charAt(Ge-3)=="="&&(Ge-=3),Te=fe.slice(Oe,Oe+Ge),Oe+=Ge,Oe<fe.length&&(Te+="="),le.push(Te)}}return le.join(`\r
`)}function wr(ne){for(var de=[],le=0;le<ne.length;++le){for(var ce=ne[le];le<=ne.length&&ce.charAt(ce.length-1)=="=";)ce=ce.slice(0,ce.length-1)+ne[++le];de.push(ce)}for(var ue=0;ue<de.length;++ue)de[ue]=de[ue].replace(/[=][0-9A-Fa-f]{2}/g,function(fe){return String.fromCharCode(parseInt(fe.slice(1),16))});return Is(de.join(`\r
`))}function Wn(ne,de,le){for(var ce="",ue="",fe="",Oe,Ge=0;Ge<10;++Ge){var Te=de[Ge];if(!Te||Te.match(/^\s*$/))break;var Fe=Te.match(/^(.*?):\s*([^\s].*)$/);if(Fe)switch(Fe[1].toLowerCase()){case"content-location":ce=Fe[2].trim();break;case"content-type":fe=Fe[2].trim();break;case"content-transfer-encoding":ue=Fe[2].trim();break}}switch(++Ge,ue.toLowerCase()){case"base64":Oe=Is(zi(de.slice(Ge).join("")));break;case"quoted-printable":Oe=wr(de.slice(Ge));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+ue)}var ze=Er(ne,ce.slice(le.length),Oe,{unsafe:!0});fe&&(ze.ctype=fe)}function na(ne,de){if(z(ne.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var le=de&&de.root||"",ce=(gr&&Buffer.isBuffer(ne)?ne.toString("binary"):z(ne)).split(`\r
`),ue=0,fe="";for(ue=0;ue<ce.length;++ue)if(fe=ce[ue],!!/^Content-Location:/i.test(fe)&&(fe=fe.slice(fe.indexOf("file")),le||(le=fe.slice(0,fe.lastIndexOf("/")+1)),fe.slice(0,le.length)!=le))for(;le.length>0&&(le=le.slice(0,le.length-1),le=le.slice(0,le.lastIndexOf("/")+1),fe.slice(0,le.length)!=le););var Oe=(ce[1]||"").match(/boundary="(.*?)"/);if(!Oe)throw new Error("MAD cannot find boundary");var Ge="--"+(Oe[1]||""),Te=[],Fe=[],ze={FileIndex:Te,FullPaths:Fe};N(ze);var Qe,ot=0;for(ue=0;ue<ce.length;++ue){var pt=ce[ue];pt!==Ge&&pt!==Ge+"--"||(ot++&&Wn(ze,ce.slice(Qe,ue),le),Qe=ue)}return ze}function vn(ne,de){var le=de||{},ce=le.boundary||"SheetJS";ce="------="+ce;for(var ue=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+ce.slice(2)+'"',"","",""],fe=ne.FullPaths[0],Oe=fe,Ge=ne.FileIndex[0],Te=1;Te<ne.FullPaths.length;++Te)if(Oe=ne.FullPaths[Te].slice(fe.length),Ge=ne.FileIndex[Te],!(!Ge.size||!Ge.content||Oe=="Sh33tJ5")){Oe=Oe.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(Ht){return"_x"+Ht.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(Ht){return"_u"+Ht.charCodeAt(0).toString(16)+"_"});for(var Fe=Ge.content,ze=gr&&Buffer.isBuffer(Fe)?Fe.toString("binary"):z(Fe),Qe=0,ot=Math.min(1024,ze.length),pt=0,it=0;it<=ot;++it)(pt=ze.charCodeAt(it))>=32&&pt<128&&++Qe;var dt=Qe>=ot*4/5;ue.push(ce),ue.push("Content-Location: "+(le.root||"file:///C:/SheetJS/")+Oe),ue.push("Content-Transfer-Encoding: "+(dt?"quoted-printable":"base64")),ue.push("Content-Type: "+Gl(Ge,Oe)),ue.push(""),ue.push(dt?fr(ze):Pt(ze))}return ue.push(ce+`--\r
`),ue.join(`\r
`)}function Dr(ne){var de={};return N(de,ne),de}function Er(ne,de,le,ce){var ue=ce&&ce.unsafe;ue||N(ne);var fe=!ue&&br.find(ne,de);if(!fe){var Oe=ne.FullPaths[0];de.slice(0,Oe.length)==Oe?Oe=de:(Oe.slice(-1)!="/"&&(Oe+="/"),Oe=(Oe+de).replace("//","/")),fe={name:a(de),type:2},ne.FileIndex.push(fe),ne.FullPaths.push(Oe),ue||br.utils.cfb_gc(ne)}return fe.content=le,fe.size=le?le.length:0,ce&&(ce.CLSID&&(fe.clsid=ce.CLSID),ce.mt&&(fe.mt=ce.mt),ce.ct&&(fe.ct=ce.ct)),fe}function Bn(ne,de){N(ne);var le=br.find(ne,de);if(le){for(var ce=0;ce<ne.FileIndex.length;++ce)if(ne.FileIndex[ce]==le)return ne.FileIndex.splice(ce,1),ne.FullPaths.splice(ce,1),!0}return!1}function eu(ne,de,le){N(ne);var ce=br.find(ne,de);if(ce){for(var ue=0;ue<ne.FileIndex.length;++ue)if(ne.FileIndex[ue]==ce)return ne.FileIndex[ue].name=a(le),ne.FullPaths[ue]=le,!0}return!1}function z0(ne){I(ne,!0)}return t.find=H,t.read=k,t.parse=u,t.write=M,t.writeFile=Y,t.utils={cfb_new:Dr,cfb_add:Er,cfb_del:Bn,cfb_mov:eu,cfb_gc:z0,ReadShift:Op,CheckField:Uue,prep_blob:la,bconcat:Tc,use_zlib:q,_deflateRaw:at,_inflateRaw:on,consts:U},t})();function kYe(e){if(typeof Deno<"u")return Deno.readFileSync(e);if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var t=File(e);t.open("r"),t.encoding="binary";var r=t.read();return t.close(),r}catch(n){if(!n.message||!n.message.match(/onstruct/))throw n}throw new Error("Cannot access file "+e)}function Mo(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;++n)Object.prototype.hasOwnProperty.call(e,t[n])&&r.push(t[n]);return r}function m8(e){for(var t=[],r=Mo(e),n=0;n!==r.length;++n)t[e[r[n]]]=r[n];return t}var Ub=new Date(1899,11,30,0,0,0);function Ba(e,t){var r=e.getTime(),n=Ub.getTime()+(e.getTimezoneOffset()-Ub.getTimezoneOffset())*6e4;return(r-n)/(1440*60*1e3)}var _ue=new Date,NYe=Ub.getTime()+(_ue.getTimezoneOffset()-Ub.getTimezoneOffset())*6e4,QQ=_ue.getTimezoneOffset();function Ey(e){var t=new Date;return t.setTime(e*24*60*60*1e3+NYe),t.getTimezoneOffset()!==QQ&&t.setTime(t.getTime()+(t.getTimezoneOffset()-QQ)*6e4),t}function RYe(e){var t=0,r=0,n=!1,a=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!a)throw new Error("|"+e+"| is not an ISO8601 Duration");for(var i=1;i!=a.length;++i)if(a[i]){switch(r=1,i>3&&(n=!0),a[i].slice(a[i].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+a[i].slice(a[i].length-1));case"D":r*=24;case"H":r*=60;case"M":if(n)r*=60;else throw new Error("Unsupported ISO Duration Field: M")}t+=r*parseInt(a[i],10)}return t}var JQ=new Date("2017-02-19T19:06:09.000Z"),wue=isNaN(JQ.getFullYear())?new Date("2/19/17"):JQ,MYe=wue.getFullYear()==2017;function ta(e,t){var r=new Date(e);if(MYe)return t>0?r.setTime(r.getTime()+r.getTimezoneOffset()*60*1e3):t<0&&r.setTime(r.getTime()-r.getTimezoneOffset()*60*1e3),r;if(e instanceof Date)return e;if(wue.getFullYear()==1917&&!isNaN(r.getFullYear())){var n=r.getFullYear();return e.indexOf(""+n)>-1||r.setFullYear(r.getFullYear()+100),r}var a=e.match(/\d+/g)||["2017","2","19","0","0","0"],i=new Date(+a[0],+a[1]-1,+a[2],+a[3]||0,+a[4]||0,+a[5]||0);return e.indexOf("Z")>-1&&(i=new Date(i.getTime()-i.getTimezoneOffset()*60*1e3)),i}function id(e,t){if(gr&&Buffer.isBuffer(e)){if(t){if(e[0]==255&&e[1]==254)return xp(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)return xp(lue(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(t){if(e[0]==255&&e[1]==254)return xp(new TextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)return xp(new TextDecoder("utf-16be").decode(e.slice(2)))}var r={"€":"","‚":"",ƒ:"","„":"","…":"","†":"","‡":"","ˆ":"","‰":"",Š:"","‹":"",Œ:"",Ž:"","‘":"","’":"","“":"","”":"","•":"","–":"","—":"","˜":"","™":"",š:"","›":"",œ:"",ž:"",Ÿ:""};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(i){return r[i]||i})}catch{}for(var n=[],a=0;a!=e.length;++a)n.push(String.fromCharCode(e[a]));return n.join("")}function ca(e){if(typeof JSON<"u"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=ca(e[r]));return t}function dn(e,t){for(var r="";r.length<t;)r+=e;return r}function zs(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var r=1,n=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return r*=100,""});return!isNaN(t=Number(n))||(n=n.replace(/[(](.*)[)]/,function(a,i){return r=-r,i}),!isNaN(t=Number(n)))?t/r:t}var DYe=["january","february","march","april","may","june","july","august","september","october","november","december"];function c0(e){var t=new Date(e),r=new Date(NaN),n=t.getYear(),a=t.getMonth(),i=t.getDate();if(isNaN(i))return r;var s=e.toLowerCase();if(s.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(s=s.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),s.length>3&&DYe.indexOf(s)==-1)return r}else if(s.match(/[a-z]/))return r;return n<0||n>8099?r:(a>0||i>1)&&n!=101?t:e.match(/[^-0-9:,\/\\]/)?r:t}var OYe=(function(){var e="abacaba".split(/(:?b)/i).length==5;return function(r,n,a){if(e||typeof n=="string")return r.split(n);for(var i=r.split(n),s=[i[0]],o=1;o<i.length;++o)s.push(a),s.push(i[o]);return s}})();function Eue(e){return e?e.content&&e.type?id(e.content,!0):e.data?gp(e.data):e.asNodeBuffer&&gr?gp(e.asNodeBuffer().toString("binary")):e.asBinary?gp(e.asBinary()):e._data&&e._data.getContent?gp(id(Array.prototype.slice.call(e._data.getContent(),0))):null:null}function Sue(e){if(!e)return null;if(e.data)return qQ(e.data);if(e.asNodeBuffer&&gr)return e.asNodeBuffer();if(e._data&&e._data.getContent){var t=e._data.getContent();return typeof t=="string"?qQ(t):Array.prototype.slice.call(t)}return e.content&&e.type?e.content:null}function IYe(e){return e&&e.name.slice(-4)===".bin"?Sue(e):Eue(e)}function rs(e,t){for(var r=e.FullPaths||Mo(e.files),n=t.toLowerCase().replace(/[\/]/g,"\\"),a=n.replace(/\\/g,"/"),i=0;i<r.length;++i){var s=r[i].replace(/^Root Entry[\/]/,"").toLowerCase();if(n==s||a==s)return e.files?e.files[r[i]]:e.FileIndex[i]}return null}function g8(e,t){var r=rs(e,t);if(r==null)throw new Error("Cannot find file "+t+" in zip");return r}function On(e,t,r){if(!r)return IYe(g8(e,t));if(!t)return null;try{return On(e,t)}catch{return null}}function Di(e,t,r){if(!r)return Eue(g8(e,t));if(!t)return null;try{return Di(e,t)}catch{return null}}function LYe(e,t,r){return Sue(g8(e,t))}function eJ(e){for(var t=e.FullPaths||Mo(e.files),r=[],n=0;n<t.length;++n)t[n].slice(-1)!="/"&&r.push(t[n].replace(/^Root Entry[\/]/,""));return r.sort()}function PYe(e,t,r){if(e.FullPaths){if(typeof r=="string"){var n;return gr?n=yd(r):n=tYe(r),br.utils.cfb_add(e,t,n)}br.utils.cfb_add(e,t,r)}else e.file(t,r)}function Cue(e,t){switch(t.type){case"base64":return br.read(e,{type:"base64"});case"binary":return br.read(e,{type:"binary"});case"buffer":case"array":return br.read(e,{type:"buffer"})}throw new Error("Unrecognized type "+t.type)}function bp(e,t){if(e.charAt(0)=="/")return e.slice(1);var r=t.split("/");t.slice(-1)!="/"&&r.pop();for(var n=e.split("/");n.length!==0;){var a=n.shift();a===".."?r.pop():a!=="."&&r.push(a)}return r.join("/")}var Tue=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
`,FYe=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,tJ=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/mg,BYe=/<[^>]*>/g,Aa=Tue.match(tJ)?tJ:BYe,zYe=/<\w*:/,jYe=/<(\/?)\w+:/;function Ut(e,t,r){for(var n={},a=0,i=0;a!==e.length&&!((i=e.charCodeAt(a))===32||i===10||i===13);++a);if(t||(n[0]=e.slice(0,a)),a===e.length)return n;var s=e.match(FYe),o=0,l="",c=0,u="",f="",p=1;if(s)for(c=0;c!=s.length;++c){for(f=s[c],i=0;i!=f.length&&f.charCodeAt(i)!==61;++i);for(u=f.slice(0,i).trim();f.charCodeAt(i+1)==32;)++i;for(p=(a=f.charCodeAt(i+1))==34||a==39?1:0,l=f.slice(i+1+p,f.length-p),o=0;o!=u.length&&u.charCodeAt(o)!==58;++o);if(o===u.length)u.indexOf("_")>0&&(u=u.slice(0,u.indexOf("_"))),n[u]=l,n[u.toLowerCase()]=l;else{var m=(o===5&&u.slice(0,5)==="xmlns"?"xmlns":"")+u.slice(o+1);if(n[m]&&u.slice(o-3,o)=="ext")continue;n[m]=l,n[m.toLowerCase()]=l}}return n}function Uo(e){return e.replace(jYe,"<$1")}var Aue={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},qYe=m8(Aue),yr=(function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/ig,t=/_x([\da-fA-F]{4})_/ig;return function r(n){var a=n+"",i=a.indexOf("<![CDATA[");if(i==-1)return a.replace(e,function(o,l){return Aue[o]||String.fromCharCode(parseInt(l,o.indexOf("x")>-1?16:10))||o}).replace(t,function(o,l){return String.fromCharCode(parseInt(l,16))});var s=a.indexOf("]]>");return r(a.slice(0,i))+a.slice(i+9,s)+r(a.slice(s+3))}})(),UYe=/[&<>'"]/g,$Ye=/[\u0000-\u001f]/g;function v8(e){var t=e+"";return t.replace(UYe,function(r){return qYe[r]}).replace(/\n/g,"<br/>").replace($Ye,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}var rJ=(function(){var e=/&#(\d+);/g;function t(r,n){return String.fromCharCode(parseInt(n,10))}return function(n){return n.replace(e,t)}})();function Zr(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function XM(e){for(var t="",r=0,n=0,a=0,i=0,s=0,o=0;r<e.length;){if(n=e.charCodeAt(r++),n<128){t+=String.fromCharCode(n);continue}if(a=e.charCodeAt(r++),n>191&&n<224){s=(n&31)<<6,s|=a&63,t+=String.fromCharCode(s);continue}if(i=e.charCodeAt(r++),n<240){t+=String.fromCharCode((n&15)<<12|(a&63)<<6|i&63);continue}s=e.charCodeAt(r++),o=((n&7)<<18|(a&63)<<12|(i&63)<<6|s&63)-65536,t+=String.fromCharCode(55296+(o>>>10&1023)),t+=String.fromCharCode(56320+(o&1023))}return t}function nJ(e){var t=Kc(2*e.length),r,n,a=1,i=0,s=0,o;for(n=0;n<e.length;n+=a)a=1,(o=e.charCodeAt(n))<128?r=o:o<224?(r=(o&31)*64+(e.charCodeAt(n+1)&63),a=2):o<240?(r=(o&15)*4096+(e.charCodeAt(n+1)&63)*64+(e.charCodeAt(n+2)&63),a=3):(a=4,r=(o&7)*262144+(e.charCodeAt(n+1)&63)*4096+(e.charCodeAt(n+2)&63)*64+(e.charCodeAt(n+3)&63),r-=65536,s=55296+(r>>>10&1023),r=56320+(r&1023)),s!==0&&(t[i++]=s&255,t[i++]=s>>>8,s=0),t[i++]=r%256,t[i++]=r>>>8;return t.slice(0,i).toString("ucs2")}function aJ(e){return yd(e,"binary").toString("utf8")}var A1="foo bar bazâð£",Vr=gr&&(aJ(A1)==XM(A1)&&aJ||nJ(A1)==XM(A1)&&nJ)||XM,xp=gr?function(e){return yd(e,"utf8").toString("binary")}:function(e){for(var t=[],r=0,n=0,a=0;r<e.length;)switch(n=e.charCodeAt(r++),!0){case n<128:t.push(String.fromCharCode(n));break;case n<2048:t.push(String.fromCharCode(192+(n>>6))),t.push(String.fromCharCode(128+(n&63)));break;case(n>=55296&&n<57344):n-=55296,a=e.charCodeAt(r++)-56320+(n<<10),t.push(String.fromCharCode(240+(a>>18&7))),t.push(String.fromCharCode(144+(a>>12&63))),t.push(String.fromCharCode(128+(a>>6&63))),t.push(String.fromCharCode(128+(a&63)));break;default:t.push(String.fromCharCode(224+(n>>12))),t.push(String.fromCharCode(128+(n>>6&63))),t.push(String.fromCharCode(128+(n&63)))}return t.join("")},gm=(function(){var e={};return function(r,n){var a=r+"|"+(n||"");return e[a]?e[a]:e[a]=new RegExp("<(?:\\w+:)?"+r+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+r+">",n||"")}})(),kue=(function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(t){return[new RegExp("&"+t[0]+";","ig"),t[1]]});return function(r){for(var n=r.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,`
`).replace(/<[^>]*>/g,""),a=0;a<e.length;++a)n=n.replace(e[a][0],e[a][1]);return n}})(),HYe=(function(){var e={};return function(r){return e[r]!==void 0?e[r]:e[r]=new RegExp("<(?:vt:)?"+r+">([\\s\\S]*?)</(?:vt:)?"+r+">","g")}})(),GYe=/<\/?(?:vt:)?variant>/g,VYe=/<(?:vt:)([^>]*)>([\s\S]*)</;function iJ(e,t){var r=Ut(e),n=e.match(HYe(r.baseType))||[],a=[];if(n.length!=r.size){if(t.WTF)throw new Error("unexpected vector length "+n.length+" != "+r.size);return a}return n.forEach(function(i){var s=i.replace(GYe,"").match(VYe);s&&a.push({v:Vr(s[2]),t:s[1]})}),a}var WYe=/(^\s|\s$|\n)/;function KYe(e){return Mo(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}function XYe(e,t,r){return"<"+e+(r!=null?KYe(r):"")+(t!=null?(t.match(WYe)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function b8(e){if(gr&&Buffer.isBuffer(e))return e.toString("utf8");if(typeof e=="string")return e;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return Vr(_d(f8(e)));throw new Error("Bad input format: expected Buffer or string")}var vm=/<(\/?)([^\s?><!\/:]*:|)([^\s?<>:\/]+)(?:[\s?:\/][^>]*)?>/mg,YYe={CT:"http://schemas.openxmlformats.org/package/2006/content-types"},ZYe=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];function QYe(e,t){for(var r=1-2*(e[t+7]>>>7),n=((e[t+7]&127)<<4)+(e[t+6]>>>4&15),a=e[t+6]&15,i=5;i>=0;--i)a=a*256+e[t+i];return n==2047?a==0?r*(1/0):NaN:(n==0?n=-1022:(n-=1023,a+=Math.pow(2,52)),r*Math.pow(2,n-52)*a)}function JYe(e,t,r){var n=(t<0||1/t==-1/0?1:0)<<7,a=0,i=0,s=n?-t:t;isFinite(s)?s==0?a=i=0:(a=Math.floor(Math.log(s)/Math.LN2),i=s*Math.pow(2,52-a),a<=-1023&&(!isFinite(i)||i<Math.pow(2,52))?a=-1022:(i-=Math.pow(2,52),a+=1023)):(a=2047,i=isNaN(t)?26985:0);for(var o=0;o<=5;++o,i/=256)e[r+o]=i&255;e[r+6]=(a&15)<<4|i&15,e[r+7]=a>>4|n}var sJ=function(e){for(var t=[],r=10240,n=0;n<e[0].length;++n)if(e[0][n])for(var a=0,i=e[0][n].length;a<i;a+=r)t.push.apply(t,e[0][n].slice(a,a+r));return t},oJ=gr?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(t){return Buffer.isBuffer(t)?t:yd(t)})):sJ(e)}:sJ,lJ=function(e,t,r){for(var n=[],a=t;a<r;a+=2)n.push(String.fromCharCode(vl(e,a)));return n.join("").replace(Fa,"")},x8=gr?function(e,t,r){return Buffer.isBuffer(e)?e.toString("utf16le",t,r).replace(Fa,""):lJ(e,t,r)}:lJ,cJ=function(e,t,r){for(var n=[],a=t;a<t+r;++a)n.push(("0"+e[a].toString(16)).slice(-2));return n.join("")},Nue=gr?function(e,t,r){return Buffer.isBuffer(e)?e.toString("hex",t,t+r):cJ(e,t,r)}:cJ,uJ=function(e,t,r){for(var n=[],a=t;a<r;a++)n.push(String.fromCharCode(Tf(e,a)));return n.join("")},fg=gr?function(t,r,n){return Buffer.isBuffer(t)?t.toString("utf8",r,n):uJ(t,r,n)}:uJ,Rue=function(e,t){var r=Ri(e,t);return r>0?fg(e,t+4,t+4+r-1):""},Mue=Rue,Due=function(e,t){var r=Ri(e,t);return r>0?fg(e,t+4,t+4+r-1):""},Oue=Due,Iue=function(e,t){var r=2*Ri(e,t);return r>0?fg(e,t+4,t+4+r-1):""},Lue=Iue,Pue=function(t,r){var n=Ri(t,r);return n>0?x8(t,r+4,r+4+n):""},Fue=Pue,Bue=function(e,t){var r=Ri(e,t);return r>0?fg(e,t+4,t+4+r):""},zue=Bue,jue=function(e,t){return QYe(e,t)},$b=jue,que=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};gr&&(Mue=function(t,r){if(!Buffer.isBuffer(t))return Rue(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},Oue=function(t,r){if(!Buffer.isBuffer(t))return Due(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},Lue=function(t,r){if(!Buffer.isBuffer(t))return Iue(t,r);var n=2*t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n-1)},Fue=function(t,r){if(!Buffer.isBuffer(t))return Pue(t,r);var n=t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n)},zue=function(t,r){if(!Buffer.isBuffer(t))return Bue(t,r);var n=t.readUInt32LE(r);return t.toString("utf8",r+4,r+4+n)},$b=function(t,r){return Buffer.isBuffer(t)?t.readDoubleLE(r):jue(t,r)},que=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array});var Tf=function(e,t){return e[t]},vl=function(e,t){return e[t+1]*256+e[t]},eZe=function(e,t){var r=e[t+1]*256+e[t];return r<32768?r:(65535-r+1)*-1},Ri=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},Du=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},tZe=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function Op(e,t){var r="",n,a,i=[],s,o,l,c;switch(t){case"dbcs":if(c=this.l,gr&&Buffer.isBuffer(this))r=this.slice(this.l,this.l+2*e).toString("utf16le");else for(l=0;l<e;++l)r+=String.fromCharCode(vl(this,c)),c+=2;e*=2;break;case"utf8":r=fg(this,this.l,this.l+e);break;case"utf16le":e*=2,r=x8(this,this.l,this.l+e);break;case"wstr":return Op.call(this,e,"dbcs");case"lpstr-ansi":r=Mue(this,this.l),e=4+Ri(this,this.l);break;case"lpstr-cp":r=Oue(this,this.l),e=4+Ri(this,this.l);break;case"lpwstr":r=Lue(this,this.l),e=4+2*Ri(this,this.l);break;case"lpp4":e=4+Ri(this,this.l),r=Fue(this,this.l),e&2&&(e+=2);break;case"8lpp4":e=4+Ri(this,this.l),r=zue(this,this.l),e&3&&(e+=4-(e&3));break;case"cstr":for(e=0,r="";(s=Tf(this,this.l+e++))!==0;)i.push(T1(s));r=i.join("");break;case"_wstr":for(e=0,r="";(s=vl(this,this.l+e))!==0;)i.push(T1(s)),e+=2;e+=2,r=i.join("");break;case"dbcs-cont":for(r="",c=this.l,l=0;l<e;++l){if(this.lens&&this.lens.indexOf(c)!==-1)return s=Tf(this,c),this.l=c+1,o=Op.call(this,e-l,s?"dbcs-cont":"sbcs-cont"),i.join("")+o;i.push(T1(vl(this,c))),c+=2}r=i.join(""),e*=2;break;case"cpstr":case"sbcs-cont":for(r="",c=this.l,l=0;l!=e;++l){if(this.lens&&this.lens.indexOf(c)!==-1)return s=Tf(this,c),this.l=c+1,o=Op.call(this,e-l,s?"dbcs-cont":"sbcs-cont"),i.join("")+o;i.push(T1(Tf(this,c))),c+=1}r=i.join("");break;default:switch(e){case 1:return n=Tf(this,this.l),this.l++,n;case 2:return n=(t==="i"?eZe:vl)(this,this.l),this.l+=2,n;case 4:case-4:return t==="i"||(this[this.l+3]&128)===0?(n=(e>0?Du:tZe)(this,this.l),this.l+=4,n):(a=Ri(this,this.l),this.l+=4,a);case 8:case-8:if(t==="f")return e==8?a=$b(this,this.l):a=$b([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,a;e=8;case 16:r=Nue(this,this.l,e);break}}return this.l+=e,r}var rZe=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24&255},nZe=function(e,t,r){e[r]=t&255,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},aZe=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255};function iZe(e,t,r){var n=0,a=0;if(r==="dbcs"){for(a=0;a!=t.length;++a)aZe(this,t.charCodeAt(a),this.l+2*a);n=2*t.length}else if(r==="sbcs"){for(t=t.replace(/[^\x00-\x7F]/g,"_"),a=0;a!=t.length;++a)this[this.l+a]=t.charCodeAt(a)&255;n=t.length}else if(r==="hex"){for(;a<e;++a)this[this.l++]=parseInt(t.slice(2*a,2*a+2),16)||0;return this}else if(r==="utf16le"){var i=Math.min(this.l+e,this.length);for(a=0;a<Math.min(t.length,e);++a){var s=t.charCodeAt(a);this[this.l++]=s&255,this[this.l++]=s>>8}for(;this.l<i;)this[this.l++]=0;return this}else switch(e){case 1:n=1,this[this.l]=t&255;break;case 2:n=2,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255;break;case 3:n=3,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255,t>>>=8,this[this.l+2]=t&255;break;case 4:n=4,rZe(this,t,this.l);break;case 8:if(n=8,r==="f"){JYe(this,t,this.l);break}case 16:break;case-4:n=4,nZe(this,t,this.l);break}return this.l+=n,this}function Uue(e,t){var r=Nue(this,this.l,e.length>>1);if(r!==e)throw new Error(t+"Expected "+e+" saw "+r);this.l+=e.length>>1}function la(e,t){e.l=t,e.read_shift=Op,e.chk=Uue,e.write_shift=iZe}function Ca(e,t){e.l+=t}function $n(e){var t=Kc(e);return la(t,0),t}function Hl(e,t,r){if(e){var n,a,i;la(e,e.l||0);for(var s=e.length,o=0,l=0;e.l<s;){o=e.read_shift(1),o&128&&(o=(o&127)+((e.read_shift(1)&127)<<7));var c=Xb[o]||Xb[65535];for(n=e.read_shift(1),i=n&127,a=1;a<4&&n&128;++a)i+=((n=e.read_shift(1))&127)<<7*a;l=e.l+i;var u=c.f&&c.f(e,i,r);if(e.l=l,t(u,c,o))return}}}function Z6(){var e=[],t=gr?256:2048,r=function(c){var u=$n(c);return la(u,0),u},n=r(t),a=function(){n&&(n.length>n.l&&(n=n.slice(0,n.l),n.l=n.length),n.length>0&&e.push(n),n=null)},i=function(c){return n&&c<n.length-n.l?n:(a(),n=r(Math.max(c+1,t)))},s=function(){return a(),Tc(e)},o=function(c){a(),n=c,n.l==null&&(n.l=n.length),i(t)};return{next:i,push:o,end:s,_bufs:e}}function Ip(e,t,r){var n=ca(e);if(t.s?(n.cRel&&(n.c+=t.s.c),n.rRel&&(n.r+=t.s.r)):(n.cRel&&(n.c+=t.c),n.rRel&&(n.r+=t.r)),!r||r.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function dJ(e,t,r){var n=ca(e);return n.s=Ip(n.s,t.s,r),n.e=Ip(n.e,t.s,r),n}function Lp(e,t){if(e.cRel&&e.c<0)for(e=ca(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=ca(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var r=Wt(e);return!e.cRel&&e.cRel!=null&&(r=lZe(r)),!e.rRel&&e.rRel!=null&&(r=sZe(r)),r}function YM(e,t){return e.s.r==0&&!e.s.rRel&&e.e.r==(t.biff>=12?1048575:t.biff>=8?65536:16384)&&!e.e.rRel?(e.s.cRel?"":"$")+Hn(e.s.c)+":"+(e.e.cRel?"":"$")+Hn(e.e.c):e.s.c==0&&!e.s.cRel&&e.e.c==(t.biff>=12?16383:255)&&!e.e.cRel?(e.s.rRel?"":"$")+ua(e.s.r)+":"+(e.e.rRel?"":"$")+ua(e.e.r):Lp(e.s,t.biff)+":"+Lp(e.e,t.biff)}function y8(e){return parseInt(oZe(e),10)-1}function ua(e){return""+(e+1)}function sZe(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function oZe(e){return e.replace(/\$(\d+)$/,"$1")}function _8(e){for(var t=cZe(e),r=0,n=0;n!==t.length;++n)r=26*r+t.charCodeAt(n)-64;return r-1}function Hn(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function lZe(e){return e.replace(/^([A-Z])/,"$$$1")}function cZe(e){return e.replace(/^\$([A-Z])/,"$1")}function uZe(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function La(e){for(var t=0,r=0,n=0;n<e.length;++n){var a=e.charCodeAt(n);a>=48&&a<=57?t=10*t+(a-48):a>=65&&a<=90&&(r=26*r+(a-64))}return{c:r-1,r:t-1}}function Wt(e){for(var t=e.c+1,r="";t;t=(t-1)/26|0)r=String.fromCharCode((t-1)%26+65)+r;return r+(e.r+1)}function F0(e){var t=e.indexOf(":");return t==-1?{s:La(e),e:La(e)}:{s:La(e.slice(0,t)),e:La(e.slice(t+1))}}function xr(e,t){return typeof t>"u"||typeof t=="number"?xr(e.s,e.e):(typeof e!="string"&&(e=Wt(e)),typeof t!="string"&&(t=Wt(t)),e==t?e:e+":"+t)}function gn(e){var t={s:{c:0,r:0},e:{c:0,r:0}},r=0,n=0,a=0,i=e.length;for(r=0;n<i&&!((a=e.charCodeAt(n)-64)<1||a>26);++n)r=26*r+a;for(t.s.c=--r,r=0;n<i&&!((a=e.charCodeAt(n)-48)<0||a>9);++n)r=10*r+a;if(t.s.r=--r,n===i||a!=10)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++n,r=0;n!=i&&!((a=e.charCodeAt(n)-64)<1||a>26);++n)r=26*r+a;for(t.e.c=--r,r=0;n!=i&&!((a=e.charCodeAt(n)-48)<0||a>9);++n)r=10*r+a;return t.e.r=--r,t}function fJ(e,t){var r=e.t=="d"&&t instanceof Date;if(e.z!=null)try{return e.w=ms(e.z,r?Ba(t):t)}catch{}try{return e.w=ms((e.XF||{}).numFmtId||(r?14:0),r?Ba(t):t)}catch{return""+t}}function Pl(e,t,r){return e==null||e.t==null||e.t=="z"?"":e.w!==void 0?e.w:(e.t=="d"&&!e.z&&r&&r.dateNF&&(e.z=r.dateNF),e.t=="e"?Sd[e.v]||e.v:t==null?fJ(e,e.v):fJ(e,t))}function Jc(e,t){var r=t&&t.sheet?t.sheet:"Sheet1",n={};return n[r]=e,{SheetNames:[r],Sheets:n}}function $ue(e,t,r){var n=r||{},a=e?Array.isArray(e):n.dense,i=e||(a?[]:{}),s=0,o=0;if(i&&n.origin!=null){if(typeof n.origin=="number")s=n.origin;else{var l=typeof n.origin=="string"?La(n.origin):n.origin;s=l.r,o=l.c}i["!ref"]||(i["!ref"]="A1:A1")}var c={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(i["!ref"]){var u=gn(i["!ref"]);c.s.c=u.s.c,c.s.r=u.s.r,c.e.c=Math.max(c.e.c,u.e.c),c.e.r=Math.max(c.e.r,u.e.r),s==-1&&(c.e.r=s=u.e.r+1)}for(var f=0;f!=t.length;++f)if(t[f]){if(!Array.isArray(t[f]))throw new Error("aoa_to_sheet expects an array of arrays");for(var p=0;p!=t[f].length;++p)if(!(typeof t[f][p]>"u")){var m={v:t[f][p]},b=s+f,v=o+p;if(c.s.r>b&&(c.s.r=b),c.s.c>v&&(c.s.c=v),c.e.r<b&&(c.e.r=b),c.e.c<v&&(c.e.c=v),t[f][p]&&typeof t[f][p]=="object"&&!Array.isArray(t[f][p])&&!(t[f][p]instanceof Date))m=t[f][p];else if(Array.isArray(m.v)&&(m.f=t[f][p][1],m.v=m.v[0]),m.v===null)if(m.f)m.t="n";else if(n.nullError)m.t="e",m.v=0;else if(n.sheetStubs)m.t="z";else continue;else typeof m.v=="number"?m.t="n":typeof m.v=="boolean"?m.t="b":m.v instanceof Date?(m.z=n.dateNF||Yt[14],n.cellDates?(m.t="d",m.w=ms(m.z,Ba(m.v))):(m.t="n",m.v=Ba(m.v),m.w=ms(m.z,m.v))):m.t="s";if(a)i[b]||(i[b]=[]),i[b][v]&&i[b][v].z&&(m.z=i[b][v].z),i[b][v]=m;else{var y=Wt({c:v,r:b});i[y]&&i[y].z&&(m.z=i[y].z),i[y]=m}}}return c.s.c<1e7&&(i["!ref"]=xr(c)),i}function B0(e,t){return $ue(null,e,t)}function dZe(e){return e.read_shift(4,"i")}function Sa(e){var t=e.read_shift(4);return t===0?"":e.read_shift(t,"dbcs")}function fZe(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function w8(e,t){var r=e.l,n=e.read_shift(1),a=Sa(e),i=[],s={t:a,h:a};if((n&1)!==0){for(var o=e.read_shift(4),l=0;l!=o;++l)i.push(fZe(e));s.r=i}else s.r=[{ich:0,ifnt:0}];return e.l=r+t,s}var hZe=w8;function ys(e){var t=e.read_shift(4),r=e.read_shift(2);return r+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:r}}function wd(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}var pZe=Sa;function E8(e){var t=e.read_shift(4);return t===0||t===4294967295?"":e.read_shift(t,"dbcs")}var mZe=Sa,Q6=E8;function S8(e){var t=e.slice(e.l,e.l+4),r=t[0]&1,n=t[0]&2;e.l+=4;var a=n===0?$b([0,0,0,0,t[0]&252,t[1],t[2],t[3]],0):Du(t,0)>>2;return r?a/100:a}function Hue(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}var Ed=Hue;function _a(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function gZe(e){var t={},r=e.read_shift(1),n=r>>>1,a=e.read_shift(1),i=e.read_shift(2,"i"),s=e.read_shift(1),o=e.read_shift(1),l=e.read_shift(1);switch(e.l++,n){case 0:t.auto=1;break;case 1:t.index=a;var c=Gu[a];c&&(t.rgb=xm(c));break;case 2:t.rgb=xm([s,o,l]);break;case 3:t.theme=a;break}return i!=0&&(t.tint=i>0?i/32767:i/32768),t}function vZe(e){var t=e.read_shift(1);e.l++;var r={fBold:t&1,fItalic:t&2,fUnderline:t&4,fStrikeout:t&8,fOutline:t&16,fShadow:t&32,fCondense:t&64,fExtend:t&128};return r}function Gue(e,t){var r={2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"},n=e.read_shift(4);switch(n){case 0:return"";case 4294967295:case 4294967294:return r[e.read_shift(4)]||""}if(n>400)throw new Error("Unsupported Clipboard: "+n.toString(16));return e.l-=4,e.read_shift(0,t==1?"lpstr":"lpwstr")}function bZe(e){return Gue(e,1)}function xZe(e){return Gue(e,2)}var C8=2,ti=3,k1=11,hJ=12,Hb=19,N1=64,yZe=65,_Ze=71,wZe=4108,EZe=4126,Jn=80,Vue=81,SZe=[Jn,Vue],CZe={1:{n:"CodePage",t:C8},2:{n:"Category",t:Jn},3:{n:"PresentationFormat",t:Jn},4:{n:"ByteCount",t:ti},5:{n:"LineCount",t:ti},6:{n:"ParagraphCount",t:ti},7:{n:"SlideCount",t:ti},8:{n:"NoteCount",t:ti},9:{n:"HiddenCount",t:ti},10:{n:"MultimediaClipCount",t:ti},11:{n:"ScaleCrop",t:k1},12:{n:"HeadingPairs",t:wZe},13:{n:"TitlesOfParts",t:EZe},14:{n:"Manager",t:Jn},15:{n:"Company",t:Jn},16:{n:"LinksUpToDate",t:k1},17:{n:"CharacterCount",t:ti},19:{n:"SharedDoc",t:k1},22:{n:"HyperlinksChanged",t:k1},23:{n:"AppVersion",t:ti,p:"version"},24:{n:"DigSig",t:yZe},26:{n:"ContentType",t:Jn},27:{n:"ContentStatus",t:Jn},28:{n:"Language",t:Jn},29:{n:"Version",t:Jn},255:{},2147483648:{n:"Locale",t:Hb},2147483651:{n:"Behavior",t:Hb},1919054434:{}},TZe={1:{n:"CodePage",t:C8},2:{n:"Title",t:Jn},3:{n:"Subject",t:Jn},4:{n:"Author",t:Jn},5:{n:"Keywords",t:Jn},6:{n:"Comments",t:Jn},7:{n:"Template",t:Jn},8:{n:"LastAuthor",t:Jn},9:{n:"RevNumber",t:Jn},10:{n:"EditTime",t:N1},11:{n:"LastPrinted",t:N1},12:{n:"CreatedDate",t:N1},13:{n:"ModifiedDate",t:N1},14:{n:"PageCount",t:ti},15:{n:"WordCount",t:ti},16:{n:"CharCount",t:ti},17:{n:"Thumbnail",t:_Ze},18:{n:"Application",t:Jn},19:{n:"DocSecurity",t:ti},255:{},2147483648:{n:"Locale",t:Hb},2147483651:{n:"Behavior",t:Hb},1919054434:{}},pJ={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"},AZe=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function kZe(e){return e.map(function(t){return[t>>16&255,t>>8&255,t&255]})}var NZe=kZe([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Gu=ca(NZe),Sd={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},Wue={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},mJ={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"};function RZe(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function MZe(e){var t=RZe();if(!e||!e.match)return t;var r={};if((e.match(Aa)||[]).forEach(function(n){var a=Ut(n);switch(a[0].replace(zYe,"<")){case"<?xml":break;case"<Types":t.xmlns=a["xmlns"+(a[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":r[a.Extension]=a.ContentType;break;case"<Override":t[mJ[a.ContentType]]!==void 0&&t[mJ[a.ContentType]].push(a.PartName);break}}),t.xmlns!==YYe.CT)throw new Error("Unknown Namespace: "+t.xmlns);return t.calcchain=t.calcchains.length>0?t.calcchains[0]:"",t.sst=t.strs.length>0?t.strs[0]:"",t.style=t.styles.length>0?t.styles[0]:"",t.defaults=r,delete t.calcchains,t}var Df={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function J6(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function Pp(e,t){var r={"!id":{}};if(!e)return r;t.charAt(0)!=="/"&&(t="/"+t);var n={};return(e.match(Aa)||[]).forEach(function(a){var i=Ut(a);if(i[0]==="<Relationship"){var s={};s.Type=i.Type,s.Target=i.Target,s.Id=i.Id,i.TargetMode&&(s.TargetMode=i.TargetMode);var o=i.TargetMode==="External"?i.Target:bp(i.Target,t);r[o]=s,n[i.Id]=s}}),r["!id"]=n,r}var DZe="application/vnd.oasis.opendocument.spreadsheet";function OZe(e,t){for(var r=b8(e),n,a;n=vm.exec(r);)switch(n[3]){case"manifest":break;case"file-entry":if(a=Ut(n[0],!1),a.path=="/"&&a.type!==DZe)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(t&&t.WTF)throw n}}var Fp=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]],IZe=(function(){for(var e=new Array(Fp.length),t=0;t<Fp.length;++t){var r=Fp[t],n="(?:"+r[0].slice(0,r[0].indexOf(":"))+":)"+r[0].slice(r[0].indexOf(":")+1);e[t]=new RegExp("<"+n+"[^>]*>([\\s\\S]*?)</"+n+">")}return e})();function Kue(e){var t={};e=Vr(e);for(var r=0;r<Fp.length;++r){var n=Fp[r],a=e.match(IZe[r]);a!=null&&a.length>0&&(t[n[1]]=yr(a[1])),n[2]==="date"&&t[n[1]]&&(t[n[1]]=ta(t[n[1]]))}return t}var LZe=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]];function Xue(e,t,r,n){var a=[];if(typeof e=="string")a=iJ(e,n);else for(var i=0;i<e.length;++i)a=a.concat(e[i].map(function(u){return{v:u}}));var s=typeof t=="string"?iJ(t,n).map(function(u){return u.v}):t,o=0,l=0;if(s.length>0)for(var c=0;c!==a.length;c+=2){switch(l=+a[c+1].v,a[c].v){case"Worksheets":case"工作表":case"Листы":case"أوراق العمل":case"ワークシート":case"גליונות עבודה":case"Arbeitsblätter":case"Çalışma Sayfaları":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de cálculo":case"Planilhas":case"Regneark":case"Hojas de cálculo":case"Werkbladen":r.Worksheets=l,r.SheetNames=s.slice(o,o+l);break;case"Named Ranges":case"Rangos con nombre":case"名前付き一覧":case"Benannte Bereiche":case"Navngivne områder":r.NamedRanges=l,r.DefinedNames=s.slice(o,o+l);break;case"Charts":case"Diagramme":r.Chartsheets=l,r.ChartNames=s.slice(o,o+l);break}o+=l}}function PZe(e,t,r){var n={};return t||(t={}),e=Vr(e),LZe.forEach(function(a){var i=(e.match(gm(a[0]))||[])[1];switch(a[2]){case"string":i&&(t[a[1]]=yr(i));break;case"bool":t[a[1]]=i==="true";break;case"raw":var s=e.match(new RegExp("<"+a[0]+"[^>]*>([\\s\\S]*?)</"+a[0]+">"));s&&s.length>0&&(n[a[1]]=s[1]);break}}),n.HeadingPairs&&n.TitlesOfParts&&Xue(n.HeadingPairs,n.TitlesOfParts,t,r),t}var FZe=/<[^>]+>[^<]*/g;function BZe(e,t){var r={},n="",a=e.match(FZe);if(a)for(var i=0;i!=a.length;++i){var s=a[i],o=Ut(s);switch(o[0]){case"<?xml":break;case"<Properties":break;case"<property":n=yr(o.name);break;case"</property>":n=null;break;default:if(s.indexOf("<vt:")===0){var l=s.split(">"),c=l[0].slice(4),u=l[1];switch(c){case"lpstr":case"bstr":case"lpwstr":r[n]=yr(u);break;case"bool":r[n]=Zr(u);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":r[n]=parseInt(u,10);break;case"r4":case"r8":case"decimal":r[n]=parseFloat(u);break;case"filetime":case"date":r[n]=ta(u);break;case"cy":case"error":r[n]=yr(u);break;default:if(c.slice(-1)=="/")break;t.WTF&&typeof console<"u"&&console.warn("Unexpected",s,c,l)}}else if(s.slice(0,2)!=="</"){if(t.WTF)throw new Error(s)}}}return r}var zZe={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"},ZM;function jZe(e,t,r){ZM||(ZM=m8(zZe)),t=ZM[t]||t,e[t]=r}function T8(e){var t=e.read_shift(4),r=e.read_shift(4);return new Date((r/1e7*Math.pow(2,32)+t/1e7-11644473600)*1e3).toISOString().replace(/\.000/,"")}function Yue(e,t,r){var n=e.l,a=e.read_shift(0,"lpstr-cp");if(r)for(;e.l-n&3;)++e.l;return a}function Zue(e,t,r){var n=e.read_shift(0,"lpwstr");return n}function Que(e,t,r){return t===31?Zue(e):Yue(e,t,r)}function eD(e,t,r){return Que(e,t,r===!1?0:4)}function qZe(e,t){if(!t)throw new Error("VtUnalignedString must have positive length");return Que(e,t,0)}function UZe(e){for(var t=e.read_shift(4),r=[],n=0;n!=t;++n){var a=e.l;r[n]=e.read_shift(0,"lpwstr").replace(Fa,""),e.l-a&2&&(e.l+=2)}return r}function $Ze(e){for(var t=e.read_shift(4),r=[],n=0;n!=t;++n)r[n]=e.read_shift(0,"lpstr-cp").replace(Fa,"");return r}function HZe(e){var t=e.l,r=Gb(e,Vue);e[e.l]==0&&e[e.l+1]==0&&e.l-t&2&&(e.l+=2);var n=Gb(e,ti);return[r,n]}function GZe(e){for(var t=e.read_shift(4),r=[],n=0;n<t/2;++n)r.push(HZe(e));return r}function gJ(e,t){for(var r=e.read_shift(4),n={},a=0;a!=r;++a){var i=e.read_shift(4),s=e.read_shift(4);n[i]=e.read_shift(s,t===1200?"utf16le":"utf8").replace(Fa,"").replace(vp,"!"),t===1200&&s%2&&(e.l+=2)}return e.l&3&&(e.l=e.l>>3<<2),n}function Jue(e){var t=e.read_shift(4),r=e.slice(e.l,e.l+t);return e.l+=t,(t&3)>0&&(e.l+=4-(t&3)&3),r}function VZe(e){var t={};return t.Size=e.read_shift(4),e.l+=t.Size+3-(t.Size-1)%4,t}function Gb(e,t,r){var n=e.read_shift(2),a,i=r||{};if(e.l+=2,t!==hJ&&n!==t&&SZe.indexOf(t)===-1&&!((t&65534)==4126&&(n&65534)==4126))throw new Error("Expected type "+t+" saw "+n);switch(t===hJ?n:t){case 2:return a=e.read_shift(2,"i"),i.raw||(e.l+=2),a;case 3:return a=e.read_shift(4,"i"),a;case 11:return e.read_shift(4)!==0;case 19:return a=e.read_shift(4),a;case 30:return Yue(e,n,4).replace(Fa,"");case 31:return Zue(e);case 64:return T8(e);case 65:return Jue(e);case 71:return VZe(e);case 80:return eD(e,n,!i.raw).replace(Fa,"");case 81:return qZe(e,n).replace(Fa,"");case 4108:return GZe(e);case 4126:case 4127:return n==4127?UZe(e):$Ze(e);default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+n)}}function vJ(e,t){var r=e.l,n=e.read_shift(4),a=e.read_shift(4),i=[],s=0,o=0,l=-1,c={};for(s=0;s!=a;++s){var u=e.read_shift(4),f=e.read_shift(4);i[s]=[u,f+r]}i.sort(function(S,C){return S[1]-C[1]});var p={};for(s=0;s!=a;++s){if(e.l!==i[s][1]){var m=!0;if(s>0&&t)switch(t[i[s-1][0]].t){case 2:e.l+2===i[s][1]&&(e.l+=2,m=!1);break;case 80:e.l<=i[s][1]&&(e.l=i[s][1],m=!1);break;case 4108:e.l<=i[s][1]&&(e.l=i[s][1],m=!1);break}if((!t||s==0)&&e.l<=i[s][1]&&(m=!1,e.l=i[s][1]),m)throw new Error("Read Error: Expected address "+i[s][1]+" at "+e.l+" :"+s)}if(t){var b=t[i[s][0]];if(p[b.n]=Gb(e,b.t,{raw:!0}),b.p==="version"&&(p[b.n]=String(p[b.n]>>16)+"."+("0000"+String(p[b.n]&65535)).slice(-4)),b.n=="CodePage")switch(p[b.n]){case 0:p[b.n]=1252;case 874:case 932:case 936:case 949:case 950:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 1e4:case 1200:case 1201:case 1252:case 65e3:case-536:case 65001:case-535:Ls(o=p[b.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+p[b.n])}}else if(i[s][0]===1){if(o=p.CodePage=Gb(e,C8),Ls(o),l!==-1){var v=e.l;e.l=i[l][1],c=gJ(e,o),e.l=v}}else if(i[s][0]===0){if(o===0){l=s,e.l=i[s+1][1];continue}c=gJ(e,o)}else{var y=c[i[s][0]],_;switch(e[e.l]){case 65:e.l+=4,_=Jue(e);break;case 30:e.l+=4,_=eD(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 31:e.l+=4,_=eD(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4,_=e.read_shift(4,"i");break;case 19:e.l+=4,_=e.read_shift(4);break;case 5:e.l+=4,_=e.read_shift(8,"f");break;case 11:e.l+=4,_=yn(e,4);break;case 64:e.l+=4,_=ta(T8(e));break;default:throw new Error("unparsed value: "+e[e.l])}p[y]=_}}return e.l=r+n,p}function bJ(e,t,r){var n=e.content;if(!n)return{};la(n,0);var a,i,s,o,l=0;n.chk("feff","Byte Order: "),n.read_shift(2);var c=n.read_shift(4),u=n.read_shift(16);if(u!==br.utils.consts.HEADER_CLSID&&u!==r)throw new Error("Bad PropertySet CLSID "+u);if(a=n.read_shift(4),a!==1&&a!==2)throw new Error("Unrecognized #Sets: "+a);if(i=n.read_shift(16),o=n.read_shift(4),a===1&&o!==n.l)throw new Error("Length mismatch: "+o+" !== "+n.l);a===2&&(s=n.read_shift(16),l=n.read_shift(4));var f=vJ(n,t),p={SystemIdentifier:c};for(var m in f)p[m]=f[m];if(p.FMTID=i,a===1)return p;if(l-n.l==2&&(n.l+=2),n.l!==l)throw new Error("Length mismatch 2: "+n.l+" !== "+l);var b;try{b=vJ(n,null)}catch{}for(m in b)p[m]=b[m];return p.FMTID=[i,s],p}function _c(e,t){return e.read_shift(t),null}function WZe(e,t,r){for(var n=[],a=e.l+t;e.l<a;)n.push(r(e,a-e.l));if(a!==e.l)throw new Error("Slurp error");return n}function yn(e,t){return e.read_shift(t)===1}function In(e){return e.read_shift(2,"u")}function ede(e,t){return WZe(e,t,In)}function KZe(e){var t=e.read_shift(1),r=e.read_shift(1);return r===1?t:t===1}function hg(e,t,r){var n=e.read_shift(r&&r.biff>=12?2:1),a="sbcs-cont";if(r&&r.biff>=8,!r||r.biff==8){var i=e.read_shift(1);i&&(a="dbcs-cont")}else r.biff==12&&(a="wstr");r.biff>=2&&r.biff<=5&&(a="cpstr");var s=n?e.read_shift(n,a):"";return s}function XZe(e){var t=e.read_shift(2),r=e.read_shift(1),n=r&4,a=r&8,i=1+(r&1),s=0,o,l={};a&&(s=e.read_shift(2)),n&&(o=e.read_shift(4));var c=i==2?"dbcs-cont":"sbcs-cont",u=t===0?"":e.read_shift(t,c);return a&&(e.l+=4*s),n&&(e.l+=o),l.t=u,a||(l.raw="<t>"+l.t+"</t>",l.r=l.t),l}function sd(e,t,r){var n;if(r){if(r.biff>=2&&r.biff<=5)return e.read_shift(t,"cpstr");if(r.biff>=12)return e.read_shift(t,"dbcs-cont")}var a=e.read_shift(1);return a===0?n=e.read_shift(t,"sbcs-cont"):n=e.read_shift(t,"dbcs-cont"),n}function pg(e,t,r){var n=e.read_shift(r&&r.biff==2?1:2);return n===0?(e.l++,""):sd(e,n,r)}function Cd(e,t,r){if(r.biff>5)return pg(e,t,r);var n=e.read_shift(1);return n===0?(e.l++,""):e.read_shift(n,r.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function YZe(e){var t=e.read_shift(1);e.l++;var r=e.read_shift(2);return e.l+=2,[t,r]}function ZZe(e){var t=e.read_shift(4),r=e.l,n=!1;t>24&&(e.l+=t-24,e.read_shift(16)==="795881f43b1d7f48af2c825dc4852763"&&(n=!0),e.l=r);var a=e.read_shift((n?t-24:t)>>1,"utf16le").replace(Fa,"");return n&&(e.l+=24),a}function QZe(e){for(var t=e.read_shift(2),r="";t-- >0;)r+="../";var n=e.read_shift(0,"lpstr-ansi");if(e.l+=2,e.read_shift(2)!=57005)throw new Error("Bad FileMoniker");var a=e.read_shift(4);if(a===0)return r+n.replace(/\\/g,"/");var i=e.read_shift(4);if(e.read_shift(2)!=3)throw new Error("Bad FileMoniker");var s=e.read_shift(i>>1,"utf16le").replace(Fa,"");return r+s}function JZe(e,t){var r=e.read_shift(16);switch(r){case"e0c9ea79f9bace118c8200aa004ba90b":return ZZe(e);case"0303000000000000c000000000000046":return QZe(e);default:throw new Error("Unsupported Moniker "+r)}}function R1(e){var t=e.read_shift(4),r=t>0?e.read_shift(t,"utf16le").replace(Fa,""):"";return r}function eQe(e,t){var r=e.l+t,n=e.read_shift(4);if(n!==2)throw new Error("Unrecognized streamVersion: "+n);var a=e.read_shift(2);e.l+=2;var i,s,o,l,c="",u,f;a&16&&(i=R1(e,r-e.l)),a&128&&(s=R1(e,r-e.l)),(a&257)===257&&(o=R1(e,r-e.l)),(a&257)===1&&(l=JZe(e,r-e.l)),a&8&&(c=R1(e,r-e.l)),a&32&&(u=e.read_shift(16)),a&64&&(f=T8(e)),e.l=r;var p=s||o||l||"";p&&c&&(p+="#"+c),p||(p="#"+c),a&2&&p.charAt(0)=="/"&&p.charAt(1)!="/"&&(p="file://"+p);var m={Target:p};return u&&(m.guid=u),f&&(m.time=f),i&&(m.Tooltip=i),m}function tde(e){var t=e.read_shift(1),r=e.read_shift(1),n=e.read_shift(1),a=e.read_shift(1);return[t,r,n,a]}function rde(e,t){var r=tde(e);return r[3]=0,r}function $o(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2);return{r:t,c:r,ixfe:n}}function tQe(e){var t=e.read_shift(2),r=e.read_shift(2);return e.l+=8,{type:t,flags:r}}function rQe(e,t,r){return t===0?"":Cd(e,t,r)}function nQe(e,t,r){var n=r.biff>8?4:2,a=e.read_shift(n),i=e.read_shift(n,"i"),s=e.read_shift(n,"i");return[a,i,s]}function nde(e){var t=e.read_shift(2),r=S8(e);return[t,r]}function aQe(e,t,r){e.l+=4,t-=4;var n=e.l+t,a=hg(e,t,r),i=e.read_shift(2);if(n-=e.l,i!==n)throw new Error("Malformed AddinUdf: padding = "+n+" != "+i);return e.l+=i,a}function Sy(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),a=e.read_shift(2);return{s:{c:n,r:t},e:{c:a,r}}}function ade(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(1),a=e.read_shift(1);return{s:{c:n,r:t},e:{c:a,r}}}var iQe=ade;function ide(e){e.l+=4;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2);return e.l+=12,[r,t,n]}function sQe(e){var t={};return e.l+=4,e.l+=16,t.fSharedNote=e.read_shift(2),e.l+=4,t}function oQe(e){var t={};return e.l+=4,e.cf=e.read_shift(2),t}function pa(e){e.l+=2,e.l+=e.read_shift(2)}var lQe={0:pa,4:pa,5:pa,6:pa,7:oQe,8:pa,9:pa,10:pa,11:pa,12:pa,13:sQe,14:pa,15:pa,16:pa,17:pa,18:pa,19:pa,20:pa,21:ide};function cQe(e,t){for(var r=e.l+t,n=[];e.l<r;){var a=e.read_shift(2);e.l-=2;try{n.push(lQe[a](e,r-e.l))}catch{return e.l=r,n}}return e.l!=r&&(e.l=r),n}function M1(e,t){var r={BIFFVer:0,dt:0};switch(r.BIFFVer=e.read_shift(2),t-=2,t>=2&&(r.dt=e.read_shift(2),e.l-=2),r.BIFFVer){case 1536:case 1280:case 1024:case 768:case 512:case 2:case 7:break;default:if(t>6)throw new Error("Unexpected BIFF Ver "+r.BIFFVer)}return e.read_shift(t),r}function uQe(e,t){return t===0||e.read_shift(2),1200}function dQe(e,t,r){if(r.enc)return e.l+=t,"";var n=e.l,a=Cd(e,0,r);return e.read_shift(t+n-e.l),a}function fQe(e,t,r){var n=r&&r.biff==8||t==2?e.read_shift(2):(e.l+=t,0);return{fDialog:n&16,fBelow:n&64,fRight:n&128}}function hQe(e,t,r){var n=e.read_shift(4),a=e.read_shift(1)&3,i=e.read_shift(1);switch(i){case 0:i="Worksheet";break;case 1:i="Macrosheet";break;case 2:i="Chartsheet";break;case 6:i="VBAModule";break}var s=hg(e,0,r);return s.length===0&&(s="Sheet1"),{pos:n,hs:a,dt:i,name:s}}function pQe(e,t){for(var r=e.l+t,n=e.read_shift(4),a=e.read_shift(4),i=[],s=0;s!=a&&e.l<r;++s)i.push(XZe(e));return i.Count=n,i.Unique=a,i}function mQe(e,t){var r={};return r.dsst=e.read_shift(2),e.l+=t-2,r}function gQe(e){var t={};t.r=e.read_shift(2),t.c=e.read_shift(2),t.cnt=e.read_shift(2)-t.c;var r=e.read_shift(2);e.l+=4;var n=e.read_shift(1);return e.l+=3,n&7&&(t.level=n&7),n&32&&(t.hidden=!0),n&64&&(t.hpt=r/20),t}function vQe(e){var t=tQe(e);if(t.type!=2211)throw new Error("Invalid Future Record "+t.type);var r=e.read_shift(4);return r!==0}function bQe(e){return e.read_shift(2),e.read_shift(4)}function xJ(e,t,r){var n=0;r&&r.biff==2||(n=e.read_shift(2));var a=e.read_shift(2);r&&r.biff==2&&(n=1-(a>>15),a&=32767);var i={Unsynced:n&1,DyZero:(n&2)>>1,ExAsc:(n&4)>>2,ExDsc:(n&8)>>3};return[i,a]}function xQe(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),a=e.read_shift(2),i=e.read_shift(2),s=e.read_shift(2),o=e.read_shift(2),l=e.read_shift(2),c=e.read_shift(2);return{Pos:[t,r],Dim:[n,a],Flags:i,CurTab:s,FirstTab:o,Selected:l,TabRatio:c}}function yQe(e,t,r){if(r&&r.biff>=2&&r.biff<5)return{};var n=e.read_shift(2);return{RTL:n&64}}function _Qe(){}function wQe(e,t,r){var n={dyHeight:e.read_shift(2),fl:e.read_shift(2)};switch(r&&r.biff||8){case 2:break;case 3:case 4:e.l+=2;break;default:e.l+=10;break}return n.name=hg(e,0,r),n}function EQe(e){var t=$o(e);return t.isst=e.read_shift(4),t}function SQe(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=e.l+t,a=$o(e);r.biff==2&&e.l++;var i=pg(e,n-e.l,r);return a.val=i,a}function CQe(e,t,r){var n=e.read_shift(2),a=Cd(e,0,r);return[n,a]}var TQe=Cd;function yJ(e,t,r){var n=e.l+t,a=r.biff==8||!r.biff?4:2,i=e.read_shift(a),s=e.read_shift(a),o=e.read_shift(2),l=e.read_shift(2);return e.l=n,{s:{r:i,c:o},e:{r:s,c:l}}}function AQe(e){var t=e.read_shift(2),r=e.read_shift(2),n=nde(e);return{r:t,c:r,ixfe:n[0],rknum:n[1]}}function kQe(e,t){for(var r=e.l+t-2,n=e.read_shift(2),a=e.read_shift(2),i=[];e.l<r;)i.push(nde(e));if(e.l!==r)throw new Error("MulRK read error");var s=e.read_shift(2);if(i.length!=s-a+1)throw new Error("MulRK length mismatch");return{r:n,c:a,C:s,rkrec:i}}function NQe(e,t){for(var r=e.l+t-2,n=e.read_shift(2),a=e.read_shift(2),i=[];e.l<r;)i.push(e.read_shift(2));if(e.l!==r)throw new Error("MulBlank read error");var s=e.read_shift(2);if(i.length!=s-a+1)throw new Error("MulBlank length mismatch");return{r:n,c:a,C:s,ixfe:i}}function RQe(e,t,r,n){var a={},i=e.read_shift(4),s=e.read_shift(4),o=e.read_shift(4),l=e.read_shift(2);return a.patternType=AZe[o>>26],n.cellStyles&&(a.alc=i&7,a.fWrap=i>>3&1,a.alcV=i>>4&7,a.fJustLast=i>>7&1,a.trot=i>>8&255,a.cIndent=i>>16&15,a.fShrinkToFit=i>>20&1,a.iReadOrder=i>>22&2,a.fAtrNum=i>>26&1,a.fAtrFnt=i>>27&1,a.fAtrAlc=i>>28&1,a.fAtrBdr=i>>29&1,a.fAtrPat=i>>30&1,a.fAtrProt=i>>31&1,a.dgLeft=s&15,a.dgRight=s>>4&15,a.dgTop=s>>8&15,a.dgBottom=s>>12&15,a.icvLeft=s>>16&127,a.icvRight=s>>23&127,a.grbitDiag=s>>30&3,a.icvTop=o&127,a.icvBottom=o>>7&127,a.icvDiag=o>>14&127,a.dgDiag=o>>21&15,a.icvFore=l&127,a.icvBack=l>>7&127,a.fsxButton=l>>14&1),a}function MQe(e,t,r){var n={};return n.ifnt=e.read_shift(2),n.numFmtId=e.read_shift(2),n.flags=e.read_shift(2),n.fStyle=n.flags>>2&1,t-=6,n.data=RQe(e,t,n.fStyle,r),n}function DQe(e){e.l+=4;var t=[e.read_shift(2),e.read_shift(2)];if(t[0]!==0&&t[0]--,t[1]!==0&&t[1]--,t[0]>7||t[1]>7)throw new Error("Bad Gutters: "+t.join("|"));return t}function _J(e,t,r){var n=$o(e);(r.biff==2||t==9)&&++e.l;var a=KZe(e);return n.val=a,n.t=a===!0||a===!1?"b":"e",n}function OQe(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=$o(e),a=_a(e);return n.val=a,n}var wJ=rQe;function IQe(e,t,r){var n=e.l+t,a=e.read_shift(2),i=e.read_shift(2);if(r.sbcch=i,i==1025||i==14849)return[i,a];if(i<1||i>255)throw new Error("Unexpected SupBook type: "+i);for(var s=sd(e,i),o=[];n>e.l;)o.push(pg(e));return[i,a,s,o]}function EJ(e,t,r){var n=e.read_shift(2),a,i={fBuiltIn:n&1,fWantAdvise:n>>>1&1,fWantPict:n>>>2&1,fOle:n>>>3&1,fOleLink:n>>>4&1,cf:n>>>5&1023,fIcon:n>>>15&1};return r.sbcch===14849&&(a=aQe(e,t-2,r)),i.body=a||e.read_shift(t-2),typeof a=="string"&&(i.Name=a),i}var LQe=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"];function SJ(e,t,r){var n=e.l+t,a=e.read_shift(2),i=e.read_shift(1),s=e.read_shift(1),o=e.read_shift(r&&r.biff==2?1:2),l=0;(!r||r.biff>=5)&&(r.biff!=5&&(e.l+=2),l=e.read_shift(2),r.biff==5&&(e.l+=2),e.l+=4);var c=sd(e,s,r);a&32&&(c=LQe[c.charCodeAt(0)]);var u=n-e.l;r&&r.biff==2&&--u;var f=n==e.l||o===0||!(u>0)?[]:brt(e,u,r,o);return{chKey:i,Name:c,itab:l,rgce:f}}function sde(e,t,r){if(r.biff<8)return PQe(e,t,r);for(var n=[],a=e.l+t,i=e.read_shift(r.biff>8?4:2);i--!==0;)n.push(nQe(e,r.biff>8?12:6,r));if(e.l!=a)throw new Error("Bad ExternSheet: "+e.l+" != "+a);return n}function PQe(e,t,r){e[e.l+1]==3&&e[e.l]++;var n=hg(e,t,r);return n.charCodeAt(0)==3?n.slice(1):n}function FQe(e,t,r){if(r.biff<8){e.l+=t;return}var n=e.read_shift(2),a=e.read_shift(2),i=sd(e,n,r),s=sd(e,a,r);return[i,s]}function BQe(e,t,r){var n=ade(e);e.l++;var a=e.read_shift(1);return t-=8,[xrt(e,t,r),a,n]}function CJ(e,t,r){var n=iQe(e);switch(r.biff){case 2:e.l++,t-=7;break;case 3:case 4:e.l+=2,t-=8;break;default:e.l+=6,t-=12}return[n,grt(e,t,r)]}function zQe(e){var t=e.read_shift(4)!==0,r=e.read_shift(4)!==0,n=e.read_shift(4);return[t,r,n]}function jQe(e,t,r){if(!(r.biff<8)){var n=e.read_shift(2),a=e.read_shift(2),i=e.read_shift(2),s=e.read_shift(2),o=Cd(e,0,r);return r.biff<8&&e.read_shift(1),[{r:n,c:a},o,s,i]}}function qQe(e,t,r){return jQe(e,t,r)}function UQe(e,t){for(var r=[],n=e.read_shift(2);n--;)r.push(Sy(e));return r}function $Qe(e,t,r){if(r&&r.biff<8)return GQe(e,t,r);var n=ide(e),a=cQe(e,t-22,n[1]);return{cmo:n,ft:a}}var HQe={8:function(e,t){var r=e.l+t;e.l+=10;var n=e.read_shift(2);e.l+=4,e.l+=2,e.l+=2,e.l+=2,e.l+=4;var a=e.read_shift(1);return e.l+=a,e.l=r,{fmt:n}}};function GQe(e,t,r){e.l+=4;var n=e.read_shift(2),a=e.read_shift(2),i=e.read_shift(2);e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=6,t-=36;var s=[];return s.push((HQe[n]||Ca)(e,t,r)),{cmo:[a,n,i],ft:s}}function VQe(e,t,r){var n=e.l,a="";try{e.l+=4;var i=(r.lastobj||{cmo:[0,0]}).cmo[1],s;[0,5,7,11,12,14].indexOf(i)==-1?e.l+=6:s=YZe(e,6,r);var o=e.read_shift(2);e.read_shift(2),In(e,2);var l=e.read_shift(2);e.l+=l;for(var c=1;c<e.lens.length-1;++c){if(e.l-n!=e.lens[c])throw new Error("TxO: bad continue record");var u=e[e.l],f=sd(e,e.lens[c+1]-e.lens[c]-1);if(a+=f,a.length>=(u?o:2*o))break}if(a.length!==o&&a.length!==o*2)throw new Error("cchText: "+o+" != "+a.length);return e.l=n+t,{t:a}}catch{return e.l=n+t,{t:a}}}function WQe(e,t){var r=Sy(e);e.l+=16;var n=eQe(e,t-24);return[r,n]}function KQe(e,t){e.read_shift(2);var r=Sy(e),n=e.read_shift((t-10)/2,"dbcs-cont");return n=n.replace(Fa,""),[r,n]}function XQe(e){var t=[0,0],r;return r=e.read_shift(2),t[0]=pJ[r]||r,r=e.read_shift(2),t[1]=pJ[r]||r,t}function YQe(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(rde(e));return r}function ZQe(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(rde(e));return r}function QQe(e){e.l+=2;var t={cxfs:0,crc:0};return t.cxfs=e.read_shift(2),t.crc=e.read_shift(4),t}function ode(e,t,r){if(!r.cellStyles)return Ca(e,t);var n=r&&r.biff>=12?4:2,a=e.read_shift(n),i=e.read_shift(n),s=e.read_shift(n),o=e.read_shift(n),l=e.read_shift(2);n==2&&(e.l+=2);var c={s:a,e:i,w:s,ixfe:o,flags:l};return(r.biff>=5||!r.biff)&&(c.level=l>>8&7),c}function JQe(e,t){var r={};return t<32||(e.l+=16,r.header=_a(e),r.footer=_a(e),e.l+=2),r}function eJe(e,t,r){var n={area:!1};if(r.biff!=5)return e.l+=t,n;var a=e.read_shift(1);return e.l+=3,a&16&&(n.area=!0),n}var tJe=$o,rJe=ede,nJe=pg;function aJe(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),a={fmt:t,env:r,len:n,data:e.slice(e.l,e.l+n)};return e.l+=n,a}function iJe(e,t,r){r.biffguess&&r.biff==5&&(r.biff=2);var n=$o(e);++e.l;var a=Cd(e,t-7,r);return n.t="str",n.val=a,n}function sJe(e){var t=$o(e);++e.l;var r=_a(e);return t.t="n",t.val=r,t}function oJe(e){var t=$o(e);++e.l;var r=e.read_shift(2);return t.t="n",t.val=r,t}function lJe(e){var t=e.read_shift(1);return t===0?(e.l++,""):e.read_shift(t,"sbcs-cont")}function cJe(e,t){e.l+=6,e.l+=2,e.l+=1,e.l+=3,e.l+=1,e.l+=t-13}function uJe(e,t,r){var n=e.l+t,a=$o(e),i=e.read_shift(2),s=sd(e,i,r);return e.l=n,a.t="str",a.val=s,a}var dJe=[2,3,48,49,131,139,140,245],TJ=(function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=m8({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function r(o,l){var c=[],u=Kc(1);switch(l.type){case"base64":u=Is(zi(o));break;case"binary":u=Is(o);break;case"buffer":case"array":u=o;break}la(u,0);var f=u.read_shift(1),p=!!(f&136),m=!1,b=!1;switch(f){case 2:break;case 3:break;case 48:m=!0,p=!0;break;case 49:m=!0,p=!0;break;case 131:break;case 139:break;case 140:b=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+f.toString(16))}var v=0,y=521;f==2&&(v=u.read_shift(2)),u.l+=3,f!=2&&(v=u.read_shift(4)),v>1048576&&(v=1e6),f!=2&&(y=u.read_shift(2));var _=u.read_shift(2),S=l.codepage||1252;f!=2&&(u.l+=16,u.read_shift(1),u[u.l]!==0&&(S=e[u[u.l]]),u.l+=1,u.l+=2),b&&(u.l+=36);for(var C=[],T={},A=Math.min(u.length,f==2?521:y-10-(m?264:0)),k=b?32:11;u.l<A&&u[u.l]!=13;)switch(T={},T.name=pm.utils.decode(S,u.slice(u.l,u.l+k)).replace(/[\u0000\r\n].*$/g,""),u.l+=k,T.type=String.fromCharCode(u.read_shift(1)),f!=2&&!b&&(T.offset=u.read_shift(4)),T.len=u.read_shift(1),f==2&&(T.offset=u.read_shift(2)),T.dec=u.read_shift(1),T.name.length&&C.push(T),f!=2&&(u.l+=b?13:14),T.type){case"B":(!m||T.len!=8)&&l.WTF&&console.log("Skipping "+T.name+":"+T.type);break;case"G":case"P":l.WTF&&console.log("Skipping "+T.name+":"+T.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+T.type)}if(u[u.l]!==13&&(u.l=y-1),u.read_shift(1)!==13)throw new Error("DBF Terminator not found "+u.l+" "+u[u.l]);u.l=y;var N=0,L=0;for(c[0]=[],L=0;L!=C.length;++L)c[0][L]=C[L].name;for(;v-- >0;){if(u[u.l]===42){u.l+=_;continue}for(++u.l,c[++N]=[],L=0,L=0;L!=C.length;++L){var I=u.slice(u.l,u.l+C[L].len);u.l+=C[L].len,la(I,0);var P=pm.utils.decode(S,I);switch(C[L].type){case"C":P.trim().length&&(c[N][L]=P.replace(/\s+$/,""));break;case"D":P.length===8?c[N][L]=new Date(+P.slice(0,4),+P.slice(4,6)-1,+P.slice(6,8)):c[N][L]=P;break;case"F":c[N][L]=parseFloat(P.trim());break;case"+":case"I":c[N][L]=b?I.read_shift(-4,"i")^2147483648:I.read_shift(4,"i");break;case"L":switch(P.trim().toUpperCase()){case"Y":case"T":c[N][L]=!0;break;case"N":case"F":c[N][L]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+P+"|")}break;case"M":if(!p)throw new Error("DBF Unexpected MEMO for type "+f.toString(16));c[N][L]="##MEMO##"+(b?parseInt(P.trim(),10):I.read_shift(4));break;case"N":P=P.replace(/\u0000/g,"").trim(),P&&P!="."&&(c[N][L]=+P||0);break;case"@":c[N][L]=new Date(I.read_shift(-8,"f")-621356832e5);break;case"T":c[N][L]=new Date((I.read_shift(4)-2440588)*864e5+I.read_shift(4));break;case"Y":c[N][L]=I.read_shift(4,"i")/1e4+I.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":c[N][L]=-I.read_shift(-8,"f");break;case"B":if(m&&C[L].len==8){c[N][L]=I.read_shift(8,"f");break}case"G":case"P":I.l+=C[L].len;break;case"0":if(C[L].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+C[L].type)}}}if(f!=2&&u.l<u.length&&u[u.l++]!=26)throw new Error("DBF EOF Marker missing "+(u.l-1)+" of "+u.length+" "+u[u.l-1].toString(16));return l&&l.sheetRows&&(c=c.slice(0,l.sheetRows)),l.DBF=C,c}function n(o,l){var c=l||{};c.dateNF||(c.dateNF="yyyymmdd");var u=B0(r(o,c),c);return u["!cols"]=c.DBF.map(function(f){return{wch:f.len,DBF:f}}),delete c.DBF,u}function a(o,l){try{return Jc(n(o,l),l)}catch(c){if(l&&l.WTF)throw c}return{SheetNames:[],Sheets:{}}}var i={B:8,C:250,L:1,D:8,"?":0,"":0};function s(o,l){var c=l||{};if(+c.codepage>=0&&Ls(+c.codepage),c.type=="string")throw new Error("Cannot write DBF to JS string");var u=Z6(),f=oD(o,{header:1,raw:!0,cellDates:!0}),p=f[0],m=f.slice(1),b=o["!cols"]||[],v=0,y=0,_=0,S=1;for(v=0;v<p.length;++v){if(((b[v]||{}).DBF||{}).name){p[v]=b[v].DBF.name,++_;continue}if(p[v]!=null){if(++_,typeof p[v]=="number"&&(p[v]=p[v].toString(10)),typeof p[v]!="string")throw new Error("DBF Invalid column name "+p[v]+" |"+typeof p[v]+"|");if(p.indexOf(p[v])!==v){for(y=0;y<1024;++y)if(p.indexOf(p[v]+"_"+y)==-1){p[v]+="_"+y;break}}}}var C=gn(o["!ref"]),T=[],A=[],k=[];for(v=0;v<=C.e.c-C.s.c;++v){var N="",L="",I=0,P=[];for(y=0;y<m.length;++y)m[y][v]!=null&&P.push(m[y][v]);if(P.length==0||p[v]==null){T[v]="?";continue}for(y=0;y<P.length;++y){switch(typeof P[y]){case"number":L="B";break;case"string":L="C";break;case"boolean":L="L";break;case"object":L=P[y]instanceof Date?"D":"C";break;default:L="C"}I=Math.max(I,String(P[y]).length),N=N&&N!=L?"C":L}I>250&&(I=250),L=((b[v]||{}).DBF||{}).type,L=="C"&&b[v].DBF.len>I&&(I=b[v].DBF.len),N=="B"&&L=="N"&&(N="N",k[v]=b[v].DBF.dec,I=b[v].DBF.len),A[v]=N=="C"||L=="N"?I:i[N]||0,S+=A[v],T[v]=N}var H=u.next(32);for(H.write_shift(4,318902576),H.write_shift(4,m.length),H.write_shift(2,296+32*_),H.write_shift(2,S),v=0;v<4;++v)H.write_shift(4,0);for(H.write_shift(4,0|(+t[sue]||3)<<8),v=0,y=0;v<p.length;++v)if(p[v]!=null){var B=u.next(32),K=(p[v].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);B.write_shift(1,K,"sbcs"),B.write_shift(1,T[v]=="?"?"C":T[v],"sbcs"),B.write_shift(4,y),B.write_shift(1,A[v]||i[T[v]]||0),B.write_shift(1,k[v]||0),B.write_shift(1,2),B.write_shift(4,0),B.write_shift(1,0),B.write_shift(4,0),B.write_shift(4,0),y+=A[v]||i[T[v]]||0}var j=u.next(264);for(j.write_shift(4,13),v=0;v<65;++v)j.write_shift(4,0);for(v=0;v<m.length;++v){var W=u.next(S);for(W.write_shift(1,0),y=0;y<p.length;++y)if(p[y]!=null)switch(T[y]){case"L":W.write_shift(1,m[v][y]==null?63:m[v][y]?84:70);break;case"B":W.write_shift(8,m[v][y]||0,"f");break;case"N":var D="0";for(typeof m[v][y]=="number"&&(D=m[v][y].toFixed(k[y]||0)),_=0;_<A[y]-D.length;++_)W.write_shift(1,32);W.write_shift(1,D,"sbcs");break;case"D":m[v][y]?(W.write_shift(4,("0000"+m[v][y].getFullYear()).slice(-4),"sbcs"),W.write_shift(2,("00"+(m[v][y].getMonth()+1)).slice(-2),"sbcs"),W.write_shift(2,("00"+m[v][y].getDate()).slice(-2),"sbcs")):W.write_shift(8,"00000000","sbcs");break;case"C":var U=String(m[v][y]!=null?m[v][y]:"").slice(0,A[y]);for(W.write_shift(1,U,"sbcs"),_=0;_<A[y]-U.length;++_)W.write_shift(1,32);break}}return u.next(1).write_shift(1,26),u.end()}return{to_workbook:a,to_sheet:n,from_sheet:s}})(),fJe=(function(){var e={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("\x1BN("+Mo(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),r=function(p,m){var b=e[m];return typeof b=="number"?UQ(b):b},n=function(p,m,b){var v=m.charCodeAt(0)-32<<4|b.charCodeAt(0)-48;return v==59?p:UQ(v)};e["|"]=254;function a(p,m){switch(m.type){case"base64":return i(zi(p),m);case"binary":return i(p,m);case"buffer":return i(gr&&Buffer.isBuffer(p)?p.toString("binary"):_d(p),m);case"array":return i(id(p),m)}throw new Error("Unrecognized type "+m.type)}function i(p,m){var b=p.split(/[\n\r]+/),v=-1,y=-1,_=0,S=0,C=[],T=[],A=null,k={},N=[],L=[],I=[],P=0,H;for(+m.codepage>=0&&Ls(+m.codepage);_!==b.length;++_){P=0;var B=b[_].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(t,r),K=B.replace(/;;/g,"\0").split(";").map(function(Z){return Z.replace(/\u0000/g,";")}),j=K[0],W;if(B.length>0)switch(j){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":K[1].charAt(0)=="P"&&T.push(B.slice(3).replace(/;;/g,";"));break;case"C":var D=!1,U=!1,Y=!1,z=!1,M=-1,Q=-1;for(S=1;S<K.length;++S)switch(K[S].charAt(0)){case"A":break;case"X":y=parseInt(K[S].slice(1))-1,U=!0;break;case"Y":for(v=parseInt(K[S].slice(1))-1,U||(y=0),H=C.length;H<=v;++H)C[H]=[];break;case"K":W=K[S].slice(1),W.charAt(0)==='"'?W=W.slice(1,W.length-1):W==="TRUE"?W=!0:W==="FALSE"?W=!1:isNaN(zs(W))?isNaN(c0(W).getDate())||(W=ta(W)):(W=zs(W),A!==null&&P0(A)&&(W=Ey(W))),D=!0;break;case"E":z=!0;var q=Vf(K[S].slice(1),{r:v,c:y});C[v][y]=[C[v][y],q];break;case"S":Y=!0,C[v][y]=[C[v][y],"S5S"];break;case"G":break;case"R":M=parseInt(K[S].slice(1))-1;break;case"C":Q=parseInt(K[S].slice(1))-1;break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+B)}if(D&&(C[v][y]&&C[v][y].length==2?C[v][y][0]=W:C[v][y]=W,A=null),Y){if(z)throw new Error("SYLK shared formula cannot have own formula");var F=M>-1&&C[M][Q];if(!F||!F[1])throw new Error("SYLK shared formula cannot find base");C[v][y][1]=vde(F[1],{r:v-M,c:y-Q})}break;case"F":var V=0;for(S=1;S<K.length;++S)switch(K[S].charAt(0)){case"X":y=parseInt(K[S].slice(1))-1,++V;break;case"Y":for(v=parseInt(K[S].slice(1))-1,H=C.length;H<=v;++H)C[H]=[];break;case"M":P=parseInt(K[S].slice(1))/20;break;case"F":break;case"G":break;case"P":A=T[parseInt(K[S].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":for(I=K[S].slice(1).split(" "),H=parseInt(I[0],10);H<=parseInt(I[1],10);++H)P=parseInt(I[2],10),L[H-1]=P===0?{hidden:!0}:{wch:P},u0(L[H-1]);break;case"C":y=parseInt(K[S].slice(1))-1,L[y]||(L[y]={});break;case"R":v=parseInt(K[S].slice(1))-1,N[v]||(N[v]={}),P>0?(N[v].hpt=P,N[v].hpx=ym(P)):P===0&&(N[v].hidden=!0);break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+B)}V<1&&(A=null);break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+B)}}return N.length>0&&(k["!rows"]=N),L.length>0&&(k["!cols"]=L),m&&m.sheetRows&&(C=C.slice(0,m.sheetRows)),[C,k]}function s(p,m){var b=a(p,m),v=b[0],y=b[1],_=B0(v,m);return Mo(y).forEach(function(S){_[S]=y[S]}),_}function o(p,m){return Jc(s(p,m),m)}function l(p,m,b,v){var y="C;Y"+(b+1)+";X"+(v+1)+";K";switch(p.t){case"n":y+=p.v||0,p.f&&!p.F&&(y+=";E"+ett(p.f,{r:b,c:v}));break;case"b":y+=p.v?"TRUE":"FALSE";break;case"e":y+=p.w||p.v;break;case"d":y+='"'+(p.w||p.v)+'"';break;case"s":y+='"'+p.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return y}function c(p,m){m.forEach(function(b,v){var y="F;W"+(v+1)+" "+(v+1)+" ";b.hidden?y+="0":(typeof b.width=="number"&&!b.wpx&&(b.wpx=Wb(b.width)),typeof b.wpx=="number"&&!b.wch&&(b.wch=Kb(b.wpx)),typeof b.wch=="number"&&(y+=Math.round(b.wch))),y.charAt(y.length-1)!=" "&&p.push(y)})}function u(p,m){m.forEach(function(b,v){var y="F;";b.hidden?y+="M0;":b.hpt?y+="M"+20*b.hpt+";":b.hpx&&(y+="M"+20*pde(b.hpx)+";"),y.length>2&&p.push(y+"R"+(v+1))})}function f(p,m){var b=["ID;PWXL;N;E"],v=[],y=gn(p["!ref"]),_,S=Array.isArray(p),C=`\r
`;b.push("P;PGeneral"),b.push("F;P0;DG0G8;M255"),p["!cols"]&&c(b,p["!cols"]),p["!rows"]&&u(b,p["!rows"]),b.push("B;Y"+(y.e.r-y.s.r+1)+";X"+(y.e.c-y.s.c+1)+";D"+[y.s.c,y.s.r,y.e.c,y.e.r].join(" "));for(var T=y.s.r;T<=y.e.r;++T)for(var A=y.s.c;A<=y.e.c;++A){var k=Wt({r:T,c:A});_=S?(p[T]||[])[A]:p[k],!(!_||_.v==null&&(!_.f||_.F))&&v.push(l(_,p,T,A))}return b.join(C)+C+v.join(C)+C+"E"+C}return{to_workbook:o,to_sheet:s,from_sheet:f}})(),hJe=(function(){function e(i,s){switch(s.type){case"base64":return t(zi(i),s);case"binary":return t(i,s);case"buffer":return t(gr&&Buffer.isBuffer(i)?i.toString("binary"):_d(i),s);case"array":return t(id(i),s)}throw new Error("Unrecognized type "+s.type)}function t(i,s){for(var o=i.split(`
`),l=-1,c=-1,u=0,f=[];u!==o.length;++u){if(o[u].trim()==="BOT"){f[++l]=[],c=0;continue}if(!(l<0)){var p=o[u].trim().split(","),m=p[0],b=p[1];++u;for(var v=o[u]||"";(v.match(/["]/g)||[]).length&1&&u<o.length-1;)v+=`
`+o[++u];switch(v=v.trim(),+m){case-1:if(v==="BOT"){f[++l]=[],c=0;continue}else if(v!=="EOD")throw new Error("Unrecognized DIF special command "+v);break;case 0:v==="TRUE"?f[l][c]=!0:v==="FALSE"?f[l][c]=!1:isNaN(zs(b))?isNaN(c0(b).getDate())?f[l][c]=b:f[l][c]=ta(b):f[l][c]=zs(b),++c;break;case 1:v=v.slice(1,v.length-1),v=v.replace(/""/g,'"'),v&&v.match(/^=".*"$/)&&(v=v.slice(2,-1)),f[l][c++]=v!==""?v:null;break}if(v==="EOD")break}}return s&&s.sheetRows&&(f=f.slice(0,s.sheetRows)),f}function r(i,s){return B0(e(i,s),s)}function n(i,s){return Jc(r(i,s),s)}var a=(function(){var i=function(l,c,u,f,p){l.push(c),l.push(u+","+f),l.push('"'+p.replace(/"/g,'""')+'"')},s=function(l,c,u,f){l.push(c+","+u),l.push(c==1?'"'+f.replace(/"/g,'""')+'"':f)};return function(l){var c=[],u=gn(l["!ref"]),f,p=Array.isArray(l);i(c,"TABLE",0,1,"sheetjs"),i(c,"VECTORS",0,u.e.r-u.s.r+1,""),i(c,"TUPLES",0,u.e.c-u.s.c+1,""),i(c,"DATA",0,0,"");for(var m=u.s.r;m<=u.e.r;++m){s(c,-1,0,"BOT");for(var b=u.s.c;b<=u.e.c;++b){var v=Wt({r:m,c:b});if(f=p?(l[m]||[])[b]:l[v],!f){s(c,1,0,"");continue}switch(f.t){case"n":var y=f.w;!y&&f.v!=null&&(y=f.v),y==null?f.f&&!f.F?s(c,1,0,"="+f.f):s(c,1,0,""):s(c,0,y,"V");break;case"b":s(c,0,f.v?1:0,f.v?"TRUE":"FALSE");break;case"s":s(c,1,0,isNaN(f.v)?f.v:'="'+f.v+'"');break;case"d":f.w||(f.w=ms(f.z||Yt[14],Ba(ta(f.v)))),s(c,0,f.w,"V");break;default:s(c,1,0,"")}}}s(c,-1,0,"EOD");var _=`\r
`,S=c.join(_);return S}})();return{to_workbook:n,to_sheet:r,from_sheet:a}})(),pJe=(function(){function e(f){return f.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,`
`)}function t(f){return f.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function r(f,p){for(var m=f.split(`
`),b=-1,v=-1,y=0,_=[];y!==m.length;++y){var S=m[y].trim().split(":");if(S[0]==="cell"){var C=La(S[1]);if(_.length<=C.r)for(b=_.length;b<=C.r;++b)_[b]||(_[b]=[]);switch(b=C.r,v=C.c,S[2]){case"t":_[b][v]=e(S[3]);break;case"v":_[b][v]=+S[3];break;case"vtf":var T=S[S.length-1];case"vtc":switch(S[3]){case"nl":_[b][v]=!!+S[4];break;default:_[b][v]=+S[4];break}S[2]=="vtf"&&(_[b][v]=[_[b][v],T])}}}return p&&p.sheetRows&&(_=_.slice(0,p.sheetRows)),_}function n(f,p){return B0(r(f,p),p)}function a(f,p){return Jc(n(f,p),p)}var i=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
`),s=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(`
`)+`
`,o=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(`
`),l="--SocialCalcSpreadsheetControlSave--";function c(f){if(!f||!f["!ref"])return"";for(var p=[],m=[],b,v="",y=F0(f["!ref"]),_=Array.isArray(f),S=y.s.r;S<=y.e.r;++S)for(var C=y.s.c;C<=y.e.c;++C)if(v=Wt({r:S,c:C}),b=_?(f[S]||[])[C]:f[v],!(!b||b.v==null||b.t==="z")){switch(m=["cell",v,"t"],b.t){case"s":case"str":m.push(t(b.v));break;case"n":b.f?(m[2]="vtf",m[3]="n",m[4]=b.v,m[5]=t(b.f)):(m[2]="v",m[3]=b.v);break;case"b":m[2]="vt"+(b.f?"f":"c"),m[3]="nl",m[4]=b.v?"1":"0",m[5]=t(b.f||(b.v?"TRUE":"FALSE"));break;case"d":var T=Ba(ta(b.v));m[2]="vtc",m[3]="nd",m[4]=""+T,m[5]=b.w||ms(b.z||Yt[14],T);break;case"e":continue}p.push(m.join(":"))}return p.push("sheet:c:"+(y.e.c-y.s.c+1)+":r:"+(y.e.r-y.s.r+1)+":tvf:1"),p.push("valueformat:1:text-wiki"),p.join(`
`)}function u(f){return[i,s,o,s,c(f),l].join(`
`)}return{to_workbook:a,to_sheet:n,from_sheet:u}})(),bm=(function(){function e(u,f,p,m,b){b.raw?f[p][m]=u:u===""||(u==="TRUE"?f[p][m]=!0:u==="FALSE"?f[p][m]=!1:isNaN(zs(u))?isNaN(c0(u).getDate())?f[p][m]=u:f[p][m]=ta(u):f[p][m]=zs(u))}function t(u,f){var p=f||{},m=[];if(!u||u.length===0)return m;for(var b=u.split(/[\r\n]/),v=b.length-1;v>=0&&b[v].length===0;)--v;for(var y=10,_=0,S=0;S<=v;++S)_=b[S].indexOf(" "),_==-1?_=b[S].length:_++,y=Math.max(y,_);for(S=0;S<=v;++S){m[S]=[];var C=0;for(e(b[S].slice(0,y).trim(),m,S,C,p),C=1;C<=(b[S].length-y)/10+1;++C)e(b[S].slice(y+(C-1)*10,y+C*10).trim(),m,S,C,p)}return p.sheetRows&&(m=m.slice(0,p.sheetRows)),m}var r={44:",",9:"	",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function a(u){for(var f={},p=!1,m=0,b=0;m<u.length;++m)(b=u.charCodeAt(m))==34?p=!p:!p&&b in r&&(f[b]=(f[b]||0)+1);b=[];for(m in f)Object.prototype.hasOwnProperty.call(f,m)&&b.push([f[m],m]);if(!b.length){f=n;for(m in f)Object.prototype.hasOwnProperty.call(f,m)&&b.push([f[m],m])}return b.sort(function(v,y){return v[0]-y[0]||n[v[1]]-n[y[1]]}),r[b.pop()[1]]||44}function i(u,f){var p=f||{},m="",b=p.dense?[]:{},v={s:{c:0,r:0},e:{c:0,r:0}};u.slice(0,4)=="sep="?u.charCodeAt(5)==13&&u.charCodeAt(6)==10?(m=u.charAt(4),u=u.slice(7)):u.charCodeAt(5)==13||u.charCodeAt(5)==10?(m=u.charAt(4),u=u.slice(6)):m=a(u.slice(0,1024)):p&&p.FS?m=p.FS:m=a(u.slice(0,1024));var y=0,_=0,S=0,C=0,T=0,A=m.charCodeAt(0),k=!1,N=0,L=u.charCodeAt(0);u=u.replace(/\r\n/mg,`
`);var I=p.dateNF!=null?CYe(p.dateNF):null;function P(){var H=u.slice(C,T),B={};if(H.charAt(0)=='"'&&H.charAt(H.length-1)=='"'&&(H=H.slice(1,-1).replace(/""/g,'"')),H.length===0)B.t="z";else if(p.raw)B.t="s",B.v=H;else if(H.trim().length===0)B.t="s",B.v=H;else if(H.charCodeAt(0)==61)H.charCodeAt(1)==34&&H.charCodeAt(H.length-1)==34?(B.t="s",B.v=H.slice(2,-1).replace(/""/g,'"')):rtt(H)?(B.t="n",B.f=H.slice(1)):(B.t="s",B.v=H);else if(H=="TRUE")B.t="b",B.v=!0;else if(H=="FALSE")B.t="b",B.v=!1;else if(!isNaN(S=zs(H)))B.t="n",p.cellText!==!1&&(B.w=H),B.v=S;else if(!isNaN(c0(H).getDate())||I&&H.match(I)){B.z=p.dateNF||Yt[14];var K=0;I&&H.match(I)&&(H=TYe(H,p.dateNF,H.match(I)||[]),K=1),p.cellDates?(B.t="d",B.v=ta(H,K)):(B.t="n",B.v=Ba(ta(H,K))),p.cellText!==!1&&(B.w=ms(B.z,B.v instanceof Date?Ba(B.v):B.v)),p.cellNF||delete B.z}else B.t="s",B.v=H;if(B.t=="z"||(p.dense?(b[y]||(b[y]=[]),b[y][_]=B):b[Wt({c:_,r:y})]=B),C=T+1,L=u.charCodeAt(C),v.e.c<_&&(v.e.c=_),v.e.r<y&&(v.e.r=y),N==A)++_;else if(_=0,++y,p.sheetRows&&p.sheetRows<=y)return!0}e:for(;T<u.length;++T)switch(N=u.charCodeAt(T)){case 34:L===34&&(k=!k);break;case A:case 10:case 13:if(!k&&P())break e;break}return T-C>0&&P(),b["!ref"]=xr(v),b}function s(u,f){return!(f&&f.PRN)||f.FS||u.slice(0,4)=="sep="||u.indexOf("	")>=0||u.indexOf(",")>=0||u.indexOf(";")>=0?i(u,f):B0(t(u,f),f)}function o(u,f){var p="",m=f.type=="string"?[0,0,0,0]:I8(u,f);switch(f.type){case"base64":p=zi(u);break;case"binary":p=u;break;case"buffer":f.codepage==65001?p=u.toString("utf8"):f.codepage&&typeof pm<"u"||(p=gr&&Buffer.isBuffer(u)?u.toString("binary"):_d(u));break;case"array":p=id(u);break;case"string":p=u;break;default:throw new Error("Unrecognized type "+f.type)}return m[0]==239&&m[1]==187&&m[2]==191?p=Vr(p.slice(3)):f.type!="string"&&f.type!="buffer"&&f.codepage==65001?p=Vr(p):f.type=="binary"&&typeof pm<"u",p.slice(0,19)=="socialcalc:version:"?pJe.to_sheet(f.type=="string"?p:Vr(p),f):s(p,f)}function l(u,f){return Jc(o(u,f),f)}function c(u){for(var f=[],p=gn(u["!ref"]),m,b=Array.isArray(u),v=p.s.r;v<=p.e.r;++v){for(var y=[],_=p.s.c;_<=p.e.c;++_){var S=Wt({r:v,c:_});if(m=b?(u[v]||[])[_]:u[S],!m||m.v==null){y.push("          ");continue}for(var C=(m.w||(Pl(m),m.w)||"").slice(0,10);C.length<10;)C+=" ";y.push(C+(_===0?" ":""))}f.push(y.join(""))}return f.join(`
`)}return{to_workbook:l,to_sheet:o,from_sheet:c}})();function mJe(e,t){var r=t||{},n=!!r.WTF;r.WTF=!0;try{var a=fJe.to_workbook(e,r);return r.WTF=n,a}catch(i){if(r.WTF=n,!i.message.match(/SYLK bad record ID/)&&n)throw i;return bm.to_workbook(e,t)}}var Bp=(function(){function e(q,F,V){if(q){la(q,q.l||0);for(var Z=V.Enum||M;q.l<q.length;){var ee=q.read_shift(2),te=Z[ee]||Z[65535],oe=q.read_shift(2),pe=q.l+oe,he=te.f&&te.f(q,oe,V);if(q.l=pe,F(he,te,ee))return}}}function t(q,F){switch(F.type){case"base64":return r(Is(zi(q)),F);case"binary":return r(Is(q),F);case"buffer":case"array":return r(q,F)}throw"Unsupported type "+F.type}function r(q,F){if(!q)return q;var V=F||{},Z=V.dense?[]:{},ee="Sheet1",te="",oe=0,pe={},he=[],ke=[],se={s:{r:0,c:0},e:{r:0,c:0}},qe=V.sheetRows||0;if(q[2]==0&&(q[3]==8||q[3]==9)&&q.length>=16&&q[14]==5&&q[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(q[2]==2)V.Enum=M,e(q,function(xe,ve,Ne){switch(Ne){case 0:V.vers=xe,xe>=4096&&(V.qpro=!0);break;case 6:se=xe;break;case 204:xe&&(te=xe);break;case 222:te=xe;break;case 15:case 51:V.qpro||(xe[1].v=xe[1].v.slice(1));case 13:case 14:case 16:Ne==14&&(xe[2]&112)==112&&(xe[2]&15)>1&&(xe[2]&15)<15&&(xe[1].z=V.dateNF||Yt[14],V.cellDates&&(xe[1].t="d",xe[1].v=Ey(xe[1].v))),V.qpro&&xe[3]>oe&&(Z["!ref"]=xr(se),pe[ee]=Z,he.push(ee),Z=V.dense?[]:{},se={s:{r:0,c:0},e:{r:0,c:0}},oe=xe[3],ee=te||"Sheet"+(oe+1),te="");var Ue=V.dense?(Z[xe[0].r]||[])[xe[0].c]:Z[Wt(xe[0])];if(Ue){Ue.t=xe[1].t,Ue.v=xe[1].v,xe[1].z!=null&&(Ue.z=xe[1].z),xe[1].f!=null&&(Ue.f=xe[1].f);break}V.dense?(Z[xe[0].r]||(Z[xe[0].r]=[]),Z[xe[0].r][xe[0].c]=xe[1]):Z[Wt(xe[0])]=xe[1];break}},V);else if(q[2]==26||q[2]==14)V.Enum=Q,q[2]==14&&(V.qpro=!0,q.l=0),e(q,function(xe,ve,Ne){switch(Ne){case 204:ee=xe;break;case 22:xe[1].v=xe[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(xe[3]>oe&&(Z["!ref"]=xr(se),pe[ee]=Z,he.push(ee),Z=V.dense?[]:{},se={s:{r:0,c:0},e:{r:0,c:0}},oe=xe[3],ee="Sheet"+(oe+1)),qe>0&&xe[0].r>=qe)break;V.dense?(Z[xe[0].r]||(Z[xe[0].r]=[]),Z[xe[0].r][xe[0].c]=xe[1]):Z[Wt(xe[0])]=xe[1],se.e.c<xe[0].c&&(se.e.c=xe[0].c),se.e.r<xe[0].r&&(se.e.r=xe[0].r);break;case 27:xe[14e3]&&(ke[xe[14e3][0]]=xe[14e3][1]);break;case 1537:ke[xe[0]]=xe[1],xe[0]==oe&&(ee=xe[1]);break}},V);else throw new Error("Unrecognized LOTUS BOF "+q[2]);if(Z["!ref"]=xr(se),pe[te||ee]=Z,he.push(te||ee),!ke.length)return{SheetNames:he,Sheets:pe};for(var $e={},Pe=[],Ce=0;Ce<ke.length;++Ce)pe[he[Ce]]?(Pe.push(ke[Ce]||he[Ce]),$e[ke[Ce]]=pe[ke[Ce]]||pe[he[Ce]]):(Pe.push(ke[Ce]),$e[ke[Ce]]={"!ref":"A1"});return{SheetNames:Pe,Sheets:$e}}function n(q,F){var V=F||{};if(+V.codepage>=0&&Ls(+V.codepage),V.type=="string")throw new Error("Cannot write WK1 to JS string");var Z=Z6(),ee=gn(q["!ref"]),te=Array.isArray(q),oe=[];Ns(Z,0,i(1030)),Ns(Z,6,l(ee));for(var pe=Math.min(ee.e.r,8191),he=ee.s.r;he<=pe;++he)for(var ke=ua(he),se=ee.s.c;se<=ee.e.c;++se){he===ee.s.r&&(oe[se]=Hn(se));var qe=oe[se]+ke,$e=te?(q[he]||[])[se]:q[qe];if(!(!$e||$e.t=="z"))if($e.t=="n")($e.v|0)==$e.v&&$e.v>=-32768&&$e.v<=32767?Ns(Z,13,m(he,se,$e.v)):Ns(Z,14,v(he,se,$e.v));else{var Pe=Pl($e);Ns(Z,15,f(he,se,Pe.slice(0,239)))}}return Ns(Z,1),Z.end()}function a(q,F){var V=F||{};if(+V.codepage>=0&&Ls(+V.codepage),V.type=="string")throw new Error("Cannot write WK3 to JS string");var Z=Z6();Ns(Z,0,s(q));for(var ee=0,te=0;ee<q.SheetNames.length;++ee)(q.Sheets[q.SheetNames[ee]]||{})["!ref"]&&Ns(Z,27,z(q.SheetNames[ee],te++));var oe=0;for(ee=0;ee<q.SheetNames.length;++ee){var pe=q.Sheets[q.SheetNames[ee]];if(!(!pe||!pe["!ref"])){for(var he=gn(pe["!ref"]),ke=Array.isArray(pe),se=[],qe=Math.min(he.e.r,8191),$e=he.s.r;$e<=qe;++$e)for(var Pe=ua($e),Ce=he.s.c;Ce<=he.e.c;++Ce){$e===he.s.r&&(se[Ce]=Hn(Ce));var xe=se[Ce]+Pe,ve=ke?(pe[$e]||[])[Ce]:pe[xe];if(!(!ve||ve.t=="z"))if(ve.t=="n")Ns(Z,23,P($e,Ce,oe,ve.v));else{var Ne=Pl(ve);Ns(Z,22,N($e,Ce,oe,Ne.slice(0,239)))}}++oe}}return Ns(Z,1),Z.end()}function i(q){var F=$n(2);return F.write_shift(2,q),F}function s(q){var F=$n(26);F.write_shift(2,4096),F.write_shift(2,4),F.write_shift(4,0);for(var V=0,Z=0,ee=0,te=0;te<q.SheetNames.length;++te){var oe=q.SheetNames[te],pe=q.Sheets[oe];if(!(!pe||!pe["!ref"])){++ee;var he=F0(pe["!ref"]);V<he.e.r&&(V=he.e.r),Z<he.e.c&&(Z=he.e.c)}}return V>8191&&(V=8191),F.write_shift(2,V),F.write_shift(1,ee),F.write_shift(1,Z),F.write_shift(2,0),F.write_shift(2,0),F.write_shift(1,1),F.write_shift(1,2),F.write_shift(4,0),F.write_shift(4,0),F}function o(q,F,V){var Z={s:{c:0,r:0},e:{c:0,r:0}};return F==8&&V.qpro?(Z.s.c=q.read_shift(1),q.l++,Z.s.r=q.read_shift(2),Z.e.c=q.read_shift(1),q.l++,Z.e.r=q.read_shift(2),Z):(Z.s.c=q.read_shift(2),Z.s.r=q.read_shift(2),F==12&&V.qpro&&(q.l+=2),Z.e.c=q.read_shift(2),Z.e.r=q.read_shift(2),F==12&&V.qpro&&(q.l+=2),Z.s.c==65535&&(Z.s.c=Z.e.c=Z.s.r=Z.e.r=0),Z)}function l(q){var F=$n(8);return F.write_shift(2,q.s.c),F.write_shift(2,q.s.r),F.write_shift(2,q.e.c),F.write_shift(2,q.e.r),F}function c(q,F,V){var Z=[{c:0,r:0},{t:"n",v:0},0,0];return V.qpro&&V.vers!=20768?(Z[0].c=q.read_shift(1),Z[3]=q.read_shift(1),Z[0].r=q.read_shift(2),q.l+=2):(Z[2]=q.read_shift(1),Z[0].c=q.read_shift(2),Z[0].r=q.read_shift(2)),Z}function u(q,F,V){var Z=q.l+F,ee=c(q,F,V);if(ee[1].t="s",V.vers==20768){q.l++;var te=q.read_shift(1);return ee[1].v=q.read_shift(te,"utf8"),ee}return V.qpro&&q.l++,ee[1].v=q.read_shift(Z-q.l,"cstr"),ee}function f(q,F,V){var Z=$n(7+V.length);Z.write_shift(1,255),Z.write_shift(2,F),Z.write_shift(2,q),Z.write_shift(1,39);for(var ee=0;ee<Z.length;++ee){var te=V.charCodeAt(ee);Z.write_shift(1,te>=128?95:te)}return Z.write_shift(1,0),Z}function p(q,F,V){var Z=c(q,F,V);return Z[1].v=q.read_shift(2,"i"),Z}function m(q,F,V){var Z=$n(7);return Z.write_shift(1,255),Z.write_shift(2,F),Z.write_shift(2,q),Z.write_shift(2,V,"i"),Z}function b(q,F,V){var Z=c(q,F,V);return Z[1].v=q.read_shift(8,"f"),Z}function v(q,F,V){var Z=$n(13);return Z.write_shift(1,255),Z.write_shift(2,F),Z.write_shift(2,q),Z.write_shift(8,V,"f"),Z}function y(q,F,V){var Z=q.l+F,ee=c(q,F,V);if(ee[1].v=q.read_shift(8,"f"),V.qpro)q.l=Z;else{var te=q.read_shift(2);T(q.slice(q.l,q.l+te),ee),q.l+=te}return ee}function _(q,F,V){var Z=F&32768;return F&=-32769,F=(Z?q:0)+(F>=8192?F-16384:F),(Z?"":"$")+(V?Hn(F):ua(F))}var S={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},C=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function T(q,F){la(q,0);for(var V=[],Z=0,ee="",te="",oe="",pe="";q.l<q.length;){var he=q[q.l++];switch(he){case 0:V.push(q.read_shift(8,"f"));break;case 1:te=_(F[0].c,q.read_shift(2),!0),ee=_(F[0].r,q.read_shift(2),!1),V.push(te+ee);break;case 2:{var ke=_(F[0].c,q.read_shift(2),!0),se=_(F[0].r,q.read_shift(2),!1);te=_(F[0].c,q.read_shift(2),!0),ee=_(F[0].r,q.read_shift(2),!1),V.push(ke+se+":"+te+ee)}break;case 3:if(q.l<q.length){console.error("WK1 premature formula end");return}break;case 4:V.push("("+V.pop()+")");break;case 5:V.push(q.read_shift(2));break;case 6:{for(var qe="";he=q[q.l++];)qe+=String.fromCharCode(he);V.push('"'+qe.replace(/"/g,'""')+'"')}break;case 8:V.push("-"+V.pop());break;case 23:V.push("+"+V.pop());break;case 22:V.push("NOT("+V.pop()+")");break;case 20:case 21:pe=V.pop(),oe=V.pop(),V.push(["AND","OR"][he-20]+"("+oe+","+pe+")");break;default:if(he<32&&C[he])pe=V.pop(),oe=V.pop(),V.push(oe+C[he]+pe);else if(S[he]){if(Z=S[he][1],Z==69&&(Z=q[q.l++]),Z>V.length){console.error("WK1 bad formula parse 0x"+he.toString(16)+":|"+V.join("|")+"|");return}var $e=V.slice(-Z);V.length-=Z,V.push(S[he][0]+"("+$e.join(",")+")")}else return he<=7?console.error("WK1 invalid opcode "+he.toString(16)):he<=24?console.error("WK1 unsupported op "+he.toString(16)):he<=30?console.error("WK1 invalid opcode "+he.toString(16)):he<=115?console.error("WK1 unsupported function opcode "+he.toString(16)):console.error("WK1 unrecognized opcode "+he.toString(16))}}V.length==1?F[1].f=""+V[0]:console.error("WK1 bad formula parse |"+V.join("|")+"|")}function A(q){var F=[{c:0,r:0},{t:"n",v:0},0];return F[0].r=q.read_shift(2),F[3]=q[q.l++],F[0].c=q[q.l++],F}function k(q,F){var V=A(q);return V[1].t="s",V[1].v=q.read_shift(F-4,"cstr"),V}function N(q,F,V,Z){var ee=$n(6+Z.length);ee.write_shift(2,q),ee.write_shift(1,V),ee.write_shift(1,F),ee.write_shift(1,39);for(var te=0;te<Z.length;++te){var oe=Z.charCodeAt(te);ee.write_shift(1,oe>=128?95:oe)}return ee.write_shift(1,0),ee}function L(q,F){var V=A(q);V[1].v=q.read_shift(2);var Z=V[1].v>>1;if(V[1].v&1)switch(Z&7){case 0:Z=(Z>>3)*5e3;break;case 1:Z=(Z>>3)*500;break;case 2:Z=(Z>>3)/20;break;case 3:Z=(Z>>3)/200;break;case 4:Z=(Z>>3)/2e3;break;case 5:Z=(Z>>3)/2e4;break;case 6:Z=(Z>>3)/16;break;case 7:Z=(Z>>3)/64;break}return V[1].v=Z,V}function I(q,F){var V=A(q),Z=q.read_shift(4),ee=q.read_shift(4),te=q.read_shift(2);if(te==65535)return Z===0&&ee===3221225472?(V[1].t="e",V[1].v=15):Z===0&&ee===3489660928?(V[1].t="e",V[1].v=42):V[1].v=0,V;var oe=te&32768;return te=(te&32767)-16446,V[1].v=(1-oe*2)*(ee*Math.pow(2,te+32)+Z*Math.pow(2,te)),V}function P(q,F,V,Z){var ee=$n(14);if(ee.write_shift(2,q),ee.write_shift(1,V),ee.write_shift(1,F),Z==0)return ee.write_shift(4,0),ee.write_shift(4,0),ee.write_shift(2,65535),ee;var te=0,oe=0,pe=0,he=0;return Z<0&&(te=1,Z=-Z),oe=Math.log2(Z)|0,Z/=Math.pow(2,oe-31),he=Z>>>0,(he&2147483648)==0&&(Z/=2,++oe,he=Z>>>0),Z-=he,he|=2147483648,he>>>=0,Z*=Math.pow(2,32),pe=Z>>>0,ee.write_shift(4,pe),ee.write_shift(4,he),oe+=16383+(te?32768:0),ee.write_shift(2,oe),ee}function H(q,F){var V=I(q);return q.l+=F-14,V}function B(q,F){var V=A(q),Z=q.read_shift(4);return V[1].v=Z>>6,V}function K(q,F){var V=A(q),Z=q.read_shift(8,"f");return V[1].v=Z,V}function j(q,F){var V=K(q);return q.l+=F-10,V}function W(q,F){return q[q.l+F-1]==0?q.read_shift(F,"cstr"):""}function D(q,F){var V=q[q.l++];V>F-1&&(V=F-1);for(var Z="";Z.length<V;)Z+=String.fromCharCode(q[q.l++]);return Z}function U(q,F,V){if(!(!V.qpro||F<21)){var Z=q.read_shift(1);q.l+=17,q.l+=1,q.l+=2;var ee=q.read_shift(F-21,"cstr");return[Z,ee]}}function Y(q,F){for(var V={},Z=q.l+F;q.l<Z;){var ee=q.read_shift(2);if(ee==14e3){for(V[ee]=[0,""],V[ee][0]=q.read_shift(2);q[q.l];)V[ee][1]+=String.fromCharCode(q[q.l]),q.l++;q.l++}}return V}function z(q,F){var V=$n(5+q.length);V.write_shift(2,14e3),V.write_shift(2,F);for(var Z=0;Z<q.length;++Z){var ee=q.charCodeAt(Z);V[V.l++]=ee>127?95:ee}return V[V.l++]=0,V}var M={0:{n:"BOF",f:In},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:o},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:p},14:{n:"NUMBER",f:b},15:{n:"LABEL",f:u},16:{n:"FORMULA",f:y},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:u},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:W},222:{n:"SHEETNAMELP",f:D},65535:{n:""}},Q={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:k},23:{n:"NUMBER17",f:I},24:{n:"NUMBER18",f:L},25:{n:"FORMULA19",f:H},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:Y},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:B},38:{n:"??"},39:{n:"NUMBER27",f:K},40:{n:"FORMULA28",f:j},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:W},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:U},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:n,book_to_wk3:a,to_workbook:t}})();function gJe(e){var t={},r=e.match(Aa),n=0,a=!1;if(r)for(;n!=r.length;++n){var i=Ut(r[n]);switch(i[0].replace(/\w*:/g,"")){case"<condense":break;case"<extend":break;case"<shadow":if(!i.val)break;case"<shadow>":case"<shadow/>":t.shadow=1;break;case"</shadow>":break;case"<charset":if(i.val=="1")break;t.cp=u8[parseInt(i.val,10)];break;case"<outline":if(!i.val)break;case"<outline>":case"<outline/>":t.outline=1;break;case"</outline>":break;case"<rFont":t.name=i.val;break;case"<sz":t.sz=i.val;break;case"<strike":if(!i.val)break;case"<strike>":case"<strike/>":t.strike=1;break;case"</strike>":break;case"<u":if(!i.val)break;switch(i.val){case"double":t.uval="double";break;case"singleAccounting":t.uval="single-accounting";break;case"doubleAccounting":t.uval="double-accounting";break}case"<u>":case"<u/>":t.u=1;break;case"</u>":break;case"<b":if(i.val=="0")break;case"<b>":case"<b/>":t.b=1;break;case"</b>":break;case"<i":if(i.val=="0")break;case"<i>":case"<i/>":t.i=1;break;case"</i>":break;case"<color":i.rgb&&(t.color=i.rgb.slice(2,8));break;case"<color>":case"<color/>":case"</color>":break;case"<family":t.family=i.val;break;case"<family>":case"<family/>":case"</family>":break;case"<vertAlign":t.valign=i.val;break;case"<vertAlign>":case"<vertAlign/>":case"</vertAlign>":break;case"<scheme":break;case"<scheme>":case"<scheme/>":case"</scheme>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(i[0].charCodeAt(1)!==47&&!a)throw new Error("Unrecognized rich format "+i[0])}}return t}var vJe=(function(){var e=gm("t"),t=gm("rPr");function r(i){var s=i.match(e);if(!s)return{t:"s",v:""};var o={t:"s",v:yr(s[1])},l=i.match(t);return l&&(o.s=gJe(l[1])),o}var n=/<(?:\w+:)?r>/g,a=/<\/(?:\w+:)?r>/;return function(s){return s.replace(n,"").split(a).map(r).filter(function(o){return o.v})}})(),bJe=(function(){var t=/(\r\n|\n)/g;function r(a,i,s){var o=[];a.u&&o.push("text-decoration: underline;"),a.uval&&o.push("text-underline-style:"+a.uval+";"),a.sz&&o.push("font-size:"+a.sz+"pt;"),a.outline&&o.push("text-effect: outline;"),a.shadow&&o.push("text-shadow: auto;"),i.push('<span style="'+o.join("")+'">'),a.b&&(i.push("<b>"),s.push("</b>")),a.i&&(i.push("<i>"),s.push("</i>")),a.strike&&(i.push("<s>"),s.push("</s>"));var l=a.valign||"";return l=="superscript"||l=="super"?l="sup":l=="subscript"&&(l="sub"),l!=""&&(i.push("<"+l+">"),s.push("</"+l+">")),s.push("</span>"),a}function n(a){var i=[[],a.v,[]];return a.v?(a.s&&r(a.s,i[0],i[2]),i[0].join("")+i[1].replace(t,"<br/>")+i[2].join("")):""}return function(i){return i.map(n).join("")}})(),xJe=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,yJe=/<(?:\w+:)?r>/,_Je=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function A8(e,t){var r=t?t.cellHTML:!0,n={};return e?(e.match(/^\s*<(?:\w+:)?t[^>]*>/)?(n.t=yr(Vr(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||"")),n.r=Vr(e),r&&(n.h=v8(n.t))):e.match(yJe)&&(n.r=Vr(e),n.t=yr(Vr((e.replace(_Je,"").match(xJe)||[]).join("").replace(Aa,""))),r&&(n.h=bJe(vJe(n.r)))),n):{t:""}}var wJe=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,EJe=/<(?:\w+:)?(?:si|sstItem)>/g,SJe=/<\/(?:\w+:)?(?:si|sstItem)>/;function CJe(e,t){var r=[],n="";if(!e)return r;var a=e.match(wJe);if(a){n=a[2].replace(EJe,"").split(SJe);for(var i=0;i!=n.length;++i){var s=A8(n[i].trim(),t);s!=null&&(r[r.length]=s)}a=Ut(a[1]),r.Count=a.count,r.Unique=a.uniqueCount}return r}function TJe(e){return[e.read_shift(4),e.read_shift(4)]}function AJe(e,t){var r=[],n=!1;return Hl(e,function(i,s,o){switch(o){case 159:r.Count=i[0],r.Unique=i[1];break;case 19:r.push(i);break;case 160:return!0;case 35:n=!0;break;case 36:n=!1;break;default:if(s.T,!n||t.WTF)throw new Error("Unexpected record 0x"+o.toString(16))}}),r}function lde(e){for(var t=[],r=e.split(""),n=0;n<r.length;++n)t[n]=r[n].charCodeAt(0);return t}function El(e,t){var r={};return r.Major=e.read_shift(2),r.Minor=e.read_shift(2),t>=4&&(e.l+=t-4),r}function kJe(e){var t={};return t.id=e.read_shift(0,"lpp4"),t.R=El(e,4),t.U=El(e,4),t.W=El(e,4),t}function NJe(e){for(var t=e.read_shift(4),r=e.l+t-4,n={},a=e.read_shift(4),i=[];a-- >0;)i.push({t:e.read_shift(4),v:e.read_shift(0,"lpp4")});if(n.name=e.read_shift(0,"lpp4"),n.comps=i,e.l!=r)throw new Error("Bad DataSpaceMapEntry: "+e.l+" != "+r);return n}function RJe(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(NJe(e));return t}function MJe(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(e.read_shift(0,"lpp4"));return t}function DJe(e){var t={};return e.read_shift(4),e.l+=4,t.id=e.read_shift(0,"lpp4"),t.name=e.read_shift(0,"lpp4"),t.R=El(e,4),t.U=El(e,4),t.W=El(e,4),t}function OJe(e){var t=DJe(e);if(t.ename=e.read_shift(0,"8lpp4"),t.blksz=e.read_shift(4),t.cmode=e.read_shift(4),e.read_shift(4)!=4)throw new Error("Bad !Primary record");return t}function cde(e,t){var r=e.l+t,n={};n.Flags=e.read_shift(4)&63,e.l+=4,n.AlgID=e.read_shift(4);var a=!1;switch(n.AlgID){case 26126:case 26127:case 26128:a=n.Flags==36;break;case 26625:a=n.Flags==4;break;case 0:a=n.Flags==16||n.Flags==4||n.Flags==36;break;default:throw"Unrecognized encryption algorithm: "+n.AlgID}if(!a)throw new Error("Encryption Flags/AlgID mismatch");return n.AlgIDHash=e.read_shift(4),n.KeySize=e.read_shift(4),n.ProviderType=e.read_shift(4),e.l+=8,n.CSPName=e.read_shift(r-e.l>>1,"utf16le"),e.l=r,n}function ude(e,t){var r={},n=e.l+t;return e.l+=4,r.Salt=e.slice(e.l,e.l+16),e.l+=16,r.Verifier=e.slice(e.l,e.l+16),e.l+=16,e.read_shift(4),r.VerifierHash=e.slice(e.l,n),e.l=n,r}function IJe(e){var t=El(e);switch(t.Minor){case 2:return[t.Minor,LJe(e)];case 3:return[t.Minor,PJe()];case 4:return[t.Minor,FJe(e)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+t.Minor)}function LJe(e){var t=e.read_shift(4);if((t&63)!=36)throw new Error("EncryptionInfo mismatch");var r=e.read_shift(4),n=cde(e,r),a=ude(e,e.length-e.l);return{t:"Std",h:n,v:a}}function PJe(){throw new Error("File is password-protected: ECMA-376 Extensible")}function FJe(e){var t=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];e.l+=4;var r=e.read_shift(e.length-e.l,"utf8"),n={};return r.replace(Aa,function(i){var s=Ut(i);switch(Uo(s[0])){case"<?xml":break;case"<encryption":case"</encryption>":break;case"<keyData":t.forEach(function(o){n[o]=s[o]});break;case"<dataIntegrity":n.encryptedHmacKey=s.encryptedHmacKey,n.encryptedHmacValue=s.encryptedHmacValue;break;case"<keyEncryptors>":case"<keyEncryptors":n.encs=[];break;case"</keyEncryptors>":break;case"<keyEncryptor":n.uri=s.uri;break;case"</keyEncryptor>":break;case"<encryptedKey":n.encs.push(s);break;default:throw s[0]}}),n}function BJe(e,t){var r={},n=r.EncryptionVersionInfo=El(e,4);if(t-=4,n.Minor!=2)throw new Error("unrecognized minor version code: "+n.Minor);if(n.Major>4||n.Major<2)throw new Error("unrecognized major version code: "+n.Major);r.Flags=e.read_shift(4),t-=4;var a=e.read_shift(4);return t-=4,r.EncryptionHeader=cde(e,a),t-=a,r.EncryptionVerifier=ude(e,t),r}function zJe(e){var t={},r=t.EncryptionVersionInfo=El(e,4);if(r.Major!=1||r.Minor!=1)throw"unrecognized version code "+r.Major+" : "+r.Minor;return t.Salt=e.read_shift(16),t.EncryptedVerifier=e.read_shift(16),t.EncryptedVerifierHash=e.read_shift(16),t}function jJe(e){var t=0,r,n=lde(e),a=n.length+1,i,s,o,l,c;for(r=Kc(a),r[0]=n.length,i=1;i!=a;++i)r[i]=n[i-1];for(i=a-1;i>=0;--i)s=r[i],o=(t&16384)===0?0:1,l=t<<1&32767,c=o|l,t=c^s;return t^52811}var dde=(function(){var e=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0],t=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163],r=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628],n=function(s){return(s/2|s*128)&255},a=function(s,o){return n(s^o)},i=function(s){for(var o=t[s.length-1],l=104,c=s.length-1;c>=0;--c)for(var u=s[c],f=0;f!=7;++f)u&64&&(o^=r[l]),u*=2,--l;return o};return function(s){for(var o=lde(s),l=i(o),c=o.length,u=Kc(16),f=0;f!=16;++f)u[f]=0;var p,m,b;for((c&1)===1&&(p=l>>8,u[c]=a(e[0],p),--c,p=l&255,m=o[o.length-1],u[c]=a(m,p));c>0;)--c,p=l>>8,u[c]=a(o[c],p),--c,p=l&255,u[c]=a(o[c],p);for(c=15,b=15-o.length;b>0;)p=l>>8,u[c]=a(e[b],p),--c,--b,p=l&255,u[c]=a(o[c],p),--c,--b;return u}})(),qJe=function(e,t,r,n,a){a||(a=t),n||(n=dde(e));var i,s;for(i=0;i!=t.length;++i)s=t[i],s^=n[r],s=(s>>5|s<<3)&255,a[i]=s,++r;return[a,r,n]},UJe=function(e){var t=0,r=dde(e);return function(n){var a=qJe("",n,t,r);return t=a[1],a[0]}};function $Je(e,t,r,n){var a={key:In(e),verificationBytes:In(e)};return r.password&&(a.verifier=jJe(r.password)),n.valid=a.verificationBytes===a.verifier,n.valid&&(n.insitu=UJe(r.password)),a}function HJe(e,t,r){var n=r||{};return n.Info=e.read_shift(2),e.l-=2,n.Info===1?n.Data=zJe(e):n.Data=BJe(e,t),n}function GJe(e,t,r){var n={Type:r.biff>=8?e.read_shift(2):0};return n.Type?HJe(e,t-2,n):$Je(e,r.biff>=8?t:t-2,r,n),n}var VJe=(function(){function e(a,i){switch(i.type){case"base64":return t(zi(a),i);case"binary":return t(a,i);case"buffer":return t(gr&&Buffer.isBuffer(a)?a.toString("binary"):_d(a),i);case"array":return t(id(a),i)}throw new Error("Unrecognized type "+i.type)}function t(a,i){var s=i||{},o=s.dense?[]:{},l=a.match(/\\trowd.*?\\row\b/g);if(!l.length)throw new Error("RTF missing table");var c={s:{c:0,r:0},e:{c:0,r:l.length-1}};return l.forEach(function(u,f){Array.isArray(o)&&(o[f]=[]);for(var p=/\\\w+\b/g,m=0,b,v=-1;b=p.exec(u);){switch(b[0]){case"\\cell":var y=u.slice(m,p.lastIndex-b[0].length);if(y[0]==" "&&(y=y.slice(1)),++v,y.length){var _={v:y,t:"s"};Array.isArray(o)?o[f][v]=_:o[Wt({r:f,c:v})]=_}break}m=p.lastIndex}v>c.e.c&&(c.e.c=v)}),o["!ref"]=xr(c),o}function r(a,i){return Jc(e(a,i),i)}function n(a){for(var i=["{\\rtf1\\ansi"],s=gn(a["!ref"]),o,l=Array.isArray(a),c=s.s.r;c<=s.e.r;++c){i.push("\\trowd\\trautofit1");for(var u=s.s.c;u<=s.e.c;++u)i.push("\\cellx"+(u+1));for(i.push("\\pard\\intbl"),u=s.s.c;u<=s.e.c;++u){var f=Wt({r:c,c:u});o=l?(a[c]||[])[u]:a[f],!(!o||o.v==null&&(!o.f||o.F))&&(i.push(" "+(o.w||(Pl(o),o.w))),i.push("\\cell"))}i.push("\\pard\\intbl\\row")}return i.join("")+"}"}return{to_workbook:r,to_sheet:e,from_sheet:n}})();function WJe(e){var t=e.slice(e[0]==="#"?1:0).slice(0,6);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}function xm(e){for(var t=0,r=1;t!=3;++t)r=r*256+(e[t]>255?255:e[t]<0?0:e[t]);return r.toString(16).toUpperCase().slice(1)}function KJe(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.max(t,r,n),i=Math.min(t,r,n),s=a-i;if(s===0)return[0,0,t];var o=0,l=0,c=a+i;switch(l=s/(c>1?2-c:c),a){case t:o=((r-n)/s+6)%6;break;case r:o=(n-t)/s+2;break;case n:o=(t-r)/s+4;break}return[o/6,l,c/2]}function XJe(e){var t=e[0],r=e[1],n=e[2],a=r*2*(n<.5?n:1-n),i=n-a/2,s=[i,i,i],o=6*t,l;if(r!==0)switch(o|0){case 0:case 6:l=a*o,s[0]+=a,s[1]+=l;break;case 1:l=a*(2-o),s[0]+=l,s[1]+=a;break;case 2:l=a*(o-2),s[1]+=a,s[2]+=l;break;case 3:l=a*(4-o),s[1]+=l,s[2]+=a;break;case 4:l=a*(o-4),s[2]+=a,s[0]+=l;break;case 5:l=a*(6-o),s[2]+=l,s[0]+=a;break}for(var c=0;c!=3;++c)s[c]=Math.round(s[c]*255);return s}function Vb(e,t){if(t===0)return e;var r=KJe(WJe(e));return t<0?r[2]=r[2]*(1+t):r[2]=1-(1-r[2])*(1-t),xm(XJe(r))}var fde=6,YJe=15,ZJe=1,Da=fde;function Wb(e){return Math.floor((e+Math.round(128/Da)/256)*Da)}function Kb(e){return Math.floor((e-5)/Da*100+.5)/100}function tD(e){return Math.round((e*Da+5)/Da*256)/256}function QM(e){return tD(Kb(Wb(e)))}function k8(e){var t=Math.abs(e-QM(e)),r=Da;if(t>.005)for(Da=ZJe;Da<YJe;++Da)Math.abs(e-QM(e))<=t&&(t=Math.abs(e-QM(e)),r=Da);Da=r}function u0(e){e.width?(e.wpx=Wb(e.width),e.wch=Kb(e.wpx),e.MDW=Da):e.wpx?(e.wch=Kb(e.wpx),e.width=tD(e.wch),e.MDW=Da):typeof e.wch=="number"&&(e.width=tD(e.wch),e.wpx=Wb(e.width),e.MDW=Da),e.customWidth&&delete e.customWidth}var QJe=96,hde=QJe;function pde(e){return e*96/hde}function ym(e){return e*hde/96}var JJe={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinHorzCross:"lightGrid"};function eet(e,t,r,n){t.Borders=[];var a={},i=!1;(e[0].match(Aa)||[]).forEach(function(s){var o=Ut(s);switch(Uo(o[0])){case"<borders":case"<borders>":case"</borders>":break;case"<border":case"<border>":case"<border/>":a={},o.diagonalUp&&(a.diagonalUp=Zr(o.diagonalUp)),o.diagonalDown&&(a.diagonalDown=Zr(o.diagonalDown)),t.Borders.push(a);break;case"</border>":break;case"<left/>":break;case"<left":case"<left>":break;case"</left>":break;case"<right/>":break;case"<right":case"<right>":break;case"</right>":break;case"<top/>":break;case"<top":case"<top>":break;case"</top>":break;case"<bottom/>":break;case"<bottom":case"<bottom>":break;case"</bottom>":break;case"<diagonal":case"<diagonal>":case"<diagonal/>":break;case"</diagonal>":break;case"<horizontal":case"<horizontal>":case"<horizontal/>":break;case"</horizontal>":break;case"<vertical":case"<vertical>":case"<vertical/>":break;case"</vertical>":break;case"<start":case"<start>":case"<start/>":break;case"</start>":break;case"<end":case"<end>":case"<end/>":break;case"</end>":break;case"<color":case"<color>":break;case"<color/>":case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+o[0]+" in borders")}})}function tet(e,t,r,n){t.Fills=[];var a={},i=!1;(e[0].match(Aa)||[]).forEach(function(s){var o=Ut(s);switch(Uo(o[0])){case"<fills":case"<fills>":case"</fills>":break;case"<fill>":case"<fill":case"<fill/>":a={},t.Fills.push(a);break;case"</fill>":break;case"<gradientFill>":break;case"<gradientFill":case"</gradientFill>":t.Fills.push(a),a={};break;case"<patternFill":case"<patternFill>":o.patternType&&(a.patternType=o.patternType);break;case"<patternFill/>":case"</patternFill>":break;case"<bgColor":a.bgColor||(a.bgColor={}),o.indexed&&(a.bgColor.indexed=parseInt(o.indexed,10)),o.theme&&(a.bgColor.theme=parseInt(o.theme,10)),o.tint&&(a.bgColor.tint=parseFloat(o.tint)),o.rgb&&(a.bgColor.rgb=o.rgb.slice(-6));break;case"<bgColor/>":case"</bgColor>":break;case"<fgColor":a.fgColor||(a.fgColor={}),o.theme&&(a.fgColor.theme=parseInt(o.theme,10)),o.tint&&(a.fgColor.tint=parseFloat(o.tint)),o.rgb!=null&&(a.fgColor.rgb=o.rgb.slice(-6));break;case"<fgColor/>":case"</fgColor>":break;case"<stop":case"<stop/>":break;case"</stop>":break;case"<color":case"<color/>":break;case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+o[0]+" in fills")}})}function ret(e,t,r,n){t.Fonts=[];var a={},i=!1;(e[0].match(Aa)||[]).forEach(function(s){var o=Ut(s);switch(Uo(o[0])){case"<fonts":case"<fonts>":case"</fonts>":break;case"<font":case"<font>":break;case"</font>":case"<font/>":t.Fonts.push(a),a={};break;case"<name":o.val&&(a.name=Vr(o.val));break;case"<name/>":case"</name>":break;case"<b":a.bold=o.val?Zr(o.val):1;break;case"<b/>":a.bold=1;break;case"<i":a.italic=o.val?Zr(o.val):1;break;case"<i/>":a.italic=1;break;case"<u":switch(o.val){case"none":a.underline=0;break;case"single":a.underline=1;break;case"double":a.underline=2;break;case"singleAccounting":a.underline=33;break;case"doubleAccounting":a.underline=34;break}break;case"<u/>":a.underline=1;break;case"<strike":a.strike=o.val?Zr(o.val):1;break;case"<strike/>":a.strike=1;break;case"<outline":a.outline=o.val?Zr(o.val):1;break;case"<outline/>":a.outline=1;break;case"<shadow":a.shadow=o.val?Zr(o.val):1;break;case"<shadow/>":a.shadow=1;break;case"<condense":a.condense=o.val?Zr(o.val):1;break;case"<condense/>":a.condense=1;break;case"<extend":a.extend=o.val?Zr(o.val):1;break;case"<extend/>":a.extend=1;break;case"<sz":o.val&&(a.sz=+o.val);break;case"<sz/>":case"</sz>":break;case"<vertAlign":o.val&&(a.vertAlign=o.val);break;case"<vertAlign/>":case"</vertAlign>":break;case"<family":o.val&&(a.family=parseInt(o.val,10));break;case"<family/>":case"</family>":break;case"<scheme":o.val&&(a.scheme=o.val);break;case"<scheme/>":case"</scheme>":break;case"<charset":if(o.val=="1")break;o.codepage=u8[parseInt(o.val,10)];break;case"<color":if(a.color||(a.color={}),o.auto&&(a.color.auto=Zr(o.auto)),o.rgb)a.color.rgb=o.rgb.slice(-6);else if(o.indexed){a.color.index=parseInt(o.indexed,10);var l=Gu[a.color.index];a.color.index==81&&(l=Gu[1]),l||(l=Gu[1]),a.color.rgb=l[0].toString(16)+l[1].toString(16)+l[2].toString(16)}else o.theme&&(a.color.theme=parseInt(o.theme,10),o.tint&&(a.color.tint=parseFloat(o.tint)),o.theme&&r.themeElements&&r.themeElements.clrScheme&&(a.color.rgb=Vb(r.themeElements.clrScheme[a.color.theme].rgb,a.color.tint||0)));break;case"<color/>":case"</color>":break;case"<AlternateContent":i=!0;break;case"</AlternateContent>":i=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+o[0]+" in fonts")}})}function net(e,t,r){t.NumberFmt=[];for(var n=Mo(Yt),a=0;a<n.length;++a)t.NumberFmt[n[a]]=Yt[n[a]];var i=e[0].match(Aa);if(i)for(a=0;a<i.length;++a){var s=Ut(i[a]);switch(Uo(s[0])){case"<numFmts":case"</numFmts>":case"<numFmts/>":case"<numFmts>":break;case"<numFmt":{var o=yr(Vr(s.formatCode)),l=parseInt(s.numFmtId,10);if(t.NumberFmt[l]=o,l>0){if(l>392){for(l=392;l>60&&t.NumberFmt[l]!=null;--l);t.NumberFmt[l]=o}Hu(o,l)}}break;case"</numFmt>":break;default:if(r.WTF)throw new Error("unrecognized "+s[0]+" in numFmts")}}}var D1=["numFmtId","fillId","fontId","borderId","xfId"],O1=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function aet(e,t,r){t.CellXf=[];var n,a=!1;(e[0].match(Aa)||[]).forEach(function(i){var s=Ut(i),o=0;switch(Uo(s[0])){case"<cellXfs":case"<cellXfs>":case"<cellXfs/>":case"</cellXfs>":break;case"<xf":case"<xf/>":for(n=s,delete n[0],o=0;o<D1.length;++o)n[D1[o]]&&(n[D1[o]]=parseInt(n[D1[o]],10));for(o=0;o<O1.length;++o)n[O1[o]]&&(n[O1[o]]=Zr(n[O1[o]]));if(t.NumberFmt&&n.numFmtId>392){for(o=392;o>60;--o)if(t.NumberFmt[n.numFmtId]==t.NumberFmt[o]){n.numFmtId=o;break}}t.CellXf.push(n);break;case"</xf>":break;case"<alignment":case"<alignment/>":var l={};s.vertical&&(l.vertical=s.vertical),s.horizontal&&(l.horizontal=s.horizontal),s.textRotation!=null&&(l.textRotation=s.textRotation),s.indent&&(l.indent=s.indent),s.wrapText&&(l.wrapText=Zr(s.wrapText)),n.alignment=l;break;case"</alignment>":break;case"<protection":break;case"</protection>":case"<protection/>":break;case"<AlternateContent":a=!0;break;case"</AlternateContent>":a=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(r&&r.WTF&&!a)throw new Error("unrecognized "+s[0]+" in cellXfs")}})}var iet=(function(){var t=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/,r=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/,n=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/,a=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/,i=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function(o,l,c){var u={};if(!o)return u;o=o.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");var f;return(f=o.match(t))&&net(f,u,c),(f=o.match(a))&&ret(f,u,l,c),(f=o.match(n))&&tet(f,u,l,c),(f=o.match(i))&&eet(f,u,l,c),(f=o.match(r))&&aet(f,u,c),u}})();function set(e,t){var r=e.read_shift(2),n=Sa(e);return[r,n]}function oet(e,t,r){var n={};n.sz=e.read_shift(2)/20;var a=vZe(e);a.fItalic&&(n.italic=1),a.fCondense&&(n.condense=1),a.fExtend&&(n.extend=1),a.fShadow&&(n.shadow=1),a.fOutline&&(n.outline=1),a.fStrikeout&&(n.strike=1);var i=e.read_shift(2);switch(i===700&&(n.bold=1),e.read_shift(2)){case 1:n.vertAlign="superscript";break;case 2:n.vertAlign="subscript";break}var s=e.read_shift(1);s!=0&&(n.underline=s);var o=e.read_shift(1);o>0&&(n.family=o);var l=e.read_shift(1);switch(l>0&&(n.charset=l),e.l++,n.color=gZe(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor";break}return n.name=Sa(e),n}var cet=Ca;function uet(e,t){var r=e.l+t,n=e.read_shift(2),a=e.read_shift(2);return e.l=r,{ixfe:n,numFmtId:a}}var det=Ca;function fet(e,t,r){var n={};n.NumberFmt=[];for(var a in Yt)n.NumberFmt[a]=Yt[a];n.CellXf=[],n.Fonts=[];var i=[],s=!1;return Hl(e,function(l,c,u){switch(u){case 44:n.NumberFmt[l[0]]=l[1],Hu(l[1],l[0]);break;case 43:n.Fonts.push(l),l.color.theme!=null&&t&&t.themeElements&&t.themeElements.clrScheme&&(l.color.rgb=Vb(t.themeElements.clrScheme[l.color.theme].rgb,l.color.tint||0));break;case 1025:break;case 45:break;case 46:break;case 47:i[i.length-1]==617&&n.CellXf.push(l);break;case 48:case 507:case 572:case 475:break;case 1171:case 2102:case 1130:case 512:case 2095:case 3072:break;case 35:s=!0;break;case 36:s=!1;break;case 37:i.push(u),s=!0;break;case 38:i.pop(),s=!1;break;default:if(c.T>0)i.push(u);else if(c.T<0)i.pop();else if(!s||r.WTF&&i[i.length-1]!=37)throw new Error("Unexpected record 0x"+u.toString(16))}}),n}var het=["</a:lt1>","</a:dk1>","</a:lt2>","</a:dk2>","</a:accent1>","</a:accent2>","</a:accent3>","</a:accent4>","</a:accent5>","</a:accent6>","</a:hlink>","</a:folHlink>"];function pet(e,t,r){t.themeElements.clrScheme=[];var n={};(e[0].match(Aa)||[]).forEach(function(a){var i=Ut(a);switch(i[0]){case"<a:clrScheme":case"</a:clrScheme>":break;case"<a:srgbClr":n.rgb=i.val;break;case"<a:sysClr":n.rgb=i.lastClr;break;case"<a:dk1>":case"</a:dk1>":case"<a:lt1>":case"</a:lt1>":case"<a:dk2>":case"</a:dk2>":case"<a:lt2>":case"</a:lt2>":case"<a:accent1>":case"</a:accent1>":case"<a:accent2>":case"</a:accent2>":case"<a:accent3>":case"</a:accent3>":case"<a:accent4>":case"</a:accent4>":case"<a:accent5>":case"</a:accent5>":case"<a:accent6>":case"</a:accent6>":case"<a:hlink>":case"</a:hlink>":case"<a:folHlink>":case"</a:folHlink>":i[0].charAt(1)==="/"?(t.themeElements.clrScheme[het.indexOf(i[0])]=n,n={}):n.name=i[0].slice(3,i[0].length-1);break;default:if(r&&r.WTF)throw new Error("Unrecognized "+i[0]+" in clrScheme")}})}function met(){}function get(){}var vet=/<a:clrScheme([^>]*)>[\s\S]*<\/a:clrScheme>/,bet=/<a:fontScheme([^>]*)>[\s\S]*<\/a:fontScheme>/,xet=/<a:fmtScheme([^>]*)>[\s\S]*<\/a:fmtScheme>/;function yet(e,t,r){t.themeElements={};var n;[["clrScheme",vet,pet],["fontScheme",bet,met],["fmtScheme",xet,get]].forEach(function(a){if(!(n=e.match(a[1])))throw new Error(a[0]+" not found in themeElements");a[2](n,t,r)})}var _et=/<a:themeElements([^>]*)>[\s\S]*<\/a:themeElements>/;function mde(e,t){(!e||e.length===0)&&(e=wet());var r,n={};if(!(r=e.match(_et)))throw new Error("themeElements not found in theme");return yet(r[0],n,t),n.raw=e,n}function wet(e,t){var r=[Tue];return r[r.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',r[r.length]="<a:themeElements>",r[r.length]='<a:clrScheme name="Office">',r[r.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',r[r.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',r[r.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',r[r.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',r[r.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',r[r.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',r[r.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',r[r.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',r[r.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',r[r.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',r[r.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',r[r.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',r[r.length]="</a:clrScheme>",r[r.length]='<a:fontScheme name="Office">',r[r.length]="<a:majorFont>",r[r.length]='<a:latin typeface="Cambria"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Times New Roman"/>',r[r.length]='<a:font script="Hebr" typeface="Times New Roman"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="MoolBoran"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Times New Roman"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:majorFont>",r[r.length]="<a:minorFont>",r[r.length]='<a:latin typeface="Calibri"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Arial"/>',r[r.length]='<a:font script="Hebr" typeface="Arial"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="DaunPenh"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Arial"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:minorFont>",r[r.length]="</a:fontScheme>",r[r.length]='<a:fmtScheme name="Office">',r[r.length]="<a:fillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="1"/>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="0"/>',r[r.length]="</a:gradFill>",r[r.length]="</a:fillStyleLst>",r[r.length]="<a:lnStyleLst>",r[r.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]="</a:lnStyleLst>",r[r.length]="<a:effectStyleLst>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',r[r.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',r[r.length]="</a:effectStyle>",r[r.length]="</a:effectStyleLst>",r[r.length]="<a:bgFillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]="</a:bgFillStyleLst>",r[r.length]="</a:fmtScheme>",r[r.length]="</a:themeElements>",r[r.length]="<a:objectDefaults>",r[r.length]="<a:spDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',r[r.length]="</a:spDef>",r[r.length]="<a:lnDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',r[r.length]="</a:lnDef>",r[r.length]="</a:objectDefaults>",r[r.length]="<a:extraClrSchemeLst/>",r[r.length]="</a:theme>",r.join("")}function Eet(e,t,r){var n=e.l+t,a=e.read_shift(4);if(a!==124226){if(!r.cellStyles){e.l=n;return}var i=e.slice(e.l);e.l=n;var s;try{s=Cue(i,{type:"array"})}catch{return}var o=Di(s,"theme/theme/theme1.xml",!0);if(o)return mde(o,r)}}function Cet(e){return e.read_shift(4)}function Tet(e){var t={};switch(t.xclrType=e.read_shift(2),t.nTintShade=e.read_shift(2),t.xclrType){case 0:e.l+=4;break;case 1:t.xclrValue=Aet(e,4);break;case 2:t.xclrValue=tde(e);break;case 3:t.xclrValue=Cet(e);break;case 4:e.l+=4;break}return e.l+=8,t}function Aet(e,t){return Ca(e,t)}function ket(e,t){return Ca(e,t)}function Net(e){var t=e.read_shift(2),r=e.read_shift(2)-4,n=[t];switch(t){case 4:case 5:case 7:case 8:case 9:case 10:case 11:case 13:n[1]=Tet(e);break;case 6:n[1]=ket(e,r);break;case 14:case 15:n[1]=e.read_shift(r===1?1:2);break;default:throw new Error("Unrecognized ExtProp type: "+t+" "+r)}return n}function Ret(e,t){var r=e.l+t;e.l+=2;var n=e.read_shift(2);e.l+=2;for(var a=e.read_shift(2),i=[];a-- >0;)i.push(Net(e,r-e.l));return{ixfe:n,ext:i}}function Met(e,t){t.forEach(function(r){r[0]})}function Det(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:Sa(e)}}function Oet(e){for(var t=[],r=e.read_shift(4);r-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}function Iet(e){return e.l+=4,e.read_shift(4)!=0}function Let(e,t,r){var n={Types:[],Cell:[],Value:[]},a=r||{},i=[],s=!1,o=2;return Hl(e,function(l,c,u){switch(u){case 335:n.Types.push({name:l.name});break;case 51:l.forEach(function(f){o==1?n.Cell.push({type:n.Types[f[0]-1].name,index:f[1]}):o==0&&n.Value.push({type:n.Types[f[0]-1].name,index:f[1]})});break;case 337:o=l?1:0;break;case 338:o=2;break;case 35:i.push(u),s=!0;break;case 36:i.pop(),s=!1;break;default:if(!c.T){if(!s||a.WTF&&i[i.length-1]!=35)throw new Error("Unexpected record 0x"+u.toString(16))}}}),n}function Pet(e,t,r){var n={Types:[],Cell:[],Value:[]};if(!e)return n;var a=!1,i=2,s;return e.replace(Aa,function(o){var l=Ut(o);switch(Uo(l[0])){case"<?xml":break;case"<metadata":case"</metadata>":break;case"<metadataTypes":case"</metadataTypes>":break;case"<metadataType":n.Types.push({name:l.name});break;case"</metadataType>":break;case"<futureMetadata":for(var c=0;c<n.Types.length;++c)n.Types[c].name==l.name&&(s=n.Types[c]);break;case"</futureMetadata>":break;case"<bk>":break;case"</bk>":break;case"<rc":i==1?n.Cell.push({type:n.Types[l.t-1].name,index:+l.v}):i==0&&n.Value.push({type:n.Types[l.t-1].name,index:+l.v});break;case"</rc>":break;case"<cellMetadata":i=1;break;case"</cellMetadata>":i=2;break;case"<valueMetadata":i=0;break;case"</valueMetadata>":i=2;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;case"<rvb":if(!s)break;s.offsets||(s.offsets=[]),s.offsets.push(+l.i);break;default:if(!a&&r.WTF)throw new Error("unrecognized "+l[0]+" in metadata")}return o}),n}function Fet(e){var t=[];if(!e)return t;var r=1;return(e.match(Aa)||[]).forEach(function(n){var a=Ut(n);switch(a[0]){case"<?xml":break;case"<calcChain":case"<calcChain>":case"</calcChain>":break;case"<c":delete a[0],a.i?r=a.i:a.i=r,t.push(a);break}}),t}function Bet(e){var t={};t.i=e.read_shift(4);var r={};r.r=e.read_shift(4),r.c=e.read_shift(4),t.r=Wt(r);var n=e.read_shift(1);return n&2&&(t.l="1"),n&8&&(t.a="1"),t}function zet(e,t,r){var n=[];return Hl(e,function(i,s,o){switch(o){case 63:n.push(i);break;default:if(!s.T)throw new Error("Unexpected record 0x"+o.toString(16))}}),n}function jet(e,t,r,n){if(!e)return e;var a=n||{},i=!1;Hl(e,function(o,l,c){switch(c){case 359:case 363:case 364:case 366:case 367:case 368:case 369:case 370:case 371:case 472:case 577:case 578:case 579:case 580:case 581:case 582:case 583:case 584:case 585:case 586:case 587:break;case 35:i=!0;break;case 36:i=!1;break;default:if(!l.T){if(!i||a.WTF)throw new Error("Unexpected record 0x"+c.toString(16))}}},a)}function qet(e,t){if(!e)return"??";var r=(e.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1];return t["!id"][r].Target}function AJ(e,t,r,n){var a=Array.isArray(e),i;t.forEach(function(s){var o=La(s.ref);if(a?(e[o.r]||(e[o.r]=[]),i=e[o.r][o.c]):i=e[s.ref],!i){i={t:"z"},a?e[o.r][o.c]=i:e[s.ref]=i;var l=gn(e["!ref"]||"BDWGO1000001:A1");l.s.r>o.r&&(l.s.r=o.r),l.e.r<o.r&&(l.e.r=o.r),l.s.c>o.c&&(l.s.c=o.c),l.e.c<o.c&&(l.e.c=o.c);var c=xr(l);c!==e["!ref"]&&(e["!ref"]=c)}i.c||(i.c=[]);var u={a:s.author,t:s.t,r:s.r,T:r};s.h&&(u.h=s.h);for(var f=i.c.length-1;f>=0;--f){if(!r&&i.c[f].T)return;r&&!i.c[f].T&&i.c.splice(f,1)}if(r&&n){for(f=0;f<n.length;++f)if(u.a==n[f].id){u.a=n[f].name||u.a;break}}i.c.push(u)})}function Uet(e,t){if(e.match(/<(?:\w+:)?comments *\/>/))return[];var r=[],n=[],a=e.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);a&&a[1]&&a[1].split(/<\/\w*:?author>/).forEach(function(s){if(!(s===""||s.trim()==="")){var o=s.match(/<(?:\w+:)?author[^>]*>(.*)/);o&&r.push(o[1])}});var i=e.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);return i&&i[1]&&i[1].split(/<\/\w*:?comment>/).forEach(function(s){if(!(s===""||s.trim()==="")){var o=s.match(/<(?:\w+:)?comment[^>]*>/);if(o){var l=Ut(o[0]),c={author:l.authorId&&r[l.authorId]||"sheetjsghost",ref:l.ref,guid:l.guid},u=La(l.ref);if(!(t.sheetRows&&t.sheetRows<=u.r)){var f=s.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),p=!!f&&!!f[1]&&A8(f[1])||{r:"",t:"",h:""};c.r=p.r,p.r=="<t></t>"&&(p.t=p.h=""),c.t=(p.t||"").replace(/\r\n/g,`
`).replace(/\r/g,`
`),t.cellHTML&&(c.h=p.h),n.push(c)}}}}),n}function $et(e,t){var r=[],n=!1,a={},i=0;return e.replace(Aa,function(o,l){var c=Ut(o);switch(Uo(c[0])){case"<?xml":break;case"<ThreadedComments":break;case"</ThreadedComments>":break;case"<threadedComment":a={author:c.personId,guid:c.id,ref:c.ref,T:1};break;case"</threadedComment>":a.t!=null&&r.push(a);break;case"<text>":case"<text":i=l+o.length;break;case"</text>":a.t=e.slice(i,l).replace(/\r\n/g,`
`).replace(/\r/g,`
`);break;case"<mentions":case"<mentions>":n=!0;break;case"</mentions>":n=!1;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+c[0]+" in threaded comments")}return o}),r}function Het(e,t){var r=[],n=!1;return e.replace(Aa,function(i){var s=Ut(i);switch(Uo(s[0])){case"<?xml":break;case"<personList":break;case"</personList>":break;case"<person":r.push({name:s.displayname,id:s.id});break;case"</person>":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+s[0]+" in threaded comments")}return i}),r}function Get(e){var t={};t.iauthor=e.read_shift(4);var r=Ed(e);return t.rfx=r.s,t.ref=Wt(r.s),e.l+=16,t}var Vet=Sa;function Wet(e,t){var r=[],n=[],a={},i=!1;return Hl(e,function(o,l,c){switch(c){case 632:n.push(o);break;case 635:a=o;break;case 637:a.t=o.t,a.h=o.h,a.r=o.r;break;case 636:if(a.author=n[a.iauthor],delete a.iauthor,t.sheetRows&&a.rfx&&t.sheetRows<=a.rfx.r)break;a.t||(a.t=""),delete a.rfx,r.push(a);break;case 3072:break;case 35:i=!0;break;case 36:i=!1;break;case 37:break;case 38:break;default:if(!l.T){if(!i||t.WTF)throw new Error("Unexpected record 0x"+c.toString(16))}}}),r}var Ket="application/vnd.ms-office.vbaProject";function Xet(e){var t=br.utils.cfb_new({root:"R"});return e.FullPaths.forEach(function(r,n){if(!(r.slice(-1)==="/"||!r.match(/_VBA_PROJECT_CUR/))){var a=r.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");br.utils.cfb_add(t,a,e.FileIndex[n].content)}}),br.write(t)}function Yet(){return{"!type":"dialog"}}function Zet(){return{"!type":"dialog"}}function Qet(){return{"!type":"macro"}}function Jet(){return{"!type":"macro"}}var Vf=(function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function r(n,a,i,s){var o=!1,l=!1;i.length==0?l=!0:i.charAt(0)=="["&&(l=!0,i=i.slice(1,-1)),s.length==0?o=!0:s.charAt(0)=="["&&(o=!0,s=s.slice(1,-1));var c=i.length>0?parseInt(i,10)|0:0,u=s.length>0?parseInt(s,10)|0:0;return o?u+=t.c:--u,l?c+=t.r:--c,a+(o?"":"$")+Hn(u)+(l?"":"$")+ua(c)}return function(a,i){return t=i,a.replace(e,r)}})(),gde=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,ett=(function(){return function(t,r){return t.replace(gde,function(n,a,i,s,o,l){var c=_8(s)-(i?0:r.c),u=y8(l)-(o?0:r.r),f=u==0?"":o?u+1:"["+u+"]",p=c==0?"":i?c+1:"["+c+"]";return a+"R"+f+"C"+p})}})();function vde(e,t){return e.replace(gde,function(r,n,a,i,s,o){return n+(a=="$"?a+i:Hn(_8(i)+t.c))+(s=="$"?s+o:ua(y8(o)+t.r))})}function ttt(e,t,r){var n=F0(t),a=n.s,i=La(r),s={r:i.r-a.r,c:i.c-a.c};return vde(e,s)}function rtt(e){return e.length!=1}function kJ(e){return e.replace(/_xlfn\./g,"")}function Mn(e){e.l+=1}function Xc(e,t){var r=e.read_shift(2);return[r&16383,r>>14&1,r>>15&1]}function bde(e,t,r){var n=2;if(r){if(r.biff>=2&&r.biff<=5)return xde(e);r.biff==12&&(n=4)}var a=e.read_shift(n),i=e.read_shift(n),s=Xc(e),o=Xc(e);return{s:{r:a,c:s[0],cRel:s[1],rRel:s[2]},e:{r:i,c:o[0],cRel:o[1],rRel:o[2]}}}function xde(e){var t=Xc(e),r=Xc(e),n=e.read_shift(1),a=e.read_shift(1);return{s:{r:t[0],c:n,cRel:t[1],rRel:t[2]},e:{r:r[0],c:a,cRel:r[1],rRel:r[2]}}}function ntt(e,t,r){if(r.biff<8)return xde(e);var n=e.read_shift(r.biff==12?4:2),a=e.read_shift(r.biff==12?4:2),i=Xc(e),s=Xc(e);return{s:{r:n,c:i[0],cRel:i[1],rRel:i[2]},e:{r:a,c:s[0],cRel:s[1],rRel:s[2]}}}function yde(e,t,r){if(r&&r.biff>=2&&r.biff<=5)return att(e);var n=e.read_shift(r&&r.biff==12?4:2),a=Xc(e);return{r:n,c:a[0],cRel:a[1],rRel:a[2]}}function att(e){var t=Xc(e),r=e.read_shift(1);return{r:t[0],c:r,cRel:t[1],rRel:t[2]}}function itt(e){var t=e.read_shift(2),r=e.read_shift(2);return{r:t,c:r&255,fQuoted:!!(r&16384),cRel:r>>15,rRel:r>>15}}function stt(e,t,r){var n=r&&r.biff?r.biff:8;if(n>=2&&n<=5)return ott(e);var a=e.read_shift(n>=12?4:2),i=e.read_shift(2),s=(i&16384)>>14,o=(i&32768)>>15;if(i&=16383,o==1)for(;a>524287;)a-=1048576;if(s==1)for(;i>8191;)i=i-16384;return{r:a,c:i,cRel:s,rRel:o}}function ott(e){var t=e.read_shift(2),r=e.read_shift(1),n=(t&32768)>>15,a=(t&16384)>>14;return t&=16383,n==1&&t>=8192&&(t=t-16384),a==1&&r>=128&&(r=r-256),{r:t,c:r,cRel:a,rRel:n}}function ltt(e,t,r){var n=(e[e.l++]&96)>>5,a=bde(e,r.biff>=2&&r.biff<=5?6:8,r);return[n,a]}function ctt(e,t,r){var n=(e[e.l++]&96)>>5,a=e.read_shift(2,"i"),i=8;if(r)switch(r.biff){case 5:e.l+=12,i=6;break;case 12:i=12;break}var s=bde(e,i,r);return[n,a,s]}function utt(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r&&r.biff>8?12:r.biff<8?6:8,[n]}function dtt(e,t,r){var n=(e[e.l++]&96)>>5,a=e.read_shift(2),i=8;if(r)switch(r.biff){case 5:e.l+=12,i=6;break;case 12:i=12;break}return e.l+=i,[n,a]}function ftt(e,t,r){var n=(e[e.l++]&96)>>5,a=ntt(e,t-1,r);return[n,a]}function htt(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r.biff==2?6:r.biff==12?14:7,[n]}function NJ(e){var t=e[e.l+1]&1,r=1;return e.l+=4,[t,r]}function ptt(e,t,r){e.l+=2;for(var n=e.read_shift(r&&r.biff==2?1:2),a=[],i=0;i<=n;++i)a.push(e.read_shift(r&&r.biff==2?1:2));return a}function mtt(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function gtt(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function vtt(e){var t=e[e.l+1]&255?1:0;return e.l+=2,[t,e.read_shift(2)]}function btt(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=r&&r.biff==2?3:4,[n]}function _de(e){var t=e.read_shift(1),r=e.read_shift(1);return[t,r]}function xtt(e){return e.read_shift(2),_de(e)}function ytt(e){return e.read_shift(2),_de(e)}function _tt(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=yde(e,0,r);return[n,a]}function wtt(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=stt(e,0,r);return[n,a]}function Ett(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=e.read_shift(2);r&&r.biff==5&&(e.l+=12);var i=yde(e,0,r);return[n,a,i]}function Stt(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=e.read_shift(r&&r.biff<=3?1:2);return[Crt[a],Sde[a],n]}function Ctt(e,t,r){var n=e[e.l++],a=e.read_shift(1),i=r&&r.biff<=3?[n==88?-1:0,e.read_shift(1)]:Ttt(e);return[a,(i[0]===0?Sde:Srt)[i[1]]]}function Ttt(e){return[e[e.l+1]>>7,e.read_shift(2)&32767]}function Att(e,t,r){e.l+=r&&r.biff==2?3:4}function ktt(e,t,r){if(e.l++,r&&r.biff==12)return[e.read_shift(4,"i"),0];var n=e.read_shift(2),a=e.read_shift(r&&r.biff==2?1:2);return[n,a]}function Ntt(e){return e.l++,Sd[e.read_shift(1)]}function Rtt(e){return e.l++,e.read_shift(2)}function Mtt(e){return e.l++,e.read_shift(1)!==0}function Dtt(e){return e.l++,_a(e)}function Ott(e,t,r){return e.l++,hg(e,t-1,r)}function Itt(e,t){var r=[e.read_shift(1)];if(t==12)switch(r[0]){case 2:r[0]=4;break;case 4:r[0]=16;break;case 0:r[0]=1;break;case 1:r[0]=2;break}switch(r[0]){case 4:r[1]=yn(e,1)?"TRUE":"FALSE",t!=12&&(e.l+=7);break;case 37:case 16:r[1]=Sd[e[e.l]],e.l+=t==12?4:8;break;case 0:e.l+=8;break;case 1:r[1]=_a(e);break;case 2:r[1]=Cd(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+r[0])}return r}function Ltt(e,t,r){for(var n=e.read_shift(r.biff==12?4:2),a=[],i=0;i!=n;++i)a.push((r.biff==12?Ed:Sy)(e));return a}function Ptt(e,t,r){var n=0,a=0;r.biff==12?(n=e.read_shift(4),a=e.read_shift(4)):(a=1+e.read_shift(1),n=1+e.read_shift(2)),r.biff>=2&&r.biff<8&&(--n,--a==0&&(a=256));for(var i=0,s=[];i!=n&&(s[i]=[]);++i)for(var o=0;o!=a;++o)s[i][o]=Itt(e,r.biff);return s}function Ftt(e,t,r){var n=e.read_shift(1)>>>5&3,a=!r||r.biff>=8?4:2,i=e.read_shift(a);switch(r.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12;break}return[n,0,i]}function Btt(e,t,r){if(r.biff==5)return ztt(e);var n=e.read_shift(1)>>>5&3,a=e.read_shift(2),i=e.read_shift(4);return[n,a,i]}function ztt(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2,"i");e.l+=8;var n=e.read_shift(2);return e.l+=12,[t,r,n]}function jtt(e,t,r){var n=e.read_shift(1)>>>5&3;e.l+=r&&r.biff==2?3:4;var a=e.read_shift(r&&r.biff==2?1:2);return[n,a]}function qtt(e,t,r){var n=e.read_shift(1)>>>5&3,a=e.read_shift(r&&r.biff==2?1:2);return[n,a]}function Utt(e,t,r){var n=e.read_shift(1)>>>5&3;return e.l+=4,r.biff<8&&e.l--,r.biff==12&&(e.l+=2),[n]}function $tt(e,t,r){var n=(e[e.l++]&96)>>5,a=e.read_shift(2),i=4;if(r)switch(r.biff){case 5:i=15;break;case 12:i=6;break}return e.l+=i,[n,a]}var Htt=Ca,Gtt=Ca,Vtt=Ca;function mg(e,t,r){return e.l+=2,[itt(e)]}function N8(e){return e.l+=6,[]}var Wtt=mg,Ktt=N8,Xtt=N8,Ytt=mg;function wde(e){return e.l+=2,[In(e),e.read_shift(2)&1]}var Ztt=mg,Qtt=wde,Jtt=N8,ert=mg,trt=mg,rrt=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function nrt(e){e.l+=2;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),a=e.read_shift(2),i=e.read_shift(2),s=rrt[r>>2&31];return{ixti:t,coltype:r&3,rt:s,idx:n,c:a,C:i}}function art(e){return e.l+=2,[e.read_shift(4)]}function irt(e,t,r){return e.l+=5,e.l+=2,e.l+=r.biff==2?1:4,["PTGSHEET"]}function srt(e,t,r){return e.l+=r.biff==2?4:5,["PTGENDSHEET"]}function ort(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function lrt(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function crt(e){return e.l+=4,[0,0]}var RJ={1:{n:"PtgExp",f:ktt},2:{n:"PtgTbl",f:Vtt},3:{n:"PtgAdd",f:Mn},4:{n:"PtgSub",f:Mn},5:{n:"PtgMul",f:Mn},6:{n:"PtgDiv",f:Mn},7:{n:"PtgPower",f:Mn},8:{n:"PtgConcat",f:Mn},9:{n:"PtgLt",f:Mn},10:{n:"PtgLe",f:Mn},11:{n:"PtgEq",f:Mn},12:{n:"PtgGe",f:Mn},13:{n:"PtgGt",f:Mn},14:{n:"PtgNe",f:Mn},15:{n:"PtgIsect",f:Mn},16:{n:"PtgUnion",f:Mn},17:{n:"PtgRange",f:Mn},18:{n:"PtgUplus",f:Mn},19:{n:"PtgUminus",f:Mn},20:{n:"PtgPercent",f:Mn},21:{n:"PtgParen",f:Mn},22:{n:"PtgMissArg",f:Mn},23:{n:"PtgStr",f:Ott},26:{n:"PtgSheet",f:irt},27:{n:"PtgEndSheet",f:srt},28:{n:"PtgErr",f:Ntt},29:{n:"PtgBool",f:Mtt},30:{n:"PtgInt",f:Rtt},31:{n:"PtgNum",f:Dtt},32:{n:"PtgArray",f:htt},33:{n:"PtgFunc",f:Stt},34:{n:"PtgFuncVar",f:Ctt},35:{n:"PtgName",f:Ftt},36:{n:"PtgRef",f:_tt},37:{n:"PtgArea",f:ltt},38:{n:"PtgMemArea",f:jtt},39:{n:"PtgMemErr",f:Htt},40:{n:"PtgMemNoMem",f:Gtt},41:{n:"PtgMemFunc",f:qtt},42:{n:"PtgRefErr",f:Utt},43:{n:"PtgAreaErr",f:utt},44:{n:"PtgRefN",f:wtt},45:{n:"PtgAreaN",f:ftt},46:{n:"PtgMemAreaN",f:ort},47:{n:"PtgMemNoMemN",f:lrt},57:{n:"PtgNameX",f:Btt},58:{n:"PtgRef3d",f:Ett},59:{n:"PtgArea3d",f:ctt},60:{n:"PtgRefErr3d",f:$tt},61:{n:"PtgAreaErr3d",f:dtt},255:{}},urt={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},drt={1:{n:"PtgElfLel",f:wde},2:{n:"PtgElfRw",f:ert},3:{n:"PtgElfCol",f:Wtt},6:{n:"PtgElfRwV",f:trt},7:{n:"PtgElfColV",f:Ytt},10:{n:"PtgElfRadical",f:Ztt},11:{n:"PtgElfRadicalS",f:Jtt},13:{n:"PtgElfColS",f:Ktt},15:{n:"PtgElfColSV",f:Xtt},16:{n:"PtgElfRadicalLel",f:Qtt},25:{n:"PtgList",f:nrt},29:{n:"PtgSxName",f:art},255:{}},frt={0:{n:"PtgAttrNoop",f:crt},1:{n:"PtgAttrSemi",f:btt},2:{n:"PtgAttrIf",f:gtt},4:{n:"PtgAttrChoose",f:ptt},8:{n:"PtgAttrGoto",f:mtt},16:{n:"PtgAttrSum",f:Att},32:{n:"PtgAttrBaxcel",f:NJ},33:{n:"PtgAttrBaxcel",f:NJ},64:{n:"PtgAttrSpace",f:xtt},65:{n:"PtgAttrSpaceSemi",f:ytt},128:{n:"PtgAttrIfError",f:vtt},255:{}};function gg(e,t,r,n){if(n.biff<8)return Ca(e,t);for(var a=e.l+t,i=[],s=0;s!==r.length;++s)switch(r[s][0]){case"PtgArray":r[s][1]=Ptt(e,0,n),i.push(r[s][1]);break;case"PtgMemArea":r[s][2]=Ltt(e,r[s][1],n),i.push(r[s][2]);break;case"PtgExp":n&&n.biff==12&&(r[s][1][1]=e.read_shift(4),i.push(r[s][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+r[s][0]}return t=a-e.l,t!==0&&i.push(Ca(e,t)),i}function vg(e,t,r){for(var n=e.l+t,a,i,s=[];n!=e.l;)t=n-e.l,i=e[e.l],a=RJ[i]||RJ[urt[i]],(i===24||i===25)&&(a=(i===24?drt:frt)[e[e.l+1]]),!a||!a.f?Ca(e,t):s.push([a.n,a.f(e,t,r)]);return s}function hrt(e){for(var t=[],r=0;r<e.length;++r){for(var n=e[r],a=[],i=0;i<n.length;++i){var s=n[i];if(s)switch(s[0]){case 2:a.push('"'+s[1].replace(/"/g,'""')+'"');break;default:a.push(s[1])}else a.push("")}t.push(a.join(","))}return t.join(";")}var prt={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function mrt(e,t){if(!e&&!(t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}function Ede(e,t,r){if(!e)return"SH33TJSERR0";if(r.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var n=e.XTI[t];if(r.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),t==0?"":e.XTI[t-1];if(!n)return"SH33TJSERR1";var a="";if(r.biff>8)switch(e[n[0]][0]){case 357:return a=n[1]==-1?"#REF":e.SheetNames[n[1]],n[1]==n[2]?a:a+":"+e.SheetNames[n[2]];case 358:return r.SID!=null?e.SheetNames[r.SID]:"SH33TJSSAME"+e[n[0]][0];case 355:default:return"SH33TJSSRC"+e[n[0]][0]}switch(e[n[0]][0][0]){case 1025:return a=n[1]==-1?"#REF":e.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?a:a+":"+e.SheetNames[n[2]];case 14849:return e[n[0]].slice(1).map(function(i){return i.Name}).join(";;");default:return e[n[0]][0][3]?(a=n[1]==-1?"#REF":e[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?a:a+":"+e[n[0]][0][3][n[2]]):"SH33TJSERR2"}}function MJ(e,t,r){var n=Ede(e,t,r);return n=="#REF"?n:mrt(n,r)}function va(e,t,r,n,a){var i=a&&a.biff||8,s={s:{c:0,r:0}},o=[],l,c,u,f=0,p=0,m,b="";if(!e[0]||!e[0][0])return"";for(var v=-1,y="",_=0,S=e[0].length;_<S;++_){var C=e[0][_];switch(C[0]){case"PtgUminus":o.push("-"+o.pop());break;case"PtgUplus":o.push("+"+o.pop());break;case"PtgPercent":o.push(o.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(l=o.pop(),c=o.pop(),v>=0){switch(e[0][v][1][0]){case 0:y=dn(" ",e[0][v][1][1]);break;case 1:y=dn("\r",e[0][v][1][1]);break;default:if(y="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][v][1][0])}c=c+y,v=-1}o.push(c+prt[C[0]]+l);break;case"PtgIsect":l=o.pop(),c=o.pop(),o.push(c+" "+l);break;case"PtgUnion":l=o.pop(),c=o.pop(),o.push(c+","+l);break;case"PtgRange":l=o.pop(),c=o.pop(),o.push(c+":"+l);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":u=Ip(C[1][1],s,a),o.push(Lp(u,i));break;case"PtgRefN":u=r?Ip(C[1][1],r,a):C[1][1],o.push(Lp(u,i));break;case"PtgRef3d":f=C[1][1],u=Ip(C[1][2],s,a),b=MJ(n,f,a),o.push(b+"!"+Lp(u,i));break;case"PtgFunc":case"PtgFuncVar":var T=C[1][0],A=C[1][1];T||(T=0),T&=127;var k=T==0?[]:o.slice(-T);o.length-=T,A==="User"&&(A=k.shift()),o.push(A+"("+k.join(",")+")");break;case"PtgBool":o.push(C[1]?"TRUE":"FALSE");break;case"PtgInt":o.push(C[1]);break;case"PtgNum":o.push(String(C[1]));break;case"PtgStr":o.push('"'+C[1].replace(/"/g,'""')+'"');break;case"PtgErr":o.push(C[1]);break;case"PtgAreaN":m=dJ(C[1][1],r?{s:r}:s,a),o.push(YM(m,a));break;case"PtgArea":m=dJ(C[1][1],s,a),o.push(YM(m,a));break;case"PtgArea3d":f=C[1][1],m=C[1][2],b=MJ(n,f,a),o.push(b+"!"+YM(m,a));break;case"PtgAttrSum":o.push("SUM("+o.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":p=C[1][2];var N=(n.names||[])[p-1]||(n[0]||[])[p],L=N?N.Name:"SH33TJSNAME"+String(p);L&&L.slice(0,6)=="_xlfn."&&!a.xlfn&&(L=L.slice(6)),o.push(L);break;case"PtgNameX":var I=C[1][1];p=C[1][2];var P;if(a.biff<=5)I<0&&(I=-I),n[I]&&(P=n[I][p]);else{var H="";if(((n[I]||[])[0]||[])[0]==14849||(((n[I]||[])[0]||[])[0]==1025?n[I][p]&&n[I][p].itab>0&&(H=n.SheetNames[n[I][p].itab-1]+"!"):H=n.SheetNames[p-1]+"!"),n[I]&&n[I][p])H+=n[I][p].Name;else if(n[0]&&n[0][p])H+=n[0][p].Name;else{var B=(Ede(n,I,a)||"").split(";;");B[p-1]?H=B[p-1]:H+="SH33TJSERRX"}o.push(H);break}P||(P={Name:"SH33TJSERRY"}),o.push(P.Name);break;case"PtgParen":var K="(",j=")";if(v>=0){switch(y="",e[0][v][1][0]){case 2:K=dn(" ",e[0][v][1][1])+K;break;case 3:K=dn("\r",e[0][v][1][1])+K;break;case 4:j=dn(" ",e[0][v][1][1])+j;break;case 5:j=dn("\r",e[0][v][1][1])+j;break;default:if(a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][v][1][0])}v=-1}o.push(K+o.pop()+j);break;case"PtgRefErr":o.push("#REF!");break;case"PtgRefErr3d":o.push("#REF!");break;case"PtgExp":u={c:C[1][1],r:C[1][0]};var W={c:r.c,r:r.r};if(n.sharedf[Wt(u)]){var D=n.sharedf[Wt(u)];o.push(va(D,s,W,n,a))}else{var U=!1;for(l=0;l!=n.arrayf.length;++l)if(c=n.arrayf[l],!(u.c<c[0].s.c||u.c>c[0].e.c)&&!(u.r<c[0].s.r||u.r>c[0].e.r)){o.push(va(c[1],s,W,n,a)),U=!0;break}U||o.push(C[1])}break;case"PtgArray":o.push("{"+hrt(C[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":v=_;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":o.push("");break;case"PtgAreaErr":o.push("#REF!");break;case"PtgAreaErr3d":o.push("#REF!");break;case"PtgList":o.push("Table"+C[1].idx+"[#"+C[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(C));default:throw new Error("Unrecognized Formula Token: "+String(C))}var Y=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(a.biff!=3&&v>=0&&Y.indexOf(e[0][_][0])==-1){C=e[0][v];var z=!0;switch(C[1][0]){case 4:z=!1;case 0:y=dn(" ",C[1][1]);break;case 5:z=!1;case 1:y=dn("\r",C[1][1]);break;default:if(y="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+C[1][0])}o.push((z?y:"")+o.pop()+(z?"":y)),v=-1}}if(o.length>1&&a.WTF)throw new Error("bad formula stack");return o[0]}function grt(e,t,r){var n=e.l+t,a=r.biff==2?1:2,i,s=e.read_shift(a);if(s==65535)return[[],Ca(e,t-2)];var o=vg(e,s,r);return t!==s+a&&(i=gg(e,t-s-a,o,r)),e.l=n,[o,i]}function vrt(e,t,r){var n=e.l+t,a=r.biff==2?1:2,i,s=e.read_shift(a);if(s==65535)return[[],Ca(e,t-2)];var o=vg(e,s,r);return t!==s+a&&(i=gg(e,t-s-a,o,r)),e.l=n,[o,i]}function brt(e,t,r,n){var a=e.l+t,i=vg(e,n,r),s;return a!==e.l&&(s=gg(e,a-e.l,i,r)),[i,s]}function xrt(e,t,r){var n=e.l+t,a,i=e.read_shift(2),s=vg(e,i,r);return i==65535?[[],Ca(e,t-2)]:(t!==i+2&&(a=gg(e,n-i-2,s,r)),[s,a])}function yrt(e){var t;if(vl(e,e.l+6)!==65535)return[_a(e),"n"];switch(e[e.l]){case 0:return e.l+=8,["String","s"];case 1:return t=e[e.l+2]===1,e.l+=8,[t,"b"];case 2:return t=e[e.l+2],e.l+=8,[t,"e"];case 3:return e.l+=8,["","s"]}return[]}function JM(e,t,r){var n=e.l+t,a=$o(e);r.biff==2&&++e.l;var i=yrt(e),s=e.read_shift(1);r.biff!=2&&(e.read_shift(1),r.biff>=5&&e.read_shift(4));var o=vrt(e,n-e.l,r);return{cell:a,val:i[0],formula:o,shared:s>>3&1,tt:i[1]}}function Cy(e,t,r){var n=e.read_shift(4),a=vg(e,n,r),i=e.read_shift(4),s=i>0?gg(e,i,a,r):null;return[a,s]}var _rt=Cy,Ty=Cy,wrt=Cy,Ert=Cy,Srt={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},Sde={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},Crt={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function DJ(e){return e.slice(0,3)=="of:"&&(e=e.slice(3)),e.charCodeAt(0)==61&&(e=e.slice(1),e.charCodeAt(0)==61&&(e=e.slice(1))),e=e.replace(/COM\.MICROSOFT\./g,""),e=e.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(t,r){return r.replace(/\./g,"")}),e=e.replace(/\[.(#[A-Z]*[?!])\]/g,"$1"),e.replace(/[;~]/g,",").replace(/\|/g,";")}function e5(e){var t=e.split(":"),r=t[0].split(".")[0];return[r,t[0].split(".")[1]+(t.length>1?":"+(t[1].split(".")[1]||t[1].split(".")[0]):"")]}var zp={},Wf={};function jp(e,t){if(e){var r=[.7,.7,.75,.75,.3,.3];t=="xlml"&&(r=[1,1,1,1,.5,.5]),e.left==null&&(e.left=r[0]),e.right==null&&(e.right=r[1]),e.top==null&&(e.top=r[2]),e.bottom==null&&(e.bottom=r[3]),e.header==null&&(e.header=r[4]),e.footer==null&&(e.footer=r[5])}}function Cde(e,t,r,n,a,i){try{n.cellNF&&(e.z=Yt[t])}catch(o){if(n.WTF)throw o}if(!(e.t==="z"&&!n.cellStyles)){if(e.t==="d"&&typeof e.v=="string"&&(e.v=ta(e.v)),(!n||n.cellText!==!1)&&e.t!=="z")try{if(Yt[t]==null&&Hu(SYe[t]||"General",t),e.t==="e")e.w=e.w||Sd[e.v];else if(t===0)if(e.t==="n")(e.v|0)===e.v?e.w=e.v.toString(10):e.w=mm(e.v);else if(e.t==="d"){var s=Ba(e.v);(s|0)===s?e.w=s.toString(10):e.w=mm(s)}else{if(e.v===void 0)return"";e.w=ad(e.v,Wf)}else e.t==="d"?e.w=ms(t,Ba(e.v),Wf):e.w=ms(t,e.v,Wf)}catch(o){if(n.WTF)throw o}if(n.cellStyles&&r!=null)try{e.s=i.Fills[r],e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb&&(e.s.fgColor.rgb=Vb(a.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0),n.WTF&&(e.s.fgColor.raw_rgb=a.themeElements.clrScheme[e.s.fgColor.theme].rgb)),e.s.bgColor&&e.s.bgColor.theme&&(e.s.bgColor.rgb=Vb(a.themeElements.clrScheme[e.s.bgColor.theme].rgb,e.s.bgColor.tint||0),n.WTF&&(e.s.bgColor.raw_rgb=a.themeElements.clrScheme[e.s.bgColor.theme].rgb))}catch(o){if(n.WTF&&i.Fills)throw o}}}function Trt(e,t){var r=gn(t);r.s.r<=r.e.r&&r.s.c<=r.e.c&&r.s.r>=0&&r.s.c>=0&&(e["!ref"]=xr(r))}var Art=/<(?:\w:)?mergeCell ref="[A-Z0-9:]+"\s*[\/]?>/g,krt=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,Nrt=/<(?:\w:)?hyperlink [^>]*>/mg,Rrt=/"(\w*:\w*)"/,Mrt=/<(?:\w:)?col\b[^>]*[\/]?>/g,Drt=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,Ort=/<(?:\w:)?pageMargins[^>]*\/>/g,Tde=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,Irt=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,Lrt=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function Prt(e,t,r,n,a,i,s){if(!e)return e;n||(n={"!id":{}});var o=t.dense?[]:{},l={s:{r:2e6,c:2e6},e:{r:0,c:0}},c="",u="",f=e.match(krt);f?(c=e.slice(0,f.index),u=e.slice(f.index+f[0].length)):c=u=e;var p=c.match(Tde);p?R8(p[0],o,a,r):(p=c.match(Irt))&&Frt(p[0],p[1]||"",o,a,r);var m=(c.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(m>0){var b=c.slice(m,m+50).match(Rrt);b&&Trt(o,b[1])}var v=c.match(Lrt);v&&v[1]&&$rt(v[1],a);var y=[];if(t.cellStyles){var _=c.match(Mrt);_&&jrt(y,_)}f&&Hrt(f[1],o,t,l,i,s);var S=u.match(Drt);S&&(o["!autofilter"]=qrt(S[0]));var C=[],T=u.match(Art);if(T)for(m=0;m!=T.length;++m)C[m]=gn(T[m].slice(T[m].indexOf('"')+1));var A=u.match(Nrt);A&&Brt(o,A,n);var k=u.match(Ort);if(k&&(o["!margins"]=zrt(Ut(k[0]))),!o["!ref"]&&l.e.c>=l.s.c&&l.e.r>=l.s.r&&(o["!ref"]=xr(l)),t.sheetRows>0&&o["!ref"]){var N=gn(o["!ref"]);t.sheetRows<=+N.e.r&&(N.e.r=t.sheetRows-1,N.e.r>l.e.r&&(N.e.r=l.e.r),N.e.r<N.s.r&&(N.s.r=N.e.r),N.e.c>l.e.c&&(N.e.c=l.e.c),N.e.c<N.s.c&&(N.s.c=N.e.c),o["!fullref"]=o["!ref"],o["!ref"]=xr(N))}return y.length>0&&(o["!cols"]=y),C.length>0&&(o["!merges"]=C),o}function R8(e,t,r,n){var a=Ut(e);r.Sheets[n]||(r.Sheets[n]={}),a.codeName&&(r.Sheets[n].CodeName=yr(Vr(a.codeName)))}function Frt(e,t,r,n,a){R8(e.slice(0,e.indexOf(">")),r,n,a)}function Brt(e,t,r){for(var n=Array.isArray(e),a=0;a!=t.length;++a){var i=Ut(Vr(t[a]),!0);if(!i.ref)return;var s=((r||{})["!id"]||[])[i.id];s?(i.Target=s.Target,i.location&&(i.Target+="#"+yr(i.location))):(i.Target="#"+yr(i.location),s={Target:i.Target,TargetMode:"Internal"}),i.Rel=s,i.tooltip&&(i.Tooltip=i.tooltip,delete i.tooltip);for(var o=gn(i.ref),l=o.s.r;l<=o.e.r;++l)for(var c=o.s.c;c<=o.e.c;++c){var u=Wt({c,r:l});n?(e[l]||(e[l]=[]),e[l][c]||(e[l][c]={t:"z",v:void 0}),e[l][c].l=i):(e[u]||(e[u]={t:"z",v:void 0}),e[u].l=i)}}}function zrt(e){var t={};return["left","right","top","bottom","header","footer"].forEach(function(r){e[r]&&(t[r]=parseFloat(e[r]))}),t}function jrt(e,t){for(var r=!1,n=0;n!=t.length;++n){var a=Ut(t[n],!0);a.hidden&&(a.hidden=Zr(a.hidden));var i=parseInt(a.min,10)-1,s=parseInt(a.max,10)-1;for(a.outlineLevel&&(a.level=+a.outlineLevel||0),delete a.min,delete a.max,a.width=+a.width,!r&&a.width&&(r=!0,k8(a.width)),u0(a);i<=s;)e[i++]=ca(a)}}function qrt(e){var t={ref:(e.match(/ref="([^"]*)"/)||[])[1]};return t}var Urt=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/;function $rt(e,t){t.Views||(t.Views=[{}]),(e.match(Urt)||[]).forEach(function(r,n){var a=Ut(r);t.Views[n]||(t.Views[n]={}),+a.zoomScale&&(t.Views[n].zoom=+a.zoomScale),Zr(a.rightToLeft)&&(t.Views[n].RTL=!0)})}var Hrt=(function(){var e=/<(?:\w+:)?c[ \/>]/,t=/<\/(?:\w+:)?row>/,r=/r=["']([^"']*)["']/,n=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,a=/ref=["']([^"']*)["']/,i=gm("v"),s=gm("f");return function(l,c,u,f,p,m){for(var b=0,v="",y=[],_=[],S=0,C=0,T=0,A="",k,N,L=0,I=0,P,H,B=0,K=0,j=Array.isArray(m.CellXf),W,D=[],U=[],Y=Array.isArray(c),z=[],M={},Q=!1,q=!!u.sheetStubs,F=l.split(t),V=0,Z=F.length;V!=Z;++V){v=F[V].trim();var ee=v.length;if(ee!==0){var te=0;e:for(b=0;b<ee;++b)switch(v[b]){case">":if(v[b-1]!="/"){++b;break e}if(u&&u.cellStyles){if(N=Ut(v.slice(te,b),!0),L=N.r!=null?parseInt(N.r,10):L+1,I=-1,u.sheetRows&&u.sheetRows<L)continue;M={},Q=!1,N.ht&&(Q=!0,M.hpt=parseFloat(N.ht),M.hpx=ym(M.hpt)),N.hidden=="1"&&(Q=!0,M.hidden=!0),N.outlineLevel!=null&&(Q=!0,M.level=+N.outlineLevel),Q&&(z[L-1]=M)}break;case"<":te=b;break}if(te>=b)break;if(N=Ut(v.slice(te,b),!0),L=N.r!=null?parseInt(N.r,10):L+1,I=-1,!(u.sheetRows&&u.sheetRows<L)){f.s.r>L-1&&(f.s.r=L-1),f.e.r<L-1&&(f.e.r=L-1),u&&u.cellStyles&&(M={},Q=!1,N.ht&&(Q=!0,M.hpt=parseFloat(N.ht),M.hpx=ym(M.hpt)),N.hidden=="1"&&(Q=!0,M.hidden=!0),N.outlineLevel!=null&&(Q=!0,M.level=+N.outlineLevel),Q&&(z[L-1]=M)),y=v.slice(b).split(e);for(var oe=0;oe!=y.length&&y[oe].trim().charAt(0)=="<";++oe);for(y=y.slice(oe),b=0;b!=y.length;++b)if(v=y[b].trim(),v.length!==0){if(_=v.match(r),S=b,C=0,T=0,v="<c "+(v.slice(0,1)=="<"?">":"")+v,_!=null&&_.length===2){for(S=0,A=_[1],C=0;C!=A.length&&!((T=A.charCodeAt(C)-64)<1||T>26);++C)S=26*S+T;--S,I=S}else++I;for(C=0;C!=v.length&&v.charCodeAt(C)!==62;++C);if(++C,N=Ut(v.slice(0,C),!0),N.r||(N.r=Wt({r:L-1,c:I})),A=v.slice(C),k={t:""},(_=A.match(i))!=null&&_[1]!==""&&(k.v=yr(_[1])),u.cellFormula){if((_=A.match(s))!=null&&_[1]!==""){if(k.f=yr(Vr(_[1])).replace(/\r\n/g,`
`),u.xlfn||(k.f=kJ(k.f)),_[0].indexOf('t="array"')>-1)k.F=(A.match(a)||[])[1],k.F.indexOf(":")>-1&&D.push([gn(k.F),k.F]);else if(_[0].indexOf('t="shared"')>-1){H=Ut(_[0]);var pe=yr(Vr(_[1]));u.xlfn||(pe=kJ(pe)),U[parseInt(H.si,10)]=[H,pe,N.r]}}else(_=A.match(/<f[^>]*\/>/))&&(H=Ut(_[0]),U[H.si]&&(k.f=ttt(U[H.si][1],U[H.si][2],N.r)));var he=La(N.r);for(C=0;C<D.length;++C)he.r>=D[C][0].s.r&&he.r<=D[C][0].e.r&&he.c>=D[C][0].s.c&&he.c<=D[C][0].e.c&&(k.F=D[C][1])}if(N.t==null&&k.v===void 0)if(k.f||k.F)k.v=0,k.t="n";else if(q)k.t="z";else continue;else k.t=N.t||"n";switch(f.s.c>I&&(f.s.c=I),f.e.c<I&&(f.e.c=I),k.t){case"n":if(k.v==""||k.v==null){if(!q)continue;k.t="z"}else k.v=parseFloat(k.v);break;case"s":if(typeof k.v>"u"){if(!q)continue;k.t="z"}else P=zp[parseInt(k.v,10)],k.v=P.t,k.r=P.r,u.cellHTML&&(k.h=P.h);break;case"str":k.t="s",k.v=k.v!=null?Vr(k.v):"",u.cellHTML&&(k.h=v8(k.v));break;case"inlineStr":_=A.match(n),k.t="s",_!=null&&(P=A8(_[1]))?(k.v=P.t,u.cellHTML&&(k.h=P.h)):k.v="";break;case"b":k.v=Zr(k.v);break;case"d":u.cellDates?k.v=ta(k.v,1):(k.v=Ba(ta(k.v,1)),k.t="n");break;case"e":(!u||u.cellText!==!1)&&(k.w=k.v),k.v=Wue[k.v];break}if(B=K=0,W=null,j&&N.s!==void 0&&(W=m.CellXf[N.s],W!=null&&(W.numFmtId!=null&&(B=W.numFmtId),u.cellStyles&&W.fillId!=null&&(K=W.fillId))),Cde(k,B,K,u,p,m),u.cellDates&&j&&k.t=="n"&&P0(Yt[B])&&(k.t="d",k.v=Ey(k.v)),N.cm&&u.xlmeta){var ke=(u.xlmeta.Cell||[])[+N.cm-1];ke&&ke.type=="XLDAPR"&&(k.D=!0)}if(Y){var se=La(N.r);c[se.r]||(c[se.r]=[]),c[se.r][se.c]=k}else c[N.r]=k}}}}z.length>0&&(c["!rows"]=z)}})();function Grt(e,t){var r={},n=e.l+t;r.r=e.read_shift(4),e.l+=4;var a=e.read_shift(2);e.l+=1;var i=e.read_shift(1);return e.l=n,i&7&&(r.level=i&7),i&16&&(r.hidden=!0),i&32&&(r.hpt=a/20),r}var Vrt=Ed;function Wrt(){}function Krt(e,t){var r={},n=e[e.l];return++e.l,r.above=!(n&64),r.left=!(n&128),e.l+=18,r.name=pZe(e),r}function Xrt(e){var t=ys(e);return[t]}function Yrt(e){var t=wd(e);return[t]}function Zrt(e){var t=ys(e),r=e.read_shift(1);return[t,r,"b"]}function Qrt(e){var t=wd(e),r=e.read_shift(1);return[t,r,"b"]}function Jrt(e){var t=ys(e),r=e.read_shift(1);return[t,r,"e"]}function ent(e){var t=wd(e),r=e.read_shift(1);return[t,r,"e"]}function tnt(e){var t=ys(e),r=e.read_shift(4);return[t,r,"s"]}function rnt(e){var t=wd(e),r=e.read_shift(4);return[t,r,"s"]}function nnt(e){var t=ys(e),r=_a(e);return[t,r,"n"]}function Ade(e){var t=wd(e),r=_a(e);return[t,r,"n"]}function ant(e){var t=ys(e),r=S8(e);return[t,r,"n"]}function int(e){var t=wd(e),r=S8(e);return[t,r,"n"]}function snt(e){var t=ys(e),r=w8(e);return[t,r,"is"]}function ont(e){var t=ys(e),r=Sa(e);return[t,r,"str"]}function lnt(e){var t=wd(e),r=Sa(e);return[t,r,"str"]}function cnt(e,t,r){var n=e.l+t,a=ys(e);a.r=r["!row"];var i=e.read_shift(1),s=[a,i,"b"];if(r.cellFormula){e.l+=2;var o=Ty(e,n-e.l,r);s[3]=va(o,null,a,r.supbooks,r)}else e.l=n;return s}function unt(e,t,r){var n=e.l+t,a=ys(e);a.r=r["!row"];var i=e.read_shift(1),s=[a,i,"e"];if(r.cellFormula){e.l+=2;var o=Ty(e,n-e.l,r);s[3]=va(o,null,a,r.supbooks,r)}else e.l=n;return s}function dnt(e,t,r){var n=e.l+t,a=ys(e);a.r=r["!row"];var i=_a(e),s=[a,i,"n"];if(r.cellFormula){e.l+=2;var o=Ty(e,n-e.l,r);s[3]=va(o,null,a,r.supbooks,r)}else e.l=n;return s}function fnt(e,t,r){var n=e.l+t,a=ys(e);a.r=r["!row"];var i=Sa(e),s=[a,i,"str"];if(r.cellFormula){e.l+=2;var o=Ty(e,n-e.l,r);s[3]=va(o,null,a,r.supbooks,r)}else e.l=n;return s}var hnt=Ed;function pnt(e,t){var r=e.l+t,n=Ed(e),a=E8(e),i=Sa(e),s=Sa(e),o=Sa(e);e.l=r;var l={rfx:n,relId:a,loc:i,display:o};return s&&(l.Tooltip=s),l}function mnt(){}function gnt(e,t,r){var n=e.l+t,a=Hue(e),i=e.read_shift(1),s=[a];if(s[2]=i,r.cellFormula){var o=_rt(e,n-e.l,r);s[1]=o}else e.l=n;return s}function vnt(e,t,r){var n=e.l+t,a=Ed(e),i=[a];if(r.cellFormula){var s=Ert(e,n-e.l,r);i[1]=s,e.l=n}else e.l=n;return i}var bnt=["left","right","top","bottom","header","footer"];function xnt(e){var t={};return bnt.forEach(function(r){t[r]=_a(e)}),t}function ynt(e){var t=e.read_shift(2);return e.l+=28,{RTL:t&32}}function _nt(){}function wnt(){}function Ent(e,t,r,n,a,i,s){if(!e)return e;var o=t||{};n||(n={"!id":{}});var l=o.dense?[]:{},c,u={s:{r:2e6,c:2e6},e:{r:0,c:0}},f=!1,p=!1,m,b,v,y,_,S,C,T,A,k=[];o.biff=12,o["!row"]=0;var N=0,L=!1,I=[],P={},H=o.supbooks||a.supbooks||[[]];if(H.sharedf=P,H.arrayf=I,H.SheetNames=a.SheetNames||a.Sheets.map(function(Y){return Y.name}),!o.supbooks&&(o.supbooks=H,a.Names))for(var B=0;B<a.Names.length;++B)H[0][B+1]=a.Names[B];var K=[],j=[],W=!1;Xb[16]={n:"BrtShortReal",f:Ade};var D;if(Hl(e,function(z,M,Q){if(!p)switch(Q){case 148:c=z;break;case 0:m=z,o.sheetRows&&o.sheetRows<=m.r&&(p=!0),T=ua(y=m.r),o["!row"]=m.r,(z.hidden||z.hpt||z.level!=null)&&(z.hpt&&(z.hpx=ym(z.hpt)),j[z.r]=z);break;case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 13:case 14:case 15:case 16:case 17:case 18:case 62:switch(b={t:z[2]},z[2]){case"n":b.v=z[1];break;case"s":C=zp[z[1]],b.v=C.t,b.r=C.r;break;case"b":b.v=!!z[1];break;case"e":b.v=z[1],o.cellText!==!1&&(b.w=Sd[b.v]);break;case"str":b.t="s",b.v=z[1];break;case"is":b.t="s",b.v=z[1].t;break}if((v=s.CellXf[z[0].iStyleRef])&&Cde(b,v.numFmtId,null,o,i,s),_=z[0].c==-1?_+1:z[0].c,o.dense?(l[y]||(l[y]=[]),l[y][_]=b):l[Hn(_)+T]=b,o.cellFormula){for(L=!1,N=0;N<I.length;++N){var q=I[N];m.r>=q[0].s.r&&m.r<=q[0].e.r&&_>=q[0].s.c&&_<=q[0].e.c&&(b.F=xr(q[0]),L=!0)}!L&&z.length>3&&(b.f=z[3])}if(u.s.r>m.r&&(u.s.r=m.r),u.s.c>_&&(u.s.c=_),u.e.r<m.r&&(u.e.r=m.r),u.e.c<_&&(u.e.c=_),o.cellDates&&v&&b.t=="n"&&P0(Yt[v.numFmtId])){var F=Bu(b.v);F&&(b.t="d",b.v=new Date(F.y,F.m-1,F.d,F.H,F.M,F.S,F.u))}D&&(D.type=="XLDAPR"&&(b.D=!0),D=void 0);break;case 1:case 12:if(!o.sheetStubs||f)break;b={t:"z",v:void 0},_=z[0].c==-1?_+1:z[0].c,o.dense?(l[y]||(l[y]=[]),l[y][_]=b):l[Hn(_)+T]=b,u.s.r>m.r&&(u.s.r=m.r),u.s.c>_&&(u.s.c=_),u.e.r<m.r&&(u.e.r=m.r),u.e.c<_&&(u.e.c=_),D&&(D.type=="XLDAPR"&&(b.D=!0),D=void 0);break;case 176:k.push(z);break;case 49:D=((o.xlmeta||{}).Cell||[])[z-1];break;case 494:var V=n["!id"][z.relId];for(V?(z.Target=V.Target,z.loc&&(z.Target+="#"+z.loc),z.Rel=V):z.relId==""&&(z.Target="#"+z.loc),y=z.rfx.s.r;y<=z.rfx.e.r;++y)for(_=z.rfx.s.c;_<=z.rfx.e.c;++_)o.dense?(l[y]||(l[y]=[]),l[y][_]||(l[y][_]={t:"z",v:void 0}),l[y][_].l=z):(S=Wt({c:_,r:y}),l[S]||(l[S]={t:"z",v:void 0}),l[S].l=z);break;case 426:if(!o.cellFormula)break;I.push(z),A=o.dense?l[y][_]:l[Hn(_)+T],A.f=va(z[1],u,{r:m.r,c:_},H,o),A.F=xr(z[0]);break;case 427:if(!o.cellFormula)break;P[Wt(z[0].s)]=z[1],A=o.dense?l[y][_]:l[Hn(_)+T],A.f=va(z[1],u,{r:m.r,c:_},H,o);break;case 60:if(!o.cellStyles)break;for(;z.e>=z.s;)K[z.e--]={width:z.w/256,hidden:!!(z.flags&1),level:z.level},W||(W=!0,k8(z.w/256)),u0(K[z.e+1]);break;case 161:l["!autofilter"]={ref:xr(z)};break;case 476:l["!margins"]=z;break;case 147:a.Sheets[r]||(a.Sheets[r]={}),z.name&&(a.Sheets[r].CodeName=z.name),(z.above||z.left)&&(l["!outline"]={above:z.above,left:z.left});break;case 137:a.Views||(a.Views=[{}]),a.Views[0]||(a.Views[0]={}),z.RTL&&(a.Views[0].RTL=!0);break;case 485:break;case 64:case 1053:break;case 151:break;case 152:case 175:case 644:case 625:case 562:case 396:case 1112:case 1146:case 471:case 1050:case 649:case 1105:case 589:case 607:case 564:case 1055:case 168:case 174:case 1180:case 499:case 507:case 550:case 171:case 167:case 1177:case 169:case 1181:case 551:case 552:case 661:case 639:case 478:case 537:case 477:case 536:case 1103:case 680:case 1104:case 1024:case 663:case 535:case 678:case 504:case 1043:case 428:case 170:case 3072:case 50:case 2070:case 1045:break;case 35:f=!0;break;case 36:f=!1;break;case 37:f=!0;break;case 38:f=!1;break;default:if(!M.T){if(!f||o.WTF)throw new Error("Unexpected record 0x"+Q.toString(16))}}},o),delete o.supbooks,delete o["!row"],!l["!ref"]&&(u.s.r<2e6||c&&(c.e.r>0||c.e.c>0||c.s.r>0||c.s.c>0))&&(l["!ref"]=xr(c||u)),o.sheetRows&&l["!ref"]){var U=gn(l["!ref"]);o.sheetRows<=+U.e.r&&(U.e.r=o.sheetRows-1,U.e.r>u.e.r&&(U.e.r=u.e.r),U.e.r<U.s.r&&(U.s.r=U.e.r),U.e.c>u.e.c&&(U.e.c=u.e.c),U.e.c<U.s.c&&(U.s.c=U.e.c),l["!fullref"]=l["!ref"],l["!ref"]=xr(U))}return k.length>0&&(l["!merges"]=k),K.length>0&&(l["!cols"]=K),j.length>0&&(l["!rows"]=j),l}function Snt(e){var t=[],r=e.match(/^<c:numCache>/),n;(e.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/mg)||[]).forEach(function(i){var s=i.match(/<c:pt idx="(\d*?)"><c:v>(.*)<\/c:v><\/c:pt>/);s&&(t[+s[1]]=r?+s[2]:s[2])});var a=yr((e.match(/<c:formatCode>([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(e.match(/<c:f>(.*?)<\/c:f>/mg)||[]).forEach(function(i){n=i.replace(/<.*?>/g,"")}),[t,a,n]}function Cnt(e,t,r,n,a,i){var s=i||{"!type":"chart"};if(!e)return i;var o=0,l=0,c="A",u={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(e.match(/<c:numCache>[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function(f){var p=Snt(f);u.s.r=u.s.c=0,u.e.c=o,c=Hn(o),p[0].forEach(function(m,b){s[c+ua(b)]={t:"n",v:m,z:p[1]},l=b}),u.e.r<l&&(u.e.r=l),++o}),o>0&&(s["!ref"]=xr(u)),s}function Tnt(e,t,r,n,a){if(!e)return e;n||(n={"!id":{}});var i={"!type":"chart","!drawel":null,"!rel":""},s,o=e.match(Tde);return o&&R8(o[0],i,a,r),(s=e.match(/drawing r:id="(.*?)"/))&&(i["!rel"]=s[1]),n["!id"][i["!rel"]]&&(i["!drawel"]=n["!id"][i["!rel"]]),i}function Ant(e,t){e.l+=10;var r=Sa(e);return{name:r}}function knt(e,t,r,n,a){if(!e)return e;n||(n={"!id":{}});var i={"!type":"chart","!drawel":null,"!rel":""},s=!1;return Hl(e,function(l,c,u){switch(u){case 550:i["!rel"]=l;break;case 651:a.Sheets[r]||(a.Sheets[r]={}),l.name&&(a.Sheets[r].CodeName=l.name);break;case 562:case 652:case 669:case 679:case 551:case 552:case 476:case 3072:break;case 35:s=!0;break;case 36:s=!1;break;case 37:break;case 38:break;default:if(!(c.T>0)){if(!(c.T<0)){if(!s||t.WTF)throw new Error("Unexpected record 0x"+u.toString(16))}}}},t),n["!id"][i["!rel"]]&&(i["!drawel"]=n["!id"][i["!rel"]]),i}var kde=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],Nnt=[["activeTab",0,"int"],["autoFilterDateGrouping",!0,"bool"],["firstSheet",0,"int"],["minimized",!1,"bool"],["showHorizontalScroll",!0,"bool"],["showSheetTabs",!0,"bool"],["showVerticalScroll",!0,"bool"],["tabRatio",600,"int"],["visibility","visible"]],Rnt=[],Mnt=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function OJ(e,t){for(var r=0;r!=e.length;++r)for(var n=e[r],a=0;a!=t.length;++a){var i=t[a];if(n[i[0]]==null)n[i[0]]=i[1];else switch(i[2]){case"bool":typeof n[i[0]]=="string"&&(n[i[0]]=Zr(n[i[0]]));break;case"int":typeof n[i[0]]=="string"&&(n[i[0]]=parseInt(n[i[0]],10));break}}}function IJ(e,t){for(var r=0;r!=t.length;++r){var n=t[r];if(e[n[0]]==null)e[n[0]]=n[1];else switch(n[2]){case"bool":typeof e[n[0]]=="string"&&(e[n[0]]=Zr(e[n[0]]));break;case"int":typeof e[n[0]]=="string"&&(e[n[0]]=parseInt(e[n[0]],10));break}}}function Nde(e){IJ(e.WBProps,kde),IJ(e.CalcPr,Mnt),OJ(e.WBView,Nnt),OJ(e.Sheets,Rnt),Wf.date1904=Zr(e.WBProps.date1904)}var Dnt="][*?/\\".split("");function Ont(e,t){if(e.length>31)throw new Error("Sheet names cannot exceed 31 chars");var r=!0;return Dnt.forEach(function(n){if(e.indexOf(n)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")}),r}var Int=/<\w+:workbook/;function Lnt(e,t){if(!e)throw new Error("Could not find file");var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""},n=!1,a="xmlns",i={},s=0;if(e.replace(Aa,function(l,c){var u=Ut(l);switch(Uo(u[0])){case"<?xml":break;case"<workbook":l.match(Int)&&(a="xmlns"+l.match(/<(\w+):/)[1]),r.xmlns=u[a];break;case"</workbook>":break;case"<fileVersion":delete u[0],r.AppVersion=u;break;case"<fileVersion/>":case"</fileVersion>":break;case"<fileSharing":break;case"<fileSharing/>":break;case"<workbookPr":case"<workbookPr/>":kde.forEach(function(f){if(u[f[0]]!=null)switch(f[2]){case"bool":r.WBProps[f[0]]=Zr(u[f[0]]);break;case"int":r.WBProps[f[0]]=parseInt(u[f[0]],10);break;default:r.WBProps[f[0]]=u[f[0]]}}),u.codeName&&(r.WBProps.CodeName=Vr(u.codeName));break;case"</workbookPr>":break;case"<workbookProtection":break;case"<workbookProtection/>":break;case"<bookViews":case"<bookViews>":case"</bookViews>":break;case"<workbookView":case"<workbookView/>":delete u[0],r.WBView.push(u);break;case"</workbookView>":break;case"<sheets":case"<sheets>":case"</sheets>":break;case"<sheet":switch(u.state){case"hidden":u.Hidden=1;break;case"veryHidden":u.Hidden=2;break;default:u.Hidden=0}delete u.state,u.name=yr(Vr(u.name)),delete u[0],r.Sheets.push(u);break;case"</sheet>":break;case"<functionGroups":case"<functionGroups/>":break;case"<functionGroup":break;case"<externalReferences":case"</externalReferences>":case"<externalReferences>":break;case"<externalReference":break;case"<definedNames/>":break;case"<definedNames>":case"<definedNames":n=!0;break;case"</definedNames>":n=!1;break;case"<definedName":i={},i.Name=Vr(u.name),u.comment&&(i.Comment=u.comment),u.localSheetId&&(i.Sheet=+u.localSheetId),Zr(u.hidden||"0")&&(i.Hidden=!0),s=c+l.length;break;case"</definedName>":i.Ref=yr(Vr(e.slice(s,c))),r.Names.push(i);break;case"<definedName/>":break;case"<calcPr":delete u[0],r.CalcPr=u;break;case"<calcPr/>":delete u[0],r.CalcPr=u;break;case"</calcPr>":break;case"<oleSize":break;case"<customWorkbookViews>":case"</customWorkbookViews>":case"<customWorkbookViews":break;case"<customWorkbookView":case"</customWorkbookView>":break;case"<pivotCaches>":case"</pivotCaches>":case"<pivotCaches":break;case"<pivotCache":break;case"<smartTagPr":case"<smartTagPr/>":break;case"<smartTagTypes":case"<smartTagTypes>":case"</smartTagTypes>":break;case"<smartTagType":break;case"<webPublishing":case"<webPublishing/>":break;case"<fileRecoveryPr":case"<fileRecoveryPr/>":break;case"<webPublishObjects>":case"<webPublishObjects":case"</webPublishObjects>":break;case"<webPublishObject":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;case"<ArchID":break;case"<AlternateContent":case"<AlternateContent>":n=!0;break;case"</AlternateContent>":n=!1;break;case"<revisionPtr":break;default:if(!n&&t.WTF)throw new Error("unrecognized "+u[0]+" in workbook")}return l}),ZYe.indexOf(r.xmlns)===-1)throw new Error("Unknown Namespace: "+r.xmlns);return Nde(r),r}function Pnt(e,t){var r={};return r.Hidden=e.read_shift(4),r.iTabID=e.read_shift(4),r.strRelID=Q6(e),r.name=Sa(e),r}function Fnt(e,t){var r={},n=e.read_shift(4);r.defaultThemeVersion=e.read_shift(4);var a=t>8?Sa(e):"";return a.length>0&&(r.CodeName=a),r.autoCompressPictures=!!(n&65536),r.backupFile=!!(n&64),r.checkCompatibility=!!(n&4096),r.date1904=!!(n&1),r.filterPrivacy=!!(n&8),r.hidePivotFieldList=!!(n&1024),r.promptedSolutions=!!(n&16),r.publishItems=!!(n&2048),r.refreshAllConnections=!!(n&262144),r.saveExternalLinkValues=!!(n&128),r.showBorderUnselectedTables=!!(n&4),r.showInkAnnotation=!!(n&32),r.showObjects=["all","placeholders","none"][n>>13&3],r.showPivotChartFilter=!!(n&32768),r.updateLinks=["userSet","never","always"][n>>8&3],r}function Bnt(e,t){var r={};return e.read_shift(4),r.ArchID=e.read_shift(4),e.l+=t-8,r}function znt(e,t,r){var n=e.l+t;e.l+=4,e.l+=1;var a=e.read_shift(4),i=mZe(e),s=wrt(e,0,r),o=E8(e);e.l=n;var l={Name:i,Ptg:s};return a<268435455&&(l.Sheet=a),o&&(l.Comment=o),l}function jnt(e,t){var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:""},n=[],a=!1;t||(t={}),t.biff=12;var i=[],s=[[]];return s.SheetNames=[],s.XTI=[],Xb[16]={n:"BrtFRTArchID$",f:Bnt},Hl(e,function(l,c,u){switch(u){case 156:s.SheetNames.push(l.name),r.Sheets.push(l);break;case 153:r.WBProps=l;break;case 39:l.Sheet!=null&&(t.SID=l.Sheet),l.Ref=va(l.Ptg,null,null,s,t),delete t.SID,delete l.Ptg,i.push(l);break;case 1036:break;case 357:case 358:case 355:case 667:s[0].length?s.push([u,l]):s[0]=[u,l],s[s.length-1].XTI=[];break;case 362:s.length===0&&(s[0]=[],s[0].XTI=[]),s[s.length-1].XTI=s[s.length-1].XTI.concat(l),s.XTI=s.XTI.concat(l);break;case 361:break;case 2071:case 158:case 143:case 664:case 353:break;case 3072:case 3073:case 534:case 677:case 157:case 610:case 2050:case 155:case 548:case 676:case 128:case 665:case 2128:case 2125:case 549:case 2053:case 596:case 2076:case 2075:case 2082:case 397:case 154:case 1117:case 553:case 2091:break;case 35:n.push(u),a=!0;break;case 36:n.pop(),a=!1;break;case 37:n.push(u),a=!0;break;case 38:n.pop(),a=!1;break;case 16:break;default:if(!c.T){if(!a||t.WTF&&n[n.length-1]!=37&&n[n.length-1]!=35)throw new Error("Unexpected record 0x"+u.toString(16))}}},t),Nde(r),r.Names=i,r.supbooks=s,r}function qnt(e,t,r){return t.slice(-4)===".bin"?jnt(e,r):Lnt(e,r)}function Unt(e,t,r,n,a,i,s,o){return t.slice(-4)===".bin"?Ent(e,n,r,a,i,s,o):Prt(e,n,r,a,i,s,o)}function $nt(e,t,r,n,a,i,s,o){return t.slice(-4)===".bin"?knt(e,n,r,a,i):Tnt(e,n,r,a,i)}function Hnt(e,t,r,n,a,i,s,o){return t.slice(-4)===".bin"?Qet():Jet()}function Gnt(e,t,r,n,a,i,s,o){return t.slice(-4)===".bin"?Yet():Zet()}function Vnt(e,t,r,n){return t.slice(-4)===".bin"?fet(e,r,n):iet(e,r,n)}function Wnt(e,t,r){return mde(e,r)}function Knt(e,t,r){return t.slice(-4)===".bin"?AJe(e,r):CJe(e,r)}function Xnt(e,t,r){return t.slice(-4)===".bin"?Wet(e,r):Uet(e,r)}function Ynt(e,t,r){return t.slice(-4)===".bin"?zet(e):Fet(e)}function Znt(e,t,r,n){return r.slice(-4)===".bin"?jet(e,t,r,n):void 0}function Qnt(e,t,r){return t.slice(-4)===".bin"?Let(e,t,r):Pet(e,t,r)}var Rde=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g,Mde=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function ks(e,t){var r=e.split(/\s+/),n=[];if(n[0]=r[0],r.length===1)return n;var a=e.match(Rde),i,s,o,l;if(a)for(l=0;l!=a.length;++l)i=a[l].match(Mde),(s=i[1].indexOf(":"))===-1?n[i[1]]=i[2].slice(1,i[2].length-1):(i[1].slice(0,6)==="xmlns:"?o="xmlns"+i[1].slice(6):o=i[1].slice(s+1),n[o]=i[2].slice(1,i[2].length-1));return n}function Jnt(e){var t=e.split(/\s+/),r={};if(t.length===1)return r;var n=e.match(Rde),a,i,s,o;if(n)for(o=0;o!=n.length;++o)a=n[o].match(Mde),(i=a[1].indexOf(":"))===-1?r[a[1]]=a[2].slice(1,a[2].length-1):(a[1].slice(0,6)==="xmlns:"?s="xmlns"+a[1].slice(6):s=a[1].slice(i+1),r[s]=a[2].slice(1,a[2].length-1));return r}var qp;function eat(e,t){var r=qp[e]||yr(e);return r==="General"?ad(t):ms(r,t)}function tat(e,t,r,n){var a=n;switch((r[0].match(/dt:dt="([\w.]+)"/)||["",""])[1]){case"boolean":a=Zr(n);break;case"i2":case"int":a=parseInt(n,10);break;case"r4":case"float":a=parseFloat(n);break;case"date":case"dateTime.tz":a=ta(n);break;case"i8":case"string":case"fixed":case"uuid":case"bin.base64":break;default:throw new Error("bad custprop:"+r[0])}e[yr(t)]=a}function rat(e,t,r){if(e.t!=="z"){if(!r||r.cellText!==!1)try{e.t==="e"?e.w=e.w||Sd[e.v]:t==="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=mm(e.v):e.w=ad(e.v):e.w=eat(t||"General",e.v)}catch(i){if(r.WTF)throw i}try{var n=qp[t]||t||"General";if(r.cellNF&&(e.z=n),r.cellDates&&e.t=="n"&&P0(n)){var a=Bu(e.v);a&&(e.t="d",e.v=new Date(a.y,a.m-1,a.d,a.H,a.M,a.S,a.u))}}catch(i){if(r.WTF)throw i}}}function nat(e,t,r){if(r.cellStyles&&t.Interior){var n=t.Interior;n.Pattern&&(n.patternType=JJe[n.Pattern]||n.Pattern)}e[t.ID]=t}function aat(e,t,r,n,a,i,s,o,l,c){var u="General",f=n.StyleID,p={};c=c||{};var m=[],b=0;for(f===void 0&&o&&(f=o.StyleID),f===void 0&&s&&(f=s.StyleID);i[f]!==void 0&&(i[f].nf&&(u=i[f].nf),i[f].Interior&&m.push(i[f].Interior),!!i[f].Parent);)f=i[f].Parent;switch(r.Type){case"Boolean":n.t="b",n.v=Zr(e);break;case"String":n.t="s",n.r=rJ(yr(e)),n.v=e.indexOf("<")>-1?yr(t||e).replace(/<.*?>/g,""):n.r;break;case"DateTime":e.slice(-1)!="Z"&&(e+="Z"),n.v=(ta(e)-new Date(Date.UTC(1899,11,30)))/(1440*60*1e3),n.v!==n.v?n.v=yr(e):n.v<60&&(n.v=n.v-1),(!u||u=="General")&&(u="yyyy-mm-dd");case"Number":n.v===void 0&&(n.v=+e),n.t||(n.t="n");break;case"Error":n.t="e",n.v=Wue[e],c.cellText!==!1&&(n.w=e);break;default:e==""&&t==""?n.t="z":(n.t="s",n.v=rJ(t||e));break}if(rat(n,u,c),c.cellFormula!==!1)if(n.Formula){var v=yr(n.Formula);v.charCodeAt(0)==61&&(v=v.slice(1)),n.f=Vf(v,a),delete n.Formula,n.ArrayRange=="RC"?n.F=Vf("RC:RC",a):n.ArrayRange&&(n.F=Vf(n.ArrayRange,a),l.push([gn(n.F),n.F]))}else for(b=0;b<l.length;++b)a.r>=l[b][0].s.r&&a.r<=l[b][0].e.r&&a.c>=l[b][0].s.c&&a.c<=l[b][0].e.c&&(n.F=l[b][1]);c.cellStyles&&(m.forEach(function(y){!p.patternType&&y.patternType&&(p.patternType=y.patternType)}),n.s=p),n.StyleID!==void 0&&(n.ixfe=n.StyleID)}function iat(e){e.t=e.v||"",e.t=e.t.replace(/\r\n/g,`
`).replace(/\r/g,`
`),e.v=e.w=e.ixfe=void 0}function t5(e,t){var r=t||{};xue();var n=gp(b8(e));(r.type=="binary"||r.type=="array"||r.type=="base64")&&(n=Vr(n));var a=n.slice(0,1024).toLowerCase(),i=!1;if(a=a.replace(/".*?"/g,""),(a.indexOf(">")&1023)>Math.min(a.indexOf(",")&1023,a.indexOf(";")&1023)){var s=ca(r);return s.type="string",bm.to_workbook(n,s)}if(a.indexOf("<?xml")==-1&&["html","table","head","meta","script","style","div"].forEach(function(ve){a.indexOf("<"+ve)>=0&&(i=!0)}),i)return pat(n,r);qp={"General Number":"General","General Date":Yt[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":Yt[15],"Short Date":Yt[14],"Long Time":Yt[19],"Medium Time":Yt[18],"Short Time":Yt[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:Yt[2],Standard:Yt[4],Percent:Yt[10],Scientific:Yt[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var o,l=[],c,u={},f=[],p=r.dense?[]:{},m="",b={},v={},y=ks('<Data ss:Type="String">'),_=0,S=0,C=0,T={s:{r:2e6,c:2e6},e:{r:0,c:0}},A={},k={},N="",L=0,I=[],P={},H={},B=0,K=[],j=[],W={},D=[],U,Y=!1,z=[],M=[],Q={},q=0,F=0,V={Sheets:[],WBProps:{date1904:!1}},Z={};vm.lastIndex=0,n=n.replace(/<!--([\s\S]*?)-->/mg,"");for(var ee="";o=vm.exec(n);)switch(o[3]=(ee=o[3]).toLowerCase()){case"data":if(ee=="data"){if(o[1]==="/"){if((c=l.pop())[0]!==o[3])throw new Error("Bad state: "+c.join("|"))}else o[0].charAt(o[0].length-2)!=="/"&&l.push([o[3],!0]);break}if(l[l.length-1][1])break;o[1]==="/"?aat(n.slice(_,o.index),N,y,l[l.length-1][0]=="comment"?W:b,{c:S,r:C},A,D[S],v,z,r):(N="",y=ks(o[0]),_=o.index+o[0].length);break;case"cell":if(o[1]==="/")if(j.length>0&&(b.c=j),(!r.sheetRows||r.sheetRows>C)&&b.v!==void 0&&(r.dense?(p[C]||(p[C]=[]),p[C][S]=b):p[Hn(S)+ua(C)]=b),b.HRef&&(b.l={Target:yr(b.HRef)},b.HRefScreenTip&&(b.l.Tooltip=b.HRefScreenTip),delete b.HRef,delete b.HRefScreenTip),(b.MergeAcross||b.MergeDown)&&(q=S+(parseInt(b.MergeAcross,10)|0),F=C+(parseInt(b.MergeDown,10)|0),I.push({s:{c:S,r:C},e:{c:q,r:F}})),!r.sheetStubs)b.MergeAcross?S=q+1:++S;else if(b.MergeAcross||b.MergeDown){for(var te=S;te<=q;++te)for(var oe=C;oe<=F;++oe)(te>S||oe>C)&&(r.dense?(p[oe]||(p[oe]=[]),p[oe][te]={t:"z"}):p[Hn(te)+ua(oe)]={t:"z"});S=q+1}else++S;else b=Jnt(o[0]),b.Index&&(S=+b.Index-1),S<T.s.c&&(T.s.c=S),S>T.e.c&&(T.e.c=S),o[0].slice(-2)==="/>"&&++S,j=[];break;case"row":o[1]==="/"||o[0].slice(-2)==="/>"?(C<T.s.r&&(T.s.r=C),C>T.e.r&&(T.e.r=C),o[0].slice(-2)==="/>"&&(v=ks(o[0]),v.Index&&(C=+v.Index-1)),S=0,++C):(v=ks(o[0]),v.Index&&(C=+v.Index-1),Q={},(v.AutoFitHeight=="0"||v.Height)&&(Q.hpx=parseInt(v.Height,10),Q.hpt=pde(Q.hpx),M[C]=Q),v.Hidden=="1"&&(Q.hidden=!0,M[C]=Q));break;case"worksheet":if(o[1]==="/"){if((c=l.pop())[0]!==o[3])throw new Error("Bad state: "+c.join("|"));f.push(m),T.s.r<=T.e.r&&T.s.c<=T.e.c&&(p["!ref"]=xr(T),r.sheetRows&&r.sheetRows<=T.e.r&&(p["!fullref"]=p["!ref"],T.e.r=r.sheetRows-1,p["!ref"]=xr(T))),I.length&&(p["!merges"]=I),D.length>0&&(p["!cols"]=D),M.length>0&&(p["!rows"]=M),u[m]=p}else T={s:{r:2e6,c:2e6},e:{r:0,c:0}},C=S=0,l.push([o[3],!1]),c=ks(o[0]),m=yr(c.Name),p=r.dense?[]:{},I=[],z=[],M=[],Z={name:m,Hidden:0},V.Sheets.push(Z);break;case"table":if(o[1]==="/"){if((c=l.pop())[0]!==o[3])throw new Error("Bad state: "+c.join("|"))}else{if(o[0].slice(-2)=="/>")break;l.push([o[3],!1]),D=[],Y=!1}break;case"style":o[1]==="/"?nat(A,k,r):k=ks(o[0]);break;case"numberformat":k.nf=yr(ks(o[0]).Format||"General"),qp[k.nf]&&(k.nf=qp[k.nf]);for(var pe=0;pe!=392&&Yt[pe]!=k.nf;++pe);if(pe==392){for(pe=57;pe!=392;++pe)if(Yt[pe]==null){Hu(k.nf,pe);break}}break;case"column":if(l[l.length-1][0]!=="table")break;if(U=ks(o[0]),U.Hidden&&(U.hidden=!0,delete U.Hidden),U.Width&&(U.wpx=parseInt(U.Width,10)),!Y&&U.wpx>10){Y=!0,Da=fde;for(var he=0;he<D.length;++he)D[he]&&u0(D[he])}Y&&u0(U),D[U.Index-1||D.length]=U;for(var ke=0;ke<+U.Span;++ke)D[D.length]=ca(U);break;case"namedrange":if(o[1]==="/")break;V.Names||(V.Names=[]);var se=Ut(o[0]),qe={Name:se.Name,Ref:Vf(se.RefersTo.slice(1),{r:0,c:0})};V.Sheets.length>0&&(qe.Sheet=V.Sheets.length-1),V.Names.push(qe);break;case"namedcell":break;case"b":break;case"i":break;case"u":break;case"s":break;case"em":break;case"h2":break;case"h3":break;case"sub":break;case"sup":break;case"span":break;case"alignment":break;case"borders":break;case"border":break;case"font":if(o[0].slice(-2)==="/>")break;o[1]==="/"?N+=n.slice(L,o.index):L=o.index+o[0].length;break;case"interior":if(!r.cellStyles)break;k.Interior=ks(o[0]);break;case"protection":break;case"author":case"title":case"description":case"created":case"keywords":case"subject":case"category":case"company":case"lastauthor":case"lastsaved":case"lastprinted":case"version":case"revision":case"totaltime":case"hyperlinkbase":case"manager":case"contentstatus":case"identifier":case"language":case"appname":if(o[0].slice(-2)==="/>")break;o[1]==="/"?jZe(P,ee,n.slice(B,o.index)):B=o.index+o[0].length;break;case"paragraphs":break;case"styles":case"workbook":if(o[1]==="/"){if((c=l.pop())[0]!==o[3])throw new Error("Bad state: "+c.join("|"))}else l.push([o[3],!1]);break;case"comment":if(o[1]==="/"){if((c=l.pop())[0]!==o[3])throw new Error("Bad state: "+c.join("|"));iat(W),j.push(W)}else l.push([o[3],!1]),c=ks(o[0]),W={a:c.Author};break;case"autofilter":if(o[1]==="/"){if((c=l.pop())[0]!==o[3])throw new Error("Bad state: "+c.join("|"))}else if(o[0].charAt(o[0].length-2)!=="/"){var $e=ks(o[0]);p["!autofilter"]={ref:Vf($e.Range).replace(/\$/g,"")},l.push([o[3],!0])}break;case"name":break;case"datavalidation":if(o[1]==="/"){if((c=l.pop())[0]!==o[3])throw new Error("Bad state: "+c.join("|"))}else o[0].charAt(o[0].length-2)!=="/"&&l.push([o[3],!0]);break;case"pixelsperinch":break;case"componentoptions":case"documentproperties":case"customdocumentproperties":case"officedocumentsettings":case"pivottable":case"pivotcache":case"names":case"mapinfo":case"pagebreaks":case"querytable":case"sorting":case"schema":case"conditionalformatting":case"smarttagtype":case"smarttags":case"excelworkbook":case"workbookoptions":case"worksheetoptions":if(o[1]==="/"){if((c=l.pop())[0]!==o[3])throw new Error("Bad state: "+c.join("|"))}else o[0].charAt(o[0].length-2)!=="/"&&l.push([o[3],!0]);break;case"null":break;default:if(l.length==0&&o[3]=="document"||l.length==0&&o[3]=="uof")return jJ(n,r);var Pe=!0;switch(l[l.length-1][0]){case"officedocumentsettings":switch(o[3]){case"allowpng":break;case"removepersonalinformation":break;case"downloadcomponents":break;case"locationofcomponents":break;case"colors":break;case"color":break;case"index":break;case"rgb":break;case"targetscreensize":break;case"readonlyrecommended":break;default:Pe=!1}break;case"componentoptions":switch(o[3]){case"toolbar":break;case"hideofficelogo":break;case"spreadsheetautofit":break;case"label":break;case"caption":break;case"maxheight":break;case"maxwidth":break;case"nextsheetnumber":break;default:Pe=!1}break;case"excelworkbook":switch(o[3]){case"date1904":V.WBProps.date1904=!0;break;case"windowheight":break;case"windowwidth":break;case"windowtopx":break;case"windowtopy":break;case"tabratio":break;case"protectstructure":break;case"protectwindow":break;case"protectwindows":break;case"activesheet":break;case"displayinknotes":break;case"firstvisiblesheet":break;case"supbook":break;case"sheetname":break;case"sheetindex":break;case"sheetindexfirst":break;case"sheetindexlast":break;case"dll":break;case"acceptlabelsinformulas":break;case"donotsavelinkvalues":break;case"iteration":break;case"maxiterations":break;case"maxchange":break;case"path":break;case"xct":break;case"count":break;case"selectedsheets":break;case"calculation":break;case"uncalced":break;case"startupprompt":break;case"crn":break;case"externname":break;case"formula":break;case"colfirst":break;case"collast":break;case"wantadvise":break;case"boolean":break;case"error":break;case"text":break;case"ole":break;case"noautorecover":break;case"publishobjects":break;case"donotcalculatebeforesave":break;case"number":break;case"refmoder1c1":break;case"embedsavesmarttags":break;default:Pe=!1}break;case"workbookoptions":switch(o[3]){case"owcversion":break;case"height":break;case"width":break;default:Pe=!1}break;case"worksheetoptions":switch(o[3]){case"visible":if(o[0].slice(-2)!=="/>")if(o[1]==="/")switch(n.slice(B,o.index)){case"SheetHidden":Z.Hidden=1;break;case"SheetVeryHidden":Z.Hidden=2;break}else B=o.index+o[0].length;break;case"header":p["!margins"]||jp(p["!margins"]={},"xlml"),isNaN(+Ut(o[0]).Margin)||(p["!margins"].header=+Ut(o[0]).Margin);break;case"footer":p["!margins"]||jp(p["!margins"]={},"xlml"),isNaN(+Ut(o[0]).Margin)||(p["!margins"].footer=+Ut(o[0]).Margin);break;case"pagemargins":var Ce=Ut(o[0]);p["!margins"]||jp(p["!margins"]={},"xlml"),isNaN(+Ce.Top)||(p["!margins"].top=+Ce.Top),isNaN(+Ce.Left)||(p["!margins"].left=+Ce.Left),isNaN(+Ce.Right)||(p["!margins"].right=+Ce.Right),isNaN(+Ce.Bottom)||(p["!margins"].bottom=+Ce.Bottom);break;case"displayrighttoleft":V.Views||(V.Views=[]),V.Views[0]||(V.Views[0]={}),V.Views[0].RTL=!0;break;case"freezepanes":break;case"frozennosplit":break;case"splithorizontal":case"splitvertical":break;case"donotdisplaygridlines":break;case"activerow":break;case"activecol":break;case"toprowbottompane":break;case"leftcolumnrightpane":break;case"unsynced":break;case"print":break;case"printerrors":break;case"panes":break;case"scale":break;case"pane":break;case"number":break;case"layout":break;case"pagesetup":break;case"selected":break;case"protectobjects":break;case"enableselection":break;case"protectscenarios":break;case"validprinterinfo":break;case"horizontalresolution":break;case"verticalresolution":break;case"numberofcopies":break;case"activepane":break;case"toprowvisible":break;case"leftcolumnvisible":break;case"fittopage":break;case"rangeselection":break;case"papersizeindex":break;case"pagelayoutzoom":break;case"pagebreakzoom":break;case"filteron":break;case"fitwidth":break;case"fitheight":break;case"commentslayout":break;case"zoom":break;case"lefttoright":break;case"gridlines":break;case"allowsort":break;case"allowfilter":break;case"allowinsertrows":break;case"allowdeleterows":break;case"allowinsertcols":break;case"allowdeletecols":break;case"allowinserthyperlinks":break;case"allowformatcells":break;case"allowsizecols":break;case"allowsizerows":break;case"nosummaryrowsbelowdetail":p["!outline"]||(p["!outline"]={}),p["!outline"].above=!0;break;case"tabcolorindex":break;case"donotdisplayheadings":break;case"showpagelayoutzoom":break;case"nosummarycolumnsrightdetail":p["!outline"]||(p["!outline"]={}),p["!outline"].left=!0;break;case"blackandwhite":break;case"donotdisplayzeros":break;case"displaypagebreak":break;case"rowcolheadings":break;case"donotdisplayoutline":break;case"noorientation":break;case"allowusepivottables":break;case"zeroheight":break;case"viewablerange":break;case"selection":break;case"protectcontents":break;default:Pe=!1}break;case"pivottable":case"pivotcache":switch(o[3]){case"immediateitemsondrop":break;case"showpagemultipleitemlabel":break;case"compactrowindent":break;case"location":break;case"pivotfield":break;case"orientation":break;case"layoutform":break;case"layoutsubtotallocation":break;case"layoutcompactrow":break;case"position":break;case"pivotitem":break;case"datatype":break;case"datafield":break;case"sourcename":break;case"parentfield":break;case"ptlineitems":break;case"ptlineitem":break;case"countofsameitems":break;case"item":break;case"itemtype":break;case"ptsource":break;case"cacheindex":break;case"consolidationreference":break;case"filename":break;case"reference":break;case"nocolumngrand":break;case"norowgrand":break;case"blanklineafteritems":break;case"hidden":break;case"subtotal":break;case"basefield":break;case"mapchilditems":break;case"function":break;case"refreshonfileopen":break;case"printsettitles":break;case"mergelabels":break;case"defaultversion":break;case"refreshname":break;case"refreshdate":break;case"refreshdatecopy":break;case"versionlastrefresh":break;case"versionlastupdate":break;case"versionupdateablemin":break;case"versionrefreshablemin":break;case"calculation":break;default:Pe=!1}break;case"pagebreaks":switch(o[3]){case"colbreaks":break;case"colbreak":break;case"rowbreaks":break;case"rowbreak":break;case"colstart":break;case"colend":break;case"rowend":break;default:Pe=!1}break;case"autofilter":switch(o[3]){case"autofiltercolumn":break;case"autofiltercondition":break;case"autofilterand":break;case"autofilteror":break;default:Pe=!1}break;case"querytable":switch(o[3]){case"id":break;case"autoformatfont":break;case"autoformatpattern":break;case"querysource":break;case"querytype":break;case"enableredirections":break;case"refreshedinxl9":break;case"urlstring":break;case"htmltables":break;case"connection":break;case"commandtext":break;case"refreshinfo":break;case"notitles":break;case"nextid":break;case"columninfo":break;case"overwritecells":break;case"donotpromptforfile":break;case"textwizardsettings":break;case"source":break;case"number":break;case"decimal":break;case"thousandseparator":break;case"trailingminusnumbers":break;case"formatsettings":break;case"fieldtype":break;case"delimiters":break;case"tab":break;case"comma":break;case"autoformatname":break;case"versionlastedit":break;case"versionlastrefresh":break;default:Pe=!1}break;case"datavalidation":switch(o[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;case"cellrangelist":break;default:Pe=!1}break;case"sorting":case"conditionalformatting":switch(o[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"cellrangelist":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;default:Pe=!1}break;case"mapinfo":case"schema":case"data":switch(o[3]){case"map":break;case"entry":break;case"range":break;case"xpath":break;case"field":break;case"xsdtype":break;case"filteron":break;case"aggregate":break;case"elementtype":break;case"attributetype":break;case"schema":case"element":case"complextype":case"datatype":case"all":case"attribute":case"extends":break;case"row":break;default:Pe=!1}break;case"smarttags":break;default:Pe=!1;break}if(Pe||o[3].match(/!\[CDATA/))break;if(!l[l.length-1][1])throw"Unrecognized tag: "+o[3]+"|"+l.join("|");if(l[l.length-1][0]==="customdocumentproperties"){if(o[0].slice(-2)==="/>")break;o[1]==="/"?tat(H,ee,K,n.slice(B,o.index)):(K=o,B=o.index+o[0].length);break}if(r.WTF)throw"Unrecognized tag: "+o[3]+"|"+l.join("|")}var xe={};return!r.bookSheets&&!r.bookProps&&(xe.Sheets=u),xe.SheetNames=f,xe.Workbook=V,xe.SSF=ca(Yt),xe.Props=P,xe.Custprops=H,xe}function rD(e,t){switch(O8(t=t||{}),t.type||"base64"){case"base64":return t5(zi(e),t);case"binary":case"buffer":case"file":return t5(e,t);case"array":return t5(_d(e),t)}}function sat(e){var t={},r=e.content;if(r.l=28,t.AnsiUserType=r.read_shift(0,"lpstr-ansi"),t.AnsiClipboardFormat=bZe(r),r.length-r.l<=4)return t;var n=r.read_shift(4);if(n==0||n>40||(r.l-=4,t.Reserved1=r.read_shift(0,"lpstr-ansi"),r.length-r.l<=4)||(n=r.read_shift(4),n!==1907505652)||(t.UnicodeClipboardFormat=xZe(r),n=r.read_shift(4),n==0||n>40))return t;r.l-=4,t.Reserved2=r.read_shift(0,"lpwstr")}var oat=[60,1084,2066,2165,2175];function lat(e,t,r,n,a){var i=n,s=[],o=r.slice(r.l,r.l+i);if(a&&a.enc&&a.enc.insitu&&o.length>0)switch(e){case 9:case 521:case 1033:case 2057:case 47:case 405:case 225:case 406:case 312:case 404:case 10:break;case 133:break;default:a.enc.insitu(o)}s.push(o),r.l+=i;for(var l=vl(r,r.l),c=nD[l],u=0;c!=null&&oat.indexOf(l)>-1;)i=vl(r,r.l+2),u=r.l+4,l==2066?u+=4:(l==2165||l==2175)&&(u+=12),o=r.slice(u,r.l+4+i),s.push(o),r.l+=4+i,c=nD[l=vl(r,r.l)];var f=Tc(s);la(f,0);var p=0;f.lens=[];for(var m=0;m<s.length;++m)f.lens.push(p),p+=s[m].length;if(f.length<n)throw"XLS Record 0x"+e.toString(16)+" Truncated: "+f.length+" < "+n;return t.f(f,f.length,a)}function fo(e,t,r){if(e.t!=="z"&&e.XF){var n=0;try{n=e.z||e.XF.numFmtId||0,t.cellNF&&(e.z=Yt[n])}catch(i){if(t.WTF)throw i}if(!t||t.cellText!==!1)try{e.t==="e"?e.w=e.w||Sd[e.v]:n===0||n=="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=mm(e.v):e.w=ad(e.v):e.w=ms(n,e.v,{date1904:!!r,dateNF:t&&t.dateNF})}catch(i){if(t.WTF)throw i}if(t.cellDates&&n&&e.t=="n"&&P0(Yt[n]||String(n))){var a=Bu(e.v);a&&(e.t="d",e.v=new Date(a.y,a.m-1,a.d,a.H,a.M,a.S,a.u))}}}function I1(e,t,r){return{v:e,ixfe:t,t:r}}function cat(e,t){var r={opts:{}},n={},a=t.dense?[]:{},i={},s={},o=null,l=[],c="",u={},f,p="",m,b,v,y,_={},S=[],C,T,A=[],k=[],N={Sheets:[],WBProps:{date1904:!1},Views:[{}]},L={},I=function(at){return at<8?Gu[at]:at<64&&k[at-8]||Gu[at]},P=function(at,bt,et){var ft=bt.XF.data;if(!(!ft||!ft.patternType||!et||!et.cellStyles)){bt.s={},bt.s.patternType=ft.patternType;var zt;(zt=xm(I(ft.icvFore)))&&(bt.s.fgColor={rgb:zt}),(zt=xm(I(ft.icvBack)))&&(bt.s.bgColor={rgb:zt})}},H=function(at,bt,et){if(!(Q>1)&&!(et.sheetRows&&at.r>=et.sheetRows)){if(et.cellStyles&&bt.XF&&bt.XF.data&&P(at,bt,et),delete bt.ixfe,delete bt.XF,f=at,p=Wt(at),(!s||!s.s||!s.e)&&(s={s:{r:0,c:0},e:{r:0,c:0}}),at.r<s.s.r&&(s.s.r=at.r),at.c<s.s.c&&(s.s.c=at.c),at.r+1>s.e.r&&(s.e.r=at.r+1),at.c+1>s.e.c&&(s.e.c=at.c+1),et.cellFormula&&bt.f){for(var ft=0;ft<S.length;++ft)if(!(S[ft][0].s.c>at.c||S[ft][0].s.r>at.r)&&!(S[ft][0].e.c<at.c||S[ft][0].e.r<at.r)){bt.F=xr(S[ft][0]),(S[ft][0].s.c!=at.c||S[ft][0].s.r!=at.r)&&delete bt.f,bt.f&&(bt.f=""+va(S[ft][1],s,at,z,B));break}}et.dense?(a[at.r]||(a[at.r]=[]),a[at.r][at.c]=bt):a[p]=bt}},B={enc:!1,sbcch:0,snames:[],sharedf:_,arrayf:S,rrtabid:[],lastuser:"",biff:8,codepage:0,winlocked:0,cellStyles:!!t&&!!t.cellStyles,WTF:!!t&&!!t.wtf};t.password&&(B.password=t.password);var K,j=[],W=[],D=[],U=[],Y=!1,z=[];z.SheetNames=B.snames,z.sharedf=B.sharedf,z.arrayf=B.arrayf,z.names=[],z.XTI=[];var M=0,Q=0,q=0,F=[],V=[],Z;B.codepage=1200,Ls(1200);for(var ee=!1;e.l<e.length-1;){var te=e.l,oe=e.read_shift(2);if(oe===0&&M===10)break;var pe=e.l===e.length?0:e.read_shift(2),he=nD[oe];if(he&&he.f){if(t.bookSheets&&M===133&&oe!==133)break;if(M=oe,he.r===2||he.r==12){var ke=e.read_shift(2);if(pe-=2,!B.enc&&ke!==oe&&((ke&255)<<8|ke>>8)!==oe)throw new Error("rt mismatch: "+ke+"!="+oe);he.r==12&&(e.l+=10,pe-=10)}var se={};if(oe===10?se=he.f(e,pe,B):se=lat(oe,he,e,pe,B),Q==0&&[9,521,1033,2057].indexOf(M)===-1)continue;switch(oe){case 34:r.opts.Date1904=N.WBProps.date1904=se;break;case 134:r.opts.WriteProtect=!0;break;case 47:if(B.enc||(e.l=0),B.enc=se,!t.password)throw new Error("File is password-protected");if(se.valid==null)throw new Error("Encryption scheme unsupported");if(!se.valid)throw new Error("Password is incorrect");break;case 92:B.lastuser=se;break;case 66:var qe=Number(se);switch(qe){case 21010:qe=1200;break;case 32768:qe=1e4;break;case 32769:qe=1252;break}Ls(B.codepage=qe),ee=!0;break;case 317:B.rrtabid=se;break;case 25:B.winlocked=se;break;case 439:r.opts.RefreshAll=se;break;case 12:r.opts.CalcCount=se;break;case 16:r.opts.CalcDelta=se;break;case 17:r.opts.CalcIter=se;break;case 13:r.opts.CalcMode=se;break;case 14:r.opts.CalcPrecision=se;break;case 95:r.opts.CalcSaveRecalc=se;break;case 15:B.CalcRefMode=se;break;case 2211:r.opts.FullCalc=se;break;case 129:se.fDialog&&(a["!type"]="dialog"),se.fBelow||((a["!outline"]||(a["!outline"]={})).above=!0),se.fRight||((a["!outline"]||(a["!outline"]={})).left=!0);break;case 224:A.push(se);break;case 430:z.push([se]),z[z.length-1].XTI=[];break;case 35:case 547:z[z.length-1].push(se);break;case 24:case 536:Z={Name:se.Name,Ref:va(se.rgce,s,null,z,B)},se.itab>0&&(Z.Sheet=se.itab-1),z.names.push(Z),z[0]||(z[0]=[],z[0].XTI=[]),z[z.length-1].push(se),se.Name=="_xlnm._FilterDatabase"&&se.itab>0&&se.rgce&&se.rgce[0]&&se.rgce[0][0]&&se.rgce[0][0][0]=="PtgArea3d"&&(V[se.itab-1]={ref:xr(se.rgce[0][0][1][2])});break;case 22:B.ExternCount=se;break;case 23:z.length==0&&(z[0]=[],z[0].XTI=[]),z[z.length-1].XTI=z[z.length-1].XTI.concat(se),z.XTI=z.XTI.concat(se);break;case 2196:if(B.biff<8)break;Z!=null&&(Z.Comment=se[1]);break;case 18:a["!protect"]=se;break;case 19:se!==0&&B.WTF&&console.error("Password verifier: "+se);break;case 133:i[se.pos]=se,B.snames.push(se.name);break;case 10:{if(--Q)break;if(s.e){if(s.e.r>0&&s.e.c>0){if(s.e.r--,s.e.c--,a["!ref"]=xr(s),t.sheetRows&&t.sheetRows<=s.e.r){var $e=s.e.r;s.e.r=t.sheetRows-1,a["!fullref"]=a["!ref"],a["!ref"]=xr(s),s.e.r=$e}s.e.r++,s.e.c++}j.length>0&&(a["!merges"]=j),W.length>0&&(a["!objects"]=W),D.length>0&&(a["!cols"]=D),U.length>0&&(a["!rows"]=U),N.Sheets.push(L)}c===""?u=a:n[c]=a,a=t.dense?[]:{}}break;case 9:case 521:case 1033:case 2057:{if(B.biff===8&&(B.biff={9:2,521:3,1033:4}[oe]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[se.BIFFVer]||8),B.biffguess=se.BIFFVer==0,se.BIFFVer==0&&se.dt==4096&&(B.biff=5,ee=!0,Ls(B.codepage=28591)),B.biff==8&&se.BIFFVer==0&&se.dt==16&&(B.biff=2),Q++)break;if(a=t.dense?[]:{},B.biff<8&&!ee&&(ee=!0,Ls(B.codepage=t.codepage||1252)),B.biff<5||se.BIFFVer==0&&se.dt==4096){c===""&&(c="Sheet1"),s={s:{r:0,c:0},e:{r:0,c:0}};var Pe={pos:e.l-pe,name:c};i[Pe.pos]=Pe,B.snames.push(c)}else c=(i[te]||{name:""}).name;se.dt==32&&(a["!type"]="chart"),se.dt==64&&(a["!type"]="macro"),j=[],W=[],B.arrayf=S=[],D=[],U=[],Y=!1,L={Hidden:(i[te]||{hs:0}).hs,name:c}}break;case 515:case 3:case 2:a["!type"]=="chart"&&(t.dense?(a[se.r]||[])[se.c]:a[Wt({c:se.c,r:se.r})])&&++se.c,C={ixfe:se.ixfe,XF:A[se.ixfe]||{},v:se.val,t:"n"},q>0&&(C.z=F[C.ixfe>>8&63]),fo(C,t,r.opts.Date1904),H({c:se.c,r:se.r},C,t);break;case 5:case 517:C={ixfe:se.ixfe,XF:A[se.ixfe],v:se.val,t:se.t},q>0&&(C.z=F[C.ixfe>>8&63]),fo(C,t,r.opts.Date1904),H({c:se.c,r:se.r},C,t);break;case 638:C={ixfe:se.ixfe,XF:A[se.ixfe],v:se.rknum,t:"n"},q>0&&(C.z=F[C.ixfe>>8&63]),fo(C,t,r.opts.Date1904),H({c:se.c,r:se.r},C,t);break;case 189:for(var Ce=se.c;Ce<=se.C;++Ce){var xe=se.rkrec[Ce-se.c][0];C={ixfe:xe,XF:A[xe],v:se.rkrec[Ce-se.c][1],t:"n"},q>0&&(C.z=F[C.ixfe>>8&63]),fo(C,t,r.opts.Date1904),H({c:Ce,r:se.r},C,t)}break;case 6:case 518:case 1030:{if(se.val=="String"){o=se;break}if(C=I1(se.val,se.cell.ixfe,se.tt),C.XF=A[C.ixfe],t.cellFormula){var ve=se.formula;if(ve&&ve[0]&&ve[0][0]&&ve[0][0][0]=="PtgExp"){var Ne=ve[0][0][1][0],Ue=ve[0][0][1][1],Le=Wt({r:Ne,c:Ue});_[Le]?C.f=""+va(se.formula,s,se.cell,z,B):C.F=((t.dense?(a[Ne]||[])[Ue]:a[Le])||{}).F}else C.f=""+va(se.formula,s,se.cell,z,B)}q>0&&(C.z=F[C.ixfe>>8&63]),fo(C,t,r.opts.Date1904),H(se.cell,C,t),o=se}break;case 7:case 519:if(o)o.val=se,C=I1(se,o.cell.ixfe,"s"),C.XF=A[C.ixfe],t.cellFormula&&(C.f=""+va(o.formula,s,o.cell,z,B)),q>0&&(C.z=F[C.ixfe>>8&63]),fo(C,t,r.opts.Date1904),H(o.cell,C,t),o=null;else throw new Error("String record expects Formula");break;case 33:case 545:{S.push(se);var Ye=Wt(se[0].s);if(m=t.dense?(a[se[0].s.r]||[])[se[0].s.c]:a[Ye],t.cellFormula&&m){if(!o||!Ye||!m)break;m.f=""+va(se[1],s,se[0],z,B),m.F=xr(se[0])}}break;case 1212:{if(!t.cellFormula)break;if(p){if(!o)break;_[Wt(o.cell)]=se[0],m=t.dense?(a[o.cell.r]||[])[o.cell.c]:a[Wt(o.cell)],(m||{}).f=""+va(se[0],s,f,z,B)}}break;case 253:C=I1(l[se.isst].t,se.ixfe,"s"),l[se.isst].h&&(C.h=l[se.isst].h),C.XF=A[C.ixfe],q>0&&(C.z=F[C.ixfe>>8&63]),fo(C,t,r.opts.Date1904),H({c:se.c,r:se.r},C,t);break;case 513:t.sheetStubs&&(C={ixfe:se.ixfe,XF:A[se.ixfe],t:"z"},q>0&&(C.z=F[C.ixfe>>8&63]),fo(C,t,r.opts.Date1904),H({c:se.c,r:se.r},C,t));break;case 190:if(t.sheetStubs)for(var De=se.c;De<=se.C;++De){var Ve=se.ixfe[De-se.c];C={ixfe:Ve,XF:A[Ve],t:"z"},q>0&&(C.z=F[C.ixfe>>8&63]),fo(C,t,r.opts.Date1904),H({c:De,r:se.r},C,t)}break;case 214:case 516:case 4:C=I1(se.val,se.ixfe,"s"),C.XF=A[C.ixfe],q>0&&(C.z=F[C.ixfe>>8&63]),fo(C,t,r.opts.Date1904),H({c:se.c,r:se.r},C,t);break;case 0:case 512:Q===1&&(s=se);break;case 252:l=se;break;case 1054:if(B.biff==4){F[q++]=se[1];for(var lt=0;lt<q+163&&Yt[lt]!=se[1];++lt);lt>=163&&Hu(se[1],q+163)}else Hu(se[1],se[0]);break;case 30:{F[q++]=se;for(var Ee=0;Ee<q+163&&Yt[Ee]!=se;++Ee);Ee>=163&&Hu(se,q+163)}break;case 229:j=j.concat(se);break;case 93:W[se.cmo[0]]=B.lastobj=se;break;case 438:B.lastobj.TxO=se;break;case 127:B.lastobj.ImData=se;break;case 440:for(y=se[0].s.r;y<=se[0].e.r;++y)for(v=se[0].s.c;v<=se[0].e.c;++v)m=t.dense?(a[y]||[])[v]:a[Wt({c:v,r:y})],m&&(m.l=se[1]);break;case 2048:for(y=se[0].s.r;y<=se[0].e.r;++y)for(v=se[0].s.c;v<=se[0].e.c;++v)m=t.dense?(a[y]||[])[v]:a[Wt({c:v,r:y})],m&&m.l&&(m.l.Tooltip=se[1]);break;case 28:{if(B.biff<=5&&B.biff>=2)break;m=t.dense?(a[se[0].r]||[])[se[0].c]:a[Wt(se[0])];var Ae=W[se[2]];m||(t.dense?(a[se[0].r]||(a[se[0].r]=[]),m=a[se[0].r][se[0].c]={t:"z"}):m=a[Wt(se[0])]={t:"z"},s.e.r=Math.max(s.e.r,se[0].r),s.s.r=Math.min(s.s.r,se[0].r),s.e.c=Math.max(s.e.c,se[0].c),s.s.c=Math.min(s.s.c,se[0].c)),m.c||(m.c=[]),b={a:se[1],t:Ae.TxO.t},m.c.push(b)}break;case 2173:Met(A[se.ixfe],se.ext);break;case 125:{if(!B.cellStyles)break;for(;se.e>=se.s;)D[se.e--]={width:se.w/256,level:se.level||0,hidden:!!(se.flags&1)},Y||(Y=!0,k8(se.w/256)),u0(D[se.e+1])}break;case 520:{var Ze={};se.level!=null&&(U[se.r]=Ze,Ze.level=se.level),se.hidden&&(U[se.r]=Ze,Ze.hidden=!0),se.hpt&&(U[se.r]=Ze,Ze.hpt=se.hpt,Ze.hpx=ym(se.hpt))}break;case 38:case 39:case 40:case 41:a["!margins"]||jp(a["!margins"]={}),a["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[oe]]=se;break;case 161:a["!margins"]||jp(a["!margins"]={}),a["!margins"].header=se.header,a["!margins"].footer=se.footer;break;case 574:se.RTL&&(N.Views[0].RTL=!0);break;case 146:k=se;break;case 2198:K=se;break;case 140:T=se;break;case 442:c?L.CodeName=se||L.name:N.WBProps.CodeName=se||"ThisWorkbook";break}}else he||console.error("Missing Info for XLS Record 0x"+oe.toString(16)),e.l+=pe}return r.SheetNames=Mo(i).sort(function(rt,at){return Number(rt)-Number(at)}).map(function(rt){return i[rt].name}),t.bookSheets||(r.Sheets=n),!r.SheetNames.length&&u["!ref"]?(r.SheetNames.push("Sheet1"),r.Sheets&&(r.Sheets.Sheet1=u)):r.Preamble=u,r.Sheets&&V.forEach(function(rt,at){r.Sheets[r.SheetNames[at]]["!autofilter"]=rt}),r.Strings=l,r.SSF=ca(Yt),B.enc&&(r.Encryption=B.enc),K&&(r.Themes=K),r.Metadata={},T!==void 0&&(r.Metadata.Country=T),z.names.length>0&&(N.Names=z.names),r.Workbook=N,r}var LJ={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function uat(e,t,r){var n=br.find(e,"/!DocumentSummaryInformation");if(n&&n.size>0)try{var a=bJ(n,CZe,LJ.DSI);for(var i in a)t[i]=a[i]}catch(c){if(r.WTF)throw c}var s=br.find(e,"/!SummaryInformation");if(s&&s.size>0)try{var o=bJ(s,TZe,LJ.SI);for(var l in o)t[l]==null&&(t[l]=o[l])}catch(c){if(r.WTF)throw c}t.HeadingPairs&&t.TitlesOfParts&&(Xue(t.HeadingPairs,t.TitlesOfParts,t,r),delete t.HeadingPairs,delete t.TitlesOfParts)}function Dde(e,t){t||(t={}),O8(t),oue(),t.codepage&&d8(t.codepage);var r,n;if(e.FullPaths){if(br.find(e,"/encryption"))throw new Error("File is password-protected");r=br.find(e,"!CompObj"),n=br.find(e,"/Workbook")||br.find(e,"/Book")}else{switch(t.type){case"base64":e=Is(zi(e));break;case"binary":e=Is(e);break;case"buffer":break;case"array":Array.isArray(e)||(e=Array.prototype.slice.call(e));break}la(e,0),n={content:e}}var a,i;if(r&&sat(r),t.bookProps&&!t.bookSheets)a={};else{var s=gr?"buffer":"array";if(n&&n.content)a=cat(n.content,t);else if((i=br.find(e,"PerfectOffice_MAIN"))&&i.content)a=Bp.to_workbook(i.content,(t.type=s,t));else if((i=br.find(e,"NativeContent_MAIN"))&&i.content)a=Bp.to_workbook(i.content,(t.type=s,t));else throw(i=br.find(e,"MN0"))&&i.content?new Error("Unsupported Works 4 for Mac file"):new Error("Cannot find Workbook stream");t.bookVBA&&e.FullPaths&&br.find(e,"/_VBA_PROJECT_CUR/VBA/dir")&&(a.vbaraw=Xet(e))}var o={};return e.FullPaths&&uat(e,o,t),a.Props=a.Custprops=o,t.bookFiles&&(a.cfb=e),a}var Xb={0:{f:Grt},1:{f:Xrt},2:{f:ant},3:{f:Jrt},4:{f:Zrt},5:{f:nnt},6:{f:ont},7:{f:tnt},8:{f:fnt},9:{f:dnt},10:{f:cnt},11:{f:unt},12:{f:Yrt},13:{f:int},14:{f:ent},15:{f:Qrt},16:{f:Ade},17:{f:lnt},18:{f:rnt},19:{f:w8},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:znt},40:{},42:{},43:{f:oet},44:{f:set},45:{f:cet},46:{f:det},47:{f:uet},48:{},49:{f:dZe},50:{},51:{f:Oet},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:ode},62:{f:snt},63:{f:Bet},64:{f:_nt},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:Ca,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:ynt},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:Krt},148:{f:Vrt,p:16},151:{f:mnt},152:{},153:{f:Fnt},154:{},155:{},156:{f:Pnt},157:{},158:{},159:{T:1,f:TJe},160:{T:-1},161:{T:1,f:Ed},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:hnt},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:Det},336:{T:-1},337:{f:Iet,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:Q6},357:{},358:{},359:{},360:{T:1},361:{},362:{f:sde},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:gnt},427:{f:vnt},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:xnt},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:Wrt},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:pnt},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:Q6},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:Vet},633:{T:1},634:{T:-1},635:{T:1,f:Get},636:{T:-1},637:{f:hZe},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:Ant},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:wnt},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}},nD={6:{f:JM},10:{f:_c},12:{f:In},13:{f:In},14:{f:yn},15:{f:yn},16:{f:_a},17:{f:yn},18:{f:yn},19:{f:In},20:{f:wJ},21:{f:wJ},23:{f:sde},24:{f:SJ},25:{f:yn},26:{},27:{},28:{f:qQe},29:{},34:{f:yn},35:{f:EJ},38:{f:_a},39:{f:_a},40:{f:_a},41:{f:_a},42:{f:yn},43:{f:yn},47:{f:GJe},49:{f:wQe},51:{f:In},60:{},61:{f:xQe},64:{f:yn},65:{f:_Qe},66:{f:In},77:{},80:{},81:{},82:{},85:{f:In},89:{},90:{},91:{},92:{f:dQe},93:{f:$Qe},94:{},95:{f:yn},96:{},97:{},99:{f:yn},125:{f:ode},128:{f:DQe},129:{f:fQe},130:{f:In},131:{f:yn},132:{f:yn},133:{f:hQe},134:{},140:{f:XQe},141:{f:In},144:{},146:{f:ZQe},151:{},152:{},153:{},154:{},155:{},156:{f:In},157:{},158:{},160:{f:rJe},161:{f:JQe},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:kQe},190:{f:NQe},193:{f:_c},197:{},198:{},199:{},200:{},201:{},202:{f:yn},203:{},204:{},205:{},206:{},207:{},208:{},209:{},210:{},211:{},213:{},215:{},216:{},217:{},218:{f:In},220:{},221:{f:yn},222:{},224:{f:MQe},225:{f:uQe},226:{f:_c},227:{},229:{f:UQe},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:pQe},253:{f:EQe},255:{f:mQe},256:{},259:{},290:{},311:{},312:{},315:{},317:{f:ede},318:{},319:{},320:{},330:{},331:{},333:{},334:{},335:{},336:{},337:{},338:{},339:{},340:{},351:{},352:{f:yn},353:{f:_c},401:{},402:{},403:{},404:{},405:{},406:{},407:{},408:{},425:{},426:{},427:{},428:{},429:{},430:{f:IQe},431:{f:yn},432:{},433:{},434:{},437:{},438:{f:VQe},439:{f:yn},440:{f:WQe},441:{},442:{f:pg},443:{},444:{f:In},445:{},446:{},448:{f:_c},449:{f:bQe,r:2},450:{f:_c},512:{f:yJ},513:{f:tJe},515:{f:OQe},516:{f:SQe},517:{f:_J},519:{f:nJe},520:{f:gQe},523:{},545:{f:CJ},549:{f:xJ},566:{},574:{f:yQe},638:{f:AQe},659:{},1048:{},1054:{f:CQe},1084:{},1212:{f:BQe},2048:{f:KQe},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:M1},2058:{},2059:{},2060:{},2061:{},2062:{},2063:{},2064:{},2066:{},2067:{},2128:{},2129:{},2130:{},2131:{},2132:{},2133:{},2134:{},2135:{},2136:{},2137:{},2138:{},2146:{},2147:{r:12},2148:{},2149:{},2150:{},2151:{f:_c},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:QQe,r:12},2173:{f:Ret,r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:yn,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:FQe,r:12},2197:{},2198:{f:Eet,r:12},2199:{},2200:{},2201:{},2202:{f:zQe,r:12},2203:{f:_c},2204:{},2205:{},2206:{},2207:{},2211:{f:vQe},2212:{},2213:{},2214:{},2215:{},4097:{},4098:{},4099:{},4102:{},4103:{},4105:{},4106:{},4107:{},4108:{},4109:{},4116:{},4117:{},4118:{},4119:{},4120:{},4121:{},4122:{},4123:{},4124:{},4125:{},4126:{},4127:{},4128:{},4129:{},4130:{},4132:{},4133:{},4134:{f:In},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:eJe},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:YQe},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:yJ},1:{},2:{f:oJe},3:{f:sJe},4:{f:iJe},5:{f:_J},7:{f:lJe},8:{},9:{f:M1},11:{},22:{f:In},30:{f:TQe},31:{},32:{},33:{f:CJ},36:{},37:{f:xJ},50:{f:cJe},62:{},52:{},67:{},68:{f:In},69:{},86:{},126:{},127:{f:aJe},135:{},136:{},137:{},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:uJe},223:{},234:{},354:{},421:{},518:{f:JM},521:{f:M1},536:{f:SJ},547:{f:EJ},561:{},579:{},1030:{f:JM},1033:{f:M1},1091:{},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},29282:{}};function Ns(e,t,r,n){var a=t;if(!isNaN(a)){var i=(r||[]).length||0,s=e.next(4);s.write_shift(2,a),s.write_shift(2,i),i>0&&que(r)&&e.push(r)}}function PJ(e,t){var r=t||{},n=r.dense?[]:{};e=e.replace(/<!--.*?-->/g,"");var a=e.match(/<table/i);if(!a)throw new Error("Invalid HTML: could not find <table>");var i=e.match(/<\/table/i),s=a.index,o=i&&i.index||e.length,l=OYe(e.slice(s,o),/(:?<tr[^>]*>)/i,"<tr>"),c=-1,u=0,f=0,p=0,m={s:{r:1e7,c:1e7},e:{r:0,c:0}},b=[];for(s=0;s<l.length;++s){var v=l[s].trim(),y=v.slice(0,3).toLowerCase();if(y=="<tr"){if(++c,r.sheetRows&&r.sheetRows<=c){--c;break}u=0;continue}if(!(y!="<td"&&y!="<th")){var _=v.split(/<\/t[dh]>/i);for(o=0;o<_.length;++o){var S=_[o].trim();if(S.match(/<t[dh]/i)){for(var C=S,T=0;C.charAt(0)=="<"&&(T=C.indexOf(">"))>-1;)C=C.slice(T+1);for(var A=0;A<b.length;++A){var k=b[A];k.s.c==u&&k.s.r<c&&c<=k.e.r&&(u=k.e.c+1,A=-1)}var N=Ut(S.slice(0,S.indexOf(">")));p=N.colspan?+N.colspan:1,((f=+N.rowspan)>1||p>1)&&b.push({s:{r:c,c:u},e:{r:c+(f||1)-1,c:u+p-1}});var L=N.t||N["data-t"]||"";if(!C.length){u+=p;continue}if(C=kue(C),m.s.r>c&&(m.s.r=c),m.e.r<c&&(m.e.r=c),m.s.c>u&&(m.s.c=u),m.e.c<u&&(m.e.c=u),!C.length){u+=p;continue}var I={t:"s",v:C};r.raw||!C.trim().length||L=="s"||(C==="TRUE"?I={t:"b",v:!0}:C==="FALSE"?I={t:"b",v:!1}:isNaN(zs(C))?isNaN(c0(C).getDate())||(I={t:"d",v:ta(C)},r.cellDates||(I={t:"n",v:Ba(I.v)}),I.z=r.dateNF||Yt[14]):I={t:"n",v:zs(C)}),r.dense?(n[c]||(n[c]=[]),n[c][u]=I):n[Wt({r:c,c:u})]=I,u+=p}}}}return n["!ref"]=xr(m),b.length&&(n["!merges"]=b),n}function dat(e,t,r,n){for(var a=e["!merges"]||[],i=[],s=t.s.c;s<=t.e.c;++s){for(var o=0,l=0,c=0;c<a.length;++c)if(!(a[c].s.r>r||a[c].s.c>s)&&!(a[c].e.r<r||a[c].e.c<s)){if(a[c].s.r<r||a[c].s.c<s){o=-1;break}o=a[c].e.r-a[c].s.r+1,l=a[c].e.c-a[c].s.c+1;break}if(!(o<0)){var u=Wt({r,c:s}),f=n.dense?(e[r]||[])[s]:e[u],p=f&&f.v!=null&&(f.h||v8(f.w||(Pl(f),f.w)||""))||"",m={};o>1&&(m.rowspan=o),l>1&&(m.colspan=l),n.editable?p='<span contenteditable="true">'+p+"</span>":f&&(m["data-t"]=f&&f.t||"z",f.v!=null&&(m["data-v"]=f.v),f.z!=null&&(m["data-z"]=f.z),f.l&&(f.l.Target||"#").charAt(0)!="#"&&(p='<a href="'+f.l.Target+'">'+p+"</a>")),m.id=(n.id||"sjs")+"-"+u,i.push(XYe("td",p,m))}}var b="<tr>";return b+i.join("")+"</tr>"}var fat='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',hat="</body></html>";function pat(e,t){var r=e.match(/<table[\s\S]*?>[\s\S]*?<\/table>/gi);if(!r||r.length==0)throw new Error("Invalid HTML: could not find <table>");if(r.length==1)return Jc(PJ(r[0],t),t);var n=L8();return r.forEach(function(a,i){P8(n,PJ(a,t),"Sheet"+(i+1))}),n}function mat(e,t,r){var n=[];return n.join("")+"<table"+(r&&r.id?' id="'+r.id+'"':"")+">"}function gat(e,t){var r=t||{},n=r.header!=null?r.header:fat,a=r.footer!=null?r.footer:hat,i=[n],s=F0(e["!ref"]);r.dense=Array.isArray(e),i.push(mat(e,s,r));for(var o=s.s.r;o<=s.e.r;++o)i.push(dat(e,s,o,r));return i.push("</table>"+a),i.join("")}function Ode(e,t,r){var n=r||{},a=0,i=0;if(n.origin!=null)if(typeof n.origin=="number")a=n.origin;else{var s=typeof n.origin=="string"?La(n.origin):n.origin;a=s.r,i=s.c}var o=t.getElementsByTagName("tr"),l=Math.min(n.sheetRows||1e7,o.length),c={s:{r:0,c:0},e:{r:a,c:i}};if(e["!ref"]){var u=F0(e["!ref"]);c.s.r=Math.min(c.s.r,u.s.r),c.s.c=Math.min(c.s.c,u.s.c),c.e.r=Math.max(c.e.r,u.e.r),c.e.c=Math.max(c.e.c,u.e.c),a==-1&&(c.e.r=a=u.e.r+1)}var f=[],p=0,m=e["!rows"]||(e["!rows"]=[]),b=0,v=0,y=0,_=0,S=0,C=0;for(e["!cols"]||(e["!cols"]=[]);b<o.length&&v<l;++b){var T=o[b];if(FJ(T)){if(n.display)continue;m[v]={hidden:!0}}var A=T.children;for(y=_=0;y<A.length;++y){var k=A[y];if(!(n.display&&FJ(k))){var N=k.hasAttribute("data-v")?k.getAttribute("data-v"):k.hasAttribute("v")?k.getAttribute("v"):kue(k.innerHTML),L=k.getAttribute("data-z")||k.getAttribute("z");for(p=0;p<f.length;++p){var I=f[p];I.s.c==_+i&&I.s.r<v+a&&v+a<=I.e.r&&(_=I.e.c+1-i,p=-1)}C=+k.getAttribute("colspan")||1,((S=+k.getAttribute("rowspan")||1)>1||C>1)&&f.push({s:{r:v+a,c:_+i},e:{r:v+a+(S||1)-1,c:_+i+(C||1)-1}});var P={t:"s",v:N},H=k.getAttribute("data-t")||k.getAttribute("t")||"";N!=null&&(N.length==0?P.t=H||"z":n.raw||N.trim().length==0||H=="s"||(N==="TRUE"?P={t:"b",v:!0}:N==="FALSE"?P={t:"b",v:!1}:isNaN(zs(N))?isNaN(c0(N).getDate())||(P={t:"d",v:ta(N)},n.cellDates||(P={t:"n",v:Ba(P.v)}),P.z=n.dateNF||Yt[14]):P={t:"n",v:zs(N)})),P.z===void 0&&L!=null&&(P.z=L);var B="",K=k.getElementsByTagName("A");if(K&&K.length)for(var j=0;j<K.length&&!(K[j].hasAttribute("href")&&(B=K[j].getAttribute("href"),B.charAt(0)!="#"));++j);B&&B.charAt(0)!="#"&&(P.l={Target:B}),n.dense?(e[v+a]||(e[v+a]=[]),e[v+a][_+i]=P):e[Wt({c:_+i,r:v+a})]=P,c.e.c<_+i&&(c.e.c=_+i),_+=C}}++v}return f.length&&(e["!merges"]=(e["!merges"]||[]).concat(f)),c.e.r=Math.max(c.e.r,v-1+a),e["!ref"]=xr(c),v>=l&&(e["!fullref"]=xr((c.e.r=o.length-b+v-1+a,c))),e}function Ide(e,t){var r=t||{},n=r.dense?[]:{};return Ode(n,e,t)}function vat(e,t){return Jc(Ide(e,t),t)}function FJ(e){var t="",r=bat(e);return r&&(t=r(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),t==="none"}function bat(e){return e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle=="function"?e.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}function xat(e){var t=e.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(/<text:s\/>/g," ").replace(/<text:s text:c="(\d+)"\/>/g,function(n,a){return Array(parseInt(a,10)+1).join(" ")}).replace(/<text:tab[^>]*\/>/g,"	").replace(/<text:line-break\/>/g,`
`),r=yr(t.replace(/<[^>]*>/g,""));return[r]}var BJ={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']};function Lde(e,t){var r=t||{},n=b8(e),a=[],i,s,o={name:""},l="",c=0,u,f,p={},m=[],b=r.dense?[]:{},v,y,_={value:""},S="",C=0,T=[],A=-1,k=-1,N={s:{r:1e6,c:1e7},e:{r:0,c:0}},L=0,I={},P=[],H={},B=0,K=0,j=[],W=1,D=1,U=[],Y={Names:[]},z={},M=["",""],Q=[],q={},F="",V=0,Z=!1,ee=!1,te=0;for(vm.lastIndex=0,n=n.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");v=vm.exec(n);)switch(v[3]=v[3].replace(/_.*$/,"")){case"table":case"工作表":v[1]==="/"?(N.e.c>=N.s.c&&N.e.r>=N.s.r?b["!ref"]=xr(N):b["!ref"]="A1:A1",r.sheetRows>0&&r.sheetRows<=N.e.r&&(b["!fullref"]=b["!ref"],N.e.r=r.sheetRows-1,b["!ref"]=xr(N)),P.length&&(b["!merges"]=P),j.length&&(b["!rows"]=j),u.name=u.名称||u.name,typeof JSON<"u"&&JSON.stringify(u),m.push(u.name),p[u.name]=b,ee=!1):v[0].charAt(v[0].length-2)!=="/"&&(u=Ut(v[0],!1),A=k=-1,N.s.r=N.s.c=1e7,N.e.r=N.e.c=0,b=r.dense?[]:{},P=[],j=[],ee=!0);break;case"table-row-group":v[1]==="/"?--L:++L;break;case"table-row":case"行":if(v[1]==="/"){A+=W,W=1;break}if(f=Ut(v[0],!1),f.行号?A=f.行号-1:A==-1&&(A=0),W=+f["number-rows-repeated"]||1,W<10)for(te=0;te<W;++te)L>0&&(j[A+te]={level:L});k=-1;break;case"covered-table-cell":v[1]!=="/"&&++k,r.sheetStubs&&(r.dense?(b[A]||(b[A]=[]),b[A][k]={t:"z"}):b[Wt({r:A,c:k})]={t:"z"}),S="",T=[];break;case"table-cell":case"数据":if(v[0].charAt(v[0].length-2)==="/")++k,_=Ut(v[0],!1),D=parseInt(_["number-columns-repeated"]||"1",10),y={t:"z",v:null},_.formula&&r.cellFormula!=!1&&(y.f=DJ(yr(_.formula))),(_.数据类型||_["value-type"])=="string"&&(y.t="s",y.v=yr(_["string-value"]||""),r.dense?(b[A]||(b[A]=[]),b[A][k]=y):b[Wt({r:A,c:k})]=y),k+=D-1;else if(v[1]!=="/"){++k,S="",C=0,T=[],D=1;var oe=W?A+W-1:A;if(k>N.e.c&&(N.e.c=k),k<N.s.c&&(N.s.c=k),A<N.s.r&&(N.s.r=A),oe>N.e.r&&(N.e.r=oe),_=Ut(v[0],!1),Q=[],q={},y={t:_.数据类型||_["value-type"],v:null},r.cellFormula)if(_.formula&&(_.formula=yr(_.formula)),_["number-matrix-columns-spanned"]&&_["number-matrix-rows-spanned"]&&(B=parseInt(_["number-matrix-rows-spanned"],10)||0,K=parseInt(_["number-matrix-columns-spanned"],10)||0,H={s:{r:A,c:k},e:{r:A+B-1,c:k+K-1}},y.F=xr(H),U.push([H,y.F])),_.formula)y.f=DJ(_.formula);else for(te=0;te<U.length;++te)A>=U[te][0].s.r&&A<=U[te][0].e.r&&k>=U[te][0].s.c&&k<=U[te][0].e.c&&(y.F=U[te][1]);switch((_["number-columns-spanned"]||_["number-rows-spanned"])&&(B=parseInt(_["number-rows-spanned"],10)||0,K=parseInt(_["number-columns-spanned"],10)||0,H={s:{r:A,c:k},e:{r:A+B-1,c:k+K-1}},P.push(H)),_["number-columns-repeated"]&&(D=parseInt(_["number-columns-repeated"],10)),y.t){case"boolean":y.t="b",y.v=Zr(_["boolean-value"]);break;case"float":y.t="n",y.v=parseFloat(_.value);break;case"percentage":y.t="n",y.v=parseFloat(_.value);break;case"currency":y.t="n",y.v=parseFloat(_.value);break;case"date":y.t="d",y.v=ta(_["date-value"]),r.cellDates||(y.t="n",y.v=Ba(y.v)),y.z="m/d/yy";break;case"time":y.t="n",y.v=RYe(_["time-value"])/86400,r.cellDates&&(y.t="d",y.v=Ey(y.v)),y.z="HH:MM:SS";break;case"number":y.t="n",y.v=parseFloat(_.数据数值);break;default:if(y.t==="string"||y.t==="text"||!y.t)y.t="s",_["string-value"]!=null&&(S=yr(_["string-value"]),T=[]);else throw new Error("Unsupported value type "+y.t)}}else{if(Z=!1,y.t==="s"&&(y.v=S||"",T.length&&(y.R=T),Z=C==0),z.Target&&(y.l=z),Q.length>0&&(y.c=Q,Q=[]),S&&r.cellText!==!1&&(y.w=S),Z&&(y.t="z",delete y.v),(!Z||r.sheetStubs)&&!(r.sheetRows&&r.sheetRows<=A))for(var pe=0;pe<W;++pe){if(D=parseInt(_["number-columns-repeated"]||"1",10),r.dense)for(b[A+pe]||(b[A+pe]=[]),b[A+pe][k]=pe==0?y:ca(y);--D>0;)b[A+pe][k+D]=ca(y);else for(b[Wt({r:A+pe,c:k})]=y;--D>0;)b[Wt({r:A+pe,c:k+D})]=ca(y);N.e.c<=k&&(N.e.c=k)}D=parseInt(_["number-columns-repeated"]||"1",10),k+=D-1,D=0,y={},S="",T=[]}z={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if(v[1]==="/"){if((i=a.pop())[0]!==v[3])throw"Bad state: "+i}else v[0].charAt(v[0].length-2)!=="/"&&a.push([v[3],!0]);break;case"annotation":if(v[1]==="/"){if((i=a.pop())[0]!==v[3])throw"Bad state: "+i;q.t=S,T.length&&(q.R=T),q.a=F,Q.push(q)}else v[0].charAt(v[0].length-2)!=="/"&&a.push([v[3],!1]);F="",V=0,S="",C=0,T=[];break;case"creator":v[1]==="/"?F=n.slice(V,v.index):V=v.index+v[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if(v[1]==="/"){if((i=a.pop())[0]!==v[3])throw"Bad state: "+i}else v[0].charAt(v[0].length-2)!=="/"&&a.push([v[3],!1]);S="",C=0,T=[];break;case"scientific-number":break;case"currency-symbol":break;case"currency-style":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if(v[1]==="/"){if(I[o.name]=l,(i=a.pop())[0]!==v[3])throw"Bad state: "+i}else v[0].charAt(v[0].length-2)!=="/"&&(l="",o=Ut(v[0],!1),a.push([v[3],!0]));break;case"script":break;case"libraries":break;case"automatic-styles":break;case"default-style":case"page-layout":break;case"style":break;case"map":break;case"font-face":break;case"paragraph-properties":break;case"table-properties":break;case"table-column-properties":break;case"table-row-properties":break;case"table-cell-properties":break;case"number":switch(a[a.length-1][0]){case"time-style":case"date-style":s=Ut(v[0],!1),l+=BJ[v[3]][s.style==="long"?1:0];break}break;case"fraction":break;case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(a[a.length-1][0]){case"time-style":case"date-style":s=Ut(v[0],!1),l+=BJ[v[3]][s.style==="long"?1:0];break}break;case"boolean-style":break;case"boolean":break;case"text-style":break;case"text":if(v[0].slice(-2)==="/>")break;if(v[1]==="/")switch(a[a.length-1][0]){case"number-style":case"date-style":case"time-style":l+=n.slice(c,v.index);break}else c=v.index+v[0].length;break;case"named-range":s=Ut(v[0],!1),M=e5(s["cell-range-address"]);var he={Name:s.name,Ref:M[0]+"!"+M[1]};ee&&(he.Sheet=m.length),Y.Names.push(he);break;case"text-content":break;case"text-properties":break;case"embedded-text":break;case"body":case"电子表格":break;case"forms":break;case"table-column":break;case"table-header-rows":break;case"table-rows":break;case"table-column-group":break;case"table-header-columns":break;case"table-columns":break;case"null-date":break;case"graphic-properties":break;case"calculation-settings":break;case"named-expressions":break;case"label-range":break;case"label-ranges":break;case"named-expression":break;case"sort":break;case"sort-by":break;case"sort-groups":break;case"tab":break;case"line-break":break;case"span":break;case"p":case"文本串":if(["master-styles"].indexOf(a[a.length-1][0])>-1)break;if(v[1]==="/"&&(!_||!_["string-value"])){var ke=xat(n.slice(C,v.index));S=(S.length>0?S+`
`:"")+ke[0]}else Ut(v[0],!1),C=v.index+v[0].length;break;case"s":break;case"database-range":if(v[1]==="/")break;try{M=e5(Ut(v[0])["target-range-address"]),p[M[0]]["!autofilter"]={ref:M[1]}}catch{}break;case"date":break;case"object":break;case"title":case"标题":break;case"desc":break;case"binary-data":break;case"table-source":break;case"scenario":break;case"iteration":break;case"content-validations":break;case"content-validation":break;case"help-message":break;case"error-message":break;case"database-ranges":break;case"filter":break;case"filter-and":break;case"filter-or":break;case"filter-condition":break;case"list-level-style-bullet":break;case"list-level-style-number":break;case"list-level-properties":break;case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":break;case"event-listener":break;case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":break;case"config-item":break;case"page-number":break;case"page-count":break;case"time":break;case"cell-range-source":break;case"detective":break;case"operation":break;case"highlighted-range":break;case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":break;case"rect":break;case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":break;case"properties":break;case"property":break;case"a":if(v[1]!=="/"){if(z=Ut(v[0],!1),!z.href)break;z.Target=yr(z.href),delete z.href,z.Target.charAt(0)=="#"&&z.Target.indexOf(".")>-1?(M=e5(z.Target.slice(1)),z.Target="#"+M[0]+"!"+M[1]):z.Target.match(/^\.\.[\\\/]/)&&(z.Target=z.Target.slice(3))}break;case"table-protection":break;case"data-pilot-grand-total":break;case"office-document-common-attrs":break;default:switch(v[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(r.WTF)throw new Error(v)}}var se={Sheets:p,SheetNames:m,Workbook:Y};return r.bookSheets&&delete se.Sheets,se}function zJ(e,t){t=t||{},rs(e,"META-INF/manifest.xml")&&OZe(On(e,"META-INF/manifest.xml"),t);var r=Di(e,"content.xml");if(!r)throw new Error("Missing content.xml in ODS / UOF file");var n=Lde(Vr(r),t);return rs(e,"meta.xml")&&(n.Props=Kue(On(e,"meta.xml"))),n}function jJ(e,t){return Lde(e,t)}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function M8(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function aD(e){return typeof TextDecoder<"u"?new TextDecoder().decode(e):Vr(_d(e))}function iD(e){var t=e.reduce(function(a,i){return a+i.length},0),r=new Uint8Array(t),n=0;return e.forEach(function(a){r.set(a,n),n+=a.length}),r}function qJ(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>>24}function yat(e,t){for(var r=(e[t+15]&127)<<7|e[t+14]>>1,n=e[t+14]&1,a=t+13;a>=t;--a)n=n*256+e[a];return(e[t+15]&128?-n:n)*Math.pow(10,r-6176)}function _m(e,t){var r=t?t[0]:0,n=e[r]&127;e:if(e[r++]>=128&&(n|=(e[r]&127)<<7,e[r++]<128||(n|=(e[r]&127)<<14,e[r++]<128)||(n|=(e[r]&127)<<21,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,28),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,35),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,42),++r,e[r++]<128)))break e;return t&&(t[0]=r),n}function Gn(e){var t=0,r=e[t]&127;e:if(e[t++]>=128){if(r|=(e[t]&127)<<7,e[t++]<128||(r|=(e[t]&127)<<14,e[t++]<128)||(r|=(e[t]&127)<<21,e[t++]<128))break e;r|=(e[t]&127)<<28}return r}function Ea(e){for(var t=[],r=[0];r[0]<e.length;){var n=r[0],a=_m(e,r),i=a&7;a=Math.floor(a/8);var s=0,o;if(a==0)break;switch(i){case 0:{for(var l=r[0];e[r[0]++]>=128;);o=e.slice(l,r[0])}break;case 5:s=4,o=e.slice(r[0],r[0]+s),r[0]+=s;break;case 1:s=8,o=e.slice(r[0],r[0]+s),r[0]+=s;break;case 2:s=_m(e,r),o=e.slice(r[0],r[0]+s),r[0]+=s;break;case 3:case 4:default:throw new Error("PB Type ".concat(i," for Field ").concat(a," at offset ").concat(n))}var c={data:o,type:i};t[a]==null?t[a]=[c]:t[a].push(c)}return t}function D8(e,t){return e?.map(function(r){return t(r.data)})||[]}function _at(e){for(var t,r=[],n=[0];n[0]<e.length;){var a=_m(e,n),i=Ea(e.slice(n[0],n[0]+a));n[0]+=a;var s={id:Gn(i[1][0].data),messages:[]};i[2].forEach(function(o){var l=Ea(o.data),c=Gn(l[3][0].data);s.messages.push({meta:l,data:e.slice(n[0],n[0]+c)}),n[0]+=c}),(t=i[3])!=null&&t[0]&&(s.merge=Gn(i[3][0].data)>>>0>0),r.push(s)}return r}function wat(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var r=[0],n=_m(t,r),a=[];r[0]<t.length;){var i=t[r[0]]&3;if(i==0){var s=t[r[0]++]>>2;if(s<60)++s;else{var o=s-59;s=t[r[0]],o>1&&(s|=t[r[0]+1]<<8),o>2&&(s|=t[r[0]+2]<<16),o>3&&(s|=t[r[0]+3]<<24),s>>>=0,s++,r[0]+=o}a.push(t.slice(r[0],r[0]+s)),r[0]+=s;continue}else{var l=0,c=0;if(i==1?(c=(t[r[0]]>>2&7)+4,l=(t[r[0]++]&224)<<3,l|=t[r[0]++]):(c=(t[r[0]++]>>2)+1,i==2?(l=t[r[0]]|t[r[0]+1]<<8,r[0]+=2):(l=(t[r[0]]|t[r[0]+1]<<8|t[r[0]+2]<<16|t[r[0]+3]<<24)>>>0,r[0]+=4)),a=[iD(a)],l==0)throw new Error("Invalid offset 0");if(l>a[0].length)throw new Error("Invalid offset beyond length");if(c>=l)for(a.push(a[0].slice(-l)),c-=l;c>=a[a.length-1].length;)a.push(a[a.length-1]),c-=a[a.length-1].length;a.push(a[0].slice(-l,-l+c))}}var u=iD(a);if(u.length!=n)throw new Error("Unexpected length: ".concat(u.length," != ").concat(n));return u}function Eat(e){for(var t=[],r=0;r<e.length;){var n=e[r++],a=e[r]|e[r+1]<<8|e[r+2]<<16;r+=3,t.push(wat(n,e.slice(r,r+a))),r+=a}if(r!==e.length)throw new Error("data is not a valid framed stream!");return iD(t)}function Sat(e,t,r,n){var a=M8(e),i=a.getUint32(4,!0),s=(n>1?12:8)+qJ(i&(n>1?3470:398))*4,o=-1,l=-1,c=NaN,u=new Date(2001,0,1);i&512&&(o=a.getUint32(s,!0),s+=4),s+=qJ(i&(n>1?12288:4096))*4,i&16&&(l=a.getUint32(s,!0),s+=4),i&32&&(c=a.getFloat64(s,!0),s+=8),i&64&&(u.setTime(u.getTime()+a.getFloat64(s,!0)*1e3),s+=8);var f;switch(e[2]){case 0:break;case 2:f={t:"n",v:c};break;case 3:f={t:"s",v:t[l]};break;case 5:f={t:"d",v:u};break;case 6:f={t:"b",v:c>0};break;case 7:f={t:"n",v:c/86400};break;case 8:f={t:"e",v:0};break;case 9:if(o>-1)f={t:"s",v:r[o]};else if(l>-1)f={t:"s",v:t[l]};else if(!isNaN(c))f={t:"n",v:c};else throw new Error("Unsupported cell type ".concat(e.slice(0,4)));break;default:throw new Error("Unsupported cell type ".concat(e.slice(0,4)))}return f}function Cat(e,t,r){var n=M8(e),a=n.getUint32(8,!0),i=12,s=-1,o=-1,l=NaN,c=NaN,u=new Date(2001,0,1);a&1&&(l=yat(e,i),i+=16),a&2&&(c=n.getFloat64(i,!0),i+=8),a&4&&(u.setTime(u.getTime()+n.getFloat64(i,!0)*1e3),i+=8),a&8&&(o=n.getUint32(i,!0),i+=4),a&16&&(s=n.getUint32(i,!0),i+=4);var f;switch(e[1]){case 0:break;case 2:f={t:"n",v:l};break;case 3:f={t:"s",v:t[o]};break;case 5:f={t:"d",v:u};break;case 6:f={t:"b",v:c>0};break;case 7:f={t:"n",v:c/86400};break;case 8:f={t:"e",v:0};break;case 9:if(s>-1)f={t:"s",v:r[s]};else throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(a&31," : ").concat(e.slice(0,4)));break;case 10:f={t:"n",v:l};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(a&31," : ").concat(e.slice(0,4)))}return f}function Tat(e,t,r){switch(e[0]){case 0:case 1:case 2:case 3:return Sat(e,t,r,e[0]);case 5:return Cat(e,t,r);default:throw new Error("Unsupported payload version ".concat(e[0]))}}function zc(e){var t=Ea(e);return _m(t[1][0].data)}function UJ(e,t){var r=Ea(t.data),n=Gn(r[1][0].data),a=r[3],i=[];return(a||[]).forEach(function(s){var o=Ea(s.data),l=Gn(o[1][0].data)>>>0;switch(n){case 1:i[l]=aD(o[3][0].data);break;case 8:{var c=e[zc(o[9][0].data)][0],u=Ea(c.data),f=e[zc(u[1][0].data)][0],p=Gn(f.meta[1][0].data);if(p!=2001)throw new Error("2000 unexpected reference to ".concat(p));var m=Ea(f.data);i[l]=m[3].map(function(b){return aD(b.data)}).join("")}break}}),i}function Aat(e,t){var r,n,a,i,s,o,l,c,u,f,p,m,b,v,y=Ea(e),_=Gn(y[1][0].data)>>>0,S=Gn(y[2][0].data)>>>0,C=((n=(r=y[8])==null?void 0:r[0])==null?void 0:n.data)&&Gn(y[8][0].data)>0||!1,T,A;if((i=(a=y[7])==null?void 0:a[0])!=null&&i.data&&t!=0)T=(o=(s=y[7])==null?void 0:s[0])==null?void 0:o.data,A=(c=(l=y[6])==null?void 0:l[0])==null?void 0:c.data;else if((f=(u=y[4])==null?void 0:u[0])!=null&&f.data&&t!=1)T=(m=(p=y[4])==null?void 0:p[0])==null?void 0:m.data,A=(v=(b=y[3])==null?void 0:b[0])==null?void 0:v.data;else throw"NUMBERS Tile missing ".concat(t," cell storage");for(var k=C?4:1,N=M8(T),L=[],I=0;I<T.length/2;++I){var P=N.getUint16(I*2,!0);P<65535&&L.push([I,P])}if(L.length!=S)throw"Expected ".concat(S," cells, found ").concat(L.length);var H=[];for(I=0;I<L.length-1;++I)H[L[I][0]]=A.subarray(L[I][1]*k,L[I+1][1]*k);return L.length>=1&&(H[L[L.length-1][0]]=A.subarray(L[L.length-1][1]*k)),{R:_,cells:H}}function kat(e,t){var r,n=Ea(t.data),a=(r=n?.[7])!=null&&r[0]?Gn(n[7][0].data)>>>0>0?1:0:-1,i=D8(n[5],function(s){return Aat(s,a)});return{nrows:Gn(n[4][0].data)>>>0,data:i.reduce(function(s,o){return s[o.R]||(s[o.R]=[]),o.cells.forEach(function(l,c){if(s[o.R][c])throw new Error("Duplicate cell r=".concat(o.R," c=").concat(c));s[o.R][c]=l}),s},[])}}function Nat(e,t,r){var n,a=Ea(t.data),i={s:{r:0,c:0},e:{r:0,c:0}};if(i.e.r=(Gn(a[6][0].data)>>>0)-1,i.e.r<0)throw new Error("Invalid row varint ".concat(a[6][0].data));if(i.e.c=(Gn(a[7][0].data)>>>0)-1,i.e.c<0)throw new Error("Invalid col varint ".concat(a[7][0].data));r["!ref"]=xr(i);var s=Ea(a[4][0].data),o=UJ(e,e[zc(s[4][0].data)][0]),l=(n=s[17])!=null&&n[0]?UJ(e,e[zc(s[17][0].data)][0]):[],c=Ea(s[3][0].data),u=0;c[1].forEach(function(f){var p=Ea(f.data),m=e[zc(p[2][0].data)][0],b=Gn(m.meta[1][0].data);if(b!=6002)throw new Error("6001 unexpected reference to ".concat(b));var v=kat(e,m);v.data.forEach(function(y,_){y.forEach(function(S,C){var T=Wt({r:u+_,c:C}),A=Tat(S,o,l);A&&(r[T]=A)})}),u+=v.nrows})}function Rat(e,t){var r=Ea(t.data),n={"!ref":"A1"},a=e[zc(r[2][0].data)],i=Gn(a[0].meta[1][0].data);if(i!=6001)throw new Error("6000 unexpected reference to ".concat(i));return Nat(e,a[0],n),n}function Mat(e,t){var r,n=Ea(t.data),a={name:(r=n[1])!=null&&r[0]?aD(n[1][0].data):"",sheets:[]},i=D8(n[2],zc);return i.forEach(function(s){e[s].forEach(function(o){var l=Gn(o.meta[1][0].data);l==6e3&&a.sheets.push(Rat(e,o))})}),a}function Dat(e,t){var r=L8(),n=Ea(t.data),a=D8(n[1],zc);if(a.forEach(function(i){e[i].forEach(function(s){var o=Gn(s.meta[1][0].data);if(o==2){var l=Mat(e,s);l.sheets.forEach(function(c,u){P8(r,c,u==0?l.name:l.name+"_"+u,!0)})}})}),r.SheetNames.length==0)throw new Error("Empty NUMBERS file");return r}function r5(e){var t,r,n,a,i={},s=[];if(e.FullPaths.forEach(function(l){if(l.match(/\.iwpv2/))throw new Error("Unsupported password protection")}),e.FileIndex.forEach(function(l){if(l.name.match(/\.iwa$/)){var c;try{c=Eat(l.content)}catch(f){return console.log("?? "+l.content.length+" "+(f.message||f))}var u;try{u=_at(c)}catch(f){return console.log("## "+(f.message||f))}u.forEach(function(f){i[f.id]=f.messages,s.push(f.id)})}}),!s.length)throw new Error("File has no messages");var o=((a=(n=(r=(t=i?.[1])==null?void 0:t[0])==null?void 0:r.meta)==null?void 0:n[1])==null?void 0:a[0].data)&&Gn(i[1][0].meta[1][0].data)==1&&i[1][0];if(o||s.forEach(function(l){i[l].forEach(function(c){var u=Gn(c.meta[1][0].data)>>>0;if(u==1)if(!o)o=c;else throw new Error("Document has multiple roots")})}),!o)throw new Error("Cannot find Document root");return Dat(i,o)}function Oat(e){return function(r){for(var n=0;n!=e.length;++n){var a=e[n];r[a[0]]===void 0&&(r[a[0]]=a[1]),a[2]==="n"&&(r[a[0]]=Number(r[a[0]]))}}}function O8(e){Oat([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(e)}function Iat(e){return Df.WS.indexOf(e)>-1?"sheet":e==Df.CS?"chart":e==Df.DS?"dialog":e==Df.MS?"macro":e&&e.length?e:"sheet"}function Lat(e,t){if(!e)return 0;try{e=t.map(function(n){return n.id||(n.id=n.strRelID),[n.name,e["!id"][n.id].Target,Iat(e["!id"][n.id].Type)]})}catch{return null}return!e||e.length===0?null:e}function Pat(e,t,r,n,a,i,s,o,l,c,u,f){try{i[n]=Pp(Di(e,r,!0),t);var p=On(e,t),m;switch(o){case"sheet":m=Unt(p,t,a,l,i[n],c,u,f);break;case"chart":if(m=$nt(p,t,a,l,i[n],c,u,f),!m||!m["!drawel"])break;var b=bp(m["!drawel"].Target,t),v=J6(b),y=qet(Di(e,b,!0),Pp(Di(e,v,!0),b)),_=bp(y,b),S=J6(_);m=Cnt(Di(e,_,!0),_,l,Pp(Di(e,S,!0),_),c,m);break;case"macro":m=Hnt(p,t,a,l,i[n],c,u,f);break;case"dialog":m=Gnt(p,t,a,l,i[n],c,u,f);break;default:throw new Error("Unrecognized sheet type "+o)}s[n]=m;var C=[];i&&i[n]&&Mo(i[n]).forEach(function(T){var A="";if(i[n][T].Type==Df.CMNT){A=bp(i[n][T].Target,t);var k=Xnt(On(e,A,!0),A,l);if(!k||!k.length)return;AJ(m,k,!1)}i[n][T].Type==Df.TCMNT&&(A=bp(i[n][T].Target,t),C=C.concat($et(On(e,A,!0),l)))}),C&&C.length&&AJ(m,C,!0,l.people||[])}catch(T){if(l.WTF)throw T}}function Ji(e){return e.charAt(0)=="/"?e.slice(1):e}function Fat(e,t){if(xue(),t=t||{},O8(t),rs(e,"META-INF/manifest.xml")||rs(e,"objectdata.xml"))return zJ(e,t);if(rs(e,"Index/Document.iwa")){if(typeof Uint8Array>"u")throw new Error("NUMBERS file parsing requires Uint8Array support");if(typeof r5<"u"){if(e.FileIndex)return r5(e);var r=br.utils.cfb_new();return eJ(e).forEach(function(j){PYe(r,j,LYe(e,j))}),r5(r)}throw new Error("Unsupported NUMBERS file")}if(!rs(e,"[Content_Types].xml"))throw rs(e,"index.xml.gz")?new Error("Unsupported NUMBERS 08 file"):rs(e,"index.xml")?new Error("Unsupported NUMBERS 09 file"):new Error("Unsupported ZIP file");var n=eJ(e),a=MZe(Di(e,"[Content_Types].xml")),i=!1,s,o;if(a.workbooks.length===0&&(o="xl/workbook.xml",On(e,o,!0)&&a.workbooks.push(o)),a.workbooks.length===0){if(o="xl/workbook.bin",!On(e,o,!0))throw new Error("Could not find workbook");a.workbooks.push(o),i=!0}a.workbooks[0].slice(-3)=="bin"&&(i=!0);var l={},c={};if(!t.bookSheets&&!t.bookProps){if(zp=[],a.sst)try{zp=Knt(On(e,Ji(a.sst)),a.sst,t)}catch(j){if(t.WTF)throw j}t.cellStyles&&a.themes.length&&(l=Wnt(Di(e,a.themes[0].replace(/^\//,""),!0)||"",a.themes[0],t)),a.style&&(c=Vnt(On(e,Ji(a.style)),a.style,l,t))}a.links.map(function(j){try{var W=Pp(Di(e,J6(Ji(j))),j);return Znt(On(e,Ji(j)),W,j,t)}catch{}});var u=qnt(On(e,Ji(a.workbooks[0])),a.workbooks[0],t),f={},p="";a.coreprops.length&&(p=On(e,Ji(a.coreprops[0]),!0),p&&(f=Kue(p)),a.extprops.length!==0&&(p=On(e,Ji(a.extprops[0]),!0),p&&PZe(p,f,t)));var m={};(!t.bookSheets||t.bookProps)&&a.custprops.length!==0&&(p=Di(e,Ji(a.custprops[0]),!0),p&&(m=BZe(p,t)));var b={};if((t.bookSheets||t.bookProps)&&(u.Sheets?s=u.Sheets.map(function(W){return W.name}):f.Worksheets&&f.SheetNames.length>0&&(s=f.SheetNames),t.bookProps&&(b.Props=f,b.Custprops=m),t.bookSheets&&typeof s<"u"&&(b.SheetNames=s),t.bookSheets?b.SheetNames:t.bookProps))return b;s={};var v={};t.bookDeps&&a.calcchain&&(v=Ynt(On(e,Ji(a.calcchain)),a.calcchain));var y=0,_={},S,C;{var T=u.Sheets;f.Worksheets=T.length,f.SheetNames=[];for(var A=0;A!=T.length;++A)f.SheetNames[A]=T[A].name}var k=i?"bin":"xml",N=a.workbooks[0].lastIndexOf("/"),L=(a.workbooks[0].slice(0,N+1)+"_rels/"+a.workbooks[0].slice(N+1)+".rels").replace(/^\//,"");rs(e,L)||(L="xl/_rels/workbook."+k+".rels");var I=Pp(Di(e,L,!0),L.replace(/_rels.*/,"s5s"));(a.metadata||[]).length>=1&&(t.xlmeta=Qnt(On(e,Ji(a.metadata[0])),a.metadata[0],t)),(a.people||[]).length>=1&&(t.people=Het(On(e,Ji(a.people[0])),t)),I&&(I=Lat(I,u.Sheets));var P=On(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(y=0;y!=f.Worksheets;++y){var H="sheet";if(I&&I[y]?(S="xl/"+I[y][1].replace(/[\/]?xl\//,""),rs(e,S)||(S=I[y][1]),rs(e,S)||(S=L.replace(/_rels\/.*$/,"")+I[y][1]),H=I[y][2]):(S="xl/worksheets/sheet"+(y+1-P)+"."+k,S=S.replace(/sheet0\./,"sheet.")),C=S.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),t&&t.sheets!=null)switch(typeof t.sheets){case"number":if(y!=t.sheets)continue e;break;case"string":if(f.SheetNames[y].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var B=!1,K=0;K!=t.sheets.length;++K)typeof t.sheets[K]=="number"&&t.sheets[K]==y&&(B=1),typeof t.sheets[K]=="string"&&t.sheets[K].toLowerCase()==f.SheetNames[y].toLowerCase()&&(B=1);if(!B)continue e}}Pat(e,S,C,f.SheetNames[y],y,_,s,H,t,u,l,c)}return b={Directory:a,Workbook:u,Props:f,Custprops:m,Deps:v,Sheets:s,SheetNames:f.SheetNames,Strings:zp,Styles:c,Themes:l,SSF:ca(Yt)},t&&t.bookFiles&&(e.files?(b.keys=n,b.files=e.files):(b.keys=[],b.files={},e.FullPaths.forEach(function(j,W){j=j.replace(/^Root Entry[\/]/,""),b.keys.push(j),b.files[j]=e.FileIndex[W]}))),t&&t.bookVBA&&(a.vba.length>0?b.vbaraw=On(e,Ji(a.vba[0]),!0):a.defaults&&a.defaults.bin===Ket&&(b.vbaraw=On(e,"xl/vbaProject.bin",!0))),b}function Bat(e,t){var r=t||{},n="Workbook",a=br.find(e,n);try{if(n="/!DataSpaces/Version",a=br.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);if(kJe(a.content),n="/!DataSpaces/DataSpaceMap",a=br.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var i=RJe(a.content);if(i.length!==1||i[0].comps.length!==1||i[0].comps[0].t!==0||i[0].name!=="StrongEncryptionDataSpace"||i[0].comps[0].v!=="EncryptedPackage")throw new Error("ECMA-376 Encrypted file bad "+n);if(n="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",a=br.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var s=MJe(a.content);if(s.length!=1||s[0]!="StrongEncryptionTransform")throw new Error("ECMA-376 Encrypted file bad "+n);if(n="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",a=br.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);OJe(a.content)}catch{}if(n="/EncryptionInfo",a=br.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var o=IJe(a.content);if(n="/EncryptedPackage",a=br.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);if(o[0]==4&&typeof decrypt_agile<"u")return decrypt_agile(o[1],a.content,r.password||"",r);if(o[0]==2&&typeof decrypt_std76<"u")return decrypt_std76(o[1],a.content,r.password||"",r);throw new Error("File is password-protected")}function I8(e,t){var r="";switch((t||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":r=zi(e.slice(0,12));break;case"binary":r=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function zat(e,t){return br.find(e,"EncryptedPackage")?Bat(e,t):Dde(e,t)}function jat(e,t){var r,n=e,a=t||{};return a.type||(a.type=gr&&Buffer.isBuffer(e)?"buffer":"base64"),r=Cue(n,a),Fat(r,a)}function Pde(e,t){var r=0;e:for(;r<e.length;)switch(e.charCodeAt(r)){case 10:case 13:case 32:++r;break;case 60:return rD(e.slice(r),t);default:break e}return bm.to_workbook(e,t)}function qat(e,t){var r="",n=I8(e,t);switch(t.type){case"base64":r=zi(e);break;case"binary":r=e;break;case"buffer":r=e.toString("binary");break;case"array":r=id(e);break;default:throw new Error("Unrecognized type "+t.type)}return n[0]==239&&n[1]==187&&n[2]==191&&(r=Vr(r)),t.type="binary",Pde(r,t)}function Uat(e,t){var r=e;return t.type=="base64"&&(r=zi(r)),r=pm.utils.decode(1200,r.slice(2),"str"),t.type="binary",Pde(r,t)}function $at(e){return e.match(/[^\x00-\x7F]/)?xp(e):e}function n5(e,t,r,n){return n?(r.type="string",bm.to_workbook(e,r)):bm.to_workbook(t,r)}function sD(e,t){oue();var r=t||{};if(typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer)return sD(new Uint8Array(e),(r=ca(r),r.type="array",r));typeof Uint8Array<"u"&&e instanceof Uint8Array&&!r.type&&(r.type=typeof Deno<"u"?"buffer":"array");var n=e,a=[0,0,0,0],i=!1;if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),Wf={},r.dateNF&&(Wf.dateNF=r.dateNF),r.type||(r.type=gr&&Buffer.isBuffer(e)?"buffer":"base64"),r.type=="file"&&(r.type=gr?"buffer":"binary",n=kYe(e),typeof Uint8Array<"u"&&!gr&&(r.type="array")),r.type=="string"&&(i=!0,r.type="binary",r.codepage=65001,n=$at(e)),r.type=="array"&&typeof Uint8Array<"u"&&e instanceof Uint8Array&&typeof ArrayBuffer<"u"){var s=new ArrayBuffer(3),o=new Uint8Array(s);if(o.foo="bar",!o.foo)return r=ca(r),r.type="array",sD(f8(n),r)}switch((a=I8(n,r))[0]){case 208:if(a[1]===207&&a[2]===17&&a[3]===224&&a[4]===161&&a[5]===177&&a[6]===26&&a[7]===225)return zat(br.read(n,r),r);break;case 9:if(a[1]<=8)return Dde(n,r);break;case 60:return rD(n,r);case 73:if(a[1]===73&&a[2]===42&&a[3]===0)throw new Error("TIFF Image File is not a spreadsheet");if(a[1]===68)return mJe(n,r);break;case 84:if(a[1]===65&&a[2]===66&&a[3]===76)return hJe.to_workbook(n,r);break;case 80:return a[1]===75&&a[2]<9&&a[3]<9?jat(n,r):n5(e,n,r,i);case 239:return a[3]===60?rD(n,r):n5(e,n,r,i);case 255:if(a[1]===254)return Uat(n,r);if(a[1]===0&&a[2]===2&&a[3]===0)return Bp.to_workbook(n,r);break;case 0:if(a[1]===0&&(a[2]>=2&&a[3]===0||a[2]===0&&(a[3]===8||a[3]===9)))return Bp.to_workbook(n,r);break;case 3:case 131:case 139:case 140:return TJ.to_workbook(n,r);case 123:if(a[1]===92&&a[2]===114&&a[3]===116)return VJe.to_workbook(n,r);break;case 10:case 13:case 32:return qat(n,r);case 137:if(a[1]===80&&a[2]===78&&a[3]===71)throw new Error("PNG Image File is not a spreadsheet");break}return dJe.indexOf(a[0])>-1&&a[2]<=12&&a[3]<=31?TJ.to_workbook(n,r):n5(e,n,r,i)}function Hat(e,t,r,n,a,i,s,o){var l=ua(r),c=o.defval,u=o.raw||!Object.prototype.hasOwnProperty.call(o,"raw"),f=!0,p=a===1?[]:{};if(a!==1)if(Object.defineProperty)try{Object.defineProperty(p,"__rowNum__",{value:r,enumerable:!1})}catch{p.__rowNum__=r}else p.__rowNum__=r;if(!s||e[r])for(var m=t.s.c;m<=t.e.c;++m){var b=s?e[r][m]:e[n[m]+l];if(b===void 0||b.t===void 0){if(c===void 0)continue;i[m]!=null&&(p[i[m]]=c);continue}var v=b.v;switch(b.t){case"z":if(v==null)break;continue;case"e":v=v==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+b.t)}if(i[m]!=null){if(v==null)if(b.t=="e"&&v===null)p[i[m]]=null;else if(c!==void 0)p[i[m]]=c;else if(u&&v===null)p[i[m]]=null;else continue;else p[i[m]]=u&&(b.t!=="n"||b.t==="n"&&o.rawNumbers!==!1)?v:Pl(b,v,o);v!=null&&(f=!1)}}return{row:p,isempty:f}}function oD(e,t){if(e==null||e["!ref"]==null)return[];var r={t:"n",v:0},n=0,a=1,i=[],s=0,o="",l={s:{r:0,c:0},e:{r:0,c:0}},c=t||{},u=c.range!=null?c.range:e["!ref"];switch(c.header===1?n=1:c.header==="A"?n=2:Array.isArray(c.header)?n=3:c.header==null&&(n=0),typeof u){case"string":l=gn(u);break;case"number":l=gn(e["!ref"]),l.s.r=u;break;default:l=u}n>0&&(a=0);var f=ua(l.s.r),p=[],m=[],b=0,v=0,y=Array.isArray(e),_=l.s.r,S=0,C={};y&&!e[_]&&(e[_]=[]);var T=c.skipHidden&&e["!cols"]||[],A=c.skipHidden&&e["!rows"]||[];for(S=l.s.c;S<=l.e.c;++S)if(!(T[S]||{}).hidden)switch(p[S]=Hn(S),r=y?e[_][S]:e[p[S]+f],n){case 1:i[S]=S-l.s.c;break;case 2:i[S]=p[S];break;case 3:i[S]=c.header[S-l.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),o=s=Pl(r,null,c),v=C[s]||0,!v)C[s]=1;else{do o=s+"_"+v++;while(C[o]);C[s]=v,C[o]=1}i[S]=o}for(_=l.s.r+a;_<=l.e.r;++_)if(!(A[_]||{}).hidden){var k=Hat(e,l,_,p,n,i,y,c);(k.isempty===!1||(n===1?c.blankrows!==!1:c.blankrows))&&(m[b++]=k.row)}return m.length=b,m}var $J=/"/g;function Gat(e,t,r,n,a,i,s,o){for(var l=!0,c=[],u="",f=ua(r),p=t.s.c;p<=t.e.c;++p)if(n[p]){var m=o.dense?(e[r]||[])[p]:e[n[p]+f];if(m==null)u="";else if(m.v!=null){l=!1,u=""+(o.rawNumbers&&m.t=="n"?m.v:Pl(m,null,o));for(var b=0,v=0;b!==u.length;++b)if((v=u.charCodeAt(b))===a||v===i||v===34||o.forceQuotes){u='"'+u.replace($J,'""')+'"';break}u=="ID"&&(u='"ID"')}else m.f!=null&&!m.F?(l=!1,u="="+m.f,u.indexOf(",")>=0&&(u='"'+u.replace($J,'""')+'"')):u="";c.push(u)}return o.blankrows===!1&&l?null:c.join(s)}function Fde(e,t){var r=[],n=t??{};if(e==null||e["!ref"]==null)return"";var a=gn(e["!ref"]),i=n.FS!==void 0?n.FS:",",s=i.charCodeAt(0),o=n.RS!==void 0?n.RS:`
`,l=o.charCodeAt(0),c=new RegExp((i=="|"?"\\|":i)+"+$"),u="",f=[];n.dense=Array.isArray(e);for(var p=n.skipHidden&&e["!cols"]||[],m=n.skipHidden&&e["!rows"]||[],b=a.s.c;b<=a.e.c;++b)(p[b]||{}).hidden||(f[b]=Hn(b));for(var v=0,y=a.s.r;y<=a.e.r;++y)(m[y]||{}).hidden||(u=Gat(e,a,y,f,s,l,i,n),u!=null&&(n.strip&&(u=u.replace(c,"")),(u||n.blankrows!==!1)&&r.push((v++?o:"")+u)));return delete n.dense,r.join("")}function Vat(e,t){t||(t={}),t.FS="	",t.RS=`
`;var r=Fde(e,t);return r}function Wat(e){var t="",r,n="";if(e==null||e["!ref"]==null)return[];var a=gn(e["!ref"]),i="",s=[],o,l=[],c=Array.isArray(e);for(o=a.s.c;o<=a.e.c;++o)s[o]=Hn(o);for(var u=a.s.r;u<=a.e.r;++u)for(i=ua(u),o=a.s.c;o<=a.e.c;++o)if(t=s[o]+i,r=c?(e[u]||[])[o]:e[t],n="",r!==void 0){if(r.F!=null){if(t=r.F,!r.f)continue;n=r.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}l[l.length]=t+"="+n}return l}function Bde(e,t,r){var n=r||{},a=+!n.skipHeader,i=e||{},s=0,o=0;if(i&&n.origin!=null)if(typeof n.origin=="number")s=n.origin;else{var l=typeof n.origin=="string"?La(n.origin):n.origin;s=l.r,o=l.c}var c,u={s:{c:0,r:0},e:{c:o,r:s+t.length-1+a}};if(i["!ref"]){var f=gn(i["!ref"]);u.e.c=Math.max(u.e.c,f.e.c),u.e.r=Math.max(u.e.r,f.e.r),s==-1&&(s=f.e.r+1,u.e.r=s+t.length-1+a)}else s==-1&&(s=0,u.e.r=t.length-1+a);var p=n.header||[],m=0;t.forEach(function(v,y){Mo(v).forEach(function(_){(m=p.indexOf(_))==-1&&(p[m=p.length]=_);var S=v[_],C="z",T="",A=Wt({c:o+m,r:s+y+a});c=wm(i,A),S&&typeof S=="object"&&!(S instanceof Date)?i[A]=S:(typeof S=="number"?C="n":typeof S=="boolean"?C="b":typeof S=="string"?C="s":S instanceof Date?(C="d",n.cellDates||(C="n",S=Ba(S)),T=n.dateNF||Yt[14]):S===null&&n.nullError&&(C="e",S=0),c?(c.t=C,c.v=S,delete c.w,delete c.R,T&&(c.z=T)):i[A]=c={t:C,v:S},T&&(c.z=T))})}),u.e.c=Math.max(u.e.c,o+p.length-1);var b=ua(s);if(a)for(m=0;m<p.length;++m)i[Hn(m+o)+b]={t:"s",v:p[m]};return i["!ref"]=xr(u),i}function Kat(e,t){return Bde(null,e,t)}function wm(e,t,r){if(typeof t=="string"){if(Array.isArray(e)){var n=La(t);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?wm(e,Wt(t)):wm(e,Wt({r:t,c:r||0}))}function Xat(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var r=e.SheetNames.indexOf(t);if(r>-1)return r;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function L8(){return{SheetNames:[],Sheets:{}}}function P8(e,t,r,n){var a=1;if(!r)for(;a<=65535&&e.SheetNames.indexOf(r="Sheet"+a)!=-1;++a,r=void 0);if(!r||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(r)>=0){var i=r.match(/(^.*?)(\d+)$/);a=i&&+i[2]||0;var s=i&&i[1]||r;for(++a;a<=65535&&e.SheetNames.indexOf(r=s+a)!=-1;++a);}if(Ont(r),e.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return e.SheetNames.push(r),e.Sheets[r]=t,r}function Yat(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=Xat(e,t);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}e.Workbook.Sheets[n].Hidden=r}function Zat(e,t){return e.z=t,e}function zde(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}function Qat(e,t,r){return zde(e,"#"+t,r)}function Jat(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})}function eit(e,t,r,n){for(var a=typeof t!="string"?t:gn(t),i=typeof t=="string"?t:xr(t),s=a.s.r;s<=a.e.r;++s)for(var o=a.s.c;o<=a.e.c;++o){var l=wm(e,s,o);l.t="n",l.F=i,delete l.v,s==a.s.r&&o==a.s.c&&(l.f=r,n&&(l.D=!0))}return e}var a5={encode_col:Hn,encode_row:ua,encode_cell:Wt,encode_range:xr,decode_col:_8,decode_row:y8,split_cell:uZe,decode_cell:La,decode_range:F0,format_cell:Pl,sheet_add_aoa:$ue,sheet_add_json:Bde,sheet_add_dom:Ode,aoa_to_sheet:B0,json_to_sheet:Kat,table_to_sheet:Ide,table_to_book:vat,sheet_to_csv:Fde,sheet_to_txt:Vat,sheet_to_json:oD,sheet_to_html:gat,sheet_to_formulae:Wat,sheet_to_row_object_array:oD,sheet_get_cell:wm,book_new:L8,book_append_sheet:P8,book_set_sheet_visibility:Yat,cell_set_number_format:Zat,cell_set_hyperlink:zde,cell_set_internal_link:Qat,cell_add_comment:Jat,sheet_set_array_formula:eit,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const tit=({blobUrl:e,currentPage:t,setCurrentPage:r})=>{const[n,a]=E.useState({}),[i,s]=E.useState([]),[o,l]=E.useState(""),[c,u]=E.useState(!0),[f,p]=E.useState(null),[m,b]=E.useState(0),[v,y]=E.useState(!1),[_,S]=E.useState({}),C=100,T=5*1024*1024,A=20*1024*1024,k=E.useCallback(async(W,D)=>{try{const U={type:"array",cellDates:!0,cellNF:!1,cellStyles:!1};D<=T&&(U.cellStyles=!0,U.cellNF=!0);const Y=sD(new Uint8Array(W),U),z={},M={};y(D>T),Y.SheetNames.forEach(Q=>{const q=Y.Sheets[Q],F=a5.decode_range(q["!ref"]||"A1");if(M[Q]=F.e.r+1,D>T){const Z={s:{r:0,c:0},e:{r:Math.min(1e3,F.e.r),c:F.e.c}};q["!ref"]=a5.encode_range(Z)}const V=a5.sheet_to_json(q,{header:1});z[Q]=V}),a(z),s(Y.SheetNames),S(M),l(Y.SheetNames[0]),p(null)}catch(U){console.error("Error processing Excel file:",U),p("Failed to process Excel file")}finally{u(!1)}},[T]);E.useEffect(()=>{e&&((async D=>{try{u(!0),p(null);const Y=await(await fetch(D)).blob();if(Y.size>A){p(`File too large (${(Y.size/1048576).toFixed(1)}MB). Maximum size is ${A/1048576}MB.`),u(!1);return}const z=await Y.arrayBuffer();await k(z,Y.size)}catch(U){console.error("Error fetching Excel file:",U),p(`Failed to load Excel file: ${U.message}`),u(!1)}})(e),b(0))},[e,k,A]),E.useEffect(()=>{b(0)},[o]),E.useEffect(()=>{t!==m+1&&b(Math.max(0,t-1))},[t,m]);const N=n[o]||[],L=N.length>0?N.length-1:0,I=Math.ceil(L/C),P=()=>{b(0),r(1)},H=()=>{const W=Math.max(0,m-1);b(W),r(W+1)},B=()=>{const W=Math.min(I-1,m+1);b(W),r(W+1)},K=()=>{const W=I-1;b(W),r(W+1)},j=N.length>0?[N[0],...N.slice(1+m*C,1+(m+1)*C)]:[];return e?c?g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center p-8 h-full text-gray-500",children:[g.jsx(jc,{className:"animate-spin size-8"}),g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"font-medium",children:"Loading Excel Data"}),g.jsx("p",{className:"text-sm",children:"Please wait while the spreadsheet loads..."})]})]}):f?g.jsx("div",{className:"flex flex-col gap-4 justify-center items-center p-8 h-full text-red-500",children:g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"font-medium",children:"Error Loading Excel"}),g.jsx("p",{className:"text-sm",children:f})]})}):g.jsxs("div",{className:"flex flex-col w-full text-sm",children:[g.jsx("div",{className:"flex overflow-x-auto border-b border-gray-200 bg-background",children:i.map(W=>g.jsxs("button",{onClick:()=>l(W),className:`px-4 py-2 text-sm whitespace-nowrap border-b-2 transition-colors ${o===W?"border-brand-500 text-brand-500 font-medium":"border-transparent text-gray-600 hover:text-gray-900 hover:bg-gray-50"}`,children:[W,_[W]&&g.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[_[W]," rows"]})]},W))}),g.jsx("div",{className:"overflow-auto flex-1 p-4 scrollbar-hide",children:N.length>0?g.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-200 shadow-xs bg-background",children:g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[g.jsx("thead",{className:"sticky top-0 bg-gray-50",children:j.length>0&&g.jsx("tr",{children:j[0].map((W,D)=>g.jsx("th",{className:"px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-500 uppercase",children:W!==void 0?String(W):""},D))})}),g.jsx("tbody",{className:"divide-y divide-gray-200 bg-background",children:j.slice(1).map((W,D)=>g.jsx("tr",{className:"transition-colors hover:bg-gray-50",children:W.map((U,Y)=>g.jsx("td",{className:"px-6 py-4 text-sm text-gray-500 whitespace-nowrap",children:U!==void 0?String(U):""},Y))},D))})]})})}):g.jsx("div",{className:"flex justify-center items-center h-full",children:g.jsx("div",{className:"text-gray-500",children:"No data available"})})}),L>C&&g.jsxs("div",{className:"flex justify-between items-center p-4 border-t border-gray-200 bg-background",children:[g.jsxs("div",{className:"text-sm text-gray-500",children:["Showing rows ",m*C+1," to"," ",Math.min((m+1)*C,L)," of"," ",v?`${L}+ (Preview only)`:L]}),g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsx(Ou,{"aria-label":"First page",variant:"outline",onClick:P,disabled:m===0,children:g.jsx(Rge,{size:16})}),g.jsx(Ou,{"aria-label":"Previous page",variant:"outline",onClick:H,disabled:m===0,children:g.jsx(wD,{size:16})}),g.jsxs("span",{className:"mx-2 text-sm",children:["Page ",m+1," of ",I]}),g.jsx(Ou,{"aria-label":"Next page",variant:"outline",onClick:B,disabled:m===I-1,children:g.jsx(nx,{size:16})}),g.jsx(Ou,{"aria-label":"Last page",variant:"outline",onClick:K,disabled:m===I-1,children:g.jsx(Dge,{size:16})})]})]})]}):g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center p-8 h-full text-gray-500",children:[g.jsx(jc,{className:"animate-spin size-8"}),g.jsx("div",{className:"text-center",children:g.jsx("p",{className:"font-medium",children:"Preparing Excel..."})})]})},rit=({content:e})=>{const[t,r]=E.useState("");return E.useEffect(()=>{const n=async a=>{try{const s=await(await fetch(a)).text();r(s)}catch{r("Failed to load text file")}};e&&e.startsWith("blob:")?n(e):r(e||"")},[e]),g.jsx("div",{className:"flex overflow-auto flex-col text-sm bg-background scrollbar-hide",onClick:n=>n.stopPropagation(),children:g.jsx("div",{className:"overflow-scroll flex-1 p-4 scrollbar-hide",children:g.jsx(zx,{children:t})})})},nit=({file:e})=>{const[t,r]=E.useState(""),[n,a]=E.useState(!1),[i,s]=E.useState(null);return E.useEffect(()=>{const o=async()=>{a(!0),s(null);try{let u;typeof e=="string"?u=await(await fetch(e)).arrayBuffer():u=await e.arrayBuffer();const p=await(await Wne(()=>import("./index-BbWNBezz.js").then(m=>m.i),[])).convertToHtml({arrayBuffer:u});r(p.value)}catch(u){console.error("Failed to load document",u),s("Failed to load document")}finally{a(!1)}},l=async()=>{a(!0),s(null);try{s("Document preview not supported")}finally{a(!1)}};if(!e){r(""),s(null);return}let c="";typeof e=="string"?c=e:"name"in e&&(c=e.name),c.endsWith(".docx")?o():c.endsWith(".doc")?l():s("Unsupported file type")},[e]),n?g.jsx("div",{className:"p-4 text-gray-500",children:"Loading document preview..."}):i?g.jsx("div",{className:"p-4 text-red-500",children:i}):t?g.jsx("div",{className:"overflow-auto p-4 scrollbar-hide",children:g.jsx("div",{className:"max-w-none text-sm prose",dangerouslySetInnerHTML:{__html:t}})}):null},ait=({currentPage:e,totalPages:t,onBack:r,onNext:n,isDisabled:a=!1})=>g.jsxs("div",{className:"flex gap-2 justify-center items-center",children:[g.jsx(Ou,{"aria-label":"Previous",variant:"secondary",size:"sm",className:"flex gap-1 items-center text-gray-700 border-none",onClick:r,disabled:a||e<=1,children:g.jsx(wD,{className:"w-4 h-4"})}),g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsx("span",{className:"flex justify-center items-center text-sm text-gray-700 rounded-md border border-gray-200 size-8",children:e}),g.jsx("span",{className:"text-sm text-gray-700",children:"of"}),g.jsx("span",{className:"text-sm text-gray-700",children:t})]}),g.jsx(Ou,{"aria-label":"Next",variant:"secondary",size:"sm",className:"flex gap-1 items-center text-gray-700 border-none",onClick:n,disabled:a||e>=t,children:g.jsx(nx,{className:"w-4 h-4"})})]}),jde=e=>{const{deepExtract:t,error:r}=wy(),n=async(s=!0,o)=>{e?.id&&await t(e.id,s,o)},a=s=>{n(!0,s)},i=()=>{n(!0)};return{isDeepExtracting:e?.status==="extracting",isDeepExtracted:e?.is_deep_extracted||!1,deepExtractedDocuments:e?.documents||[],deepExtractionError:r,handleDeepExtractWithPrompt:a,handleDeepExtractWithoutPrompt:i}},iit=(e,t)=>{const[r,n]=E.useState(!1),[a,i]=E.useState(e?.documents||[]),[s,o]=E.useState(a[t-1]?.page_content||a[t-1]?.text||"");return E.useEffect(()=>{const f=e?.documents?.[t-1],p=f?.page_content||f?.text||"";console.log("[useDocumentEditing] selectedFile:",e),console.log("[useDocumentEditing] currentPage:",t),console.log("[useDocumentEditing] currentDoc:",f),console.log("[useDocumentEditing] newValue:",p),console.log("[useDocumentEditing] newValue length:",p?.length),o(p)},[e,t]),{isEditing:r,value:s,setValue:o,handleSave:()=>{const f=[...a];f[t-1]={...f[t-1],page_content:s,text:s},i(f),e?.id&&console.log("Document content updated:",f),n(!1)},handleEdit:()=>{n(!0)},handleCancel:()=>{const f=e?.documents?.[t-1];o(f?.page_content||f?.text||""),n(!1)}}},sit=e=>{const[t,r]=E.useState(null),[n,a]=E.useState(!1),[i,s]=E.useState(null),o=E.useRef(null),l=c=>{if(c)try{a(!0),s(null);const u=URL.createObjectURL(c);r(u),a(!1)}catch(u){console.error("Error creating blob URL:",u),s("Failed to load file"),a(!1)}};return E.useEffect(()=>(e&&e!==o.current&&(t&&(URL.revokeObjectURL(t),r(null)),l(e),o.current=e),()=>{t&&URL.revokeObjectURL(t)}),[e,t]),{blobUrl:t,loading:n,error:i}},oit=e=>e.split(".").pop()?.toLowerCase()||"",qde=e=>{const t=oit(e);return{isPdf:t==="pdf",isExcel:t==="xlsx"||t==="xls"||t==="csv",isText:t==="txt",isDocx:t==="docx"||t==="doc",isImage:t==="png"||t==="jpg"||t==="jpeg",extension:t}},lit=e=>{const{isPdf:t,isText:r,isDocx:n,isImage:a}=qde(e);return t||r||n||a},cit=({isDeepExtracted:e,isDeepExtracting:t,showPromptInput:r,onDeepExtractWithPrompt:n,onDeepExtractWithoutPrompt:a,isEditing:i,onEdit:s,onSave:o})=>!e&&!r?g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsx(mt,{variant:"secondary",size:"sm",className:"text-gray-700",onClick:a,disabled:t,leftSection:t&&g.jsx(Jf,{className:"animate-spin size-4"}),children:t?"Extracting...":"Deep Extract"}),!t&&(i?g.jsx(mt,{variant:"secondary",size:"sm",className:"text-gray-700",onClick:o,children:"Save"}):g.jsx(mt,{variant:"secondary",size:"sm",className:"text-gray-700",leftSection:g.jsx(w2,{}),onClick:s,children:"Edit"}))]}):r&&!e?g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsx(mt,{leftSection:t&&g.jsx(Jf,{className:"animate-spin size-4"}),disabled:t,onClick:n,variant:"secondary",size:"sm",className:"text-gray-700",children:t?"Extraction in progress...":"Start Extract"}),!t&&(i?g.jsx(mt,{variant:"secondary",size:"sm",className:"text-gray-700",onClick:o,children:"Save"}):g.jsx(mt,{variant:"secondary",size:"sm",className:"text-gray-700",leftSection:g.jsx(w2,{}),onClick:s,children:"Edit"}))]}):e?g.jsx("div",{className:"flex gap-2 items-center",children:!t&&(i?g.jsx(mt,{variant:"secondary",size:"sm",className:"text-gray-700",onClick:o,children:"Save"}):g.jsx(mt,{variant:"secondary",size:"sm",className:"text-gray-700",leftSection:g.jsx(w2,{}),onClick:s,children:"Edit"}))}):null,uit=({value:e,onChange:t,placeholder:r="Start writing in markdown...",className:n="",height:a="400px"})=>{const[i,s]=E.useState(!1),o=E.useRef(null),l=u=>{const f=o.current;if(!f)return;const p=f.selectionStart,b=e.substring(0,p).lastIndexOf(`
`)+1,v=e.substring(0,b)+u+e.substring(b);t(v),setTimeout(()=>{const y=p+u.length;f.setSelectionRange(y,y),f.focus()},0)},c={h1:()=>l("# "),h2:()=>l("## "),h3:()=>l("### ")};return g.jsxs("div",{className:`flex overflow-hidden flex-col rounded-lg border border-gray-200 dark:border-gray-700 bg-background dark:bg-gray-900 ${n}`,children:[g.jsxs("div",{className:"flex flex-wrap gap-1 items-center p-3 bg-gray-50 border-b border-gray-200 dark:border-gray-700 dark:bg-gray-800",children:[g.jsx("button",{onClick:c.h1,className:"flex justify-center items-center w-8 h-8 text-gray-600 rounded transition-colors dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700",title:"Heading 1 (# )",type:"button",children:g.jsx(Qge,{size:16})}),g.jsx("button",{onClick:c.h2,className:"flex justify-center items-center w-8 h-8 text-gray-600 rounded transition-colors dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700",title:"Heading 2 (## )",type:"button",children:g.jsx(eve,{size:16})}),g.jsx("button",{onClick:c.h3,className:"flex justify-center items-center w-8 h-8 text-gray-600 rounded transition-colors dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700",title:"Heading 3 (### )",type:"button",children:g.jsx(rve,{size:16})}),g.jsx("div",{className:"w-px h-6 bg-gray-300 dark:bg-gray-600"}),g.jsx("button",{onClick:()=>s(!i),className:`flex items-center justify-center w-8 h-8 transition-colors rounded ${i?"bg-brand-100 text-brand-700 dark:bg-brand-800 dark:text-brand-200":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700"}`,title:i?"Edit Mode":"Preview Mode",type:"button",children:i?g.jsx(Uge,{size:16}):g.jsx(Bee,{size:16})})]}),g.jsx("div",{className:"overflow-hidden flex-1",style:{height:a},children:i?g.jsx("div",{className:"overflow-y-auto p-4 h-full",children:g.jsx(zx,{children:e})}):g.jsx("textarea",{ref:o,value:e,onChange:u=>t(u.target.value),placeholder:r,className:"p-4 w-full h-full font-mono text-sm bg-transparent border-none outline-none resize-none",style:{minHeight:a}})}),g.jsx("div",{className:"px-4 py-2 text-xs text-gray-500 bg-gray-50 border-t border-gray-200 dark:border-gray-700 dark:text-gray-400 dark:bg-gray-800",children:i?"Preview Mode":`${e.length} characters | ${e.split(`
`).length} lines`})]})},dit=({text:e})=>g.jsx("div",{className:"flex overflow-y-auto w-full min-w-full h-full transition-opacity duration-500 scrollbar-hide",children:g.jsx(zx,{children:e||"No content available"})},e?e.slice(0,16):"empty"),fit=({isEditing:e,value:t,setValue:r,isUploading:n,isDeepExtracting:a})=>(console.log("[DocumentEditor] value:",t),console.log("[DocumentEditor] value length:",t?.length),console.log("[DocumentEditor] value preview:",t?.substring(0,200)),console.log("[DocumentEditor] isEditing:",e),console.log("[DocumentEditor] isUploading:",n),console.log("[DocumentEditor] isDeepExtracting:",a),g.jsxs("div",{className:"flex flex-col w-full h-full",children:[(n||a)&&g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx(n2,{className:"w-[300px] h-4 rounded-full"}),g.jsx(n2,{className:"w-[250px] h-4 rounded-full"}),g.jsx(n2,{className:"w-[200px] h-4 rounded-full"}),g.jsxs("div",{className:"flex gap-2 items-center mt-2",children:[g.jsx(Jf,{className:"animate-spin size-4"}),g.jsx("span",{className:"text-sm text-gray-600",children:n?"Uploading file...":"Extracting content..."})]})]}),!a&&!n&&(e?g.jsx("div",{className:"flex flex-col w-full h-full",children:g.jsx(uit,{value:t,onChange:r})}):g.jsx(dit,{text:t}))]})),Ay=E.createContext(null);Ay.displayName="PanelGroupContext";const fn={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},F8=10,Vu=E.useLayoutEffect,HJ=cD.useId,hit=typeof HJ=="function"?HJ:()=>null;let pit=0;function B8(e=null){const t=hit(),r=E.useRef(e||t||null);return r.current===null&&(r.current=""+pit++),e??r.current}function Ude({children:e,className:t="",collapsedSize:r,collapsible:n,defaultSize:a,forwardedRef:i,id:s,maxSize:o,minSize:l,onCollapse:c,onExpand:u,onResize:f,order:p,style:m,tagName:b="div",...v}){const y=E.useContext(Ay);if(y===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:_,expandPanel:S,getPanelSize:C,getPanelStyle:T,groupId:A,isPanelCollapsed:k,reevaluatePanelConstraints:N,registerPanel:L,resizePanel:I,unregisterPanel:P}=y,H=B8(s),B=E.useRef({callbacks:{onCollapse:c,onExpand:u,onResize:f},constraints:{collapsedSize:r,collapsible:n,defaultSize:a,maxSize:o,minSize:l},id:H,idIsFromProps:s!==void 0,order:p});E.useRef({didLogMissingDefaultSizeWarning:!1}),Vu(()=>{const{callbacks:j,constraints:W}=B.current,D={...W};B.current.id=H,B.current.idIsFromProps=s!==void 0,B.current.order=p,j.onCollapse=c,j.onExpand=u,j.onResize=f,W.collapsedSize=r,W.collapsible=n,W.defaultSize=a,W.maxSize=o,W.minSize=l,(D.collapsedSize!==W.collapsedSize||D.collapsible!==W.collapsible||D.maxSize!==W.maxSize||D.minSize!==W.minSize)&&N(B.current,D)}),Vu(()=>{const j=B.current;return L(j),()=>{P(j)}},[p,H,L,P]),E.useImperativeHandle(i,()=>({collapse:()=>{_(B.current)},expand:j=>{S(B.current,j)},getId(){return H},getSize(){return C(B.current)},isCollapsed(){return k(B.current)},isExpanded(){return!k(B.current)},resize:j=>{I(B.current,j)}}),[_,S,C,k,H,I]);const K=T(B.current,a);return E.createElement(b,{...v,children:e,className:t,id:H,style:{...K,...m},[fn.groupId]:A,[fn.panel]:"",[fn.panelCollapsible]:n||void 0,[fn.panelId]:H,[fn.panelSize]:parseFloat(""+K.flexGrow).toFixed(1)})}const $de=E.forwardRef((e,t)=>E.createElement(Ude,{...e,forwardedRef:t}));Ude.displayName="Panel";$de.displayName="forwardRef(Panel)";let lD=null,rb=-1,Ac=null;function mit(e,t,r){const n=(t&Kde)!==0,a=(t&Xde)!==0,i=(t&Yde)!==0,s=(t&Zde)!==0;if(t){if(n)return i?"se-resize":s?"ne-resize":"e-resize";if(a)return i?"sw-resize":s?"nw-resize":"w-resize";if(i)return"s-resize";if(s)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function git(){Ac!==null&&(document.head.removeChild(Ac),lD=null,Ac=null,rb=-1)}function i5(e,t,r){var n,a;const i=mit(e,t);if(lD!==i){if(lD=i,Ac===null&&(Ac=document.createElement("style"),document.head.appendChild(Ac)),rb>=0){var s;(s=Ac.sheet)===null||s===void 0||s.removeRule(rb)}rb=(n=(a=Ac.sheet)===null||a===void 0?void 0:a.insertRule(`*{cursor: ${i} !important;}`))!==null&&n!==void 0?n:-1}}function Hde(e){return e.type==="keydown"}function Gde(e){return e.type.startsWith("pointer")}function Vde(e){return e.type.startsWith("mouse")}function ky(e){if(Gde(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(Vde(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function vit(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function bit(e,t,r){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function xit(e,t){if(e===t)throw new Error("Cannot compare node with itself");const r={a:WJ(e),b:WJ(t)};let n;for(;r.a.at(-1)===r.b.at(-1);)e=r.a.pop(),t=r.b.pop(),n=e;tr(n,"Stacking order can only be calculated for elements with a common ancestor");const a={a:VJ(GJ(r.a)),b:VJ(GJ(r.b))};if(a.a===a.b){const i=n.childNodes,s={a:r.a.at(-1),b:r.b.at(-1)};let o=i.length;for(;o--;){const l=i[o];if(l===s.a)return 1;if(l===s.b)return-1}}return Math.sign(a.a-a.b)}const yit=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function _it(e){var t;const r=getComputedStyle((t=Wde(e))!==null&&t!==void 0?t:e).display;return r==="flex"||r==="inline-flex"}function wit(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||_it(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||yit.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function GJ(e){let t=e.length;for(;t--;){const r=e[t];if(tr(r,"Missing node"),wit(r))return r}return null}function VJ(e){return e&&Number(getComputedStyle(e).zIndex)||0}function WJ(e){const t=[];for(;e;)t.push(e),e=Wde(e);return t}function Wde(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const Kde=1,Xde=2,Yde=4,Zde=8,Eit=vit()==="coarse";let js=[],Kf=!1,kc=new Map,Ny=new Map;const Em=new Set;function Sit(e,t,r,n,a){var i;const{ownerDocument:s}=t,o={direction:r,element:t,hitAreaMargins:n,setResizeHandlerState:a},l=(i=kc.get(s))!==null&&i!==void 0?i:0;return kc.set(s,l+1),Em.add(o),Yb(),function(){var u;Ny.delete(e),Em.delete(o);const f=(u=kc.get(s))!==null&&u!==void 0?u:1;if(kc.set(s,f-1),Yb(),f===1&&kc.delete(s),js.includes(o)){const p=js.indexOf(o);p>=0&&js.splice(p,1),Ry(),a("up",!0,null)}}}function Cit(e){const{target:t}=e,{x:r,y:n}=ky(e);Kf=!0,z8({target:t,x:r,y:n}),Yb(),js.length>0&&(Zb("down",e),Ry(),e.preventDefault(),Qde(t)||e.stopImmediatePropagation())}function s5(e){const{x:t,y:r}=ky(e);if(Kf&&e.buttons===0&&(Kf=!1,Zb("up",e)),!Kf){const{target:n}=e;z8({target:n,x:t,y:r})}Zb("move",e),Ry(),js.length>0&&e.preventDefault()}function o5(e){const{target:t}=e,{x:r,y:n}=ky(e);Ny.clear(),Kf=!1,js.length>0&&(e.preventDefault(),Qde(t)||e.stopImmediatePropagation()),Zb("up",e),z8({target:t,x:r,y:n}),Ry(),Yb()}function Qde(e){let t=e;for(;t;){if(t.hasAttribute(fn.resizeHandle))return!0;t=t.parentElement}return!1}function z8({target:e,x:t,y:r}){js.splice(0);let n=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(n=e),Em.forEach(a=>{const{element:i,hitAreaMargins:s}=a,o=i.getBoundingClientRect(),{bottom:l,left:c,right:u,top:f}=o,p=Eit?s.coarse:s.fine;if(t>=c-p&&t<=u+p&&r>=f-p&&r<=l+p){if(n!==null&&document.contains(n)&&i!==n&&!i.contains(n)&&!n.contains(i)&&xit(n,i)>0){let b=n,v=!1;for(;b&&!b.contains(i);){if(bit(b.getBoundingClientRect(),o)){v=!0;break}b=b.parentElement}if(v)return}js.push(a)}})}function l5(e,t){Ny.set(e,t)}function Ry(){let e=!1,t=!1;js.forEach(n=>{const{direction:a}=n;a==="horizontal"?e=!0:t=!0});let r=0;Ny.forEach(n=>{r|=n}),e&&t?i5("intersection",r):e?i5("horizontal",r):t?i5("vertical",r):git()}let c5;function Yb(){var e;(e=c5)===null||e===void 0||e.abort(),c5=new AbortController;const t={capture:!0,signal:c5.signal};Em.size&&(Kf?(js.length>0&&kc.forEach((r,n)=>{const{body:a}=n;r>0&&(a.addEventListener("contextmenu",o5,t),a.addEventListener("pointerleave",s5,t),a.addEventListener("pointermove",s5,t))}),kc.forEach((r,n)=>{const{body:a}=n;a.addEventListener("pointerup",o5,t),a.addEventListener("pointercancel",o5,t)})):kc.forEach((r,n)=>{const{body:a}=n;r>0&&(a.addEventListener("pointerdown",Cit,t),a.addEventListener("pointermove",s5,t))}))}function Zb(e,t){Em.forEach(r=>{const{setResizeHandlerState:n}=r,a=js.includes(r);n(e,a,t)})}function Tit(){const[e,t]=E.useState(0);return E.useCallback(()=>t(r=>r+1),[])}function tr(e,t){if(!e)throw console.error(t),Error(t)}function od(e,t,r=F8){return e.toFixed(r)===t.toFixed(r)?0:e>t?1:-1}function ml(e,t,r=F8){return od(e,t,r)===0}function Si(e,t,r){return od(e,t,r)===0}function Ait(e,t,r){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){const a=e[n],i=t[n];if(!Si(a,i,r))return!1}return!0}function Of({panelConstraints:e,panelIndex:t,size:r}){const n=e[t];tr(n!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:a=0,collapsible:i,maxSize:s=100,minSize:o=0}=n;if(od(r,o)<0)if(i){const l=(a+o)/2;od(r,l)<0?r=a:r=o}else r=o;return r=Math.min(s,r),r=parseFloat(r.toFixed(F8)),r}function yp({delta:e,initialLayout:t,panelConstraints:r,pivotIndices:n,prevLayout:a,trigger:i}){if(Si(e,0))return t;const s=[...t],[o,l]=n;tr(o!=null,"Invalid first pivot index"),tr(l!=null,"Invalid second pivot index");let c=0;if(i==="keyboard"){{const f=e<0?l:o,p=r[f];tr(p,`Panel constraints not found for index ${f}`);const{collapsedSize:m=0,collapsible:b,minSize:v=0}=p;if(b){const y=t[f];if(tr(y!=null,`Previous layout not found for panel index ${f}`),Si(y,m)){const _=v-y;od(_,Math.abs(e))>0&&(e=e<0?0-_:_)}}}{const f=e<0?o:l,p=r[f];tr(p,`No panel constraints found for index ${f}`);const{collapsedSize:m=0,collapsible:b,minSize:v=0}=p;if(b){const y=t[f];if(tr(y!=null,`Previous layout not found for panel index ${f}`),Si(y,v)){const _=y-m;od(_,Math.abs(e))>0&&(e=e<0?0-_:_)}}}}{const f=e<0?1:-1;let p=e<0?l:o,m=0;for(;;){const v=t[p];tr(v!=null,`Previous layout not found for panel index ${p}`);const _=Of({panelConstraints:r,panelIndex:p,size:100})-v;if(m+=_,p+=f,p<0||p>=r.length)break}const b=Math.min(Math.abs(e),Math.abs(m));e=e<0?0-b:b}{let p=e<0?o:l;for(;p>=0&&p<r.length;){const m=Math.abs(e)-Math.abs(c),b=t[p];tr(b!=null,`Previous layout not found for panel index ${p}`);const v=b-m,y=Of({panelConstraints:r,panelIndex:p,size:v});if(!Si(b,y)&&(c+=b-y,s[p]=y,c.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?p--:p++}}if(Ait(a,s))return a;{const f=e<0?l:o,p=t[f];tr(p!=null,`Previous layout not found for panel index ${f}`);const m=p+c,b=Of({panelConstraints:r,panelIndex:f,size:m});if(s[f]=b,!Si(b,m)){let v=m-b,_=e<0?l:o;for(;_>=0&&_<r.length;){const S=s[_];tr(S!=null,`Previous layout not found for panel index ${_}`);const C=S+v,T=Of({panelConstraints:r,panelIndex:_,size:C});if(Si(S,T)||(v-=T-S,s[_]=T),Si(v,0))break;e>0?_--:_++}}}const u=s.reduce((f,p)=>p+f,0);return Si(u,100)?s:a}function kit({layout:e,panelsArray:t,pivotIndices:r}){let n=0,a=100,i=0,s=0;const o=r[0];tr(o!=null,"No pivot index found"),t.forEach((f,p)=>{const{constraints:m}=f,{maxSize:b=100,minSize:v=0}=m;p===o?(n=v,a=b):(i+=v,s+=b)});const l=Math.min(a,100-i),c=Math.max(n,100-s),u=e[o];return{valueMax:l,valueMin:c,valueNow:u}}function Sm(e,t=document){return Array.from(t.querySelectorAll(`[${fn.resizeHandleId}][data-panel-group-id="${e}"]`))}function Jde(e,t,r=document){const a=Sm(e,r).findIndex(i=>i.getAttribute(fn.resizeHandleId)===t);return a??null}function efe(e,t,r){const n=Jde(e,t,r);return n!=null?[n,n+1]:[-1,-1]}function Nit(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function tfe(e,t=document){if(Nit(t)&&t.dataset.panelGroupId==e)return t;const r=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function My(e,t=document){const r=t.querySelector(`[${fn.resizeHandleId}="${e}"]`);return r||null}function Rit(e,t,r,n=document){var a,i,s,o;const l=My(t,n),c=Sm(e,n),u=l?c.indexOf(l):-1,f=(a=(i=r[u])===null||i===void 0?void 0:i.id)!==null&&a!==void 0?a:null,p=(s=(o=r[u+1])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null;return[f,p]}function Mit({committedValuesRef:e,eagerValuesRef:t,groupId:r,layout:n,panelDataArray:a,panelGroupElement:i,setLayout:s}){E.useRef({didWarnAboutMissingResizeHandle:!1}),Vu(()=>{if(!i)return;const o=Sm(r,i);for(let l=0;l<a.length-1;l++){const{valueMax:c,valueMin:u,valueNow:f}=kit({layout:n,panelsArray:a,pivotIndices:[l,l+1]}),p=o[l];if(p!=null){const m=a[l];tr(m,`No panel data found for index "${l}"`),p.setAttribute("aria-controls",m.id),p.setAttribute("aria-valuemax",""+Math.round(c)),p.setAttribute("aria-valuemin",""+Math.round(u)),p.setAttribute("aria-valuenow",f!=null?""+Math.round(f):"")}}return()=>{o.forEach((l,c)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[r,n,a,i]),E.useEffect(()=>{if(!i)return;const o=t.current;tr(o,"Eager values not found");const{panelDataArray:l}=o,c=tfe(r,i);tr(c!=null,`No group found for id "${r}"`);const u=Sm(r,i);tr(u,`No resize handles found for group id "${r}"`);const f=u.map(p=>{const m=p.getAttribute(fn.resizeHandleId);tr(m,"Resize handle element has no handle id attribute");const[b,v]=Rit(r,m,l,i);if(b==null||v==null)return()=>{};const y=_=>{if(!_.defaultPrevented)switch(_.key){case"Enter":{_.preventDefault();const S=l.findIndex(C=>C.id===b);if(S>=0){const C=l[S];tr(C,`No panel data found for index ${S}`);const T=n[S],{collapsedSize:A=0,collapsible:k,minSize:N=0}=C.constraints;if(T!=null&&k){const L=yp({delta:Si(T,A)?N-A:A-T,initialLayout:n,panelConstraints:l.map(I=>I.constraints),pivotIndices:efe(r,m,i),prevLayout:n,trigger:"keyboard"});n!==L&&s(L)}}break}}};return p.addEventListener("keydown",y),()=>{p.removeEventListener("keydown",y)}});return()=>{f.forEach(p=>p())}},[i,e,t,r,n,a,s])}function KJ(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function rfe(e,t){const r=e==="horizontal",{x:n,y:a}=ky(t);return r?n:a}function Dit(e,t,r,n,a){const i=r==="horizontal",s=My(t,a);tr(s,`No resize handle element found for id "${t}"`);const o=s.getAttribute(fn.groupId);tr(o,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=n;const c=rfe(r,e),u=tfe(o,a);tr(u,`No group element found for id "${o}"`);const f=u.getBoundingClientRect(),p=i?f.width:f.height;return(c-l)/p*100}function Oit(e,t,r,n,a,i){if(Hde(e)){const s=r==="horizontal";let o=0;e.shiftKey?o=100:a!=null?o=a:o=10;let l=0;switch(e.key){case"ArrowDown":l=s?0:o;break;case"ArrowLeft":l=s?-o:0;break;case"ArrowRight":l=s?o:0;break;case"ArrowUp":l=s?0:-o;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return n==null?0:Dit(e,t,r,n,i)}function Iit({panelDataArray:e}){const t=Array(e.length),r=e.map(i=>i.constraints);let n=0,a=100;for(let i=0;i<e.length;i++){const s=r[i];tr(s,`Panel constraints not found for index ${i}`);const{defaultSize:o}=s;o!=null&&(n++,t[i]=o,a-=o)}for(let i=0;i<e.length;i++){const s=r[i];tr(s,`Panel constraints not found for index ${i}`);const{defaultSize:o}=s;if(o!=null)continue;const l=e.length-n,c=a/l;n++,t[i]=c,a-=c}return t}function wf(e,t,r){t.forEach((n,a)=>{const i=e[a];tr(i,`Panel data not found for index ${a}`);const{callbacks:s,constraints:o,id:l}=i,{collapsedSize:c=0,collapsible:u}=o,f=r[l];if(f==null||n!==f){r[l]=n;const{onCollapse:p,onExpand:m,onResize:b}=s;b&&b(n,f),u&&(p||m)&&(m&&(f==null||ml(f,c))&&!ml(n,c)&&m(),p&&(f==null||!ml(f,c))&&ml(n,c)&&p())}})}function L1(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}function Lit({defaultSize:e,dragState:t,layout:r,panelData:n,panelIndex:a,precision:i=3}){const s=r[a];let o;return s==null?o=e!=null?e.toPrecision(i):"1":n.length===1?o="1":o=s.toPrecision(i),{flexBasis:0,flexGrow:o,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function Pit(e,t=10){let r=null;return(...a)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...a)},t)}}function XJ(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,r)=>{localStorage.setItem(t,r)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function nfe(e){return`react-resizable-panels:${e}`}function afe(e){return e.map(t=>{const{constraints:r,id:n,idIsFromProps:a,order:i}=t;return a?n:i?`${i}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((t,r)=>t.localeCompare(r)).join(",")}function ife(e,t){try{const r=nfe(e),n=t.getItem(r);if(n){const a=JSON.parse(n);if(typeof a=="object"&&a!=null)return a}}catch{}return null}function Fit(e,t,r){var n,a;const i=(n=ife(e,r))!==null&&n!==void 0?n:{},s=afe(t);return(a=i[s])!==null&&a!==void 0?a:null}function Bit(e,t,r,n,a){var i;const s=nfe(e),o=afe(t),l=(i=ife(e,a))!==null&&i!==void 0?i:{};l[o]={expandToSizes:Object.fromEntries(r.entries()),layout:n};try{a.setItem(s,JSON.stringify(l))}catch(c){console.error(c)}}function YJ({layout:e,panelConstraints:t}){const r=[...e],n=r.reduce((i,s)=>i+s,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(i=>`${i}%`).join(", ")}`);if(!Si(n,100)&&r.length>0)for(let i=0;i<t.length;i++){const s=r[i];tr(s!=null,`No layout data found for index ${i}`);const o=100/n*s;r[i]=o}let a=0;for(let i=0;i<t.length;i++){const s=r[i];tr(s!=null,`No layout data found for index ${i}`);const o=Of({panelConstraints:t,panelIndex:i,size:s});s!=o&&(a+=s-o,r[i]=o)}if(!Si(a,0))for(let i=0;i<t.length;i++){const s=r[i];tr(s!=null,`No layout data found for index ${i}`);const o=s+a,l=Of({panelConstraints:t,panelIndex:i,size:o});if(s!==l&&(a-=l-s,r[i]=l,Si(a,0)))break}return r}const zit=100,_p={getItem:e=>(XJ(_p),_p.getItem(e)),setItem:(e,t)=>{XJ(_p),_p.setItem(e,t)}},ZJ={};function sfe({autoSaveId:e=null,children:t,className:r="",direction:n,forwardedRef:a,id:i=null,onLayout:s=null,keyboardResizeBy:o=null,storage:l=_p,style:c,tagName:u="div",...f}){const p=B8(i),m=E.useRef(null),[b,v]=E.useState(null),[y,_]=E.useState([]),S=Tit(),C=E.useRef({}),T=E.useRef(new Map),A=E.useRef(0),k=E.useRef({autoSaveId:e,direction:n,dragState:b,id:p,keyboardResizeBy:o,onLayout:s,storage:l}),N=E.useRef({layout:y,panelDataArray:[],panelDataArrayChanged:!1});E.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),E.useImperativeHandle(a,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:F}=N.current;return F},setLayout:F=>{const{onLayout:V}=k.current,{layout:Z,panelDataArray:ee}=N.current,te=YJ({layout:F,panelConstraints:ee.map(oe=>oe.constraints)});KJ(Z,te)||(_(te),N.current.layout=te,V&&V(te),wf(ee,te,C.current))}}),[]),Vu(()=>{k.current.autoSaveId=e,k.current.direction=n,k.current.dragState=b,k.current.id=p,k.current.onLayout=s,k.current.storage=l}),Mit({committedValuesRef:k,eagerValuesRef:N,groupId:p,layout:y,panelDataArray:N.current.panelDataArray,setLayout:_,panelGroupElement:m.current}),E.useEffect(()=>{const{panelDataArray:F}=N.current;if(e){if(y.length===0||y.length!==F.length)return;let V=ZJ[e];V==null&&(V=Pit(Bit,zit),ZJ[e]=V);const Z=[...F],ee=new Map(T.current);V(e,Z,ee,y,l)}},[e,y,l]),E.useEffect(()=>{});const L=E.useCallback(F=>{const{onLayout:V}=k.current,{layout:Z,panelDataArray:ee}=N.current;if(F.constraints.collapsible){const te=ee.map(ke=>ke.constraints),{collapsedSize:oe=0,panelSize:pe,pivotIndices:he}=ku(ee,F,Z);if(tr(pe!=null,`Panel size not found for panel "${F.id}"`),!ml(pe,oe)){T.current.set(F.id,pe);const se=Af(ee,F)===ee.length-1?pe-oe:oe-pe,qe=yp({delta:se,initialLayout:Z,panelConstraints:te,pivotIndices:he,prevLayout:Z,trigger:"imperative-api"});L1(Z,qe)||(_(qe),N.current.layout=qe,V&&V(qe),wf(ee,qe,C.current))}}},[]),I=E.useCallback((F,V)=>{const{onLayout:Z}=k.current,{layout:ee,panelDataArray:te}=N.current;if(F.constraints.collapsible){const oe=te.map($e=>$e.constraints),{collapsedSize:pe=0,panelSize:he=0,minSize:ke=0,pivotIndices:se}=ku(te,F,ee),qe=V??ke;if(ml(he,pe)){const $e=T.current.get(F.id),Pe=$e!=null&&$e>=qe?$e:qe,xe=Af(te,F)===te.length-1?he-Pe:Pe-he,ve=yp({delta:xe,initialLayout:ee,panelConstraints:oe,pivotIndices:se,prevLayout:ee,trigger:"imperative-api"});L1(ee,ve)||(_(ve),N.current.layout=ve,Z&&Z(ve),wf(te,ve,C.current))}}},[]),P=E.useCallback(F=>{const{layout:V,panelDataArray:Z}=N.current,{panelSize:ee}=ku(Z,F,V);return tr(ee!=null,`Panel size not found for panel "${F.id}"`),ee},[]),H=E.useCallback((F,V)=>{const{panelDataArray:Z}=N.current,ee=Af(Z,F);return Lit({defaultSize:V,dragState:b,layout:y,panelData:Z,panelIndex:ee})},[b,y]),B=E.useCallback(F=>{const{layout:V,panelDataArray:Z}=N.current,{collapsedSize:ee=0,collapsible:te,panelSize:oe}=ku(Z,F,V);return tr(oe!=null,`Panel size not found for panel "${F.id}"`),te===!0&&ml(oe,ee)},[]),K=E.useCallback(F=>{const{layout:V,panelDataArray:Z}=N.current,{collapsedSize:ee=0,collapsible:te,panelSize:oe}=ku(Z,F,V);return tr(oe!=null,`Panel size not found for panel "${F.id}"`),!te||od(oe,ee)>0},[]),j=E.useCallback(F=>{const{panelDataArray:V}=N.current;V.push(F),V.sort((Z,ee)=>{const te=Z.order,oe=ee.order;return te==null&&oe==null?0:te==null?-1:oe==null?1:te-oe}),N.current.panelDataArrayChanged=!0,S()},[S]);Vu(()=>{if(N.current.panelDataArrayChanged){N.current.panelDataArrayChanged=!1;const{autoSaveId:F,onLayout:V,storage:Z}=k.current,{layout:ee,panelDataArray:te}=N.current;let oe=null;if(F){const he=Fit(F,te,Z);he&&(T.current=new Map(Object.entries(he.expandToSizes)),oe=he.layout)}oe==null&&(oe=Iit({panelDataArray:te}));const pe=YJ({layout:oe,panelConstraints:te.map(he=>he.constraints)});KJ(ee,pe)||(_(pe),N.current.layout=pe,V&&V(pe),wf(te,pe,C.current))}}),Vu(()=>{const F=N.current;return()=>{F.layout=[]}},[]);const W=E.useCallback(F=>{let V=!1;const Z=m.current;return Z&&window.getComputedStyle(Z,null).getPropertyValue("direction")==="rtl"&&(V=!0),function(te){te.preventDefault();const oe=m.current;if(!oe)return()=>null;const{direction:pe,dragState:he,id:ke,keyboardResizeBy:se,onLayout:qe}=k.current,{layout:$e,panelDataArray:Pe}=N.current,{initialLayout:Ce}=he??{},xe=efe(ke,F,oe);let ve=Oit(te,F,pe,he,se,oe);const Ne=pe==="horizontal";Ne&&V&&(ve=-ve);const Ue=Pe.map(De=>De.constraints),Le=yp({delta:ve,initialLayout:Ce??$e,panelConstraints:Ue,pivotIndices:xe,prevLayout:$e,trigger:Hde(te)?"keyboard":"mouse-or-touch"}),Ye=!L1($e,Le);(Gde(te)||Vde(te))&&A.current!=ve&&(A.current=ve,!Ye&&ve!==0?Ne?l5(F,ve<0?Kde:Xde):l5(F,ve<0?Yde:Zde):l5(F,0)),Ye&&(_(Le),N.current.layout=Le,qe&&qe(Le),wf(Pe,Le,C.current))}},[]),D=E.useCallback((F,V)=>{const{onLayout:Z}=k.current,{layout:ee,panelDataArray:te}=N.current,oe=te.map($e=>$e.constraints),{panelSize:pe,pivotIndices:he}=ku(te,F,ee);tr(pe!=null,`Panel size not found for panel "${F.id}"`);const se=Af(te,F)===te.length-1?pe-V:V-pe,qe=yp({delta:se,initialLayout:ee,panelConstraints:oe,pivotIndices:he,prevLayout:ee,trigger:"imperative-api"});L1(ee,qe)||(_(qe),N.current.layout=qe,Z&&Z(qe),wf(te,qe,C.current))},[]),U=E.useCallback((F,V)=>{const{layout:Z,panelDataArray:ee}=N.current,{collapsedSize:te=0,collapsible:oe}=V,{collapsedSize:pe=0,collapsible:he,maxSize:ke=100,minSize:se=0}=F.constraints,{panelSize:qe}=ku(ee,F,Z);qe!=null&&(oe&&he&&ml(qe,te)?ml(te,pe)||D(F,pe):qe<se?D(F,se):qe>ke&&D(F,ke))},[D]),Y=E.useCallback((F,V)=>{const{direction:Z}=k.current,{layout:ee}=N.current;if(!m.current)return;const te=My(F,m.current);tr(te,`Drag handle element not found for id "${F}"`);const oe=rfe(Z,V);v({dragHandleId:F,dragHandleRect:te.getBoundingClientRect(),initialCursorPosition:oe,initialLayout:ee})},[]),z=E.useCallback(()=>{v(null)},[]),M=E.useCallback(F=>{const{panelDataArray:V}=N.current,Z=Af(V,F);Z>=0&&(V.splice(Z,1),delete C.current[F.id],N.current.panelDataArrayChanged=!0,S())},[S]),Q=E.useMemo(()=>({collapsePanel:L,direction:n,dragState:b,expandPanel:I,getPanelSize:P,getPanelStyle:H,groupId:p,isPanelCollapsed:B,isPanelExpanded:K,reevaluatePanelConstraints:U,registerPanel:j,registerResizeHandle:W,resizePanel:D,startDragging:Y,stopDragging:z,unregisterPanel:M,panelGroupElement:m.current}),[L,b,n,I,P,H,p,B,K,U,j,W,D,Y,z,M]),q={display:"flex",flexDirection:n==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return E.createElement(Ay.Provider,{value:Q},E.createElement(u,{...f,children:t,className:r,id:i,ref:m,style:{...q,...c},[fn.group]:"",[fn.groupDirection]:n,[fn.groupId]:p}))}const ofe=E.forwardRef((e,t)=>E.createElement(sfe,{...e,forwardedRef:t}));sfe.displayName="PanelGroup";ofe.displayName="forwardRef(PanelGroup)";function Af(e,t){return e.findIndex(r=>r===t||r.id===t.id)}function ku(e,t,r){const n=Af(e,t),i=n===e.length-1?[n-1,n]:[n,n+1],s=r[n];return{...t.constraints,panelSize:s,pivotIndices:i}}function jit({disabled:e,handleId:t,resizeHandler:r,panelGroupElement:n}){E.useEffect(()=>{if(e||r==null||n==null)return;const a=My(t,n);if(a==null)return;const i=s=>{if(!s.defaultPrevented)switch(s.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{s.preventDefault(),r(s);break}case"F6":{s.preventDefault();const o=a.getAttribute(fn.groupId);tr(o,`No group element found for id "${o}"`);const l=Sm(o,n),c=Jde(o,t,n);tr(c!==null,`No resize element found for id "${t}"`);const u=s.shiftKey?c>0?c-1:l.length-1:c+1<l.length?c+1:0;l[u].focus();break}}};return a.addEventListener("keydown",i),()=>{a.removeEventListener("keydown",i)}},[n,e,t,r])}function lfe({children:e=null,className:t="",disabled:r=!1,hitAreaMargins:n,id:a,onBlur:i,onClick:s,onDragging:o,onFocus:l,onPointerDown:c,onPointerUp:u,style:f={},tabIndex:p=0,tagName:m="div",...b}){var v,y;const _=E.useRef(null),S=E.useRef({onClick:s,onDragging:o,onPointerDown:c,onPointerUp:u});E.useEffect(()=>{S.current.onClick=s,S.current.onDragging=o,S.current.onPointerDown=c,S.current.onPointerUp=u});const C=E.useContext(Ay);if(C===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:T,groupId:A,registerResizeHandle:k,startDragging:N,stopDragging:L,panelGroupElement:I}=C,P=B8(a),[H,B]=E.useState("inactive"),[K,j]=E.useState(!1),[W,D]=E.useState(null),U=E.useRef({state:H});Vu(()=>{U.current.state=H}),E.useEffect(()=>{if(r)D(null);else{const Q=k(P);D(()=>Q)}},[r,P,k]);const Y=(v=n?.coarse)!==null&&v!==void 0?v:15,z=(y=n?.fine)!==null&&y!==void 0?y:5;E.useEffect(()=>{if(r||W==null)return;const Q=_.current;tr(Q,"Element ref not attached");let q=!1;return Sit(P,Q,T,{coarse:Y,fine:z},(V,Z,ee)=>{if(!Z){B("inactive");return}switch(V){case"down":{B("drag"),q=!1,tr(ee,'Expected event to be defined for "down" action'),N(P,ee);const{onDragging:te,onPointerDown:oe}=S.current;te?.(!0),oe?.();break}case"move":{const{state:te}=U.current;q=!0,te!=="drag"&&B("hover"),tr(ee,'Expected event to be defined for "move" action'),W(ee);break}case"up":{B("hover"),L();const{onClick:te,onDragging:oe,onPointerUp:pe}=S.current;oe?.(!1),pe?.(),q||te?.();break}}})},[Y,T,r,z,k,P,W,N,L]),jit({disabled:r,handleId:P,resizeHandler:W,panelGroupElement:I});const M={touchAction:"none",userSelect:"none"};return E.createElement(m,{...b,children:e,className:t,id:a,onBlur:()=>{j(!1),i?.()},onFocus:()=>{j(!0),l?.()},ref:_,role:"separator",style:{...M,...f},tabIndex:p,[fn.groupDirection]:T,[fn.groupId]:A,[fn.resizeHandle]:"",[fn.resizeHandleActive]:H==="drag"?"pointer":K?"keyboard":void 0,[fn.resizeHandleEnabled]:!r,[fn.resizeHandleId]:P,[fn.resizeHandleState]:H})}lfe.displayName="PanelResizeHandle";const qit=({className:e,...t})=>g.jsx(ofe,{className:ut("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),QJ=$de,Uit=({withHandle:e,className:t,...r})=>g.jsx(lfe,{className:ut("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...r,children:e&&g.jsx("div",{className:"z-10 flex items-center justify-center w-6 ml-[2px] transition-shadow duration-200 border border-gray-200 rounded-md dark:border-gray-300 bg-background h-14 hover:shadow-md",children:g.jsx("div",{className:"w-2 h-12 border-gray-200"})})}),JJ=({blobUrl:e,file:t,isPdf:r,isExcel:n,isText:a,isDocx:i,currentPage:s,setCurrentPage:o,loading:l,error:c})=>l?g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center p-8 h-full text-gray-500",children:[g.jsx(jc,{className:"animate-spin size-8"}),g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"font-medium",children:"Loading Preview"}),g.jsx("p",{className:"text-sm",children:"Preparing file..."})]})]}):c?g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center p-8 h-full",children:[g.jsx(_5,{className:"size-16"}),g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"font-medium",children:"Error Loading File"}),g.jsx("p",{className:"text-sm",children:c})]})]}):e?g.jsx("div",{className:"flex w-full h-full",children:r?g.jsx(ZXe,{blobUrl:e,currentPage:s,setCurrentPage:o}):n?g.jsx(tit,{blobUrl:e,currentPage:s,setCurrentPage:o}):a?g.jsx(rit,{content:e,fileName:t.name}):i?g.jsx(nit,{file:t}):g.jsx("iframe",{src:e,title:`Preview of ${t.name}`,style:{backgroundColor:"white",width:"100%",height:"100%"}})}):g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center p-8 h-full text-gray-500",children:[g.jsx(_5,{className:"size-16"}),g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"font-medium",children:"Preview Not Available"}),g.jsx("p",{className:"text-sm",children:"File type not supported"})]})]}),$it=({selectedFile:e})=>{const[t,r]=E.useState(1),[n,a]=E.useState(!1),{isDeepExtracting:i,isDeepExtracted:s,deepExtractedDocuments:o,handleDeepExtractWithoutPrompt:l}=jde(e),{isEditing:c,value:u,setValue:f,handleSave:p,handleEdit:m}=iit(e,t),{blobUrl:b,loading:v,error:y}=sit(e?.file||null),{error:_}=wy(),S=qde(e?.file?.name||""),C=lit(e?.file?.name||""),T=o?.length>0?o:e?.documents||[],A=()=>r(L=>L>1?L-1:L),k=()=>r(L=>L<(T?.length||0)?L+1:L),N=()=>{a(!1),l()};return e?g.jsxs("div",{className:"flex flex-col gap-4 w-full h-full",children:[g.jsx("div",{className:"flex flex-1 gap-4 w-full min-h-0",children:C?g.jsxs(qit,{direction:"horizontal",className:"w-full h-full",children:[g.jsx(QJ,{defaultSize:50,minSize:30,children:g.jsxs("div",{className:"flex flex-col w-full h-full",children:[g.jsx("div",{className:"flex justify-between items-center pb-2 border-b border-gray-200",children:g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsx("div",{className:"flex size-6",children:g.jsx(Ju,{ext:S.extension,className:"text-gray-600 size-5"})}),g.jsx("span",{className:"text-sm font-medium text-gray-900 truncate max-w-[350px]",children:e.file.name})]})}),g.jsx("div",{className:"flex overflow-hidden flex-1 w-full min-h-0 rounded-lg scrollbar-hide",children:g.jsx(JJ,{blobUrl:b,file:e.file,isPdf:S.isPdf,isExcel:S.isExcel,isText:S.isText,isDocx:S.isDocx,currentPage:t,setCurrentPage:r,loading:v,error:y})})]})}),g.jsx(Uit,{withHandle:!0}),g.jsx(QJ,{defaultSize:50,minSize:30,children:g.jsxs("div",{className:"flex flex-col w-full h-full bg-gray-50 rounded-lg",children:[g.jsxs("div",{className:"flex gap-2 justify-between items-center p-4 border-b border-gray-200",children:[g.jsxs("span",{className:"text-sm font-semibold text-gray-600",children:["Extract ",T.length>0&&`(${T.length} pages)`]}),g.jsx("div",{className:"flex gap-2 items-center",children:g.jsx(cit,{isDeepExtracted:s,isDeepExtracting:i,showPromptInput:n,onShowPromptInput:()=>a(!0),onDeepExtractWithPrompt:N,onDeepExtractWithoutPrompt:N,isEditing:c,onEdit:m,onSave:p})})]}),g.jsxs("div",{className:"flex overflow-hidden flex-col flex-1 gap-4 p-4",children:[_&&g.jsxs("div",{className:"p-3 text-red-700 bg-red-50 rounded-md border border-red-200",children:[g.jsx("p",{className:"text-sm font-medium",children:"Extraction Error"}),g.jsx("p",{className:"mt-1 text-xs",children:_})]}),g.jsx("div",{className:"flex-1 min-h-0",children:g.jsx(fit,{isEditing:c,value:u,setValue:f,onSave:p,onEdit:m,isUploading:e?.status==="uploading",isDeepExtracting:i||e?.status==="extracting"})})]})]})})]}):g.jsxs("div",{className:"flex flex-col gap-2 w-full h-full",children:[g.jsx("div",{className:"flex justify-between items-center pb-2 border-b border-gray-200",children:g.jsxs("div",{className:"flex gap-2 items-center",children:[g.jsx("div",{className:"flex size-6",children:g.jsx(Ju,{ext:S.extension,className:"text-gray-600 size-5"})}),g.jsx("span",{className:"text-sm font-medium text-gray-900 truncate max-w-[350px]",children:e.file.name})]})}),g.jsx("div",{className:"flex overflow-hidden flex-1 w-full min-h-0 rounded-lg scrollbar-hide",children:g.jsx(JJ,{blobUrl:b,file:e.file,isPdf:S.isPdf,isExcel:S.isExcel,isText:S.isText,isDocx:S.isDocx,currentPage:t,setCurrentPage:r,loading:v,error:y})})]})}),T&&T.length>1&&g.jsx("div",{className:"flex justify-center pt-2 border-t border-gray-200",children:g.jsx(ait,{currentPage:t,totalPages:T.length,onBack:A,onNext:k,isDisabled:i})})]}):g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center h-full text-gray-500",children:[g.jsx(_5,{className:"size-12"}),g.jsxs("div",{className:"text-center",children:[g.jsx("p",{className:"font-medium",children:"No Files Extracted"}),g.jsx("p",{className:"text-sm",children:"Upload and extract files to get started"})]})]})},Hit=({onSaveCompleted:e})=>{const t=E.useRef(null),{isExtractionPopupOpen:r,selectedFile:n,extractedFiles:a,isExtracting:i,currentExtractionStep:s,showConfirmDiscard:o,closeExtractionPopup:l,setSelectedFile:c,addFile:u,setShowConfirmDiscard:f,saveAndFinish:p,clearFiles:m,setOnSaveCompletedCallback:b}=wy(),{isDeepExtracting:v}=jde(n);E.useEffect(()=>(b(e),()=>b(void 0)),[e]);const y=i||v,_=k=>{const N=k.target.files;N&&Array.from(N).forEach(L=>{u(L)}),k.target.value=""},S=()=>{t.current?.click()},C=async()=>{await p()},T=async()=>{await m(),f(!1)},A=k=>{console.log("[ExtractionPopup] File selected:",k),console.log("[ExtractionPopup] File documents:",k?.documents),console.log("[ExtractionPopup] File documents length:",k?.documents?.length),c(k)};return g.jsxs(g.Fragment,{children:[g.jsx(si,{open:r,onOpenChange:l,children:g.jsxs(oi,{className:"flex flex-col gap-0 rounded-none w-[100vw] max-w-[100vw] min-w-[100vw] h-full max-h-[100vh] pb-0",onOpenAutoFocus:k=>k.preventDefault(),onInteractOutside:k=>k.preventDefault(),children:[g.jsxs(Pi,{children:[g.jsx(ds,{children:"Deep Extract"}),g.jsx(e0,{className:"text-sm text-gray-600",children:"Process and extract content from your files"})]}),g.jsxs("div",{className:"flex flex-1 gap-2 py-2 w-full min-h-0",children:[g.jsxs("div",{className:"flex flex-col min-w-[300px] max-w-[300px] border-t border-x border-gray-200 rounded-t-lg",children:[g.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsxs("span",{className:"font-semibold text-gray-600",children:["Uploaded Files (",a.length??0,")"]}),g.jsxs(mt,{variant:"outline",size:"sm",onClick:S,disabled:y,children:[g.jsx(gve,{className:"mr-2 w-4 h-4"}),"Add Files"]})]}),g.jsx("span",{className:"text-sm text-gray-500",children:"Enable deep extraction for better content analysis"})]}),g.jsx("div",{className:"flex overflow-y-auto flex-col flex-1 min-h-0 scrollbar-hide",children:a.map(k=>g.jsxs("div",{onClick:()=>A(k),className:ut("flex w-full gap-2 p-4 border-b first:border-t dark:border-gray-300 cursor-pointer",n?.id===k?.id&&"bg-gray-50"),children:[g.jsxs("div",{className:"flex gap-2 w-[92%]",children:[g.jsx("div",{className:"flex justify-center items-center size-6 flex-1",children:g.jsx(Ju,{className:"size-6",ext:k?.original_filename?.split(".").pop()})}),g.jsxs("div",{className:"flex flex-col gap-1 w-[90%] overflow-ellipsis",children:[g.jsx("span",{className:"text-sm font-medium text-gray-900 truncate block max-w-[90%]",children:k?.original_filename}),g.jsx("span",{className:"text-xs text-gray-500",children:k.status==="uploading"?"Uploading...":k.status==="extracting"?"Extracting...":k.status==="ready"?"Extraction complete":"Ready for extraction"})]})]}),g.jsxs("div",{className:"flex justify-center items-center size-6",children:[(k.status==="uploading"||k.status==="extracting")&&g.jsx(ab,{className:"animate-spin size-4 text-brand-700"}),k.status==="ready"&&g.jsx("div",{className:"flex justify-center items-center bg-green-500 rounded-full size-4",children:g.jsx(I5,{className:"text-white size-3",strokeWidth:3})}),!k.status&&g.jsx("div",{className:"flex justify-center items-center bg-gray-400 rounded-full size-4",children:g.jsx(I5,{className:"text-white size-3",strokeWidth:3})})]})]},k.id))})]}),g.jsx("div",{className:"flex flex-col flex-1 gap-2 px-4 min-h-0",children:g.jsx($it,{selectedFile:n??a[0]})})]}),g.jsx("div",{className:"flex flex-col gap-4 p-4 border-t border-gray-200 dark:border-gray-300",children:g.jsxs("div",{className:"flex gap-2 justify-end",children:[g.jsx(mt,{onClick:()=>f(!0),variant:"secondary",disabled:y,children:"Discard"}),g.jsxs(mt,{disabled:y||a.length===0,onClick:C,children:[s==="saving"&&g.jsx(ab,{className:"mr-2 animate-spin size-4"}),s==="saving"?"Saving...":"Save & Finish"]})]})})]})}),g.jsx("input",{ref:t,type:"file",multiple:!0,onChange:_,style:{display:"none"},accept:"*/*"}),g.jsx(si,{open:o,onOpenChange:f,children:g.jsxs(oi,{className:"max-w-[400px]",onOpenAutoFocus:k=>k.preventDefault(),onInteractOutside:k=>k.preventDefault(),children:[g.jsxs(Pi,{children:[g.jsx(ds,{children:"Discard Files"}),g.jsx(e0,{className:"text-sm text-gray-600",children:"Are you sure you want to discard all uploaded files? This action cannot be undone."})]}),g.jsxs("div",{className:"flex gap-2 justify-end",children:[g.jsx(mt,{variant:"secondary",onClick:()=>f(!1),children:"Cancel"}),g.jsx(mt,{variant:"destructive",onClick:T,children:"Discard"})]})]})})]})};function Git(){const{fetchTopics:e,createTopic:t,updateTopic:r,deleteTopic:n,topics:a,isLoading:i,isCreating:s,isUpdating:o,error:l,clearError:c}=DGe(),{fetchDocuments:u,updateDocument:f,deleteDocument:p,downloadDocument:m,documents:b,isLoading:v,isUpdating:y,error:_,clearError:S}=OGe(),{folderState:C,navigateToFolder:T,navigateToRoot:A,getItemsInCurrentFolder:k}=IGe(),{openExtractionPopup:N,isExtractionPopupOpen:L}=wy(),[I,P]=E.useState(!1),[H,B]=E.useState(!1),[K,j]=E.useState(!1),[W,D]=E.useState(!1),[U,Y]=E.useState(null),[z,M]=E.useState(""),[Q,q]=E.useState("all"),[F,V]=E.useState(!1),[Z,ee]=E.useState(null),[te,oe]=E.useState(void 0),[pe,he]=E.useState(!1),[ke,se]=E.useState(null),[qe,$e]=E.useState(void 0);E.useEffect(()=>{e(),u()},[e,u]);const Pe=[...a?.map(SGe)||[],...b?.map(CGe)||[]];console.log("📚 Library items:",{topics:a?.length||0,documents:b?.length||0,totalItems:Pe.length,documentsWithTopics:b?.filter(et=>et.topic_id).length||0});const Ce=Pe.map(et=>{if(et.type==="folder"){const ft=et.topicId,zt=b?.filter(Cr=>Cr.topic_id===ft).length||0;return{...et,itemCount:zt}}return et}),xe=k(Ce);console.log("📋 Current folder items:",xe.length,"items");const ve=xe.filter(et=>{const ft=et.name.toLowerCase().includes(z.toLowerCase());let zt=!0;return C.isInFolder?zt=et.type==="file":zt=Q==="all"||Q==="folders"&&et.type==="folder"||Q==="files"&&et.type==="file",ft&&zt}),Ne=et=>{et.type==="folder"?T(et):et.type==="file"&&et.extension?.toLowerCase()==="pdf"?(ee(et.path),oe(et.name),V(!0)):et.type==="file"&&et.extension?.toLowerCase()==="json"?(se(et.path),$e(et.name),he(!0)):console.log("View document:",et)},Ue=et=>{Y(et),et.type==="folder"?B(!0):j(!0)},Le=async(et,ft)=>{try{await r(et,ft),Fr.success("Topic updated successfully")}catch{Fr.error("Failed to update topic")}},Ye=async(et,ft)=>{try{await f(et,ft),Fr.success("Document updated successfully")}catch{Fr.error("Failed to update document")}},De=async et=>{Y(et),D(!0)},Ve=async()=>{if(U)try{if(U.type==="folder"){const et=parseInt(U.id.replace("topic-",""));await n(et),Fr.success("Topic deleted successfully")}else{const et=parseInt(U.id.replace("doc-",""));await p(et),Fr.success("Document deleted successfully")}}catch(et){const ft=et?.message||"Failed to delete item";console.log("Delete error in UI:",ft),ft.includes("associated documents")?Fr.error("Unable to delete topic and its associated documents. Please try again."):Fr.error(ft)}finally{D(!1),Y(null)}},lt=async et=>{if(et.type==="file")try{const ft=parseInt(et.id.replace("doc-",""));await m(ft),Fr.success("Document downloaded successfully")}catch{Fr.error("Failed to download document")}},Ee=async et=>{await t({name:et,description:`Topic: ${et}`}),P(!1)},Ae=et=>{M(et)},Ze=et=>{q(et)},rt=E.useCallback(()=>{e(),u()},[e,u]),at=i||v,bt=l||_;return g.jsx("div",{className:"flex overflow-hidden flex-col h-[calc(100vh-64px)]",children:g.jsxs("div",{className:"flex flex-col flex-1 p-6 space-y-6 min-h-0",children:[g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Library"}),g.jsx("p",{className:"text-gray-600",children:"Manage your topics and documents"})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(mt,{variant:"outline",onClick:rt,disabled:at,children:g.jsx(B1,{className:"w-4 h-4"})}),g.jsxs(mt,{variant:"outline",onClick:()=>P(!0),disabled:s,children:[g.jsx(zee,{className:"mr-2 w-4 h-4"}),"New Topic"]}),g.jsxs(mt,{onClick:N,variant:"default",children:[g.jsx(Gge,{className:"mr-2 w-4 h-4"}),"Deep Extract"]})]})]}),C.isInFolder&&g.jsx("div",{className:"flex items-center space-x-2",children:g.jsxs(mt,{variant:"ghost",size:"sm",onClick:A,className:"text-gray-600 hover:text-gray-900",children:[g.jsx(xge,{className:"mr-1 w-4 h-4"}),"Back to Library"]})}),bt&&g.jsxs("div",{className:"p-4 bg-red-50 rounded-lg border border-red-200",children:[g.jsx("p",{className:"text-red-800",children:bt}),g.jsx(mt,{variant:"ghost",size:"sm",onClick:()=>{c(),S()},className:"mt-2",children:"Dismiss"})]}),g.jsxs("div",{className:"flex items-center space-x-4",children:[g.jsxs("div",{className:"relative flex-1 max-w-sm",children:[g.jsx(jee,{className:"absolute left-3 top-1/2 w-4 h-4 text-gray-400 transform -translate-y-1/2"}),g.jsx(Bl,{placeholder:"Search topics and documents...",value:z,onChange:et=>Ae(et.target.value),className:"pl-10"})]}),!C.isInFolder&&g.jsxs(Fm,{children:[g.jsx(Bm,{asChild:!0,children:g.jsxs(mt,{variant:"outline",children:[g.jsx(Xge,{className:"mr-2 w-4 h-4"}),Q==="all"?"All":Q==="files"?"Documents":"Topics"]})}),g.jsxs(zm,{align:"end",children:[g.jsx(is,{onClick:()=>Ze("all"),children:"All Items"}),g.jsx(is,{onClick:()=>Ze("files"),children:"Documents Only"}),g.jsx(is,{onClick:()=>Ze("folders"),children:"Topics Only"})]})]})]}),g.jsx("div",{className:"overflow-hidden flex-1 min-h-0",children:g.jsx(Zle,{data:ve,loading:at,mode:"library",onRowClick:Ne,onViewItem:Ne,onEditItem:Ue,onDeleteItem:De,onDownloadItem:lt,allLibraryItems:Ce})}),g.jsx(HXe,{isOpen:I,onClose:()=>P(!1),onCreateFolder:Ee,currentPath:C.currentPath}),g.jsx(GXe,{topic:U?.type==="folder"&&a.find(et=>et.id===parseInt(U.id.replace("topic-","")))||null,isOpen:H,onClose:()=>{B(!1),Y(null)},onSave:Le,isLoading:o}),g.jsx(VXe,{document:U?.type==="file"&&b.find(et=>et.id===parseInt(U.id.replace("doc-","")))||null,topics:a,isOpen:K,onClose:()=>{j(!1),Y(null)},onSave:Ye,isLoading:y}),g.jsx(Qle,{isOpen:W,onClose:()=>{D(!1),Y(null)},onConfirm:Ve,title:`Delete ${U?.type==="folder"?"Topic":"Document"}`,description:`Are you sure you want to delete "${U?.name}"? This action cannot be undone.`,confirmText:"Delete",cancelText:"Cancel",variant:"destructive"}),g.jsx(Wce,{open:F,onClose:()=>V(!1),fileUrl:Z||"",fileName:te}),g.jsx(WXe,{open:pe,onClose:()=>he(!1),fileUrl:ke||"",fileName:qe}),L&&g.jsx(Hit,{onSaveCompleted:rt})]})})}const Vit=e=>Array.isArray(e?.data?.message)?e?.data?.message?.[1]:e?.content?e.content:e?.message?e.message:e?.message?.response?e.message.response:e?.data?.message?.response?e.data.message.response:e?.data?.message?.content?e.data.message.content:e?.data?.message?.message?.content?e.data.message.message.content:e?.meta_data?.solution?e.meta_data.solution:e?.data?.message||"",Wit=({message:e,className:t})=>{const r=[],n="Thinking...",{agent_id:a}=gs(),[i,s]=E.useState(!1),[o,l]=E.useState(!1),[c,u]=E.useState(""),f=Vit(e);E.useEffect(()=>{if(e.type==="welcome-message"){u(f);return}if(!e.isNew){u(f),s(!0);return}let v=0;s(!1);const y=setInterval(()=>{u(f.slice(0,v)),v++,v>f.length&&(clearInterval(y),s(!0),u(f))},5);return()=>clearInterval(y)},[f,e]);const p=$s(a||0),m=E.useMemo(()=>!r||r.length===0?!1:r[r.length-1].id===e.id,[r,e.id]),b=e?.data?.meta_data?.added_knowledge?.answer;return g.jsxs("div",{className:"flex gap-2 items-start py-4 pl-6 w-full",children:[g.jsx("div",{className:"flex overflow-hidden justify-center items-center w-8 h-8 rounded-full",children:g.jsx("img",{className:"object-cover w-full h-full",src:p,alt:"Agent avatar",onError:v=>{const y=v.target;y.style.display="none";const _=y.parentElement;_&&(_.className="flex justify-center items-center w-8 h-8 text-sm font-bold text-white bg-gradient-to-br from-pink-400 to-purple-400 rounded-full",_.innerHTML='<span className="text-white">A</span>')}})}),g.jsx("div",{className:ut("flex flex-col w-full","max-w-[630px] 3xl:max-w-[1085px]",t),children:c?g.jsxs("div",{className:ut("flex flex-col",e?.data?.meta_data?.type==="dxa:prosea:user_input"&&m&&"bg-blue-50 rounded-xl p-4 border border-blue-100"),children:[b&&g.jsxs("div",{onClick:()=>l(!o),className:"flex gap-2 items-center cursor-pointer",children:[g.jsx(mx,{className:ut("w-3 h-3 text-gray-400 transition-transform duration-300",{"rotate-180":o}),strokeWidth:3}),g.jsx("span",{className:"text-sm font-medium text-gray-400",children:o?"New response":"Old response"})]}),g.jsx(n0,{content:b&&!o?b:c,backgroundContext:"agent"}),e?.data?.meta_data?.type==="dxa:prosea:user_input"&&m&&g.jsxs("div",{className:"flex gap-1 items-center mt-2",children:[g.jsx(Qwe,{className:"w-5 h-5 text-brand-700"}),g.jsx("span",{className:"font-medium text-brand-700 animate-flash",children:"Awaiting for your response"})]})]}):g.jsxs("div",{className:"grid grid-cols-[max-content_1fr] items-start gap-2",children:[g.jsx(jc,{className:"animate-spin text-brand-700",size:20}),g.jsx("span",{className:"text-sm font-normal text-gray-900 xl:text-base animate-flash",children:n})]})})]})},Kit=({file:e})=>{const t=e?.s3_url?.split(".")?.pop(),r=e?.s3_url?.split("/").pop();return g.jsx("div",{className:"flex",children:g.jsx("div",{className:"flex gap-2 justify-between p-3 w-max rounded-lg border border-gray-200 dark:border-gray-300 bg-background",children:g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"flex justify-center items-center w-11 h-11 bg-gray-100 rounded-md",children:g.jsx(Ju,{ext:t})}),g.jsxs("div",{className:"flex flex-col text-left max-w-[200px]",children:[g.jsx("span",{className:"text-sm font-medium text-gray-700 truncate",children:r}),g.jsx("span",{className:"text-sm font-normal text-gray-600 truncate",children:t})]})]})})},e?.id)},Xit=({message:e})=>{switch(e?.type){case"file":{const t=e?.meta_data||e?.data?.meta_data;return g.jsxs("div",{className:"flex flex-col",children:[g.jsx("div",{className:ut("flex overflow-x-auto gap-1 mb-2 scrollbar-hide","max-w-[630px] 3xl:max-w-[1085px]"),children:t?.files?.map(r=>g.jsx(Kit,{file:r},r.id))}),g.jsx("div",{className:ut("flex flex-wrap w-full text-sm font-normal text-gray-900 break-words xl:text-base","max-w-[630px] 3xl:max-w-[1085px]"),children:g.jsx(n0,{content:e?.message||e?.data?.message,backgroundContext:"user"})})]})}default:return g.jsx("div",{className:ut("flex flex-wrap w-full text-sm font-normal text-gray-900 break-words xl:text-base","max-w-[630px] 3xl:max-w-[1085px]"),children:g.jsx(n0,{content:e?.message||e?.data?.message,backgroundContext:"user"})})}},Yit=({message:e})=>g.jsx("div",{className:"flex gap-2 items-start px-6 py-4 w-full bg-gray-50 rounded",children:g.jsx(Xit,{message:e})}),Zit=({message:e,avatar:t,currentStep:r})=>{const n="Thinking...",{agent_id:a}=gs(),i=t||$s(a||0);return g.jsxs("div",{className:"grid grid-cols-[max-content_1fr] items-start w-full gap-2 px-6 py-4",children:[g.jsx("div",{className:"flex overflow-hidden justify-center items-center w-8 h-8 rounded-full",children:g.jsx("img",{className:"object-cover w-full h-full",src:i,alt:"Agent avatar",onError:s=>{const o=s.target;o.style.display="none";const l=o.parentElement;l&&(l.className="flex justify-center items-center w-8 h-8 text-sm font-bold text-white bg-gradient-to-br from-pink-400 to-purple-400 rounded-full",l.innerHTML='<span className="text-white">A</span>')}})}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"flex justify-center items-start",children:g.jsx(jc,{className:"mt-0.5 animate-spin text-brand-700",size:20})}),g.jsxs("div",{className:"flex flex-col",children:[g.jsx("span",{className:"text-sm font-normal text-gray-900 break-words xl:text-base animate-flash",children:e??n??"Thinking..."}),r&&g.jsx("span",{className:"mt-1 text-xs italic text-gray-600",children:r})]})]})]})},Qit=({messages:e,isBotThinking:t,botAvatar:r,isMessageFeedback:n=!1,className:a,currentStep:i})=>{const s=E.useRef(null),o=E.useRef(null),[l,c]=E.useState(!1);return E.useLayoutEffect(()=>{if(s?.current&&o.current){const{scrollHeight:u}=s.current,f=o.current.children;let p=0;setTimeout(()=>{for(let m=0;m<f.length;m++)p+=Math.max(f.item(m)?.clientHeight??0,100);u-20<p?c(!0):c(!1),setTimeout(()=>{const m=document.getElementById("bottom-of-chat");m&&m.scrollIntoView({behavior:"smooth"})},10)},50);return}c(!1)},[s,o,e,t]),g.jsx("div",{className:"flex overflow-scroll flex-col flex-1 w-full custom-scrollbar",children:g.jsx("div",{className:"flex overflow-scroll flex-col flex-1 custom-scrollbar",children:g.jsx("div",{className:ut("flex overflow-y-scroll flex-col flex-1 max-h-full custom-scrollbar"),ref:s,children:g.jsxs("div",{className:ut("flex overflow-y-scroll flex-col flex-1 pb-8 h-full custom-scrollbar chat-wrapper",l?"":"justify-end"),ref:o,children:[e?.map((u,f)=>{const p={id:u.id,role:u.sender==="agent"?"bot":"user",content:u.content,message:u.content,data:{message:u.content},timestamp:u.created_at,isNew:!1};return console.log("Converted message:",p),u.sender==="agent"?g.jsx(Wit,{message:p,isMessageFeedback:n,avatar:r,className:a},f):g.jsx(Yit,{message:p},f)}),t&&g.jsx(Zit,{avatar:r,currentStep:i}),g.jsx("div",{id:"bottom-of-chat"})]})})})})},Jit=({id:e,message:t,setMessage:r,placeholder:n,isBotThinking:a=!1,mentionOptions:i})=>{const[s,o]=E.useState(t||""),l=E.useRef(null),c=E.useRef(a),u=E.useRef(null),f=E.useRef(null),p=E.useRef(null),[m,b]=E.useState(!1),[v,y]=E.useState(""),[_,S]=E.useState(0),[C,T]=E.useState(-1),A=i||[],k=A.filter(U=>U.label.toLowerCase().includes(v.toLowerCase())),[N,L]=E.useState(!1),I=()=>{const U=l.current;if(!U)return;U.style.height="auto";const Y=Math.min(U.scrollHeight,260);U.style.height=`${Y}px`},P=E.useCallback(()=>{const U=l.current;if(!U)return;const Y=U.selectionEnd,z=U.value,M=z.lastIndexOf("@",Y-1);if(M!==-1&&Y>M&&!z.substring(M,Y).includes(" ")){const q=z.substring(M,Y).startsWith("@document")?z.substring(M+10,Y):z.substring(M+1,Y);y(q),T(M),S(0),b(!0)}else m&&(b(!1),T(-1))},[m]),H=E.useCallback(U=>{const Y=l.current;if(!Y||C===-1)return;const z=Y.selectionEnd,M=Y.value,Q=M.substring(C,z).startsWith("@document");let q;if(Q){const F=M.substring(0,C),V=M.substring(z);q=`${F}@document:${U.value} ${V}`}else q=M.substring(0,C)+"@"+U.value+" "+M.substring(z);o(q),r(q),b(!1),T(-1),setTimeout(()=>{if(Y){const F=Q?C+10+U.value.length+1:C+U.value.length+2;Y.focus(),Y.setSelectionRange(F,F),I()}},0)},[C,r]);E.useEffect(()=>{o(t||"")},[t]),E.useLayoutEffect(()=>{t===""&&l.current&&(l.current.value="",I())},[t]),E.useEffect(()=>{c.current&&!a&&setTimeout(()=>{l.current&&l.current.focus()},10),c.current=a},[a]),E.useEffect(()=>{const U=Y=>{f.current&&!f.current.contains(Y.target)&&Y.target!==l.current&&(b(!1),T(-1))};return document.addEventListener("mousedown",U),()=>{document.removeEventListener("mousedown",U)}},[]),E.useEffect(()=>{m&&p.current&&f.current&&p.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[_,m]);const B=U=>{const Y=U.target.value;o(Y),r(Y),P()},K=U=>{U.key==="@"&&setTimeout(()=>{P()},0)},j=()=>{if(m&&l.current){const U=l.current.selectionEnd;(U<=C||U>C+v.length+1)&&(b(!1),T(-1))}},W=U=>{if(U.key==="Enter"&&!U.shiftKey&&!N){U.preventDefault();const Y=U.currentTarget.form;Y&&Y.requestSubmit()}},D=U=>{if(!m||k.length===0){W(U);return}const Y=k.length;switch(U.key){case"ArrowDown":U.preventDefault(),S(z=>z<Y-1?z+1:z);break;case"ArrowUp":U.preventDefault(),S(z=>z>0?z-1:z);break;case"Enter":U.preventDefault(),H(k[_]);break;case"Escape":U.preventDefault(),b(!1),T(-1);break;case"Tab":U.preventDefault(),H(k[_]);break;default:W(U);break}};return g.jsxs("div",{className:"relative",ref:u,children:[g.jsx(c8,{id:e,ref:l,autoFocus:!0,value:s,onChange:B,onInput:I,onKeyPress:K,onSelect:j,className:"flex p-0 w-full text-sm xl:text-base font-normal text-gray-900 bg-transparent dark:bg-gray-50 border-none outline-none placeholder:text-gray-400 min-h-[60px] scrollbar-hide overflow-y-auto resize-none focus-visible:ring-0 focus-visible:ring-offset-0",onCompositionStart:()=>L(!0),onCompositionEnd:()=>L(!1),onKeyDown:D,placeholder:n,autoComplete:"off",disabled:a,rows:1,"data-testid":"chat-input"}),m&&g.jsx("div",{ref:f,className:"overflow-y-auto absolute z-50 py-3 w-80 max-h-60 rounded-md border border-gray-200 shadow-lg dark:border-gray-300 scrollbar-hide bg-background",style:{bottom:"100%",left:"0",marginBottom:"4px"},children:A.length>0&&A[0]?.icon==="📄"?g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"px-4 text-sm text-gray-500",children:["Available Documents (",k.length,")"]}),k.length>0&&g.jsx("ul",{className:"py-1",children:k.map((U,Y)=>g.jsx("li",{onClick:()=>H(U),onMouseEnter:()=>S(Y),className:`p-4 flex gap-2 cursor-pointer hover:bg-brand-50 ${Y===_?"bg-brand-100":""}`,ref:Y===_?p:null,children:g.jsxs("div",{className:"flex gap-3 items-center",children:[g.jsx("div",{className:"size-8",children:g.jsx(Ju,{ext:U.value?.split(".").pop()})}),g.jsxs("div",{className:"flex flex-col",children:[g.jsx("span",{className:"text-sm font-medium",children:U.label}),g.jsx("span",{className:"text-xs text-gray-500",children:"Click to select"})]})]})},U.id))}),g.jsx("div",{className:"px-4 py-2 text-xs text-gray-400 border-t",children:"Type @document:filename to query specific documents"})]}):g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"px-4 text-sm text-gray-500",children:["In this chat (",k.length,")"]}),k.length>0&&g.jsx("ul",{className:"py-1",children:k.map((U,Y)=>g.jsxs("li",{onClick:()=>H(U),onMouseEnter:()=>S(Y),className:`p-4 flex gap-2 cursor-pointer hover:bg-brand-50 ${Y===_?"bg-brand-100":""}`,ref:Y===_?p:null,children:[g.jsx("div",{className:"flex",children:g.jsx(Ju,{ext:U?.value?.split(".").pop()})}),U.value]},U.id))}),g.jsxs("span",{className:"px-4 text-sm text-gray-500",children:["Assigned Sources (",k.length,")"]}),k.length>0&&g.jsx("ul",{className:"py-1",children:k.map((U,Y)=>g.jsxs("li",{ref:Y===_?p:null,className:`p-4 flex gap-2 cursor-pointer hover:bg-gray-100 ${Y===_?"bg-brand-50":""}`,onClick:()=>H(U),onMouseEnter:()=>S(Y),children:[U.icon&&g.jsx("span",{className:"text-gray-600",children:U.icon}),g.jsx("span",{className:"font-medium",children:U.label})]},U.id))})]})})]})},est=({message:e,files:t,onSubmit:r,isSubmitting:n,onFileUpload:a,isUploading:i=!1})=>{const s=e||t&&t.length>0,o=n||!s;return g.jsxs("div",{className:"flex gap-2 items-center w-full justify-between",children:[a&&g.jsxs(To,{children:[g.jsx(Ao,{asChild:!0,children:g.jsx("div",{onClick:!n&&!i?a:()=>{},className:ut("flex items-center justify-center w-9 h-9 border bg-white border-gray-300 rounded-full transition-all duration-200 cursor-pointer",n||i?"opacity-50 cursor-not-allowed bg-gray-100":" hover:bg-gray-100"),style:{pointerEvents:n||i?"none":"auto"},children:i?g.jsx(ab,{className:"w-4 h-4 text-gray-600 animate-spin"}):g.jsx(d_e,{className:"w-4 h-4 text-gray-500"})})}),g.jsx(ko,{children:g.jsx("p",{children:"Add files"})})]}),g.jsx("div",{onClick:o?()=>{}:r,className:ut("flex items-center justify-center w-9! h-9! bg-background rounded-full transition-all duration-200",n&&"opacity-50 cursor-not-allowed bg-gray-400",s?"bg-brand-600 cursor-pointer":"bg-gray-400 cursor-not-allowed",n&&"opacity-50 cursor-not-allowed"),style:{pointerEvents:o?"none":"auto"},"data-testid":"send-message-button",children:g.jsx(qD,{className:"text-white",width:14,height:14,strokeWidth:3})})]})},tst=E.memo(Jit),eee=E.forwardRef(({handleSendMessage:e,placeholder:t,id:r,agentId:n,isShowUpload:a=!1},i)=>{const[s,o]=E.useState(""),[l,c]=E.useState(!1),[u,f]=E.useState([]),[p,m]=E.useState([]),[b,v]=E.useState([]),y=E.useRef(null);E.useEffect(()=>{(async()=>{if(!n){v([]);return}try{const H=await gt.getDocuments({agent_id:Number(n)});v(H)}catch(H){console.error("Failed to fetch agent documents:",H),v([])}})()},[n]);const _=E.useMemo(()=>b.map(P=>({id:P.id.toString(),label:P.original_filename,value:P.original_filename,icon:"📄"})),[b]);E.useImperativeHandle(i,()=>({setMessage:P=>{o(P)},submitMessage:()=>{k()},sendMessageDirect:P=>{const H={message:P,role:"user",files:u.filter(B=>B.status==="success").map(B=>({name:B.name,path:B.path,size:B.size,type:B.type}))};e(H)}}),[s,u,l,e]);const S=E.useCallback(async P=>{const H={id:Date.now().toString()+Math.random().toString(36).substr(2,9),name:P.name,size:P.size,type:P.type,status:"uploading"};try{if(n){const B=await gt.uploadAgentDocument(n,P);H.status="success",H.path=B.filename}else{const B=await gt.uploadDocument({file:P,title:P.name});H.status="success",H.path=B.filename}}catch(B){H.status="error",H.error=B.message}return H},[n]),C=async P=>{const H=P.target.files;if(!H||H.length===0)return;const B=Array.from(H),K=B.map(j=>j.name);m(K);try{for(const j of B){const W=await S(j);f(D=>[...D,W]),m(D=>D.filter(U=>U!==j.name))}}catch(j){console.error("Failed to upload file:",j),m([])}finally{y.current&&(y.current.value=""),m([])}},T=()=>{y.current?.click()},A=P=>{f(H=>H.filter(B=>B.id!==P))},k=E.useCallback(()=>{if(l||!s?.trim()&&u.length===0)return;c(!0);const P=s?.trim()||"";o("");const H={message:P,role:"user",files:u.filter(B=>B.status==="success").map(B=>({name:B.name,path:B.path,size:B.size,type:B.type}))};requestAnimationFrame(()=>{e(H),o(""),f([]),setTimeout(()=>{c(!1)},100)})},[e,s,l,u]),N=E.useMemo(()=>"input",[]),L=E.useMemo(()=>g.jsx(est,{message:s,files:u,onSubmit:k,isSubmitting:l,onFileUpload:a?T:void 0,isUploading:p.length>0}),[s,u,k,l,a,p,T]),I=E.useMemo(()=>g.jsx("div",{className:ut("flex flex-row-reverse gap-2 justify-between items-end w-full h-10"),children:g.jsx("div",{className:ut("flex gap-4 justify-between items-center w-full"),children:L})}),[L]);return g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"file",ref:y,style:{display:"none"},multiple:!0,onChange:C}),g.jsx("form",{className:"flex right-0 bottom-0 left-0 w-full rounded-xl border border-gray-200 dark:border-gray-100",onSubmit:P=>{P.preventDefault(),l||k()},style:{boxShadow:"0px 20px 24px -4px rgba(16, 24, 40, 0.04), 0px 8px 8px -4px rgba(16, 24, 40, 0.03)"},children:N==="input"&&g.jsxs("div",{className:"flex flex-col gap-2 p-3 w-full rounded-xl bg-background dark:bg-gray-50",children:[p.length>0&&g.jsx("div",{className:"p-2 mb-2 bg-blue-50 rounded-lg border border-blue-200",children:g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(ab,{className:"w-4 h-4 text-blue-600 animate-spin"}),g.jsxs("div",{className:"text-sm text-blue-700",children:["Uploading ",p.length," file",p.length>1?"s":"","..."]})]})}),u.length>0&&g.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:u.map(P=>g.jsxs("div",{className:"flex items-center px-2 py-1 space-x-2 text-sm bg-gray-100 rounded-lg",children:[g.jsx("span",{className:"text-gray-700",children:P.name}),P.status==="success"&&g.jsx("button",{type:"button",onClick:()=>A(P.id),className:"text-gray-500 hover:text-red-500",children:"×"}),P.status==="error"&&g.jsx("span",{className:"text-xs text-red-500",children:"Error"})]},P.id))}),g.jsx("div",{className:"flex flex-col",children:g.jsx(tst,{id:r,message:s,setMessage:o,placeholder:t,isBotThinking:!1,mentionOptions:_})}),I]})})]})}),j8="prebuilt_agent_conversations",u5=e=>{try{sessionStorage.setItem(j8,JSON.stringify(e))}catch(t){console.warn("Failed to save to session storage:",t)}},rst=()=>{try{const e=sessionStorage.getItem(j8);return e?JSON.parse(e):[]}catch(e){return console.warn("Failed to load from session storage:",e),[]}},cfe=Ys((e,t)=>({messages:[],conversations:[],selectedConversation:null,currentAgentId:null,currentSessionId:null,sessionConversations:rst(),isLoading:!1,isSending:!1,isCreating:!1,error:null,sendMessage:async(r,n,a,i)=>{const s=typeof r=="string"?r:r.message,o=typeof r=="string"?void 0:r.files;let l=s;if(o&&o.length>0){const f=o.map(p=>`📎 ${p.name}`).join(`
`);l=`${s}${s?`

`:""}Attached files:
${f}`}const{messages:c}=t(),u={id:Date.now(),conversation_id:a||0,sender:"user",content:l,created_at:new Date().toISOString(),updated_at:new Date().toISOString()};e({messages:[...c,u],isSending:!0,error:null});try{const f=typeof a=="string"&&a.startsWith("session_");let p;if(!f&&a){const v=typeof a=="string"?parseInt(a):a;p=!isNaN(v)&&v<1e9?v:void 0}const m={message:l,agent_id:n,conversation_id:p,context:{user_id:1},websocket_id:i},b=await gt.chatWithAgent(m);if(b.conversation_id!==null&&b.conversation_id!==void 0){const v=t().messages,y={...v[v.length-1],id:b.message_id||Date.now()-1,conversation_id:b.conversation_id},_={id:(b.message_id||Date.now())+1,conversation_id:b.conversation_id,sender:"agent",content:b.agent_response,created_at:new Date().toISOString(),updated_at:new Date().toISOString()},S=[...v.slice(0,-1),y,_];if(e({messages:S,isSending:!1}),b.conversation_id===0&&typeof n=="string"){const C=t().currentSessionId;C&&t().saveSessionConversation(C,S)}}else e({isSending:!1});return b}catch(f){const p=t().messages;throw e({messages:p.slice(0,-1),error:f instanceof Error?f.message:"Failed to send message",isSending:!1}),f}},fetchConversations:async r=>{e({isLoading:!0,error:null});try{const n=await gt.getConversations(r);e({conversations:n,isLoading:!1})}catch(n){const a=n instanceof Error?n.message:"Failed to fetch conversations";e({conversations:[],isLoading:!1,error:a})}},fetchConversation:async r=>{e({isLoading:!0,error:null});try{const n=await gt.getConversation(r);n.messages&&Array.isArray(n.messages)?e({selectedConversation:n,messages:n.messages,isLoading:!1}):e({selectedConversation:n,messages:[],isLoading:!1})}catch(n){if(n&&typeof n=="object"&&"response"in n&&n.response?.status===404){e({selectedConversation:null,messages:[],isLoading:!1,error:null});return}const a=n instanceof Error?n.message:"Failed to fetch conversation";console.error("Error fetching conversation:",a),e({selectedConversation:null,messages:[],isLoading:!1,error:a})}},createConversation:async r=>{e({isCreating:!0,error:null});try{const n=t().currentAgentId;if(typeof n=="string")throw new Error("Cannot create conversations for prebuilt agents");const a={...r,agent_id:r.agent_id||n||1},i=await gt.createConversation(a),{conversations:s}=t();return e({conversations:[i,...s],isCreating:!1}),i}catch(n){const a=n instanceof Error?n.message:"Failed to create conversation";throw e({isCreating:!1,error:a}),n}},updateConversation:async(r,n)=>{e({isCreating:!0,error:null});try{const a=await gt.updateConversation(r,n),{conversations:i}=t();return e({conversations:i.map(s=>s.id===r?a:s),isCreating:!1}),a}catch(a){const i=a instanceof Error?a.message:"Failed to update conversation";throw e({isCreating:!1,error:i}),a}},deleteConversation:async r=>{e({isCreating:!0,error:null});try{await gt.deleteConversation(r);const{conversations:n}=t();e({conversations:n.filter(a=>a.id!==r),isCreating:!1})}catch(n){const a=n instanceof Error?n.message:"Failed to delete conversation";throw e({isCreating:!1,error:a}),n}},setCurrentAgentId:r=>{e({currentAgentId:r})},setSelectedConversation:r=>{e({selectedConversation:r,messages:r?.messages||[]})},clearMessages:()=>{e({messages:[]})},setError:r=>{e({error:r})},clearError:()=>{e({error:null})},loadSessionConversation:(r,n)=>{const i=t().sessionConversations.find(s=>s.id===r&&s.agentId===n);if(i)e({messages:i.messages,currentSessionId:r});else{const s=t().createSessionConversation(n);e({currentSessionId:s})}},createSessionConversation:r=>{const n=`session_${Date.now()}_${Math.random().toString(36).substring(2,11)}`,a={id:n,agentId:r,title:"New chat",messages:[],created_at:new Date().toISOString(),updated_at:new Date().toISOString()},i=[...t().sessionConversations,a];return e({sessionConversations:i,currentSessionId:n}),u5(i),n},saveSessionConversation:(r,n)=>{const a=t().sessionConversations.map(i=>i.id===r?{...i,messages:n,title:n.length>0?n[0].content.slice(0,50)+"...":"New chat",updated_at:new Date().toISOString()}:i);e({sessionConversations:a}),u5(a)},getSessionConversations:r=>t().sessionConversations.filter(n=>n.agentId===r),deleteSessionConversation:r=>{const n=t().sessionConversations.filter(a=>a.id!==r);e({sessionConversations:n}),u5(n),t().currentSessionId===r&&e({currentSessionId:null,messages:[]})},reset:()=>{e({messages:[],conversations:[],selectedConversation:null,currentAgentId:null,currentSessionId:null,sessionConversations:[],isLoading:!1,isSending:!1,isCreating:!1,error:null}),sessionStorage.removeItem(j8)}})),nst=({isSidebarCollapsed:e,agentId:t,conversationId:r})=>{const n=E.useRef(null),a=Oo(),[i]=E.useState([]),[s,o]=E.useState(""),[l,c]=E.useState(!1),[u,f]=E.useState(!1),[p]=E.useState(()=>`chatview-${Date.now()}-${Math.random().toString(36).substring(2,11)}`),m=E.useRef(null),{messages:b,isSending:v,error:y,sendMessage:_,fetchConversation:S,setCurrentAgentId:C,clearMessages:T,setError:A,clearError:k,loadSessionConversation:N,createSessionConversation:L}=cfe(),{updates:I,logUpdates:P,disconnect:H,clearLogUpdates:B}=tue(p,{maxUpdates:50,autoConnect:!0});E.useEffect(()=>{const W=Y=>{m.current?.setMessage&&m.current.setMessage(Y)},D=()=>{m.current?.submitMessage&&m.current.submitMessage()},U=Y=>{m.current?.sendMessageDirect&&m.current.sendMessageDirect(Y)};return window.setInput=W,window.setInputText=W,window.sendMessage=D,window.handleSendMessage=D,window.submitMessage=D,window.sendMessageDirect=U,()=>{delete window.setInput,delete window.setInputText,delete window.sendMessage,delete window.handleSendMessage,delete window.submitMessage,delete window.sendMessageDirect}},[]),E.useEffect(()=>{if(I.length>0){const W=I[I.length-1];if(W.variable==="step"){const D=W.newValue||"";if(D)try{const U=JSON.parse(D.replaceAll("'",'"')),Y=U.action||U.description||U.name||"";o(Y)}catch{o(D)}}}},[I]),E.useEffect(()=>{t&&C(t)},[t,C]),E.useEffect(()=>{if(console.log("Chat view: conversationId changed to:",r),r&&t){if(r.startsWith("session_")){console.log("Loading session conversation:",r),typeof t=="string"&&N(r,t);return}const W=parseInt(r);if(isNaN(W)||W>1e9){console.log("Invalid or temporary conversation ID detected:",r);return}console.log("Fetching conversation:",r),S(W)}else!r&&!v&&(console.log("Clearing messages - no conversation ID and not sending"),T())},[r,t,S,T,N,v]),E.useEffect(()=>{console.log("Chat messages updated:",b),console.log("Messages length:",b?.length)},[b]),E.useEffect(()=>()=>{H()},[H]);const K=async W=>{if(!t){A("Agent ID is required");return}try{k(),B(),f(!1);let D=r;r||(typeof t=="string"?D=L(t):D=void 0);const Y=(await _(W,t,D,p)).conversation_id,z=isNaN(Number(t));r||(z&&D?a(`/agents/${t}/chat/${D}`):!z&&Y&&a(`/agents/${t}/chat/${Y}`))}catch(D){console.error("Failed to send message:",D)}},j=()=>g.jsx("div",{className:"flex relative items-center w-full h-full fade-in",children:g.jsxs("div",{className:`
      flex flex-col items-center justify-center h-full gap-8
      transition-all duration-300 ease-in-out
      w-full
      opacity-100
    `,children:[g.jsx("div",{className:"flex flex-col items-center",children:g.jsx("span",{className:"text-[36px] font-medium text-gray-400",children:"How can I help you today?"})}),g.jsx("div",{className:"flex flex-col gap-2 transition-all duration-300 w-[700px]",children:g.jsx(eee,{files:i,isShowUpload:!0,agentId:t,placeholder:"Ask me anything",handleSendMessage:K,ref:m})})]})});return y?g.jsx("div",{className:"flex justify-center items-center w-full h-full",children:g.jsxs("div",{className:"text-center text-red-500",children:[g.jsx("p",{className:"text-lg font-medium",children:"Error"}),g.jsx("p",{className:"text-sm",children:y}),g.jsx("button",{onClick:k,className:"px-4 py-2 mt-4 text-white bg-blue-500 rounded hover:bg-blue-600",children:"Try Again"})]})}):g.jsx("div",{className:"flex w-full h-full",children:g.jsx("div",{className:"w-full overflow-y-auto custom-scrollbar h-[calc(100vh-64px)] fade-in",children:r||b.length>0?g.jsx("div",{className:"flex justify-center items-center w-full h-full",children:g.jsx("div",{className:"flex relative justify-center items-center w-full h-full",children:g.jsx("div",{id:"chat-container",className:ut("flex flex-col justify-center items-center w-full h-full","w-full"),children:g.jsxs("div",{className:ut("grid grid-rows-[1fr_max-content_max-content] justify-between w-full h-full",e?"pr-6 pl-10":"px-4","max-w-[760px] 3xl:max-w-[1200px]","opacity-100"),children:[g.jsx("div",{ref:n,className:"overflow-y-auto items-center pt-2 pb-4 custom-scrollbar fade-in w-full min-w-[760px] 3xl:min-w-[1200px]",children:g.jsx(Qit,{messages:b,isBotThinking:v,currentStep:s})}),(v||P.length>0)&&!u&&g.jsxs("div",{className:"border-t pb-6 border-gray-200 dark:border-gray-700 w-full max-w-[760px] 3xl:max-w-[1200px]",children:[g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[g.jsxs("div",{className:"flex items-center gap-2 cursor-pointer flex-1",onClick:()=>c(!l),children:[g.jsx("span",{className:"text-sm font-medium text-gray-600 dark:text-gray-300",children:"Backend Logs"}),v&&g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-pulse"}),g.jsx("span",{className:"text-xs text-blue-600 dark:text-blue-400",children:"Live"})]}),P.length>0&&g.jsx("span",{className:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 text-xs px-2 py-0.5 rounded-full font-medium",children:P.length}),l?g.jsx(aAe,{className:"w-4 h-4 text-gray-400 dark:text-gray-500"}):g.jsx(nAe,{className:"w-4 h-4 text-gray-400 dark:text-gray-500"})]}),!v&&g.jsx("button",{onClick:()=>{f(!0),c(!1)},className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Hide logs",children:g.jsx(jm,{className:"w-3 h-3 text-gray-400 dark:text-gray-500"})})]}),l&&g.jsx("div",{className:"px-4 pb-4",children:g.jsx(rue,{logs:P,showTimestamps:!0,autoScroll:!0,maxHeight:"200px"})})]}),g.jsx("div",{className:"sticky bottom-6 w-full bg-background",children:g.jsx(eee,{files:i,isShowUpload:!0,agentId:t,placeholder:"Ask me anything",handleSendMessage:K,ref:m})})]})})})}):g.jsx("div",{className:ut("flex relative items-center w-full h-full fade-in"),children:j()})})})},ast=({conversation:e,isActive:t,onSelect:r,onRename:n,onDelete:a})=>g.jsxs("div",{className:ut("flex relative items-center px-4 w-full rounded-lg cursor-pointer group","h-10",t?"bg-gray-100":"hover:bg-gray-50"),onClick:r,children:[g.jsx("div",{className:"flex flex-col flex-1",children:g.jsx("div",{className:ut("min-w-0 text-sm font-medium truncate","animate-slideIn",t?"text-gray-700":"text-gray-500"),children:e.title||"New conversation"})}),g.jsx(ist,{conversation:e,onRename:n,onDelete:a})]},e.id),ist=({onRename:e,onDelete:t})=>g.jsxs(Fm,{children:[g.jsx(Bm,{asChild:!0,children:g.jsx("div",{className:"flex justify-center items-center rounded-md opacity-0 transition-opacity cursor-pointer hover:bg-gray-100 size-8 group-hover:opacity-100",children:g.jsx(Lee,{size:16,className:"text-gray-600"})})}),g.jsxs(zm,{align:"end",children:[g.jsxs(is,{onClick:e,children:[g.jsx(Fee,{size:16,className:"mr-2"}),"Rename"]}),g.jsxs(is,{onClick:t,className:"text-red-600",children:[g.jsx(qee,{size:16,className:"mr-2"}),"Delete"]})]})]}),sst=({setIsSidebarCollapsed:e,agentId:t})=>{const r=Oo(),{conversation_id:n}=gs(),[a,i]=E.useState(!1),[s,o]=E.useState(!1),[l,c]=E.useState(null),[u,f]=E.useState(""),{conversations:p,isLoading:m,fetchConversations:b,updateConversation:v,deleteConversation:y,getSessionConversations:_,deleteSessionConversation:S}=cfe();console.log("agentId",t,typeof t);const C=typeof t=="string"?_(t):[],T=typeof t=="string"&&isNaN(Number(t))?C:p;E.useEffect(()=>{if(t){const K=Number(t);!isNaN(K)&&K>0&&b(K)}},[t,b]);const A=async()=>{if(l&&u.trim())try{await v(l.id,{title:u.trim(),agent_id:l.agent_id}),i(!1),f(""),t&&!isNaN(Number(t))&&b(parseInt(t))}catch(K){console.error("Failed to rename conversation:",K)}},k=async K=>{c(K),o(!0)},N=async()=>{if(l)try{const K="agentId"in l;K?S(l.id.toString()):await y(l.id),o(!1),n===String(l.id)&&r(`/agents/${t}/chat`),!K&&t&&!isNaN(Number(t))&&b(parseInt(t))}catch(K){console.error("Failed to delete conversation:",K)}},L=K=>{r(`/agents/${t}/chat/${K.id}`)},I=K=>{r(`/agents/${t}/chat/${K.id}`)},P=K=>{c(K),o(!0)},H=K=>{c(K),f(K.title||""),i(!0)},B=()=>{r(`/agents/${t}/chat`)};return g.jsxs("div",{className:"flex flex-col h-full border-r border-gray-200 bg-background dark:border-gray-300",children:[g.jsxs("div",{className:"flex justify-between items-center px-2 py-3 border-b border-gray-200 dark:border-gray-300",children:[g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsxs(To,{children:[g.jsx(Ao,{asChild:!0,children:g.jsx("div",{className:"flex justify-center items-center rounded-md cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700 size-8",children:g.jsx(Sre,{onClick:()=>e(!0),width:18,height:18,className:"text-gray-600 dark:text-gray-300 cursor-pointer",strokeWidth:1.5})})}),g.jsx(ko,{side:"bottom",children:"Collapse Panel"})]}),g.jsx("h2",{className:"font-semibold text-gray-900 text-md dark:text-gray-100",children:"History"})]}),g.jsxs("div",{className:"flex flex-row items-center",children:[t&&!isNaN(Number(t))&&g.jsxs(To,{children:[g.jsx(Ao,{asChild:!0,children:g.jsx("div",{className:"flex justify-center items-center rounded-md cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700 size-8",children:g.jsx(Nm,{onClick:()=>{r(`/agents/${t}`)},width:18,height:18,className:"text-gray-600 dark:text-gray-300 cursor-pointer",strokeWidth:1.5})})}),g.jsx(ko,{side:"bottom",children:"Train Agent"})]}),g.jsxs(To,{children:[g.jsx(Ao,{asChild:!0,children:g.jsx("div",{className:"flex justify-center items-center rounded-md cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700 size-8",children:g.jsx(yre,{onClick:B,width:18,height:18,className:"text-gray-600 dark:text-gray-300"})})}),g.jsx(ko,{side:"bottom",children:"New chat"})]})]})]}),g.jsx("div",{className:"flex flex-col gap-2 h-[calc(100vh-130px)] overflow-scroll custom-scrollbar",children:g.jsx("div",{className:"flex flex-col gap-3 px-2 mt-3",children:m?g.jsx("div",{className:"flex justify-center items-center p-4",children:g.jsx("div",{className:"text-sm text-gray-500",children:"Loading conversations..."})}):T.length>0?T.map(K=>{const j="agentId"in K,W=K.id,D=Number(W)===Number(n);return g.jsx(ast,{conversation:K,isActive:D,onSelect:()=>j?I(K):L(K),onRename:()=>H(K),onDelete:()=>j?P(K):k(K)},W)}):g.jsx("span",{className:"pl-3 text-sm text-gray-400",children:"History is empty"})})}),g.jsx(si,{open:a,onOpenChange:i,children:g.jsxs(oi,{children:[g.jsx(Pi,{children:g.jsx(ds,{children:"Rename Conversation"})}),g.jsxs("div",{className:"space-y-4",children:[g.jsx(Bl,{value:u,onChange:K=>f(K.target.value),placeholder:"Enter new name",onKeyDown:K=>{K.key==="Enter"&&A()}}),g.jsxs("div",{className:"flex justify-end space-x-2",children:[g.jsx(mt,{variant:"outline",onClick:()=>i(!1),children:"Cancel"}),g.jsx(mt,{onClick:A,children:"Rename"})]})]})]})}),g.jsx(si,{open:s,onOpenChange:o,children:g.jsxs(oi,{children:[g.jsx(Pi,{children:g.jsx(ds,{children:"Delete Conversation"})}),g.jsxs("div",{className:"space-y-4",children:[g.jsx("p",{children:"Are you sure you want to delete this conversation? This action cannot be undone."}),g.jsxs("div",{className:"flex justify-end space-x-2",children:[g.jsx(mt,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),g.jsx(mt,{variant:"destructive",onClick:N,children:"Delete"})]})]})]})})]})},tee="agent-sidebar-collapsed",ree=()=>{const{agent_id:e,conversation_id:t}=gs(),r=Oo(),[n,a]=E.useState(()=>{const l=localStorage.getItem(tee);return l!==null?JSON.parse(l):!0}),i=e,s=E.useCallback(()=>{a(l=>!l)},[]),o=E.useCallback(()=>{i&&r(`/agents/${i}/chat`)},[i,r]);return E.useEffect(()=>{localStorage.setItem(tee,JSON.stringify(n))},[n]),g.jsx("div",{className:"flex overflow-hidden flex-1 w-full h-full",children:g.jsxs("div",{className:"flex w-full h-full",children:[g.jsx("div",{className:ut("relative transition-all duration-300 ease-in-out z-31 shrink-0 overflow-x-hidden bg-background [view-transition-name:var(--sidebar-slideover)] max-md:w-0! custom-scrollbar",n?"w-0 opacity-0":"opacity-100 w-[260px]"),children:g.jsx("div",{className:"absolute inset-0 transition-none bg-background",children:g.jsx(sst,{setIsSidebarCollapsed:a,agentId:i})})}),g.jsx("div",{className:ut("flex transition-all duration-300 ease-in-out",n?"w-full":"w-[calc(100%-260px)]"),children:g.jsxs("div",{className:"relative w-full",children:[n&&g.jsxs("div",{className:"flex absolute top-3 left-3 z-10 flex-col justify-evenly items-center text-gray-500 rounded-xl border border-gray-200 shadow-xs dark:border-gray-300 bg-background h-max w-fit","aria-label":"Show sidebar",children:[g.jsxs(To,{children:[g.jsx(Ao,{asChild:!0,children:g.jsx("div",{onClick:s,className:"flex items-center justify-center w-[40px] h-[40px] cursor-pointer",role:"button","aria-label":"Toggle sidebar","data-testid":"toggle-sidebar-button",children:g.jsx(Sre,{width:20,strokeWidth:2})})}),g.jsx(jD,{children:g.jsx(ko,{side:"right",children:"History"})})]}),g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"w-[70%] h-[1px] border-b border-gray-200 dark:border-gray-300"}),g.jsxs(To,{children:[g.jsx(Ao,{children:g.jsx("div",{className:"flex items-center justify-center w-[40px] h-[40px] cursor-pointer",role:"button","aria-label":"New chat",onClick:o,children:g.jsx(yre,{width:20,height:20,strokeWidth:2})})}),g.jsx(ko,{side:"right",children:"New chat"})]})]}),g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"w-[70%] h-[1px] border-b border-gray-200 dark:border-gray-300"}),g.jsxs(To,{children:[g.jsx(Ao,{children:g.jsx("div",{className:"flex items-center justify-center w-[40px] h-[40px] cursor-pointer",role:"button","aria-label":"Train agent","data-testid":"manage-agent-button",children:g.jsx(Nm,{width:20,height:20,strokeWidth:2,onClick:l=>{l.stopPropagation(),r(`/agents/${e}`)}})})}),g.jsx(ko,{side:"right",children:"Train agent"})]})]})]}),g.jsx(nst,{isSidebarCollapsed:n,agentId:i,conversationId:t})]})})]})})};She.createRoot(document.getElementById("root")).render(g.jsx(E.StrictMode,{children:g.jsxs(zpe,{children:[g.jsx(wme,{position:"top-right",richColors:!0,closeButton:!0,duration:4e3,toastOptions:{style:{border:"1px solid #e5e7eb",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",fontSize:"14px",fontWeight:"500"},success:{style:{background:"#c8e3d0",color:"#1fad49",border:"1px solid #bbf7d0"},iconTheme:{primary:"#22c55e",secondary:"#f0fdf4"}},error:{style:{background:"#fef2f2",color:"#dc2626",border:"1px solid #fecaca"},iconTheme:{primary:"#ef4444",secondary:"#fef2f2"}},warning:{style:{background:"#fffbeb",color:"#d97706",border:"1px solid #fed7aa"},iconTheme:{primary:"#f59e0b",secondary:"#fffbeb"}},info:{style:{background:"#eff6ff",color:"#1d4ed8",border:"1px solid #bfdbfe"},iconTheme:{primary:"#3b82f6",secondary:"#eff6ff"}}}}),g.jsxs(mpe,{children:[g.jsx(Nu,{path:"/",element:g.jsx(df,{children:g.jsx(hpe,{to:"/agents",replace:!0})})}),g.jsx(Nu,{path:"/agents",element:g.jsx(df,{children:g.jsx(yAe,{})})}),g.jsx(Nu,{path:"/agents/:agent_id",element:g.jsx(df,{hideLayout:!0,children:g.jsx(qXe,{})})}),g.jsx(Nu,{path:"/agents/:agent_id/chat",element:g.jsx(df,{children:g.jsx(ree,{})})}),g.jsx(Nu,{path:"/agents/:agent_id/chat/:conversation_id",element:g.jsx(df,{children:g.jsx(ree,{})})}),g.jsx(Nu,{path:"/library",element:g.jsx(df,{children:g.jsx(Git,{})})})]})]})}));export{dI as a,Fl as b,Tv as c,lst as g};
