var x0e=Object.defineProperty;var p$=e=>{throw TypeError(e)};var w0e=(e,t,n)=>t in e?x0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var dn=(e,t,n)=>w0e(e,typeof t!="symbol"?t+"":t,n),vT=(e,t,n)=>t.has(e)||p$("Cannot "+n);var fe=(e,t,n)=>(vT(e,t,"read from private field"),n?n.call(e):t.get(e)),It=(e,t,n)=>t.has(e)?p$("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),nt=(e,t,n,r)=>(vT(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),on=(e,t,n)=>(vT(e,t,"access private method"),n);var pC=(e,t,n,r)=>({set _(i){nt(e,t,i,n)},get _(){return fe(e,t,r)}});function b0e(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var TA=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kZ={exports:{}},AN={},EZ={exports:{}},An={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var K1=Symbol.for("react.element"),C0e=Symbol.for("react.portal"),S0e=Symbol.for("react.fragment"),B0e=Symbol.for("react.strict_mode"),_0e=Symbol.for("react.profiler"),k0e=Symbol.for("react.provider"),E0e=Symbol.for("react.context"),N0e=Symbol.for("react.forward_ref"),j0e=Symbol.for("react.suspense"),T0e=Symbol.for("react.memo"),P0e=Symbol.for("react.lazy"),m$=Symbol.iterator;function I0e(e){return e===null||typeof e!="object"?null:(e=m$&&e[m$]||e["@@iterator"],typeof e=="function"?e:null)}var NZ={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jZ=Object.assign,TZ={};function P0(e,t,n){this.props=e,this.context=t,this.refs=TZ,this.updater=n||NZ}P0.prototype.isReactComponent={};P0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};P0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function PZ(){}PZ.prototype=P0.prototype;function hR(e,t,n){this.props=e,this.context=t,this.refs=TZ,this.updater=n||NZ}var fR=hR.prototype=new PZ;fR.constructor=hR;jZ(fR,P0.prototype);fR.isPureReactComponent=!0;var g$=Array.isArray,IZ=Object.prototype.hasOwnProperty,pR={current:null},OZ={key:!0,ref:!0,__self:!0,__source:!0};function FZ(e,t,n){var r,i={},s=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)IZ.call(t,r)&&!OZ.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var l=Array(o),u=0;u<o;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:K1,type:e,key:s,ref:a,props:i,_owner:pR.current}}function O0e(e,t){return{$$typeof:K1,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function mR(e){return typeof e=="object"&&e!==null&&e.$$typeof===K1}function F0e(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var y$=/\/+/g;function xT(e,t){return typeof e=="object"&&e!==null&&e.key!=null?F0e(""+e.key):t.toString(36)}function uB(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case K1:case C0e:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+xT(a,0):r,g$(i)?(n="",e!=null&&(n=e.replace(y$,"$&/")+"/"),uB(i,t,n,"",function(u){return u})):i!=null&&(mR(i)&&(i=O0e(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(y$,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",g$(e))for(var o=0;o<e.length;o++){s=e[o];var l=r+xT(s,o);a+=uB(s,t,n,l,i)}else if(l=I0e(e),typeof l=="function")for(e=l.call(e),o=0;!(s=e.next()).done;)s=s.value,l=r+xT(s,o++),a+=uB(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function mC(e,t,n){if(e==null)return e;var r=[],i=0;return uB(e,r,"","",function(s){return t.call(n,s,i++)}),r}function M0e(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var pa={current:null},dB={transition:null},L0e={ReactCurrentDispatcher:pa,ReactCurrentBatchConfig:dB,ReactCurrentOwner:pR};function MZ(){throw Error("act(...) is not supported in production builds of React.")}An.Children={map:mC,forEach:function(e,t,n){mC(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return mC(e,function(){t++}),t},toArray:function(e){return mC(e,function(t){return t})||[]},only:function(e){if(!mR(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};An.Component=P0;An.Fragment=S0e;An.Profiler=_0e;An.PureComponent=hR;An.StrictMode=B0e;An.Suspense=j0e;An.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L0e;An.act=MZ;An.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=jZ({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=pR.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(l in t)IZ.call(t,l)&&!OZ.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&o!==void 0?o[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){o=Array(l);for(var u=0;u<l;u++)o[u]=arguments[u+2];r.children=o}return{$$typeof:K1,type:e.type,key:i,ref:s,props:r,_owner:a}};An.createContext=function(e){return e={$$typeof:E0e,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:k0e,_context:e},e.Consumer=e};An.createElement=FZ;An.createFactory=function(e){var t=FZ.bind(null,e);return t.type=e,t};An.createRef=function(){return{current:null}};An.forwardRef=function(e){return{$$typeof:N0e,render:e}};An.isValidElement=mR;An.lazy=function(e){return{$$typeof:P0e,_payload:{_status:-1,_result:e},_init:M0e}};An.memo=function(e,t){return{$$typeof:T0e,type:e,compare:t===void 0?null:t}};An.startTransition=function(e){var t=dB.transition;dB.transition={};try{e()}finally{dB.transition=t}};An.unstable_act=MZ;An.useCallback=function(e,t){return pa.current.useCallback(e,t)};An.useContext=function(e){return pa.current.useContext(e)};An.useDebugValue=function(){};An.useDeferredValue=function(e){return pa.current.useDeferredValue(e)};An.useEffect=function(e,t){return pa.current.useEffect(e,t)};An.useId=function(){return pa.current.useId()};An.useImperativeHandle=function(e,t,n){return pa.current.useImperativeHandle(e,t,n)};An.useInsertionEffect=function(e,t){return pa.current.useInsertionEffect(e,t)};An.useLayoutEffect=function(e,t){return pa.current.useLayoutEffect(e,t)};An.useMemo=function(e,t){return pa.current.useMemo(e,t)};An.useReducer=function(e,t,n){return pa.current.useReducer(e,t,n)};An.useRef=function(e){return pa.current.useRef(e)};An.useState=function(e){return pa.current.useState(e)};An.useSyncExternalStore=function(e,t,n){return pa.current.useSyncExternalStore(e,t,n)};An.useTransition=function(){return pa.current.useTransition()};An.version="18.3.1";EZ.exports=An;var S=EZ.exports;const re=Bn(S),gR=b0e({__proto__:null,default:re},[S]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var R0e=S,U0e=Symbol.for("react.element"),D0e=Symbol.for("react.fragment"),Q0e=Object.prototype.hasOwnProperty,H0e=R0e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$0e={key:!0,ref:!0,__self:!0,__source:!0};function LZ(e,t,n){var r,i={},s=null,a=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Q0e.call(t,r)&&!$0e.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:U0e,type:e,key:s,ref:a,props:i,_owner:H0e.current}}AN.Fragment=D0e;AN.jsx=LZ;AN.jsxs=LZ;kZ.exports=AN;var c=kZ.exports,RZ={exports:{}},So={},UZ={exports:{}},DZ={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t($,z){var Q=$.length;$.push(z);e:for(;0<Q;){var ce=Q-1>>>1,R=$[ce];if(0<i(R,z))$[ce]=z,$[Q]=R,Q=ce;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var z=$[0],Q=$.pop();if(Q!==z){$[0]=Q;e:for(var ce=0,R=$.length,O=R>>>1;ce<O;){var Y=2*(ce+1)-1,X=$[Y],K=Y+1,Z=$[K];if(0>i(X,Q))K<R&&0>i(Z,X)?($[ce]=Z,$[K]=Q,ce=K):($[ce]=X,$[Y]=Q,ce=Y);else if(K<R&&0>i(Z,Q))$[ce]=Z,$[K]=Q,ce=K;else break e}}return z}function i($,z){var Q=$.sortIndex-z.sortIndex;return Q!==0?Q:$.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],u=[],d=1,A=null,f=3,h=!1,p=!1,m=!1,g=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x($){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=$)r(u),z.sortIndex=z.expirationTime,t(l,z);else break;z=n(u)}}function b($){if(m=!1,x($),!p)if(n(l)!==null)p=!0,H(w);else{var z=n(u);z!==null&&q(b,z.startTime-$)}}function w($,z){p=!1,m&&(m=!1,y(N),N=-1),h=!0;var Q=f;try{for(x(z),A=n(l);A!==null&&(!(A.expirationTime>z)||$&&!T());){var ce=A.callback;if(typeof ce=="function"){A.callback=null,f=A.priorityLevel;var R=ce(A.expirationTime<=z);z=e.unstable_now(),typeof R=="function"?A.callback=R:A===n(l)&&r(l),x(z)}else r(l);A=n(l)}if(A!==null)var O=!0;else{var Y=n(u);Y!==null&&q(b,Y.startTime-z),O=!1}return O}finally{A=null,f=Q,h=!1}}var B=!1,k=null,N=-1,j=5,L=-1;function T(){return!(e.unstable_now()-L<j)}function E(){if(k!==null){var $=e.unstable_now();L=$;var z=!0;try{z=k(!0,$)}finally{z?F():(B=!1,k=null)}}else B=!1}var F;if(typeof v=="function")F=function(){v(E)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,D=M.port2;M.port1.onmessage=E,F=function(){D.postMessage(null)}}else F=function(){g(E,0)};function H($){k=$,B||(B=!0,F())}function q($,z){N=g(function(){$(e.unstable_now())},z)}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($){$.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,H(w))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function($){switch(f){case 1:case 2:case 3:var z=3;break;default:z=f}var Q=f;f=z;try{return $()}finally{f=Q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,z){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var Q=f;f=$;try{return z()}finally{f=Q}},e.unstable_scheduleCallback=function($,z,Q){var ce=e.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?ce+Q:ce):Q=ce,$){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=Q+R,$={id:d++,callback:z,priorityLevel:$,startTime:Q,expirationTime:R,sortIndex:-1},Q>ce?($.sortIndex=Q,t(u,$),n(l)===null&&$===n(u)&&(m?(y(N),N=-1):m=!0,q(b,Q-ce))):($.sortIndex=R,t(l,$),p||h||(p=!0,H(w))),$},e.unstable_shouldYield=T,e.unstable_wrapCallback=function($){var z=f;return function(){var Q=f;f=z;try{return $.apply(this,arguments)}finally{f=Q}}}})(DZ);UZ.exports=DZ;var z0e=UZ.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var V0e=S,xo=z0e;function Ke(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var QZ=new Set,qw={};function Zp(e,t){Ly(e,t),Ly(e+"Capture",t)}function Ly(e,t){for(qw[e]=t,e=0;e<t.length;e++)QZ.add(t[e])}var ad=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),W4=Object.prototype.hasOwnProperty,K0e=/^[: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]*$/,v$={},x$={};function W0e(e){return W4.call(x$,e)?!0:W4.call(v$,e)?!1:K0e.test(e)?x$[e]=!0:(v$[e]=!0,!1)}function q0e(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function G0e(e,t,n,r){if(t===null||typeof t>"u"||q0e(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ma(e,t,n,r,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var ws={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ws[e]=new ma(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ws[t]=new ma(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ws[e]=new ma(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ws[e]=new ma(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ws[e]=new ma(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ws[e]=new ma(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ws[e]=new ma(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ws[e]=new ma(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ws[e]=new ma(e,5,!1,e.toLowerCase(),null,!1,!1)});var yR=/[\-:]([a-z])/g;function vR(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(yR,vR);ws[t]=new ma(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(yR,vR);ws[t]=new ma(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(yR,vR);ws[t]=new ma(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ws[e]=new ma(e,1,!1,e.toLowerCase(),null,!1,!1)});ws.xlinkHref=new ma("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ws[e]=new ma(e,1,!1,e.toLowerCase(),null,!0,!0)});function xR(e,t,n,r){var i=ws.hasOwnProperty(t)?ws[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(G0e(t,n,i,r)&&(n=null),r||i===null?W0e(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var vd=V0e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gC=Symbol.for("react.element"),Cg=Symbol.for("react.portal"),Sg=Symbol.for("react.fragment"),wR=Symbol.for("react.strict_mode"),q4=Symbol.for("react.profiler"),HZ=Symbol.for("react.provider"),$Z=Symbol.for("react.context"),bR=Symbol.for("react.forward_ref"),G4=Symbol.for("react.suspense"),Y4=Symbol.for("react.suspense_list"),CR=Symbol.for("react.memo"),aA=Symbol.for("react.lazy"),zZ=Symbol.for("react.offscreen"),w$=Symbol.iterator;function Hv(e){return e===null||typeof e!="object"?null:(e=w$&&e[w$]||e["@@iterator"],typeof e=="function"?e:null)}var Fr=Object.assign,wT;function Nx(e){if(wT===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);wT=t&&t[1]||""}return`
`+wT+e}var bT=!1;function CT(e,t){if(!e||bT)return"";bT=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),s=r.stack.split(`
`),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(a!==1||o!==1)do if(a--,o--,0>o||i[a]!==s[o]){var l=`
`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=o);break}}}finally{bT=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nx(e):""}function Y0e(e){switch(e.tag){case 5:return Nx(e.type);case 16:return Nx("Lazy");case 13:return Nx("Suspense");case 19:return Nx("SuspenseList");case 0:case 2:case 15:return e=CT(e.type,!1),e;case 11:return e=CT(e.type.render,!1),e;case 1:return e=CT(e.type,!0),e;default:return""}}function X4(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sg:return"Fragment";case Cg:return"Portal";case q4:return"Profiler";case wR:return"StrictMode";case G4:return"Suspense";case Y4:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $Z:return(e.displayName||"Context")+".Consumer";case HZ:return(e._context.displayName||"Context")+".Provider";case bR:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case CR:return t=e.displayName||null,t!==null?t:X4(e.type)||"Memo";case aA:t=e._payload,e=e._init;try{return X4(e(t))}catch{}}return null}function X0e(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X4(t);case 8:return t===wR?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function fh(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function VZ(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function J0e(e){var t=VZ(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yC(e){e._valueTracker||(e._valueTracker=J0e(e))}function KZ(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=VZ(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function i_(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function J4(e,t){var n=t.checked;return Fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function b$(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fh(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function WZ(e,t){t=t.checked,t!=null&&xR(e,"checked",t,!1)}function Z4(e,t){WZ(e,t);var n=fh(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?eO(e,t.type,n):t.hasOwnProperty("defaultValue")&&eO(e,t.type,fh(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function C$(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function eO(e,t,n){(t!=="number"||i_(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var jx=Array.isArray;function Kg(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+fh(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function tO(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ke(91));return Fr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function S$(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Ke(92));if(jx(n)){if(1<n.length)throw Error(Ke(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fh(n)}}function qZ(e,t){var n=fh(t.value),r=fh(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function B$(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function GZ(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function nO(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?GZ(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var vC,YZ=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(vC=vC||document.createElement("div"),vC.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=vC.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gw(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ew={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Z0e=["Webkit","ms","Moz","O"];Object.keys(ew).forEach(function(e){Z0e.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ew[t]=ew[e]})});function XZ(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ew.hasOwnProperty(e)&&ew[e]?(""+t).trim():t+"px"}function JZ(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=XZ(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var eve=Fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function rO(e,t){if(t){if(eve[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ke(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ke(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ke(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ke(62))}}function iO(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sO=null;function SR(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var aO=null,Wg=null,qg=null;function _$(e){if(e=G1(e)){if(typeof aO!="function")throw Error(Ke(280));var t=e.stateNode;t&&(t=gN(t),aO(e.stateNode,e.type,t))}}function ZZ(e){Wg?qg?qg.push(e):qg=[e]:Wg=e}function eee(){if(Wg){var e=Wg,t=qg;if(qg=Wg=null,_$(e),t)for(e=0;e<t.length;e++)_$(t[e])}}function tee(e,t){return e(t)}function nee(){}var ST=!1;function ree(e,t,n){if(ST)return e(t,n);ST=!0;try{return tee(e,t,n)}finally{ST=!1,(Wg!==null||qg!==null)&&(nee(),eee())}}function Yw(e,t){var n=e.stateNode;if(n===null)return null;var r=gN(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Ke(231,t,typeof n));return n}var oO=!1;if(ad)try{var $v={};Object.defineProperty($v,"passive",{get:function(){oO=!0}}),window.addEventListener("test",$v,$v),window.removeEventListener("test",$v,$v)}catch{oO=!1}function tve(e,t,n,r,i,s,a,o,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var tw=!1,s_=null,a_=!1,lO=null,nve={onError:function(e){tw=!0,s_=e}};function rve(e,t,n,r,i,s,a,o,l){tw=!1,s_=null,tve.apply(nve,arguments)}function ive(e,t,n,r,i,s,a,o,l){if(rve.apply(this,arguments),tw){if(tw){var u=s_;tw=!1,s_=null}else throw Error(Ke(198));a_||(a_=!0,lO=u)}}function em(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function iee(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function k$(e){if(em(e)!==e)throw Error(Ke(188))}function sve(e){var t=e.alternate;if(!t){if(t=em(e),t===null)throw Error(Ke(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return k$(i),e;if(s===r)return k$(i),t;s=s.sibling}throw Error(Ke(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,o=i.child;o;){if(o===n){a=!0,n=i,r=s;break}if(o===r){a=!0,r=i,n=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===n){a=!0,n=s,r=i;break}if(o===r){a=!0,r=s,n=i;break}o=o.sibling}if(!a)throw Error(Ke(189))}}if(n.alternate!==r)throw Error(Ke(190))}if(n.tag!==3)throw Error(Ke(188));return n.stateNode.current===n?e:t}function see(e){return e=sve(e),e!==null?aee(e):null}function aee(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=aee(e);if(t!==null)return t;e=e.sibling}return null}var oee=xo.unstable_scheduleCallback,E$=xo.unstable_cancelCallback,ave=xo.unstable_shouldYield,ove=xo.unstable_requestPaint,ai=xo.unstable_now,lve=xo.unstable_getCurrentPriorityLevel,BR=xo.unstable_ImmediatePriority,lee=xo.unstable_UserBlockingPriority,o_=xo.unstable_NormalPriority,cve=xo.unstable_LowPriority,cee=xo.unstable_IdlePriority,hN=null,Kc=null;function uve(e){if(Kc&&typeof Kc.onCommitFiberRoot=="function")try{Kc.onCommitFiberRoot(hN,e,void 0,(e.current.flags&128)===128)}catch{}}var ec=Math.clz32?Math.clz32:hve,dve=Math.log,Ave=Math.LN2;function hve(e){return e>>>=0,e===0?32:31-(dve(e)/Ave|0)|0}var xC=64,wC=4194304;function Tx(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function l_(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,a=n&268435455;if(a!==0){var o=a&~i;o!==0?r=Tx(o):(s&=a,s!==0&&(r=Tx(s)))}else a=n&~i,a!==0?r=Tx(a):s!==0&&(r=Tx(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ec(t),i=1<<n,r|=e[n],t&=~i;return r}function fve(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pve(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-ec(s),o=1<<a,l=i[a];l===-1?(!(o&n)||o&r)&&(i[a]=fve(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}}function cO(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function uee(){var e=xC;return xC<<=1,!(xC&4194240)&&(xC=64),e}function BT(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function W1(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ec(t),e[t]=n}function mve(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ec(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function _R(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ec(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Qn=0;function dee(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Aee,kR,hee,fee,pee,uO=!1,bC=[],VA=null,KA=null,WA=null,Xw=new Map,Jw=new Map,fA=[],gve="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function N$(e,t){switch(e){case"focusin":case"focusout":VA=null;break;case"dragenter":case"dragleave":KA=null;break;case"mouseover":case"mouseout":WA=null;break;case"pointerover":case"pointerout":Xw.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jw.delete(t.pointerId)}}function zv(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=G1(t),t!==null&&kR(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function yve(e,t,n,r,i){switch(t){case"focusin":return VA=zv(VA,e,t,n,r,i),!0;case"dragenter":return KA=zv(KA,e,t,n,r,i),!0;case"mouseover":return WA=zv(WA,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Xw.set(s,zv(Xw.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Jw.set(s,zv(Jw.get(s)||null,e,t,n,r,i)),!0}return!1}function mee(e){var t=Ff(e.target);if(t!==null){var n=em(t);if(n!==null){if(t=n.tag,t===13){if(t=iee(n),t!==null){e.blockedOn=t,pee(e.priority,function(){hee(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function AB(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dO(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);sO=r,n.target.dispatchEvent(r),sO=null}else return t=G1(n),t!==null&&kR(t),e.blockedOn=n,!1;t.shift()}return!0}function j$(e,t,n){AB(e)&&n.delete(t)}function vve(){uO=!1,VA!==null&&AB(VA)&&(VA=null),KA!==null&&AB(KA)&&(KA=null),WA!==null&&AB(WA)&&(WA=null),Xw.forEach(j$),Jw.forEach(j$)}function Vv(e,t){e.blockedOn===t&&(e.blockedOn=null,uO||(uO=!0,xo.unstable_scheduleCallback(xo.unstable_NormalPriority,vve)))}function Zw(e){function t(i){return Vv(i,e)}if(0<bC.length){Vv(bC[0],e);for(var n=1;n<bC.length;n++){var r=bC[n];r.blockedOn===e&&(r.blockedOn=null)}}for(VA!==null&&Vv(VA,e),KA!==null&&Vv(KA,e),WA!==null&&Vv(WA,e),Xw.forEach(t),Jw.forEach(t),n=0;n<fA.length;n++)r=fA[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<fA.length&&(n=fA[0],n.blockedOn===null);)mee(n),n.blockedOn===null&&fA.shift()}var Gg=vd.ReactCurrentBatchConfig,c_=!0;function xve(e,t,n,r){var i=Qn,s=Gg.transition;Gg.transition=null;try{Qn=1,ER(e,t,n,r)}finally{Qn=i,Gg.transition=s}}function wve(e,t,n,r){var i=Qn,s=Gg.transition;Gg.transition=null;try{Qn=4,ER(e,t,n,r)}finally{Qn=i,Gg.transition=s}}function ER(e,t,n,r){if(c_){var i=dO(e,t,n,r);if(i===null)FT(e,t,r,u_,n),N$(e,r);else if(yve(i,e,t,n,r))r.stopPropagation();else if(N$(e,r),t&4&&-1<gve.indexOf(e)){for(;i!==null;){var s=G1(i);if(s!==null&&Aee(s),s=dO(e,t,n,r),s===null&&FT(e,t,r,u_,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else FT(e,t,r,null,n)}}var u_=null;function dO(e,t,n,r){if(u_=null,e=SR(r),e=Ff(e),e!==null)if(t=em(e),t===null)e=null;else if(n=t.tag,n===13){if(e=iee(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return u_=e,null}function gee(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(lve()){case BR:return 1;case lee:return 4;case o_:case cve:return 16;case cee:return 536870912;default:return 16}default:return 16}}var PA=null,NR=null,hB=null;function yee(){if(hB)return hB;var e,t=NR,n=t.length,r,i="value"in PA?PA.value:PA.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[s-r];r++);return hB=i.slice(e,1<r?1-r:void 0)}function fB(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function CC(){return!0}function T$(){return!1}function Bo(e){function t(n,r,i,s,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?CC:T$,this.isPropagationStopped=T$,this}return Fr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=CC)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=CC)},persist:function(){},isPersistent:CC}),t}var I0={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jR=Bo(I0),q1=Fr({},I0,{view:0,detail:0}),bve=Bo(q1),_T,kT,Kv,fN=Fr({},q1,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:TR,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Kv&&(Kv&&e.type==="mousemove"?(_T=e.screenX-Kv.screenX,kT=e.screenY-Kv.screenY):kT=_T=0,Kv=e),_T)},movementY:function(e){return"movementY"in e?e.movementY:kT}}),P$=Bo(fN),Cve=Fr({},fN,{dataTransfer:0}),Sve=Bo(Cve),Bve=Fr({},q1,{relatedTarget:0}),ET=Bo(Bve),_ve=Fr({},I0,{animationName:0,elapsedTime:0,pseudoElement:0}),kve=Bo(_ve),Eve=Fr({},I0,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Nve=Bo(Eve),jve=Fr({},I0,{data:0}),I$=Bo(jve),Tve={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pve={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"},Ive={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ove(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ive[e])?!!t[e]:!1}function TR(){return Ove}var Fve=Fr({},q1,{key:function(e){if(e.key){var t=Tve[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fB(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Pve[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:TR,charCode:function(e){return e.type==="keypress"?fB(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fB(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mve=Bo(Fve),Lve=Fr({},fN,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),O$=Bo(Lve),Rve=Fr({},q1,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:TR}),Uve=Bo(Rve),Dve=Fr({},I0,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qve=Bo(Dve),Hve=Fr({},fN,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),$ve=Bo(Hve),zve=[9,13,27,32],PR=ad&&"CompositionEvent"in window,nw=null;ad&&"documentMode"in document&&(nw=document.documentMode);var Vve=ad&&"TextEvent"in window&&!nw,vee=ad&&(!PR||nw&&8<nw&&11>=nw),F$=" ",M$=!1;function xee(e,t){switch(e){case"keyup":return zve.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wee(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bg=!1;function Kve(e,t){switch(e){case"compositionend":return wee(t);case"keypress":return t.which!==32?null:(M$=!0,F$);case"textInput":return e=t.data,e===F$&&M$?null:e;default:return null}}function Wve(e,t){if(Bg)return e==="compositionend"||!PR&&xee(e,t)?(e=yee(),hB=NR=PA=null,Bg=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return vee&&t.locale!=="ko"?null:t.data;default:return null}}var qve={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 L$(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!qve[e.type]:t==="textarea"}function bee(e,t,n,r){ZZ(r),t=d_(t,"onChange"),0<t.length&&(n=new jR("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var rw=null,eb=null;function Gve(e){Iee(e,0)}function pN(e){var t=Eg(e);if(KZ(t))return e}function Yve(e,t){if(e==="change")return t}var Cee=!1;if(ad){var NT;if(ad){var jT="oninput"in document;if(!jT){var R$=document.createElement("div");R$.setAttribute("oninput","return;"),jT=typeof R$.oninput=="function"}NT=jT}else NT=!1;Cee=NT&&(!document.documentMode||9<document.documentMode)}function U$(){rw&&(rw.detachEvent("onpropertychange",See),eb=rw=null)}function See(e){if(e.propertyName==="value"&&pN(eb)){var t=[];bee(t,eb,e,SR(e)),ree(Gve,t)}}function Xve(e,t,n){e==="focusin"?(U$(),rw=t,eb=n,rw.attachEvent("onpropertychange",See)):e==="focusout"&&U$()}function Jve(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pN(eb)}function Zve(e,t){if(e==="click")return pN(t)}function exe(e,t){if(e==="input"||e==="change")return pN(t)}function txe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ic=typeof Object.is=="function"?Object.is:txe;function tb(e,t){if(ic(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!W4.call(t,i)||!ic(e[i],t[i]))return!1}return!0}function D$(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Q$(e,t){var n=D$(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=D$(n)}}function Bee(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bee(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _ee(){for(var e=window,t=i_();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=i_(e.document)}return t}function IR(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function nxe(e){var t=_ee(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Bee(n.ownerDocument.documentElement,n)){if(r!==null&&IR(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Q$(n,s);var a=Q$(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var rxe=ad&&"documentMode"in document&&11>=document.documentMode,_g=null,AO=null,iw=null,hO=!1;function H$(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;hO||_g==null||_g!==i_(r)||(r=_g,"selectionStart"in r&&IR(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),iw&&tb(iw,r)||(iw=r,r=d_(AO,"onSelect"),0<r.length&&(t=new jR("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=_g)))}function SC(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kg={animationend:SC("Animation","AnimationEnd"),animationiteration:SC("Animation","AnimationIteration"),animationstart:SC("Animation","AnimationStart"),transitionend:SC("Transition","TransitionEnd")},TT={},kee={};ad&&(kee=document.createElement("div").style,"AnimationEvent"in window||(delete kg.animationend.animation,delete kg.animationiteration.animation,delete kg.animationstart.animation),"TransitionEvent"in window||delete kg.transitionend.transition);function mN(e){if(TT[e])return TT[e];if(!kg[e])return e;var t=kg[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in kee)return TT[e]=t[n];return e}var Eee=mN("animationend"),Nee=mN("animationiteration"),jee=mN("animationstart"),Tee=mN("transitionend"),Pee=new Map,$$="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nh(e,t){Pee.set(e,t),Zp(t,[e])}for(var PT=0;PT<$$.length;PT++){var IT=$$[PT],ixe=IT.toLowerCase(),sxe=IT[0].toUpperCase()+IT.slice(1);Nh(ixe,"on"+sxe)}Nh(Eee,"onAnimationEnd");Nh(Nee,"onAnimationIteration");Nh(jee,"onAnimationStart");Nh("dblclick","onDoubleClick");Nh("focusin","onFocus");Nh("focusout","onBlur");Nh(Tee,"onTransitionEnd");Ly("onMouseEnter",["mouseout","mouseover"]);Ly("onMouseLeave",["mouseout","mouseover"]);Ly("onPointerEnter",["pointerout","pointerover"]);Ly("onPointerLeave",["pointerout","pointerover"]);Zp("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zp("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zp("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zp("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zp("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zp("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Px="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(" "),axe=new Set("cancel close invalid load scroll toggle".split(" ").concat(Px));function z$(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ive(r,t,void 0,e),e.currentTarget=null}function Iee(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],l=o.instance,u=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;z$(i,o,u),s=l}else for(a=0;a<r.length;a++){if(o=r[a],l=o.instance,u=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;z$(i,o,u),s=l}}}if(a_)throw e=lO,a_=!1,lO=null,e}function Ar(e,t){var n=t[yO];n===void 0&&(n=t[yO]=new Set);var r=e+"__bubble";n.has(r)||(Oee(t,e,2,!1),n.add(r))}function OT(e,t,n){var r=0;t&&(r|=4),Oee(n,e,r,t)}var BC="_reactListening"+Math.random().toString(36).slice(2);function nb(e){if(!e[BC]){e[BC]=!0,QZ.forEach(function(n){n!=="selectionchange"&&(axe.has(n)||OT(n,!1,e),OT(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[BC]||(t[BC]=!0,OT("selectionchange",!1,t))}}function Oee(e,t,n,r){switch(gee(t)){case 1:var i=xve;break;case 4:i=wve;break;default:i=ER}n=i.bind(null,t,n,e),i=void 0,!oO||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function FT(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;o!==null;){if(a=Ff(o),a===null)return;if(l=a.tag,l===5||l===6){r=s=a;continue e}o=o.parentNode}}r=r.return}ree(function(){var u=s,d=SR(n),A=[];e:{var f=Pee.get(e);if(f!==void 0){var h=jR,p=e;switch(e){case"keypress":if(fB(n)===0)break e;case"keydown":case"keyup":h=Mve;break;case"focusin":p="focus",h=ET;break;case"focusout":p="blur",h=ET;break;case"beforeblur":case"afterblur":h=ET;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=P$;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Sve;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Uve;break;case Eee:case Nee:case jee:h=kve;break;case Tee:h=Qve;break;case"scroll":h=bve;break;case"wheel":h=$ve;break;case"copy":case"cut":case"paste":h=Nve;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=O$}var m=(t&4)!==0,g=!m&&e==="scroll",y=m?f!==null?f+"Capture":null:f;m=[];for(var v=u,x;v!==null;){x=v;var b=x.stateNode;if(x.tag===5&&b!==null&&(x=b,y!==null&&(b=Yw(v,y),b!=null&&m.push(rb(v,b,x)))),g)break;v=v.return}0<m.length&&(f=new h(f,p,null,n,d),A.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==sO&&(p=n.relatedTarget||n.fromElement)&&(Ff(p)||p[od]))break e;if((h||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=u,p=p?Ff(p):null,p!==null&&(g=em(p),p!==g||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=u),h!==p)){if(m=P$,b="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=O$,b="onPointerLeave",y="onPointerEnter",v="pointer"),g=h==null?f:Eg(h),x=p==null?f:Eg(p),f=new m(b,v+"leave",h,n,d),f.target=g,f.relatedTarget=x,b=null,Ff(d)===u&&(m=new m(y,v+"enter",p,n,d),m.target=x,m.relatedTarget=g,b=m),g=b,h&&p)t:{for(m=h,y=p,v=0,x=m;x;x=Mm(x))v++;for(x=0,b=y;b;b=Mm(b))x++;for(;0<v-x;)m=Mm(m),v--;for(;0<x-v;)y=Mm(y),x--;for(;v--;){if(m===y||y!==null&&m===y.alternate)break t;m=Mm(m),y=Mm(y)}m=null}else m=null;h!==null&&V$(A,f,h,m,!1),p!==null&&g!==null&&V$(A,g,p,m,!0)}}e:{if(f=u?Eg(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var w=Yve;else if(L$(f))if(Cee)w=exe;else{w=Jve;var B=Xve}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(w=Zve);if(w&&(w=w(e,u))){bee(A,w,n,d);break e}B&&B(e,f,u),e==="focusout"&&(B=f._wrapperState)&&B.controlled&&f.type==="number"&&eO(f,"number",f.value)}switch(B=u?Eg(u):window,e){case"focusin":(L$(B)||B.contentEditable==="true")&&(_g=B,AO=u,iw=null);break;case"focusout":iw=AO=_g=null;break;case"mousedown":hO=!0;break;case"contextmenu":case"mouseup":case"dragend":hO=!1,H$(A,n,d);break;case"selectionchange":if(rxe)break;case"keydown":case"keyup":H$(A,n,d)}var k;if(PR)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Bg?xee(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(vee&&n.locale!=="ko"&&(Bg||N!=="onCompositionStart"?N==="onCompositionEnd"&&Bg&&(k=yee()):(PA=d,NR="value"in PA?PA.value:PA.textContent,Bg=!0)),B=d_(u,N),0<B.length&&(N=new I$(N,e,null,n,d),A.push({event:N,listeners:B}),k?N.data=k:(k=wee(n),k!==null&&(N.data=k)))),(k=Vve?Kve(e,n):Wve(e,n))&&(u=d_(u,"onBeforeInput"),0<u.length&&(d=new I$("onBeforeInput","beforeinput",null,n,d),A.push({event:d,listeners:u}),d.data=k))}Iee(A,t)})}function rb(e,t,n){return{instance:e,listener:t,currentTarget:n}}function d_(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Yw(e,n),s!=null&&r.unshift(rb(e,s,i)),s=Yw(e,t),s!=null&&r.push(rb(e,s,i))),e=e.return}return r}function Mm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function V$(e,t,n,r,i){for(var s=t._reactName,a=[];n!==null&&n!==r;){var o=n,l=o.alternate,u=o.stateNode;if(l!==null&&l===r)break;o.tag===5&&u!==null&&(o=u,i?(l=Yw(n,s),l!=null&&a.unshift(rb(n,l,o))):i||(l=Yw(n,s),l!=null&&a.push(rb(n,l,o)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var oxe=/\r\n?/g,lxe=/\u0000|\uFFFD/g;function K$(e){return(typeof e=="string"?e:""+e).replace(oxe,`
`).replace(lxe,"")}function _C(e,t,n){if(t=K$(t),K$(e)!==t&&n)throw Error(Ke(425))}function A_(){}var fO=null,pO=null;function mO(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gO=typeof setTimeout=="function"?setTimeout:void 0,cxe=typeof clearTimeout=="function"?clearTimeout:void 0,W$=typeof Promise=="function"?Promise:void 0,uxe=typeof queueMicrotask=="function"?queueMicrotask:typeof W$<"u"?function(e){return W$.resolve(null).then(e).catch(dxe)}:gO;function dxe(e){setTimeout(function(){throw e})}function MT(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Zw(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Zw(t)}function qA(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function q$(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var O0=Math.random().toString(36).slice(2),Lc="__reactFiber$"+O0,ib="__reactProps$"+O0,od="__reactContainer$"+O0,yO="__reactEvents$"+O0,Axe="__reactListeners$"+O0,hxe="__reactHandles$"+O0;function Ff(e){var t=e[Lc];if(t)return t;for(var n=e.parentNode;n;){if(t=n[od]||n[Lc]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=q$(e);e!==null;){if(n=e[Lc])return n;e=q$(e)}return t}e=n,n=e.parentNode}return null}function G1(e){return e=e[Lc]||e[od],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Eg(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ke(33))}function gN(e){return e[ib]||null}var vO=[],Ng=-1;function jh(e){return{current:e}}function vr(e){0>Ng||(e.current=vO[Ng],vO[Ng]=null,Ng--)}function ar(e,t){Ng++,vO[Ng]=e.current,e.current=t}var ph={},Hs=jh(ph),La=jh(!1),Bp=ph;function Ry(e,t){var n=e.type.contextTypes;if(!n)return ph;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ra(e){return e=e.childContextTypes,e!=null}function h_(){vr(La),vr(Hs)}function G$(e,t,n){if(Hs.current!==ph)throw Error(Ke(168));ar(Hs,t),ar(La,n)}function Fee(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ke(108,X0e(e)||"Unknown",i));return Fr({},n,r)}function f_(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ph,Bp=Hs.current,ar(Hs,e),ar(La,La.current),!0}function Y$(e,t,n){var r=e.stateNode;if(!r)throw Error(Ke(169));n?(e=Fee(e,t,Bp),r.__reactInternalMemoizedMergedChildContext=e,vr(La),vr(Hs),ar(Hs,e)):vr(La),ar(La,n)}var Du=null,yN=!1,LT=!1;function Mee(e){Du===null?Du=[e]:Du.push(e)}function fxe(e){yN=!0,Mee(e)}function Th(){if(!LT&&Du!==null){LT=!0;var e=0,t=Qn;try{var n=Du;for(Qn=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Du=null,yN=!1}catch(i){throw Du!==null&&(Du=Du.slice(e+1)),oee(BR,Th),i}finally{Qn=t,LT=!1}}return null}var jg=[],Tg=0,p_=null,m_=0,Vo=[],Ko=0,_p=null,Vu=1,Ku="";function xf(e,t){jg[Tg++]=m_,jg[Tg++]=p_,p_=e,m_=t}function Lee(e,t,n){Vo[Ko++]=Vu,Vo[Ko++]=Ku,Vo[Ko++]=_p,_p=e;var r=Vu;e=Ku;var i=32-ec(r)-1;r&=~(1<<i),n+=1;var s=32-ec(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Vu=1<<32-ec(t)+i|n<<i|r,Ku=s+e}else Vu=1<<s|n<<i|r,Ku=e}function OR(e){e.return!==null&&(xf(e,1),Lee(e,1,0))}function FR(e){for(;e===p_;)p_=jg[--Tg],jg[Tg]=null,m_=jg[--Tg],jg[Tg]=null;for(;e===_p;)_p=Vo[--Ko],Vo[Ko]=null,Ku=Vo[--Ko],Vo[Ko]=null,Vu=Vo[--Ko],Vo[Ko]=null}var go=null,ho=null,Br=!1,$l=null;function Ree(e,t){var n=Xo(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function X$(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,go=e,ho=qA(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,go=e,ho=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=_p!==null?{id:Vu,overflow:Ku}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Xo(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,go=e,ho=null,!0):!1;default:return!1}}function xO(e){return(e.mode&1)!==0&&(e.flags&128)===0}function wO(e){if(Br){var t=ho;if(t){var n=t;if(!X$(e,t)){if(xO(e))throw Error(Ke(418));t=qA(n.nextSibling);var r=go;t&&X$(e,t)?Ree(r,n):(e.flags=e.flags&-4097|2,Br=!1,go=e)}}else{if(xO(e))throw Error(Ke(418));e.flags=e.flags&-4097|2,Br=!1,go=e}}}function J$(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;go=e}function kC(e){if(e!==go)return!1;if(!Br)return J$(e),Br=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!mO(e.type,e.memoizedProps)),t&&(t=ho)){if(xO(e))throw Uee(),Error(Ke(418));for(;t;)Ree(e,t),t=qA(t.nextSibling)}if(J$(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ke(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ho=qA(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ho=null}}else ho=go?qA(e.stateNode.nextSibling):null;return!0}function Uee(){for(var e=ho;e;)e=qA(e.nextSibling)}function Uy(){ho=go=null,Br=!1}function MR(e){$l===null?$l=[e]:$l.push(e)}var pxe=vd.ReactCurrentBatchConfig;function Wv(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ke(309));var r=n.stateNode}if(!r)throw Error(Ke(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(a){var o=i.refs;a===null?delete o[s]:o[s]=a},t._stringRef=s,t)}if(typeof e!="string")throw Error(Ke(284));if(!n._owner)throw Error(Ke(290,e))}return e}function EC(e,t){throw e=Object.prototype.toString.call(t),Error(Ke(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Z$(e){var t=e._init;return t(e._payload)}function Dee(e){function t(y,v){if(e){var x=y.deletions;x===null?(y.deletions=[v],y.flags|=16):x.push(v)}}function n(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function r(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function i(y,v){return y=JA(y,v),y.index=0,y.sibling=null,y}function s(y,v,x){return y.index=x,e?(x=y.alternate,x!==null?(x=x.index,x<v?(y.flags|=2,v):x):(y.flags|=2,v)):(y.flags|=1048576,v)}function a(y){return e&&y.alternate===null&&(y.flags|=2),y}function o(y,v,x,b){return v===null||v.tag!==6?(v=zT(x,y.mode,b),v.return=y,v):(v=i(v,x),v.return=y,v)}function l(y,v,x,b){var w=x.type;return w===Sg?d(y,v,x.props.children,b,x.key):v!==null&&(v.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===aA&&Z$(w)===v.type)?(b=i(v,x.props),b.ref=Wv(y,v,x),b.return=y,b):(b=wB(x.type,x.key,x.props,null,y.mode,b),b.ref=Wv(y,v,x),b.return=y,b)}function u(y,v,x,b){return v===null||v.tag!==4||v.stateNode.containerInfo!==x.containerInfo||v.stateNode.implementation!==x.implementation?(v=VT(x,y.mode,b),v.return=y,v):(v=i(v,x.children||[]),v.return=y,v)}function d(y,v,x,b,w){return v===null||v.tag!==7?(v=up(x,y.mode,b,w),v.return=y,v):(v=i(v,x),v.return=y,v)}function A(y,v,x){if(typeof v=="string"&&v!==""||typeof v=="number")return v=zT(""+v,y.mode,x),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case gC:return x=wB(v.type,v.key,v.props,null,y.mode,x),x.ref=Wv(y,null,v),x.return=y,x;case Cg:return v=VT(v,y.mode,x),v.return=y,v;case aA:var b=v._init;return A(y,b(v._payload),x)}if(jx(v)||Hv(v))return v=up(v,y.mode,x,null),v.return=y,v;EC(y,v)}return null}function f(y,v,x,b){var w=v!==null?v.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return w!==null?null:o(y,v,""+x,b);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case gC:return x.key===w?l(y,v,x,b):null;case Cg:return x.key===w?u(y,v,x,b):null;case aA:return w=x._init,f(y,v,w(x._payload),b)}if(jx(x)||Hv(x))return w!==null?null:d(y,v,x,b,null);EC(y,x)}return null}function h(y,v,x,b,w){if(typeof b=="string"&&b!==""||typeof b=="number")return y=y.get(x)||null,o(v,y,""+b,w);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case gC:return y=y.get(b.key===null?x:b.key)||null,l(v,y,b,w);case Cg:return y=y.get(b.key===null?x:b.key)||null,u(v,y,b,w);case aA:var B=b._init;return h(y,v,x,B(b._payload),w)}if(jx(b)||Hv(b))return y=y.get(x)||null,d(v,y,b,w,null);EC(v,b)}return null}function p(y,v,x,b){for(var w=null,B=null,k=v,N=v=0,j=null;k!==null&&N<x.length;N++){k.index>N?(j=k,k=null):j=k.sibling;var L=f(y,k,x[N],b);if(L===null){k===null&&(k=j);break}e&&k&&L.alternate===null&&t(y,k),v=s(L,v,N),B===null?w=L:B.sibling=L,B=L,k=j}if(N===x.length)return n(y,k),Br&&xf(y,N),w;if(k===null){for(;N<x.length;N++)k=A(y,x[N],b),k!==null&&(v=s(k,v,N),B===null?w=k:B.sibling=k,B=k);return Br&&xf(y,N),w}for(k=r(y,k);N<x.length;N++)j=h(k,y,N,x[N],b),j!==null&&(e&&j.alternate!==null&&k.delete(j.key===null?N:j.key),v=s(j,v,N),B===null?w=j:B.sibling=j,B=j);return e&&k.forEach(function(T){return t(y,T)}),Br&&xf(y,N),w}function m(y,v,x,b){var w=Hv(x);if(typeof w!="function")throw Error(Ke(150));if(x=w.call(x),x==null)throw Error(Ke(151));for(var B=w=null,k=v,N=v=0,j=null,L=x.next();k!==null&&!L.done;N++,L=x.next()){k.index>N?(j=k,k=null):j=k.sibling;var T=f(y,k,L.value,b);if(T===null){k===null&&(k=j);break}e&&k&&T.alternate===null&&t(y,k),v=s(T,v,N),B===null?w=T:B.sibling=T,B=T,k=j}if(L.done)return n(y,k),Br&&xf(y,N),w;if(k===null){for(;!L.done;N++,L=x.next())L=A(y,L.value,b),L!==null&&(v=s(L,v,N),B===null?w=L:B.sibling=L,B=L);return Br&&xf(y,N),w}for(k=r(y,k);!L.done;N++,L=x.next())L=h(k,y,N,L.value,b),L!==null&&(e&&L.alternate!==null&&k.delete(L.key===null?N:L.key),v=s(L,v,N),B===null?w=L:B.sibling=L,B=L);return e&&k.forEach(function(E){return t(y,E)}),Br&&xf(y,N),w}function g(y,v,x,b){if(typeof x=="object"&&x!==null&&x.type===Sg&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case gC:e:{for(var w=x.key,B=v;B!==null;){if(B.key===w){if(w=x.type,w===Sg){if(B.tag===7){n(y,B.sibling),v=i(B,x.props.children),v.return=y,y=v;break e}}else if(B.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===aA&&Z$(w)===B.type){n(y,B.sibling),v=i(B,x.props),v.ref=Wv(y,B,x),v.return=y,y=v;break e}n(y,B);break}else t(y,B);B=B.sibling}x.type===Sg?(v=up(x.props.children,y.mode,b,x.key),v.return=y,y=v):(b=wB(x.type,x.key,x.props,null,y.mode,b),b.ref=Wv(y,v,x),b.return=y,y=b)}return a(y);case Cg:e:{for(B=x.key;v!==null;){if(v.key===B)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){n(y,v.sibling),v=i(v,x.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=VT(x,y.mode,b),v.return=y,y=v}return a(y);case aA:return B=x._init,g(y,v,B(x._payload),b)}if(jx(x))return p(y,v,x,b);if(Hv(x))return m(y,v,x,b);EC(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,v!==null&&v.tag===6?(n(y,v.sibling),v=i(v,x),v.return=y,y=v):(n(y,v),v=zT(x,y.mode,b),v.return=y,y=v),a(y)):n(y,v)}return g}var Dy=Dee(!0),Qee=Dee(!1),g_=jh(null),y_=null,Pg=null,LR=null;function RR(){LR=Pg=y_=null}function UR(e){var t=g_.current;vr(g_),e._currentValue=t}function bO(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Yg(e,t){y_=e,LR=Pg=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ja=!0),e.firstContext=null)}function dl(e){var t=e._currentValue;if(LR!==e)if(e={context:e,memoizedValue:t,next:null},Pg===null){if(y_===null)throw Error(Ke(308));Pg=e,y_.dependencies={lanes:0,firstContext:e}}else Pg=Pg.next=e;return t}var Mf=null;function DR(e){Mf===null?Mf=[e]:Mf.push(e)}function Hee(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,DR(t)):(n.next=i.next,i.next=n),t.interleaved=n,ld(e,r)}function ld(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var oA=!1;function QR(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $ee(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Xu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function GA(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,kn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ld(e,n)}return i=r.interleaved,i===null?(t.next=t,DR(r)):(t.next=i.next,i.next=t),r.interleaved=t,ld(e,n)}function pB(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_R(e,n)}}function e8(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function v_(e,t,n,r){var i=e.updateQueue;oA=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,u=l.next;l.next=null,a===null?s=u:a.next=u,a=l;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==a&&(o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=l))}if(s!==null){var A=i.baseState;a=0,d=u=l=null,o=s;do{var f=o.lane,h=o.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=e,m=o;switch(f=t,h=n,m.tag){case 1:if(p=m.payload,typeof p=="function"){A=p.call(h,A,f);break e}A=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,f=typeof p=="function"?p.call(h,A,f):p,f==null)break e;A=Fr({},A,f);break e;case 2:oA=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[o]:f.push(o))}else h={eventTime:h,lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(u=d=h,l=A):d=d.next=h,a|=f;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;f=o,o=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(l=A),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Ep|=a,e.lanes=a,e.memoizedState=A}}function t8(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Ke(191,i));i.call(r)}}}var Y1={},Wc=jh(Y1),sb=jh(Y1),ab=jh(Y1);function Lf(e){if(e===Y1)throw Error(Ke(174));return e}function HR(e,t){switch(ar(ab,t),ar(sb,e),ar(Wc,Y1),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:nO(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=nO(t,e)}vr(Wc),ar(Wc,t)}function Qy(){vr(Wc),vr(sb),vr(ab)}function zee(e){Lf(ab.current);var t=Lf(Wc.current),n=nO(t,e.type);t!==n&&(ar(sb,e),ar(Wc,n))}function $R(e){sb.current===e&&(vr(Wc),vr(sb))}var Tr=jh(0);function x_(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var RT=[];function zR(){for(var e=0;e<RT.length;e++)RT[e]._workInProgressVersionPrimary=null;RT.length=0}var mB=vd.ReactCurrentDispatcher,UT=vd.ReactCurrentBatchConfig,kp=0,Or=null,Pi=null,Ki=null,w_=!1,sw=!1,ob=0,mxe=0;function ks(){throw Error(Ke(321))}function VR(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ic(e[n],t[n]))return!1;return!0}function KR(e,t,n,r,i,s){if(kp=s,Or=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,mB.current=e===null||e.memoizedState===null?xxe:wxe,e=n(r,i),sw){s=0;do{if(sw=!1,ob=0,25<=s)throw Error(Ke(301));s+=1,Ki=Pi=null,t.updateQueue=null,mB.current=bxe,e=n(r,i)}while(sw)}if(mB.current=b_,t=Pi!==null&&Pi.next!==null,kp=0,Ki=Pi=Or=null,w_=!1,t)throw Error(Ke(300));return e}function WR(){var e=ob!==0;return ob=0,e}function jc(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ki===null?Or.memoizedState=Ki=e:Ki=Ki.next=e,Ki}function Al(){if(Pi===null){var e=Or.alternate;e=e!==null?e.memoizedState:null}else e=Pi.next;var t=Ki===null?Or.memoizedState:Ki.next;if(t!==null)Ki=t,Pi=e;else{if(e===null)throw Error(Ke(310));Pi=e,e={memoizedState:Pi.memoizedState,baseState:Pi.baseState,baseQueue:Pi.baseQueue,queue:Pi.queue,next:null},Ki===null?Or.memoizedState=Ki=e:Ki=Ki.next=e}return Ki}function lb(e,t){return typeof t=="function"?t(e):t}function DT(e){var t=Al(),n=t.queue;if(n===null)throw Error(Ke(311));n.lastRenderedReducer=e;var r=Pi,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var o=a=null,l=null,u=s;do{var d=u.lane;if((kp&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var A={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(o=l=A,a=r):l=l.next=A,Or.lanes|=d,Ep|=d}u=u.next}while(u!==null&&u!==s);l===null?a=r:l.next=o,ic(r,t.memoizedState)||(ja=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Or.lanes|=s,Ep|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function QT(e){var t=Al(),n=t.queue;if(n===null)throw Error(Ke(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);ic(s,t.memoizedState)||(ja=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Vee(){}function Kee(e,t){var n=Or,r=Al(),i=t(),s=!ic(r.memoizedState,i);if(s&&(r.memoizedState=i,ja=!0),r=r.queue,qR(Gee.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ki!==null&&Ki.memoizedState.tag&1){if(n.flags|=2048,cb(9,qee.bind(null,n,r,i,t),void 0,null),Gi===null)throw Error(Ke(349));kp&30||Wee(n,t,i)}return i}function Wee(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Or.updateQueue,t===null?(t={lastEffect:null,stores:null},Or.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function qee(e,t,n,r){t.value=n,t.getSnapshot=r,Yee(t)&&Xee(e)}function Gee(e,t,n){return n(function(){Yee(t)&&Xee(e)})}function Yee(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ic(e,n)}catch{return!0}}function Xee(e){var t=ld(e,1);t!==null&&tc(t,e,1,-1)}function n8(e){var t=jc();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:lb,lastRenderedState:e},t.queue=e,e=e.dispatch=vxe.bind(null,Or,e),[t.memoizedState,e]}function cb(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Or.updateQueue,t===null?(t={lastEffect:null,stores:null},Or.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Jee(){return Al().memoizedState}function gB(e,t,n,r){var i=jc();Or.flags|=e,i.memoizedState=cb(1|t,n,void 0,r===void 0?null:r)}function vN(e,t,n,r){var i=Al();r=r===void 0?null:r;var s=void 0;if(Pi!==null){var a=Pi.memoizedState;if(s=a.destroy,r!==null&&VR(r,a.deps)){i.memoizedState=cb(t,n,s,r);return}}Or.flags|=e,i.memoizedState=cb(1|t,n,s,r)}function r8(e,t){return gB(8390656,8,e,t)}function qR(e,t){return vN(2048,8,e,t)}function Zee(e,t){return vN(4,2,e,t)}function ete(e,t){return vN(4,4,e,t)}function tte(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function nte(e,t,n){return n=n!=null?n.concat([e]):null,vN(4,4,tte.bind(null,t,e),n)}function GR(){}function rte(e,t){var n=Al();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&VR(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ite(e,t){var n=Al();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&VR(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ste(e,t,n){return kp&21?(ic(n,t)||(n=uee(),Or.lanes|=n,Ep|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ja=!0),e.memoizedState=n)}function gxe(e,t){var n=Qn;Qn=n!==0&&4>n?n:4,e(!0);var r=UT.transition;UT.transition={};try{e(!1),t()}finally{Qn=n,UT.transition=r}}function ate(){return Al().memoizedState}function yxe(e,t,n){var r=XA(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ote(e))lte(t,n);else if(n=Hee(e,t,n,r),n!==null){var i=Aa();tc(n,e,r,i),cte(n,t,r)}}function vxe(e,t,n){var r=XA(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ote(e))lte(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,o=s(a,n);if(i.hasEagerState=!0,i.eagerState=o,ic(o,a)){var l=t.interleaved;l===null?(i.next=i,DR(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Hee(e,t,i,r),n!==null&&(i=Aa(),tc(n,e,r,i),cte(n,t,r))}}function ote(e){var t=e.alternate;return e===Or||t!==null&&t===Or}function lte(e,t){sw=w_=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cte(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_R(e,n)}}var b_={readContext:dl,useCallback:ks,useContext:ks,useEffect:ks,useImperativeHandle:ks,useInsertionEffect:ks,useLayoutEffect:ks,useMemo:ks,useReducer:ks,useRef:ks,useState:ks,useDebugValue:ks,useDeferredValue:ks,useTransition:ks,useMutableSource:ks,useSyncExternalStore:ks,useId:ks,unstable_isNewReconciler:!1},xxe={readContext:dl,useCallback:function(e,t){return jc().memoizedState=[e,t===void 0?null:t],e},useContext:dl,useEffect:r8,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,gB(4194308,4,tte.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gB(4194308,4,e,t)},useInsertionEffect:function(e,t){return gB(4,2,e,t)},useMemo:function(e,t){var n=jc();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jc();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=yxe.bind(null,Or,e),[r.memoizedState,e]},useRef:function(e){var t=jc();return e={current:e},t.memoizedState=e},useState:n8,useDebugValue:GR,useDeferredValue:function(e){return jc().memoizedState=e},useTransition:function(){var e=n8(!1),t=e[0];return e=gxe.bind(null,e[1]),jc().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Or,i=jc();if(Br){if(n===void 0)throw Error(Ke(407));n=n()}else{if(n=t(),Gi===null)throw Error(Ke(349));kp&30||Wee(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,r8(Gee.bind(null,r,s,e),[e]),r.flags|=2048,cb(9,qee.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=jc(),t=Gi.identifierPrefix;if(Br){var n=Ku,r=Vu;n=(r&~(1<<32-ec(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ob++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=mxe++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},wxe={readContext:dl,useCallback:rte,useContext:dl,useEffect:qR,useImperativeHandle:nte,useInsertionEffect:Zee,useLayoutEffect:ete,useMemo:ite,useReducer:DT,useRef:Jee,useState:function(){return DT(lb)},useDebugValue:GR,useDeferredValue:function(e){var t=Al();return ste(t,Pi.memoizedState,e)},useTransition:function(){var e=DT(lb)[0],t=Al().memoizedState;return[e,t]},useMutableSource:Vee,useSyncExternalStore:Kee,useId:ate,unstable_isNewReconciler:!1},bxe={readContext:dl,useCallback:rte,useContext:dl,useEffect:qR,useImperativeHandle:nte,useInsertionEffect:Zee,useLayoutEffect:ete,useMemo:ite,useReducer:QT,useRef:Jee,useState:function(){return QT(lb)},useDebugValue:GR,useDeferredValue:function(e){var t=Al();return Pi===null?t.memoizedState=e:ste(t,Pi.memoizedState,e)},useTransition:function(){var e=QT(lb)[0],t=Al().memoizedState;return[e,t]},useMutableSource:Vee,useSyncExternalStore:Kee,useId:ate,unstable_isNewReconciler:!1};function Ml(e,t){if(e&&e.defaultProps){t=Fr({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function CO(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Fr({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xN={isMounted:function(e){return(e=e._reactInternals)?em(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Aa(),i=XA(e),s=Xu(r,i);s.payload=t,n!=null&&(s.callback=n),t=GA(e,s,i),t!==null&&(tc(t,e,i,r),pB(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Aa(),i=XA(e),s=Xu(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=GA(e,s,i),t!==null&&(tc(t,e,i,r),pB(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Aa(),r=XA(e),i=Xu(n,r);i.tag=2,t!=null&&(i.callback=t),t=GA(e,i,r),t!==null&&(tc(t,e,r,n),pB(t,e,r))}};function i8(e,t,n,r,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,a):t.prototype&&t.prototype.isPureReactComponent?!tb(n,r)||!tb(i,s):!0}function ute(e,t,n){var r=!1,i=ph,s=t.contextType;return typeof s=="object"&&s!==null?s=dl(s):(i=Ra(t)?Bp:Hs.current,r=t.contextTypes,s=(r=r!=null)?Ry(e,i):ph),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xN,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function s8(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xN.enqueueReplaceState(t,t.state,null)}function SO(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},QR(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=dl(s):(s=Ra(t)?Bp:Hs.current,i.context=Ry(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(CO(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&xN.enqueueReplaceState(i,i.state,null),v_(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Hy(e,t){try{var n="",r=t;do n+=Y0e(r),r=r.return;while(r);var i=n}catch(s){i=`
Error generating stack: `+s.message+`
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function HT(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function BO(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Cxe=typeof WeakMap=="function"?WeakMap:Map;function dte(e,t,n){n=Xu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){S_||(S_=!0,FO=r),BO(e,t)},n}function Ate(e,t,n){n=Xu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){BO(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){BO(e,t),typeof r!="function"&&(YA===null?YA=new Set([this]):YA.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function a8(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Cxe;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Lxe.bind(null,e,t,n),t.then(e,e))}function o8(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function l8(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Xu(-1,1),t.tag=2,GA(n,t,1))),n.lanes|=1),e)}var Sxe=vd.ReactCurrentOwner,ja=!1;function na(e,t,n,r){t.child=e===null?Qee(t,null,n,r):Dy(t,e.child,n,r)}function c8(e,t,n,r,i){n=n.render;var s=t.ref;return Yg(t,i),r=KR(e,t,n,r,s,i),n=WR(),e!==null&&!ja?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cd(e,t,i)):(Br&&n&&OR(t),t.flags|=1,na(e,t,r,i),t.child)}function u8(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!rU(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,hte(e,t,s,r,i)):(e=wB(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:tb,n(a,r)&&e.ref===t.ref)return cd(e,t,i)}return t.flags|=1,e=JA(s,r),e.ref=t.ref,e.return=t,t.child=e}function hte(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(tb(s,r)&&e.ref===t.ref)if(ja=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(ja=!0);else return t.lanes=e.lanes,cd(e,t,i)}return _O(e,t,n,r,i)}function fte(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ar(Og,oo),oo|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ar(Og,oo),oo|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ar(Og,oo),oo|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ar(Og,oo),oo|=r;return na(e,t,i,n),t.child}function pte(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _O(e,t,n,r,i){var s=Ra(n)?Bp:Hs.current;return s=Ry(t,s),Yg(t,i),n=KR(e,t,n,r,s,i),r=WR(),e!==null&&!ja?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cd(e,t,i)):(Br&&r&&OR(t),t.flags|=1,na(e,t,n,i),t.child)}function d8(e,t,n,r,i){if(Ra(n)){var s=!0;f_(t)}else s=!1;if(Yg(t,i),t.stateNode===null)yB(e,t),ute(t,n,r),SO(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=dl(u):(u=Ra(n)?Bp:Hs.current,u=Ry(t,u));var d=n.getDerivedStateFromProps,A=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";A||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||l!==u)&&s8(t,a,r,u),oA=!1;var f=t.memoizedState;a.state=f,v_(t,r,a,i),l=t.memoizedState,o!==r||f!==l||La.current||oA?(typeof d=="function"&&(CO(t,n,d,r),l=t.memoizedState),(o=oA||i8(t,n,o,r,f,l,u))?(A||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,$ee(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:Ml(t.type,o),a.props=u,A=t.pendingProps,f=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=dl(l):(l=Ra(n)?Bp:Hs.current,l=Ry(t,l));var h=n.getDerivedStateFromProps;(d=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==A||f!==l)&&s8(t,a,r,l),oA=!1,f=t.memoizedState,a.state=f,v_(t,r,a,i);var p=t.memoizedState;o!==A||f!==p||La.current||oA?(typeof h=="function"&&(CO(t,n,h,r),p=t.memoizedState),(u=oA||i8(t,n,u,r,f,p,l)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,p,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,p,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return kO(e,t,n,r,s,i)}function kO(e,t,n,r,i,s){pte(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Y$(t,n,!1),cd(e,t,s);r=t.stateNode,Sxe.current=t;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Dy(t,e.child,null,s),t.child=Dy(t,null,o,s)):na(e,t,o,s),t.memoizedState=r.state,i&&Y$(t,n,!0),t.child}function mte(e){var t=e.stateNode;t.pendingContext?G$(e,t.pendingContext,t.pendingContext!==t.context):t.context&&G$(e,t.context,!1),HR(e,t.containerInfo)}function A8(e,t,n,r,i){return Uy(),MR(i),t.flags|=256,na(e,t,n,r),t.child}var EO={dehydrated:null,treeContext:null,retryLane:0};function NO(e){return{baseLanes:e,cachePool:null,transitions:null}}function gte(e,t,n){var r=t.pendingProps,i=Tr.current,s=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ar(Tr,i&1),e===null)return wO(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,s?(r=t.mode,s=t.child,a={mode:"hidden",children:a},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=CN(a,r,0,null),e=up(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=NO(n),t.memoizedState=EO,e):YR(t,a));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return Bxe(e,t,a,r,o,i,n);if(s){s=r.fallback,a=t.mode,i=e.child,o=i.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=JA(i,l),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=JA(o,s):(s=up(s,a,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,a=e.child.memoizedState,a=a===null?NO(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=EO,r}return s=e.child,e=s.sibling,r=JA(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function YR(e,t){return t=CN({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function NC(e,t,n,r){return r!==null&&MR(r),Dy(t,e.child,null,n),e=YR(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Bxe(e,t,n,r,i,s,a){if(n)return t.flags&256?(t.flags&=-257,r=HT(Error(Ke(422))),NC(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=CN({mode:"visible",children:r.children},i,0,null),s=up(s,i,a,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Dy(t,e.child,null,a),t.child.memoizedState=NO(a),t.memoizedState=EO,s);if(!(t.mode&1))return NC(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,s=Error(Ke(419)),r=HT(s,r,void 0),NC(e,t,a,r)}if(o=(a&e.childLanes)!==0,ja||o){if(r=Gi,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,ld(e,i),tc(r,e,i,-1))}return nU(),r=HT(Error(Ke(421))),NC(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Rxe.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,ho=qA(i.nextSibling),go=t,Br=!0,$l=null,e!==null&&(Vo[Ko++]=Vu,Vo[Ko++]=Ku,Vo[Ko++]=_p,Vu=e.id,Ku=e.overflow,_p=t),t=YR(t,r.children),t.flags|=4096,t)}function h8(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),bO(e.return,t,n)}function $T(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function yte(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(na(e,t,r.children,n),r=Tr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&h8(e,n,t);else if(e.tag===19)h8(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ar(Tr,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&x_(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$T(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&x_(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$T(t,!0,n,null,s);break;case"together":$T(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function yB(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function cd(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ep|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ke(153));if(t.child!==null){for(e=t.child,n=JA(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=JA(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _xe(e,t,n){switch(t.tag){case 3:mte(t),Uy();break;case 5:zee(t);break;case 1:Ra(t.type)&&f_(t);break;case 4:HR(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ar(g_,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ar(Tr,Tr.current&1),t.flags|=128,null):n&t.child.childLanes?gte(e,t,n):(ar(Tr,Tr.current&1),e=cd(e,t,n),e!==null?e.sibling:null);ar(Tr,Tr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return yte(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ar(Tr,Tr.current),r)break;return null;case 22:case 23:return t.lanes=0,fte(e,t,n)}return cd(e,t,n)}var vte,jO,xte,wte;vte=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};jO=function(){};xte=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Lf(Wc.current);var s=null;switch(n){case"input":i=J4(e,i),r=J4(e,r),s=[];break;case"select":i=Fr({},i,{value:void 0}),r=Fr({},r,{value:void 0}),s=[];break;case"textarea":i=tO(e,i),r=tO(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=A_)}rO(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var o=i[u];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(qw.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(o=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==o&&(l!=null||o!=null))if(u==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(qw.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ar("scroll",e),s||o===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};wte=function(e,t,n,r){n!==r&&(t.flags|=4)};function qv(e,t){if(!Br)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Es(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function kxe(e,t,n){var r=t.pendingProps;switch(FR(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Es(t),null;case 1:return Ra(t.type)&&h_(),Es(t),null;case 3:return r=t.stateNode,Qy(),vr(La),vr(Hs),zR(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(kC(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,$l!==null&&(RO($l),$l=null))),jO(e,t),Es(t),null;case 5:$R(t);var i=Lf(ab.current);if(n=t.type,e!==null&&t.stateNode!=null)xte(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ke(166));return Es(t),null}if(e=Lf(Wc.current),kC(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Lc]=t,r[ib]=s,e=(t.mode&1)!==0,n){case"dialog":Ar("cancel",r),Ar("close",r);break;case"iframe":case"object":case"embed":Ar("load",r);break;case"video":case"audio":for(i=0;i<Px.length;i++)Ar(Px[i],r);break;case"source":Ar("error",r);break;case"img":case"image":case"link":Ar("error",r),Ar("load",r);break;case"details":Ar("toggle",r);break;case"input":b$(r,s),Ar("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ar("invalid",r);break;case"textarea":S$(r,s),Ar("invalid",r)}rO(n,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var o=s[a];a==="children"?typeof o=="string"?r.textContent!==o&&(s.suppressHydrationWarning!==!0&&_C(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&_C(r.textContent,o,e),i=["children",""+o]):qw.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&Ar("scroll",r)}switch(n){case"input":yC(r),C$(r,s,!0);break;case"textarea":yC(r),B$(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=A_)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=GZ(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Lc]=t,e[ib]=r,vte(e,t,!1,!1),t.stateNode=e;e:{switch(a=iO(n,r),n){case"dialog":Ar("cancel",e),Ar("close",e),i=r;break;case"iframe":case"object":case"embed":Ar("load",e),i=r;break;case"video":case"audio":for(i=0;i<Px.length;i++)Ar(Px[i],e);i=r;break;case"source":Ar("error",e),i=r;break;case"img":case"image":case"link":Ar("error",e),Ar("load",e),i=r;break;case"details":Ar("toggle",e),i=r;break;case"input":b$(e,r),i=J4(e,r),Ar("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Fr({},r,{value:void 0}),Ar("invalid",e);break;case"textarea":S$(e,r),i=tO(e,r),Ar("invalid",e);break;default:i=r}rO(n,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="style"?JZ(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&YZ(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Gw(e,l):typeof l=="number"&&Gw(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(qw.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Ar("scroll",e):l!=null&&xR(e,s,l,a))}switch(n){case"input":yC(e),C$(e,r,!1);break;case"textarea":yC(e),B$(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fh(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Kg(e,!!r.multiple,s,!1):r.defaultValue!=null&&Kg(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=A_)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Es(t),null;case 6:if(e&&t.stateNode!=null)wte(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Ke(166));if(n=Lf(ab.current),Lf(Wc.current),kC(t)){if(r=t.stateNode,n=t.memoizedProps,r[Lc]=t,(s=r.nodeValue!==n)&&(e=go,e!==null))switch(e.tag){case 3:_C(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_C(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Lc]=t,t.stateNode=r}return Es(t),null;case 13:if(vr(Tr),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Br&&ho!==null&&t.mode&1&&!(t.flags&128))Uee(),Uy(),t.flags|=98560,s=!1;else if(s=kC(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(Ke(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Ke(317));s[Lc]=t}else Uy(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Es(t),s=!1}else $l!==null&&(RO($l),$l=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Tr.current&1?Mi===0&&(Mi=3):nU())),t.updateQueue!==null&&(t.flags|=4),Es(t),null);case 4:return Qy(),jO(e,t),e===null&&nb(t.stateNode.containerInfo),Es(t),null;case 10:return UR(t.type._context),Es(t),null;case 17:return Ra(t.type)&&h_(),Es(t),null;case 19:if(vr(Tr),s=t.memoizedState,s===null)return Es(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)qv(s,!1);else{if(Mi!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=x_(e),a!==null){for(t.flags|=128,qv(s,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ar(Tr,Tr.current&1|2),t.child}e=e.sibling}s.tail!==null&&ai()>$y&&(t.flags|=128,r=!0,qv(s,!1),t.lanes=4194304)}else{if(!r)if(e=x_(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qv(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Br)return Es(t),null}else 2*ai()-s.renderingStartTime>$y&&n!==1073741824&&(t.flags|=128,r=!0,qv(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(n=s.last,n!==null?n.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ai(),t.sibling=null,n=Tr.current,ar(Tr,r?n&1|2:n&1),t):(Es(t),null);case 22:case 23:return tU(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?oo&1073741824&&(Es(t),t.subtreeFlags&6&&(t.flags|=8192)):Es(t),null;case 24:return null;case 25:return null}throw Error(Ke(156,t.tag))}function Exe(e,t){switch(FR(t),t.tag){case 1:return Ra(t.type)&&h_(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qy(),vr(La),vr(Hs),zR(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return $R(t),null;case 13:if(vr(Tr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ke(340));Uy()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return vr(Tr),null;case 4:return Qy(),null;case 10:return UR(t.type._context),null;case 22:case 23:return tU(),null;case 24:return null;default:return null}}var jC=!1,Rs=!1,Nxe=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Ig(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Wr(e,t,r)}else n.current=null}function TO(e,t,n){try{n()}catch(r){Wr(e,t,r)}}var f8=!1;function jxe(e,t){if(fO=c_,e=_ee(),IR(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,o=-1,l=-1,u=0,d=0,A=e,f=null;t:for(;;){for(var h;A!==n||i!==0&&A.nodeType!==3||(o=a+i),A!==s||r!==0&&A.nodeType!==3||(l=a+r),A.nodeType===3&&(a+=A.nodeValue.length),(h=A.firstChild)!==null;)f=A,A=h;for(;;){if(A===e)break t;if(f===n&&++u===i&&(o=a),f===s&&++d===r&&(l=a),(h=A.nextSibling)!==null)break;A=f,f=A.parentNode}A=h}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(pO={focusedElem:e,selectionRange:n},c_=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){t=ot;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,g=p.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Ml(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ke(163))}}catch(b){Wr(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}return p=f8,f8=!1,p}function aw(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&TO(t,n,s)}i=i.next}while(i!==r)}}function wN(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function PO(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function bte(e){var t=e.alternate;t!==null&&(e.alternate=null,bte(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lc],delete t[ib],delete t[yO],delete t[Axe],delete t[hxe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Cte(e){return e.tag===5||e.tag===3||e.tag===4}function p8(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cte(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function IO(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=A_));else if(r!==4&&(e=e.child,e!==null))for(IO(e,t,n),e=e.sibling;e!==null;)IO(e,t,n),e=e.sibling}function OO(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(OO(e,t,n),e=e.sibling;e!==null;)OO(e,t,n),e=e.sibling}var us=null,Ul=!1;function $d(e,t,n){for(n=n.child;n!==null;)Ste(e,t,n),n=n.sibling}function Ste(e,t,n){if(Kc&&typeof Kc.onCommitFiberUnmount=="function")try{Kc.onCommitFiberUnmount(hN,n)}catch{}switch(n.tag){case 5:Rs||Ig(n,t);case 6:var r=us,i=Ul;us=null,$d(e,t,n),us=r,Ul=i,us!==null&&(Ul?(e=us,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):us.removeChild(n.stateNode));break;case 18:us!==null&&(Ul?(e=us,n=n.stateNode,e.nodeType===8?MT(e.parentNode,n):e.nodeType===1&&MT(e,n),Zw(e)):MT(us,n.stateNode));break;case 4:r=us,i=Ul,us=n.stateNode.containerInfo,Ul=!0,$d(e,t,n),us=r,Ul=i;break;case 0:case 11:case 14:case 15:if(!Rs&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&TO(n,t,a),i=i.next}while(i!==r)}$d(e,t,n);break;case 1:if(!Rs&&(Ig(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){Wr(n,t,o)}$d(e,t,n);break;case 21:$d(e,t,n);break;case 22:n.mode&1?(Rs=(r=Rs)||n.memoizedState!==null,$d(e,t,n),Rs=r):$d(e,t,n);break;default:$d(e,t,n)}}function m8(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Nxe),t.forEach(function(r){var i=Uxe.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function kl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:us=o.stateNode,Ul=!1;break e;case 3:us=o.stateNode.containerInfo,Ul=!0;break e;case 4:us=o.stateNode.containerInfo,Ul=!0;break e}o=o.return}if(us===null)throw Error(Ke(160));Ste(s,a,i),us=null,Ul=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Wr(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Bte(t,e),t=t.sibling}function Bte(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(kl(t,e),_c(e),r&4){try{aw(3,e,e.return),wN(3,e)}catch(m){Wr(e,e.return,m)}try{aw(5,e,e.return)}catch(m){Wr(e,e.return,m)}}break;case 1:kl(t,e),_c(e),r&512&&n!==null&&Ig(n,n.return);break;case 5:if(kl(t,e),_c(e),r&512&&n!==null&&Ig(n,n.return),e.flags&32){var i=e.stateNode;try{Gw(i,"")}catch(m){Wr(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=n!==null?n.memoizedProps:s,o=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&WZ(i,s),iO(o,a);var u=iO(o,s);for(a=0;a<l.length;a+=2){var d=l[a],A=l[a+1];d==="style"?JZ(i,A):d==="dangerouslySetInnerHTML"?YZ(i,A):d==="children"?Gw(i,A):xR(i,d,A,u)}switch(o){case"input":Z4(i,s);break;case"textarea":qZ(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Kg(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?Kg(i,!!s.multiple,s.defaultValue,!0):Kg(i,!!s.multiple,s.multiple?[]:"",!1))}i[ib]=s}catch(m){Wr(e,e.return,m)}}break;case 6:if(kl(t,e),_c(e),r&4){if(e.stateNode===null)throw Error(Ke(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){Wr(e,e.return,m)}}break;case 3:if(kl(t,e),_c(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Zw(t.containerInfo)}catch(m){Wr(e,e.return,m)}break;case 4:kl(t,e),_c(e);break;case 13:kl(t,e),_c(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(ZR=ai())),r&4&&m8(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Rs=(u=Rs)||d,kl(t,e),Rs=u):kl(t,e),_c(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(ot=e,d=e.child;d!==null;){for(A=ot=d;ot!==null;){switch(f=ot,h=f.child,f.tag){case 0:case 11:case 14:case 15:aw(4,f,f.return);break;case 1:Ig(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(m){Wr(r,n,m)}}break;case 5:Ig(f,f.return);break;case 22:if(f.memoizedState!==null){y8(A);continue}}h!==null?(h.return=f,ot=h):y8(A)}d=d.sibling}e:for(d=null,A=e;;){if(A.tag===5){if(d===null){d=A;try{i=A.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=A.stateNode,l=A.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=XZ("display",a))}catch(m){Wr(e,e.return,m)}}}else if(A.tag===6){if(d===null)try{A.stateNode.nodeValue=u?"":A.memoizedProps}catch(m){Wr(e,e.return,m)}}else if((A.tag!==22&&A.tag!==23||A.memoizedState===null||A===e)&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===e)break e;for(;A.sibling===null;){if(A.return===null||A.return===e)break e;d===A&&(d=null),A=A.return}d===A&&(d=null),A.sibling.return=A.return,A=A.sibling}}break;case 19:kl(t,e),_c(e),r&4&&m8(e);break;case 21:break;default:kl(t,e),_c(e)}}function _c(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Cte(n)){var r=n;break e}n=n.return}throw Error(Ke(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Gw(i,""),r.flags&=-33);var s=p8(e);OO(e,s,i);break;case 3:case 4:var a=r.stateNode.containerInfo,o=p8(e);IO(e,o,a);break;default:throw Error(Ke(161))}}catch(l){Wr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Txe(e,t,n){ot=e,_te(e)}function _te(e,t,n){for(var r=(e.mode&1)!==0;ot!==null;){var i=ot,s=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||jC;if(!a){var o=i.alternate,l=o!==null&&o.memoizedState!==null||Rs;o=jC;var u=Rs;if(jC=a,(Rs=l)&&!u)for(ot=i;ot!==null;)a=ot,l=a.child,a.tag===22&&a.memoizedState!==null?v8(i):l!==null?(l.return=a,ot=l):v8(i);for(;s!==null;)ot=s,_te(s),s=s.sibling;ot=i,jC=o,Rs=u}g8(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ot=s):g8(e)}}function g8(e){for(;ot!==null;){var t=ot;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Rs||wN(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Rs)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ml(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&t8(t,s,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}t8(t,a,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var A=d.dehydrated;A!==null&&Zw(A)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ke(163))}Rs||t.flags&512&&PO(t)}catch(f){Wr(t,t.return,f)}}if(t===e){ot=null;break}if(n=t.sibling,n!==null){n.return=t.return,ot=n;break}ot=t.return}}function y8(e){for(;ot!==null;){var t=ot;if(t===e){ot=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ot=n;break}ot=t.return}}function v8(e){for(;ot!==null;){var t=ot;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{wN(4,t)}catch(l){Wr(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Wr(t,i,l)}}var s=t.return;try{PO(t)}catch(l){Wr(t,s,l)}break;case 5:var a=t.return;try{PO(t)}catch(l){Wr(t,a,l)}}}catch(l){Wr(t,t.return,l)}if(t===e){ot=null;break}var o=t.sibling;if(o!==null){o.return=t.return,ot=o;break}ot=t.return}}var Pxe=Math.ceil,C_=vd.ReactCurrentDispatcher,XR=vd.ReactCurrentOwner,nl=vd.ReactCurrentBatchConfig,kn=0,Gi=null,wi=null,xs=0,oo=0,Og=jh(0),Mi=0,ub=null,Ep=0,bN=0,JR=0,ow=null,Ea=null,ZR=0,$y=1/0,Lu=null,S_=!1,FO=null,YA=null,TC=!1,IA=null,B_=0,lw=0,MO=null,vB=-1,xB=0;function Aa(){return kn&6?ai():vB!==-1?vB:vB=ai()}function XA(e){return e.mode&1?kn&2&&xs!==0?xs&-xs:pxe.transition!==null?(xB===0&&(xB=uee()),xB):(e=Qn,e!==0||(e=window.event,e=e===void 0?16:gee(e.type)),e):1}function tc(e,t,n,r){if(50<lw)throw lw=0,MO=null,Error(Ke(185));W1(e,n,r),(!(kn&2)||e!==Gi)&&(e===Gi&&(!(kn&2)&&(bN|=n),Mi===4&&pA(e,xs)),Ua(e,r),n===1&&kn===0&&!(t.mode&1)&&($y=ai()+500,yN&&Th()))}function Ua(e,t){var n=e.callbackNode;pve(e,t);var r=l_(e,e===Gi?xs:0);if(r===0)n!==null&&E$(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&E$(n),t===1)e.tag===0?fxe(x8.bind(null,e)):Mee(x8.bind(null,e)),uxe(function(){!(kn&6)&&Th()}),n=null;else{switch(dee(r)){case 1:n=BR;break;case 4:n=lee;break;case 16:n=o_;break;case 536870912:n=cee;break;default:n=o_}n=Ote(n,kte.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function kte(e,t){if(vB=-1,xB=0,kn&6)throw Error(Ke(327));var n=e.callbackNode;if(Xg()&&e.callbackNode!==n)return null;var r=l_(e,e===Gi?xs:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=__(e,r);else{t=r;var i=kn;kn|=2;var s=Nte();(Gi!==e||xs!==t)&&(Lu=null,$y=ai()+500,cp(e,t));do try{Fxe();break}catch(o){Ete(e,o)}while(!0);RR(),C_.current=s,kn=i,wi!==null?t=0:(Gi=null,xs=0,t=Mi)}if(t!==0){if(t===2&&(i=cO(e),i!==0&&(r=i,t=LO(e,i))),t===1)throw n=ub,cp(e,0),pA(e,r),Ua(e,ai()),n;if(t===6)pA(e,r);else{if(i=e.current.alternate,!(r&30)&&!Ixe(i)&&(t=__(e,r),t===2&&(s=cO(e),s!==0&&(r=s,t=LO(e,s))),t===1))throw n=ub,cp(e,0),pA(e,r),Ua(e,ai()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ke(345));case 2:wf(e,Ea,Lu);break;case 3:if(pA(e,r),(r&130023424)===r&&(t=ZR+500-ai(),10<t)){if(l_(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Aa(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=gO(wf.bind(null,e,Ea,Lu),t);break}wf(e,Ea,Lu);break;case 4:if(pA(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-ec(r);s=1<<a,a=t[a],a>i&&(i=a),r&=~s}if(r=i,r=ai()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Pxe(r/1960))-r,10<r){e.timeoutHandle=gO(wf.bind(null,e,Ea,Lu),r);break}wf(e,Ea,Lu);break;case 5:wf(e,Ea,Lu);break;default:throw Error(Ke(329))}}}return Ua(e,ai()),e.callbackNode===n?kte.bind(null,e):null}function LO(e,t){var n=ow;return e.current.memoizedState.isDehydrated&&(cp(e,t).flags|=256),e=__(e,t),e!==2&&(t=Ea,Ea=n,t!==null&&RO(t)),e}function RO(e){Ea===null?Ea=e:Ea.push.apply(Ea,e)}function Ixe(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!ic(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function pA(e,t){for(t&=~JR,t&=~bN,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ec(t),r=1<<n;e[n]=-1,t&=~r}}function x8(e){if(kn&6)throw Error(Ke(327));Xg();var t=l_(e,0);if(!(t&1))return Ua(e,ai()),null;var n=__(e,t);if(e.tag!==0&&n===2){var r=cO(e);r!==0&&(t=r,n=LO(e,r))}if(n===1)throw n=ub,cp(e,0),pA(e,t),Ua(e,ai()),n;if(n===6)throw Error(Ke(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wf(e,Ea,Lu),Ua(e,ai()),null}function eU(e,t){var n=kn;kn|=1;try{return e(t)}finally{kn=n,kn===0&&($y=ai()+500,yN&&Th())}}function Np(e){IA!==null&&IA.tag===0&&!(kn&6)&&Xg();var t=kn;kn|=1;var n=nl.transition,r=Qn;try{if(nl.transition=null,Qn=1,e)return e()}finally{Qn=r,nl.transition=n,kn=t,!(kn&6)&&Th()}}function tU(){oo=Og.current,vr(Og)}function cp(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,cxe(n)),wi!==null)for(n=wi.return;n!==null;){var r=n;switch(FR(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&h_();break;case 3:Qy(),vr(La),vr(Hs),zR();break;case 5:$R(r);break;case 4:Qy();break;case 13:vr(Tr);break;case 19:vr(Tr);break;case 10:UR(r.type._context);break;case 22:case 23:tU()}n=n.return}if(Gi=e,wi=e=JA(e.current,null),xs=oo=t,Mi=0,ub=null,JR=bN=Ep=0,Ea=ow=null,Mf!==null){for(t=0;t<Mf.length;t++)if(n=Mf[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var a=s.next;s.next=i,r.next=a}n.pending=r}Mf=null}return e}function Ete(e,t){do{var n=wi;try{if(RR(),mB.current=b_,w_){for(var r=Or.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}w_=!1}if(kp=0,Ki=Pi=Or=null,sw=!1,ob=0,XR.current=null,n===null||n.return===null){Mi=1,ub=t,wi=null;break}e:{var s=e,a=n.return,o=n,l=t;if(t=xs,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=o,A=d.tag;if(!(d.mode&1)&&(A===0||A===11||A===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=o8(a);if(h!==null){h.flags&=-257,l8(h,a,o,s,t),h.mode&1&&a8(s,u,t),t=h,l=u;var p=t.updateQueue;if(p===null){var m=new Set;m.add(l),t.updateQueue=m}else p.add(l);break e}else{if(!(t&1)){a8(s,u,t),nU();break e}l=Error(Ke(426))}}else if(Br&&o.mode&1){var g=o8(a);if(g!==null){!(g.flags&65536)&&(g.flags|=256),l8(g,a,o,s,t),MR(Hy(l,o));break e}}s=l=Hy(l,o),Mi!==4&&(Mi=2),ow===null?ow=[s]:ow.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=dte(s,l,t);e8(s,y);break e;case 1:o=l;var v=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(YA===null||!YA.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=Ate(s,o,t);e8(s,b);break e}}s=s.return}while(s!==null)}Tte(n)}catch(w){t=w,wi===n&&n!==null&&(wi=n=n.return);continue}break}while(!0)}function Nte(){var e=C_.current;return C_.current=b_,e===null?b_:e}function nU(){(Mi===0||Mi===3||Mi===2)&&(Mi=4),Gi===null||!(Ep&268435455)&&!(bN&268435455)||pA(Gi,xs)}function __(e,t){var n=kn;kn|=2;var r=Nte();(Gi!==e||xs!==t)&&(Lu=null,cp(e,t));do try{Oxe();break}catch(i){Ete(e,i)}while(!0);if(RR(),kn=n,C_.current=r,wi!==null)throw Error(Ke(261));return Gi=null,xs=0,Mi}function Oxe(){for(;wi!==null;)jte(wi)}function Fxe(){for(;wi!==null&&!ave();)jte(wi)}function jte(e){var t=Ite(e.alternate,e,oo);e.memoizedProps=e.pendingProps,t===null?Tte(e):wi=t,XR.current=null}function Tte(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Exe(n,t),n!==null){n.flags&=32767,wi=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Mi=6,wi=null;return}}else if(n=kxe(n,t,oo),n!==null){wi=n;return}if(t=t.sibling,t!==null){wi=t;return}wi=t=e}while(t!==null);Mi===0&&(Mi=5)}function wf(e,t,n){var r=Qn,i=nl.transition;try{nl.transition=null,Qn=1,Mxe(e,t,n,r)}finally{nl.transition=i,Qn=r}return null}function Mxe(e,t,n,r){do Xg();while(IA!==null);if(kn&6)throw Error(Ke(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ke(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(mve(e,s),e===Gi&&(wi=Gi=null,xs=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||TC||(TC=!0,Ote(o_,function(){return Xg(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=nl.transition,nl.transition=null;var a=Qn;Qn=1;var o=kn;kn|=4,XR.current=null,jxe(e,n),Bte(n,e),nxe(pO),c_=!!fO,pO=fO=null,e.current=n,Txe(n),ove(),kn=o,Qn=a,nl.transition=s}else e.current=n;if(TC&&(TC=!1,IA=e,B_=i),s=e.pendingLanes,s===0&&(YA=null),uve(n.stateNode),Ua(e,ai()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(S_)throw S_=!1,e=FO,FO=null,e;return B_&1&&e.tag!==0&&Xg(),s=e.pendingLanes,s&1?e===MO?lw++:(lw=0,MO=e):lw=0,Th(),null}function Xg(){if(IA!==null){var e=dee(B_),t=nl.transition,n=Qn;try{if(nl.transition=null,Qn=16>e?16:e,IA===null)var r=!1;else{if(e=IA,IA=null,B_=0,kn&6)throw Error(Ke(331));var i=kn;for(kn|=4,ot=e.current;ot!==null;){var s=ot,a=s.child;if(ot.flags&16){var o=s.deletions;if(o!==null){for(var l=0;l<o.length;l++){var u=o[l];for(ot=u;ot!==null;){var d=ot;switch(d.tag){case 0:case 11:case 15:aw(8,d,s)}var A=d.child;if(A!==null)A.return=d,ot=A;else for(;ot!==null;){d=ot;var f=d.sibling,h=d.return;if(bte(d),d===u){ot=null;break}if(f!==null){f.return=h,ot=f;break}ot=h}}}var p=s.alternate;if(p!==null){var m=p.child;if(m!==null){p.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(m!==null)}}ot=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,ot=a;else e:for(;ot!==null;){if(s=ot,s.flags&2048)switch(s.tag){case 0:case 11:case 15:aw(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,ot=y;break e}ot=s.return}}var v=e.current;for(ot=v;ot!==null;){a=ot;var x=a.child;if(a.subtreeFlags&2064&&x!==null)x.return=a,ot=x;else e:for(a=v;ot!==null;){if(o=ot,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:wN(9,o)}}catch(w){Wr(o,o.return,w)}if(o===a){ot=null;break e}var b=o.sibling;if(b!==null){b.return=o.return,ot=b;break e}ot=o.return}}if(kn=i,Th(),Kc&&typeof Kc.onPostCommitFiberRoot=="function")try{Kc.onPostCommitFiberRoot(hN,e)}catch{}r=!0}return r}finally{Qn=n,nl.transition=t}}return!1}function w8(e,t,n){t=Hy(n,t),t=dte(e,t,1),e=GA(e,t,1),t=Aa(),e!==null&&(W1(e,1,t),Ua(e,t))}function Wr(e,t,n){if(e.tag===3)w8(e,e,n);else for(;t!==null;){if(t.tag===3){w8(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(YA===null||!YA.has(r))){e=Hy(n,e),e=Ate(t,e,1),t=GA(t,e,1),e=Aa(),t!==null&&(W1(t,1,e),Ua(t,e));break}}t=t.return}}function Lxe(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Aa(),e.pingedLanes|=e.suspendedLanes&n,Gi===e&&(xs&n)===n&&(Mi===4||Mi===3&&(xs&130023424)===xs&&500>ai()-ZR?cp(e,0):JR|=n),Ua(e,t)}function Pte(e,t){t===0&&(e.mode&1?(t=wC,wC<<=1,!(wC&130023424)&&(wC=4194304)):t=1);var n=Aa();e=ld(e,t),e!==null&&(W1(e,t,n),Ua(e,n))}function Rxe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Pte(e,n)}function Uxe(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ke(314))}r!==null&&r.delete(t),Pte(e,n)}var Ite;Ite=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||La.current)ja=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ja=!1,_xe(e,t,n);ja=!!(e.flags&131072)}else ja=!1,Br&&t.flags&1048576&&Lee(t,m_,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;yB(e,t),e=t.pendingProps;var i=Ry(t,Hs.current);Yg(t,n),i=KR(null,t,r,e,i,n);var s=WR();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ra(r)?(s=!0,f_(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,QR(t),i.updater=xN,t.stateNode=i,i._reactInternals=t,SO(t,r,e,n),t=kO(null,t,r,!0,s,n)):(t.tag=0,Br&&s&&OR(t),na(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(yB(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Qxe(r),e=Ml(r,e),i){case 0:t=_O(null,t,r,e,n);break e;case 1:t=d8(null,t,r,e,n);break e;case 11:t=c8(null,t,r,e,n);break e;case 14:t=u8(null,t,r,Ml(r.type,e),n);break e}throw Error(Ke(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ml(r,i),_O(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ml(r,i),d8(e,t,r,i,n);case 3:e:{if(mte(t),e===null)throw Error(Ke(387));r=t.pendingProps,s=t.memoizedState,i=s.element,$ee(e,t),v_(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Hy(Error(Ke(423)),t),t=A8(e,t,r,n,i);break e}else if(r!==i){i=Hy(Error(Ke(424)),t),t=A8(e,t,r,n,i);break e}else for(ho=qA(t.stateNode.containerInfo.firstChild),go=t,Br=!0,$l=null,n=Qee(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Uy(),r===i){t=cd(e,t,n);break e}na(e,t,r,n)}t=t.child}return t;case 5:return zee(t),e===null&&wO(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,mO(r,i)?a=null:s!==null&&mO(r,s)&&(t.flags|=32),pte(e,t),na(e,t,a,n),t.child;case 6:return e===null&&wO(t),null;case 13:return gte(e,t,n);case 4:return HR(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Dy(t,null,r,n):na(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ml(r,i),c8(e,t,r,i,n);case 7:return na(e,t,t.pendingProps,n),t.child;case 8:return na(e,t,t.pendingProps.children,n),t.child;case 12:return na(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,ar(g_,r._currentValue),r._currentValue=a,s!==null)if(ic(s.value,a)){if(s.children===i.children&&!La.current){t=cd(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Xu(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),bO(s.return,n,t),o.lanes|=n;break}l=l.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(Ke(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),bO(a,n,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}na(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Yg(t,n),i=dl(i),r=r(i),t.flags|=1,na(e,t,r,n),t.child;case 14:return r=t.type,i=Ml(r,t.pendingProps),i=Ml(r.type,i),u8(e,t,r,i,n);case 15:return hte(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ml(r,i),yB(e,t),t.tag=1,Ra(r)?(e=!0,f_(t)):e=!1,Yg(t,n),ute(t,r,i),SO(t,r,i,n),kO(null,t,r,!0,e,n);case 19:return yte(e,t,n);case 22:return fte(e,t,n)}throw Error(Ke(156,t.tag))};function Ote(e,t){return oee(e,t)}function Dxe(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xo(e,t,n,r){return new Dxe(e,t,n,r)}function rU(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qxe(e){if(typeof e=="function")return rU(e)?1:0;if(e!=null){if(e=e.$$typeof,e===bR)return 11;if(e===CR)return 14}return 2}function JA(e,t){var n=e.alternate;return n===null?(n=Xo(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function wB(e,t,n,r,i,s){var a=2;if(r=e,typeof e=="function")rU(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Sg:return up(n.children,i,s,t);case wR:a=8,i|=8;break;case q4:return e=Xo(12,n,t,i|2),e.elementType=q4,e.lanes=s,e;case G4:return e=Xo(13,n,t,i),e.elementType=G4,e.lanes=s,e;case Y4:return e=Xo(19,n,t,i),e.elementType=Y4,e.lanes=s,e;case zZ:return CN(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case HZ:a=10;break e;case $Z:a=9;break e;case bR:a=11;break e;case CR:a=14;break e;case aA:a=16,r=null;break e}throw Error(Ke(130,e==null?e:typeof e,""))}return t=Xo(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function up(e,t,n,r){return e=Xo(7,e,r,t),e.lanes=n,e}function CN(e,t,n,r){return e=Xo(22,e,r,t),e.elementType=zZ,e.lanes=n,e.stateNode={isHidden:!1},e}function zT(e,t,n){return e=Xo(6,e,null,t),e.lanes=n,e}function VT(e,t,n){return t=Xo(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hxe(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=BT(0),this.expirationTimes=BT(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=BT(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function iU(e,t,n,r,i,s,a,o,l){return e=new Hxe(e,t,n,o,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Xo(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},QR(s),e}function $xe(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Cg,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Fte(e){if(!e)return ph;e=e._reactInternals;e:{if(em(e)!==e||e.tag!==1)throw Error(Ke(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ra(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ke(171))}if(e.tag===1){var n=e.type;if(Ra(n))return Fee(e,n,t)}return t}function Mte(e,t,n,r,i,s,a,o,l){return e=iU(n,r,!0,e,i,s,a,o,l),e.context=Fte(null),n=e.current,r=Aa(),i=XA(n),s=Xu(r,i),s.callback=t??null,GA(n,s,i),e.current.lanes=i,W1(e,i,r),Ua(e,r),e}function SN(e,t,n,r){var i=t.current,s=Aa(),a=XA(i);return n=Fte(n),t.context===null?t.context=n:t.pendingContext=n,t=Xu(s,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=GA(i,t,a),e!==null&&(tc(e,i,a,s),pB(e,i,a)),a}function k_(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function b8(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sU(e,t){b8(e,t),(e=e.alternate)&&b8(e,t)}function zxe(){return null}var Lte=typeof reportError=="function"?reportError:function(e){console.error(e)};function aU(e){this._internalRoot=e}BN.prototype.render=aU.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ke(409));SN(e,t,null,null)};BN.prototype.unmount=aU.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Np(function(){SN(null,e,null,null)}),t[od]=null}};function BN(e){this._internalRoot=e}BN.prototype.unstable_scheduleHydration=function(e){if(e){var t=fee();e={blockedOn:null,target:e,priority:t};for(var n=0;n<fA.length&&t!==0&&t<fA[n].priority;n++);fA.splice(n,0,e),n===0&&mee(e)}};function oU(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _N(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function C8(){}function Vxe(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=k_(a);s.call(u)}}var a=Mte(t,r,e,0,null,!1,!1,"",C8);return e._reactRootContainer=a,e[od]=a.current,nb(e.nodeType===8?e.parentNode:e),Np(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var u=k_(l);o.call(u)}}var l=iU(e,0,!1,null,null,!1,!1,"",C8);return e._reactRootContainer=l,e[od]=l.current,nb(e.nodeType===8?e.parentNode:e),Np(function(){SN(t,l,n,r)}),l}function kN(e,t,n,r,i){var s=n._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var o=i;i=function(){var l=k_(a);o.call(l)}}SN(t,a,e,i)}else a=Vxe(n,t,e,i,r);return k_(a)}Aee=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Tx(t.pendingLanes);n!==0&&(_R(t,n|1),Ua(t,ai()),!(kn&6)&&($y=ai()+500,Th()))}break;case 13:Np(function(){var r=ld(e,1);if(r!==null){var i=Aa();tc(r,e,1,i)}}),sU(e,1)}};kR=function(e){if(e.tag===13){var t=ld(e,134217728);if(t!==null){var n=Aa();tc(t,e,134217728,n)}sU(e,134217728)}};hee=function(e){if(e.tag===13){var t=XA(e),n=ld(e,t);if(n!==null){var r=Aa();tc(n,e,t,r)}sU(e,t)}};fee=function(){return Qn};pee=function(e,t){var n=Qn;try{return Qn=e,t()}finally{Qn=n}};aO=function(e,t,n){switch(t){case"input":if(Z4(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=gN(r);if(!i)throw Error(Ke(90));KZ(r),Z4(r,i)}}}break;case"textarea":qZ(e,n);break;case"select":t=n.value,t!=null&&Kg(e,!!n.multiple,t,!1)}};tee=eU;nee=Np;var Kxe={usingClientEntryPoint:!1,Events:[G1,Eg,gN,ZZ,eee,eU]},Gv={findFiberByHostInstance:Ff,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Wxe={bundleType:Gv.bundleType,version:Gv.version,rendererPackageName:Gv.rendererPackageName,rendererConfig:Gv.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:vd.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=see(e),e===null?null:e.stateNode},findFiberByHostInstance:Gv.findFiberByHostInstance||zxe,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var PC=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!PC.isDisabled&&PC.supportsFiber)try{hN=PC.inject(Wxe),Kc=PC}catch{}}So.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Kxe;So.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!oU(t))throw Error(Ke(200));return $xe(e,t,null,n)};So.createRoot=function(e,t){if(!oU(e))throw Error(Ke(299));var n=!1,r="",i=Lte;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=iU(e,1,!1,null,null,n,!1,r,i),e[od]=t.current,nb(e.nodeType===8?e.parentNode:e),new aU(t)};So.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ke(188)):(e=Object.keys(e).join(","),Error(Ke(268,e)));return e=see(t),e=e===null?null:e.stateNode,e};So.flushSync=function(e){return Np(e)};So.hydrate=function(e,t,n){if(!_N(t))throw Error(Ke(200));return kN(null,e,t,!0,n)};So.hydrateRoot=function(e,t,n){if(!oU(e))throw Error(Ke(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",a=Lte;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Mte(t,null,e,1,n??null,i,!1,s,a),e[od]=t.current,nb(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new BN(t)};So.render=function(e,t,n){if(!_N(t))throw Error(Ke(200));return kN(null,e,t,!1,n)};So.unmountComponentAtNode=function(e){if(!_N(e))throw Error(Ke(40));return e._reactRootContainer?(Np(function(){kN(null,null,e,!1,function(){e._reactRootContainer=null,e[od]=null})}),!0):!1};So.unstable_batchedUpdates=eU;So.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!_N(n))throw Error(Ke(200));if(e==null||e._reactInternals===void 0)throw Error(Ke(38));return kN(e,t,n,!1,r)};So.version="18.3.1-next-f1338f8080-20240426";function Rte(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Rte)}catch(e){console.error(e)}}Rte(),RZ.exports=So;var Ph=RZ.exports;const lU=Bn(Ph);var Ute,S8=Ph;Ute=S8.createRoot,S8.hydrateRoot;const qxe=1,Gxe=1e6;let KT=0;function Yxe(){return KT=(KT+1)%Number.MAX_SAFE_INTEGER,KT.toString()}const WT=new Map,B8=e=>{if(WT.has(e))return;const t=setTimeout(()=>{WT.delete(e),cw({type:"REMOVE_TOAST",toastId:e})},Gxe);WT.set(e,t)},Xxe=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,qxe)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?B8(n):e.toasts.forEach(r=>{B8(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},bB=[];let CB={toasts:[]};function cw(e){CB=Xxe(CB,e),bB.forEach(t=>{t(CB)})}function Xe({...e}){const t=Yxe(),n=i=>cw({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>cw({type:"DISMISS_TOAST",toastId:t});return cw({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function Ih(){const[e,t]=S.useState(CB);return S.useEffect(()=>(bB.push(t),()=>{const n=bB.indexOf(t);n>-1&&bB.splice(n,1)}),[e]),{...e,toast:Xe,dismiss:n=>cw({type:"DISMISS_TOAST",toastId:n})}}function at(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function _8(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Dte(...e){return t=>{let n=!1;const r=e.map(i=>{const s=_8(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():_8(e[i],null)}}}}function tn(...e){return S.useCallback(Dte(...e),e)}function Jxe(e,t){const n=S.createContext(t),r=s=>{const{children:a,...o}=s,l=S.useMemo(()=>o,Object.values(o));return c.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(s){const a=S.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function zs(e,t=[]){let n=[];function r(s,a){const o=S.createContext(a),l=n.length;n=[...n,a];const u=A=>{var y;const{scope:f,children:h,...p}=A,m=((y=f==null?void 0:f[e])==null?void 0:y[l])||o,g=S.useMemo(()=>p,Object.values(p));return c.jsx(m.Provider,{value:g,children:h})};u.displayName=s+"Provider";function d(A,f){var m;const h=((m=f==null?void 0:f[e])==null?void 0:m[l])||o,p=S.useContext(h);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${A}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=n.map(a=>S.createContext(a));return function(o){const l=(o==null?void 0:o[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[r,Zxe(i,...t)]}function Zxe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:u})=>{const A=l(s)[`__scope${u}`];return{...o,...A}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function jp(e){const t=twe(e),n=S.forwardRef((r,i)=>{const{children:s,...a}=r,o=S.Children.toArray(s),l=o.find(nwe);if(l){const u=l.props.children,d=o.map(A=>A===l?S.Children.count(u)>1?S.Children.only(null):S.isValidElement(u)?u.props.children:null:A);return c.jsx(t,{...a,ref:i,children:S.isValidElement(u)?S.cloneElement(u,void 0,d):null})}return c.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var ewe=jp("Slot");function twe(e){const t=S.forwardRef((n,r)=>{const{children:i,...s}=n;if(S.isValidElement(i)){const a=iwe(i),o=rwe(s,i.props);return i.type!==S.Fragment&&(o.ref=r?Dte(r,a):a),S.cloneElement(i,o)}return S.Children.count(i)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qte=Symbol("radix.slottable");function Hte(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Qte,t}function nwe(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qte}function rwe(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function iwe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function EN(e){const t=e+"CollectionProvider",[n,r]=zs(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:g,children:y}=m,v=re.useRef(null),x=re.useRef(new Map).current;return c.jsx(i,{scope:g,itemMap:x,collectionRef:v,children:y})};a.displayName=t;const o=e+"CollectionSlot",l=jp(o),u=re.forwardRef((m,g)=>{const{scope:y,children:v}=m,x=s(o,y),b=tn(g,x.collectionRef);return c.jsx(l,{ref:b,children:v})});u.displayName=o;const d=e+"CollectionItemSlot",A="data-radix-collection-item",f=jp(d),h=re.forwardRef((m,g)=>{const{scope:y,children:v,...x}=m,b=re.useRef(null),w=tn(g,b),B=s(d,y);return re.useEffect(()=>(B.itemMap.set(b,{ref:b,...x}),()=>void B.itemMap.delete(b))),c.jsx(f,{[A]:"",ref:w,children:v})});h.displayName=d;function p(m){const g=s(e+"CollectionConsumer",m);return re.useCallback(()=>{const v=g.collectionRef.current;if(!v)return[];const x=Array.from(v.querySelectorAll(`[${A}]`));return Array.from(g.itemMap.values()).sort((B,k)=>x.indexOf(B.ref.current)-x.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:u,ItemSlot:h},p,r]}var swe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_t=swe.reduce((e,t)=>{const n=jp(`Primitive.${t}`),r=S.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function $te(e,t){e&&Ph.flushSync(()=>e.dispatchEvent(t))}function Fi(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function awe(e,t=globalThis==null?void 0:globalThis.document){const n=Fi(e);S.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var owe="DismissableLayer",UO="dismissableLayer.update",lwe="dismissableLayer.pointerDownOutside",cwe="dismissableLayer.focusOutside",k8,zte=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),F0=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=e,u=S.useContext(zte),[d,A]=S.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=S.useState({}),p=tn(t,k=>A(k)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),v=d?m.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,b=v>=y,w=dwe(k=>{const N=k.target,j=[...u.branches].some(L=>L.contains(N));!b||j||(i==null||i(k),a==null||a(k),k.defaultPrevented||o==null||o())},f),B=Awe(k=>{const N=k.target;[...u.branches].some(L=>L.contains(N))||(s==null||s(k),a==null||a(k),k.defaultPrevented||o==null||o())},f);return awe(k=>{v===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&o&&(k.preventDefault(),o()))},f),S.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(k8=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),E8(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=k8)}},[d,f,n,u]),S.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),E8())},[d,u]),S.useEffect(()=>{const k=()=>h({});return document.addEventListener(UO,k),()=>document.removeEventListener(UO,k)},[]),c.jsx(_t.div,{...l,ref:p,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:at(e.onFocusCapture,B.onFocusCapture),onBlurCapture:at(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:at(e.onPointerDownCapture,w.onPointerDownCapture)})});F0.displayName=owe;var uwe="DismissableLayerBranch",Vte=S.forwardRef((e,t)=>{const n=S.useContext(zte),r=S.useRef(null),i=tn(t,r);return S.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(_t.div,{...e,ref:i})});Vte.displayName=uwe;function dwe(e,t=globalThis==null?void 0:globalThis.document){const n=Fi(e),r=S.useRef(!1),i=S.useRef(()=>{});return S.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let l=function(){Kte(lwe,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Awe(e,t=globalThis==null?void 0:globalThis.document){const n=Fi(e),r=S.useRef(!1);return S.useEffect(()=>{const i=s=>{s.target&&!r.current&&Kte(cwe,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function E8(){const e=new CustomEvent(UO);document.dispatchEvent(e)}function Kte(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?$te(i,s):i.dispatchEvent(s)}var hwe=F0,fwe=Vte,Ri=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},pwe="Portal",X1=S.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[i,s]=S.useState(!1);Ri(()=>s(!0),[]);const a=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?lU.createPortal(c.jsx(_t.div,{...r,ref:t}),a):null});X1.displayName=pwe;function mwe(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var ga=e=>{const{present:t,children:n}=e,r=gwe(t),i=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),s=tn(r.ref,ywe(i));return typeof n=="function"||r.isPresent?S.cloneElement(i,{ref:s}):null};ga.displayName="Presence";function gwe(e){const[t,n]=S.useState(),r=S.useRef(null),i=S.useRef(e),s=S.useRef("none"),a=e?"mounted":"unmounted",[o,l]=mwe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const u=IC(r.current);s.current=o==="mounted"?u:"none"},[o]),Ri(()=>{const u=r.current,d=i.current;if(d!==e){const f=s.current,h=IC(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Ri(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,A=h=>{const m=IC(r.current).includes(h.animationName);if(h.target===t&&m&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=h=>{h.target===t&&(s.current=IC(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",A),t.addEventListener("animationend",A),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",A),t.removeEventListener("animationend",A)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:S.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function IC(e){return(e==null?void 0:e.animationName)||"none"}function ywe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vwe=gR[" useInsertionEffect ".trim().toString()]||Ri;function wo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=xwe({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:i;{const d=S.useRef(e!==void 0);S.useEffect(()=>{const A=d.current;A!==o&&console.warn(`${r} is changing from ${A?"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.`),d.current=o},[o,r])}const u=S.useCallback(d=>{var A;if(o){const f=wwe(d)?d(e):d;f!==e&&((A=a.current)==null||A.call(a,f))}else s(d)},[o,e,s,a]);return[l,u]}function xwe({defaultProp:e,onChange:t}){const[n,r]=S.useState(e),i=S.useRef(n),s=S.useRef(t);return vwe(()=>{s.current=t},[t]),S.useEffect(()=>{var a;i.current!==n&&((a=s.current)==null||a.call(s,n),i.current=n)},[n,i]),[n,r,s]}function wwe(e){return typeof e=="function"}var Wte=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"}),bwe="VisuallyHidden",NN=S.forwardRef((e,t)=>c.jsx(_t.span,{...e,ref:t,style:{...Wte,...e.style}}));NN.displayName=bwe;var Cwe=NN,cU="ToastProvider",[uU,Swe,Bwe]=EN("Toast"),[qte,J_t]=zs("Toast",[Bwe]),[_we,jN]=qte(cU),Gte=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:a}=e,[o,l]=S.useState(null),[u,d]=S.useState(0),A=S.useRef(!1),f=S.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${cU}\`. Expected non-empty \`string\`.`),c.jsx(uU.Provider,{scope:t,children:c.jsx(_we,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:o,onViewportChange:l,onToastAdd:S.useCallback(()=>d(h=>h+1),[]),onToastRemove:S.useCallback(()=>d(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:A,isClosePausedRef:f,children:a})})};Gte.displayName=cU;var Yte="ToastViewport",kwe=["F8"],DO="toast.viewportPause",QO="toast.viewportResume",Xte=S.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=kwe,label:i="Notifications ({hotkey})",...s}=e,a=jN(Yte,n),o=Swe(n),l=S.useRef(null),u=S.useRef(null),d=S.useRef(null),A=S.useRef(null),f=tn(t,A,a.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=a.toastCount>0;S.useEffect(()=>{const g=y=>{var x;r.length!==0&&r.every(b=>y[b]||y.code===b)&&((x=A.current)==null||x.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),S.useEffect(()=>{const g=l.current,y=A.current;if(p&&g&&y){const v=()=>{if(!a.isClosePausedRef.current){const B=new CustomEvent(DO);y.dispatchEvent(B),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const B=new CustomEvent(QO);y.dispatchEvent(B),a.isClosePausedRef.current=!1}},b=B=>{!g.contains(B.relatedTarget)&&x()},w=()=>{g.contains(document.activeElement)||x()};return g.addEventListener("focusin",v),g.addEventListener("focusout",b),g.addEventListener("pointermove",v),g.addEventListener("pointerleave",w),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{g.removeEventListener("focusin",v),g.removeEventListener("focusout",b),g.removeEventListener("pointermove",v),g.removeEventListener("pointerleave",w),window.removeEventListener("blur",v),window.removeEventListener("focus",x)}}},[p,a.isClosePausedRef]);const m=S.useCallback(({tabbingDirection:g})=>{const v=o().map(x=>{const b=x.ref.current,w=[b,...Dwe(b)];return g==="forwards"?w:w.reverse()});return(g==="forwards"?v.reverse():v).flat()},[o]);return S.useEffect(()=>{const g=A.current;if(g){const y=v=>{var w,B,k;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const N=document.activeElement,j=v.shiftKey;if(v.target===g&&j){(w=u.current)==null||w.focus();return}const E=m({tabbingDirection:j?"backwards":"forwards"}),F=E.findIndex(M=>M===N);qT(E.slice(F+1))?v.preventDefault():j?(B=u.current)==null||B.focus():(k=d.current)==null||k.focus()}};return g.addEventListener("keydown",y),()=>g.removeEventListener("keydown",y)}},[o,m]),c.jsxs(fwe,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&c.jsx(HO,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});qT(g)}}),c.jsx(uU.Slot,{scope:n,children:c.jsx(_t.ol,{tabIndex:-1,...s,ref:f})}),p&&c.jsx(HO,{ref:d,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});qT(g)}})]})});Xte.displayName=Yte;var Jte="ToastFocusProxy",HO=S.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,s=jN(Jte,n);return c.jsx(NN,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:a=>{var u;const o=a.relatedTarget;!((u=s.viewport)!=null&&u.contains(o))&&r()}})});HO.displayName=Jte;var J1="Toast",Ewe="toast.swipeStart",Nwe="toast.swipeMove",jwe="toast.swipeCancel",Twe="toast.swipeEnd",Zte=S.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...a}=e,[o,l]=wo({prop:r,defaultProp:i??!0,onChange:s,caller:J1});return c.jsx(ga,{present:n||o,children:c.jsx(Owe,{open:o,...a,ref:t,onClose:()=>l(!1),onPause:Fi(e.onPause),onResume:Fi(e.onResume),onSwipeStart:at(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:at(e.onSwipeMove,u=>{const{x:d,y:A}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${A}px`)}),onSwipeCancel:at(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:at(e.onSwipeEnd,u=>{const{x:d,y:A}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${A}px`),l(!1)})})})});Zte.displayName=J1;var[Pwe,Iwe]=qte(J1,{onClose(){}}),Owe=S.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:a,onEscapeKeyDown:o,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:A,onSwipeCancel:f,onSwipeEnd:h,...p}=e,m=jN(J1,n),[g,y]=S.useState(null),v=tn(t,M=>y(M)),x=S.useRef(null),b=S.useRef(null),w=i||m.duration,B=S.useRef(0),k=S.useRef(w),N=S.useRef(0),{onToastAdd:j,onToastRemove:L}=m,T=Fi(()=>{var D;(g==null?void 0:g.contains(document.activeElement))&&((D=m.viewport)==null||D.focus()),a()}),E=S.useCallback(M=>{!M||M===1/0||(window.clearTimeout(N.current),B.current=new Date().getTime(),N.current=window.setTimeout(T,M))},[T]);S.useEffect(()=>{const M=m.viewport;if(M){const D=()=>{E(k.current),u==null||u()},H=()=>{const q=new Date().getTime()-B.current;k.current=k.current-q,window.clearTimeout(N.current),l==null||l()};return M.addEventListener(DO,H),M.addEventListener(QO,D),()=>{M.removeEventListener(DO,H),M.removeEventListener(QO,D)}}},[m.viewport,w,l,u,E]),S.useEffect(()=>{s&&!m.isClosePausedRef.current&&E(w)},[s,w,m.isClosePausedRef,E]),S.useEffect(()=>(j(),()=>L()),[j,L]);const F=S.useMemo(()=>g?ane(g):null,[g]);return m.viewport?c.jsxs(c.Fragment,{children:[F&&c.jsx(Fwe,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),c.jsx(Pwe,{scope:n,onClose:T,children:Ph.createPortal(c.jsx(uU.ItemSlot,{scope:n,children:c.jsx(hwe,{asChild:!0,onEscapeKeyDown:at(o,()=>{m.isFocusedToastEscapeKeyDownRef.current||T(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(_t.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...p,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:at(e.onKeyDown,M=>{M.key==="Escape"&&(o==null||o(M.nativeEvent),M.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,T()))}),onPointerDown:at(e.onPointerDown,M=>{M.button===0&&(x.current={x:M.clientX,y:M.clientY})}),onPointerMove:at(e.onPointerMove,M=>{if(!x.current)return;const D=M.clientX-x.current.x,H=M.clientY-x.current.y,q=!!b.current,$=["left","right"].includes(m.swipeDirection),z=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,Q=$?z(0,D):0,ce=$?0:z(0,H),R=M.pointerType==="touch"?10:2,O={x:Q,y:ce},Y={originalEvent:M,delta:O};q?(b.current=O,OC(Nwe,A,Y,{discrete:!1})):N8(O,m.swipeDirection,R)?(b.current=O,OC(Ewe,d,Y,{discrete:!1}),M.target.setPointerCapture(M.pointerId)):(Math.abs(D)>R||Math.abs(H)>R)&&(x.current=null)}),onPointerUp:at(e.onPointerUp,M=>{const D=b.current,H=M.target;if(H.hasPointerCapture(M.pointerId)&&H.releasePointerCapture(M.pointerId),b.current=null,x.current=null,D){const q=M.currentTarget,$={originalEvent:M,delta:D};N8(D,m.swipeDirection,m.swipeThreshold)?OC(Twe,h,$,{discrete:!0}):OC(jwe,f,$,{discrete:!0}),q.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Fwe=e=>{const{__scopeToast:t,children:n,...r}=e,i=jN(J1,t),[s,a]=S.useState(!1),[o,l]=S.useState(!1);return Rwe(()=>a(!0)),S.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),o?null:c.jsx(X1,{asChild:!0,children:c.jsx(NN,{...r,children:s&&c.jsxs(c.Fragment,{children:[i.label," ",n]})})})},Mwe="ToastTitle",ene=S.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(_t.div,{...r,ref:t})});ene.displayName=Mwe;var Lwe="ToastDescription",tne=S.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(_t.div,{...r,ref:t})});tne.displayName=Lwe;var nne="ToastAction",rne=S.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?c.jsx(sne,{altText:n,asChild:!0,children:c.jsx(dU,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${nne}\`. Expected non-empty \`string\`.`),null)});rne.displayName=nne;var ine="ToastClose",dU=S.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=Iwe(ine,n);return c.jsx(sne,{asChild:!0,children:c.jsx(_t.button,{type:"button",...r,ref:t,onClick:at(e.onClick,i.onClose)})})});dU.displayName=ine;var sne=S.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return c.jsx(_t.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function ane(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),Uwe(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...ane(r))}}),t}function OC(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?$te(i,s):i.dispatchEvent(s)}var N8=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n};function Rwe(e=()=>{}){const t=Fi(e);Ri(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function Uwe(e){return e.nodeType===e.ELEMENT_NODE}function Dwe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qT(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Qwe=Gte,one=Xte,lne=Zte,cne=ene,une=tne,dne=rne,Ane=dU;function hne(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=hne(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Sn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hne(e))&&(r&&(r+=" "),r+=t);return r}const j8=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,T8=Sn,TN=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return T8(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],A=s==null?void 0:s[u];if(d===null)return null;const f=j8(d)||j8(A);return i[u][f]}),o=n&&Object.entries(n).reduce((u,d)=>{let[A,f]=d;return f===void 0||(u[A]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:A,className:f,...h}=d;return Object.entries(h).every(p=>{let[m,g]=p;return Array.isArray(g)?g.includes({...s,...o}[m]):{...s,...o}[m]===g})?[...u,A,f]:u},[]);return T8(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hwe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fne=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var $we={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.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zwe=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...o},l)=>S.createElement("svg",{ref:l,...$we,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:fne("lucide",i),...o},[...a.map(([u,d])=>S.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $e=(e,t)=>{const n=S.forwardRef(({className:r,...i},s)=>S.createElement(zwe,{ref:s,iconNode:t,className:fne(`lucide-${Hwe(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $O=$e("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Z1=$e("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sc=$e("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pne=$e("Bath",[["path",{d:"M10 4 8 6",key:"1rru8s"}],["path",{d:"M17 19v2",key:"ts1sot"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M7 19v2",key:"12npes"}],["path",{d:"M9 5 7.621 3.621A2.121 2.121 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5",key:"14ym8i"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mne=$e("BedDouble",[["path",{d:"M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8",key:"1k78r4"}],["path",{d:"M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4",key:"fb3tl2"}],["path",{d:"M12 4v6",key:"1dcgq2"}],["path",{d:"M2 18h20",key:"ajqnye"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Vwe=$e("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kwe=$e("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wwe=$e("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qwe=$e("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gwe=$e("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nc=$e("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.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ywe=$e("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gne=$e("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xwe=$e("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qc=$e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gc=$e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yne=$e("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ju=$e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jwe=$e("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zwe=$e("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.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AU=$e("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.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const M0=$e("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vne=$e("CircleMinus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const e2=$e("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.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xne=$e("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ebe=$e("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tbe=$e("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nbe=$e("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rbe=$e("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rl=$e("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const P8=$e("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const db=$e("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ibe=$e("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sbe=$e("FileCheck",[["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:"m9 15 2 2 4-4",key:"1grp1n"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const abe=$e("FileDown",[["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:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zy=$e("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.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const obe=$e("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const t2=$e("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lbe=$e("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cbe=$e("Heading1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ube=$e("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dbe=$e("Heading3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wne=$e("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Abe=$e("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hbe=$e("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hU=$e("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zO=$e("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fbe=$e("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pbe=$e("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const I8=$e("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bne=$e("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mbe=$e("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gbe=$e("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ybe=$e("ListPlus",[["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M16 18H3",key:"12xzn7"}],["path",{d:"M18 9v6",key:"1twb98"}],["path",{d:"M21 12h-6",key:"bt1uis"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vbe=$e("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.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bo=$e("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xbe=$e("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wbe=$e("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const SB=$e("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ab=$e("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const O8=$e("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const VO=$e("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dp=$e("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cne=$e("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bbe=$e("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sne=$e("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ap=$e("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cbe=$e("PiggyBank",[["path",{d:"M19 5c-1.5 0-2.8 1.4-3 2-3.5-1.5-11-.3-11 5 0 1.8 0 3 2 4.5V20h4v-2h3v2h4v-4c1-.5 1.7-1 2-2h2v-4h-2c0-1-.5-1.5-1-2V5z",key:"1ivx2i"}],["path",{d:"M2 9v1c0 1.1.9 2 2 2h1",key:"nm575m"}],["path",{d:"M16 11h.01",key:"xkw8gn"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const KO=$e("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tp=$e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sbe=$e("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bbe=$e("Redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qc=$e("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hb=$e("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fU=$e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _be=$e("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pU=$e("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kbe=$e("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ebe=$e("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yo=$e("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bne=$e("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const WO=$e("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mU=$e("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hl=$e("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Nbe=$e("Trees",[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jbe=$e("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
* @license lucide-react v0.462.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=$e("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pp=$e("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kne=$e("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tbe=$e("Undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ene=$e("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gU=$e("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pbe=$e("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ibe=$e("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const F8=$e("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Da=$e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Nne=$e("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]),yU="-",Obe=e=>{const t=Mbe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const o=a.split(yU);return o[0]===""&&o.length!==1&&o.shift(),jne(o,t)||Fbe(a)},getConflictingClassGroupIds:(a,o)=>{const l=n[a]||[];return o&&r[a]?[...l,...r[a]]:l}}},jne=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?jne(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(yU);return(a=t.validators.find(({validator:o})=>o(s)))==null?void 0:a.classGroupId},M8=/^\[(.+)\]$/,Fbe=e=>{if(M8.test(e)){const t=M8.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Mbe=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Rbe(Object.entries(e.classGroups),n).forEach(([s,a])=>{qO(a,r,s,t)}),r},qO=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:L8(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(Lbe(i)){qO(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{qO(a,L8(t,s),n,r)})})},L8=(e,t)=>{let n=e;return t.split(yU).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Lbe=e=>e.isThemeGetter,Rbe=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,o])=>[t+a,o])):s);return[n,i]}):e,Ube=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},Tne="!",Dbe=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,a=o=>{const l=[];let u=0,d=0,A;for(let g=0;g<o.length;g++){let y=o[g];if(u===0){if(y===i&&(r||o.slice(g,g+s)===t)){l.push(o.slice(d,g)),d=g+s;continue}if(y==="/"){A=g;continue}}y==="["?u++:y==="]"&&u--}const f=l.length===0?o:o.substring(d),h=f.startsWith(Tne),p=h?f.substring(1):f,m=A&&A>d?A-d:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}};return n?o=>n({className:o,parseClassName:a}):a},Qbe=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Hbe=e=>({cache:Ube(e.cacheSize),parseClassName:Dbe(e),...Obe(e)}),$be=/\s+/,zbe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],a=e.trim().split($be);let o="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:d,hasImportantModifier:A,baseClassName:f,maybePostfixModifierPosition:h}=n(u);let p=!!h,m=r(p?f.substring(0,h):f);if(!m){if(!p){o=u+(o.length>0?" "+o:o);continue}if(m=r(f),!m){o=u+(o.length>0?" "+o:o);continue}p=!1}const g=Qbe(d).join(":"),y=A?g+Tne:g,v=y+m;if(s.includes(v))continue;s.push(v);const x=i(m,p);for(let b=0;b<x.length;++b){const w=x[b];s.push(y+w)}o=u+(o.length>0?" "+o:o)}return o};function Vbe(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Pne(t))&&(r&&(r+=" "),r+=n);return r}const Pne=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Pne(e[r]))&&(n&&(n+=" "),n+=t);return n};function Kbe(e,...t){let n,r,i,s=a;function a(l){const u=t.reduce((d,A)=>A(d),e());return n=Hbe(u),r=n.cache.get,i=n.cache.set,s=o,o(l)}function o(l){const u=r(l);if(u)return u;const d=zbe(l,n);return i(l,d),d}return function(){return s(Vbe.apply(null,arguments))}}const dr=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ine=/^\[(?:([a-z-]+):)?(.+)\]$/i,Wbe=/^\d+\/\d+$/,qbe=new Set(["px","full","screen"]),Gbe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ybe=/\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$/,Xbe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Jbe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zbe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_u=e=>Jg(e)||qbe.has(e)||Wbe.test(e),zd=e=>L0(e,"length",o1e),Jg=e=>!!e&&!Number.isNaN(Number(e)),GT=e=>L0(e,"number",Jg),Yv=e=>!!e&&Number.isInteger(Number(e)),e1e=e=>e.endsWith("%")&&Jg(e.slice(0,-1)),sn=e=>Ine.test(e),Vd=e=>Gbe.test(e),t1e=new Set(["length","size","percentage"]),n1e=e=>L0(e,t1e,One),r1e=e=>L0(e,"position",One),i1e=new Set(["image","url"]),s1e=e=>L0(e,i1e,c1e),a1e=e=>L0(e,"",l1e),Xv=()=>!0,L0=(e,t,n)=>{const r=Ine.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},o1e=e=>Ybe.test(e)&&!Xbe.test(e),One=()=>!1,l1e=e=>Jbe.test(e),c1e=e=>Zbe.test(e),u1e=()=>{const e=dr("colors"),t=dr("spacing"),n=dr("blur"),r=dr("brightness"),i=dr("borderColor"),s=dr("borderRadius"),a=dr("borderSpacing"),o=dr("borderWidth"),l=dr("contrast"),u=dr("grayscale"),d=dr("hueRotate"),A=dr("invert"),f=dr("gap"),h=dr("gradientColorStops"),p=dr("gradientColorStopPositions"),m=dr("inset"),g=dr("margin"),y=dr("opacity"),v=dr("padding"),x=dr("saturate"),b=dr("scale"),w=dr("sepia"),B=dr("skew"),k=dr("space"),N=dr("translate"),j=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",sn,t],E=()=>[sn,t],F=()=>["",_u,zd],M=()=>["auto",Jg,sn],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",sn],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ce=()=>[Jg,sn];return{cacheSize:500,separator:":",theme:{colors:[Xv],spacing:[_u,zd],blur:["none","",Vd,sn],brightness:ce(),borderColor:[e],borderRadius:["none","","full",Vd,sn],borderSpacing:E(),borderWidth:F(),contrast:ce(),grayscale:z(),hueRotate:ce(),invert:z(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[e1e,zd],inset:T(),margin:T(),opacity:ce(),padding:E(),saturate:ce(),scale:ce(),sepia:z(),skew:ce(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",sn]}],container:["container"],columns:[{columns:[Vd]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),sn]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Yv,sn]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",sn]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",Yv,sn]}],"grid-cols":[{"grid-cols":[Xv]}],"col-start-end":[{col:["auto",{span:["full",Yv,sn]},sn]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Xv]}],"row-start-end":[{row:["auto",{span:[Yv,sn]},sn]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",sn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",sn]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",sn,t]}],"min-w":[{"min-w":[sn,t,"min","max","fit"]}],"max-w":[{"max-w":[sn,t,"none","full","min","max","fit","prose",{screen:[Vd]},Vd]}],h:[{h:[sn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[sn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[sn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[sn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Vd,zd]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",GT]}],"font-family":[{font:[Xv]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",sn]}],"line-clamp":[{"line-clamp":["none",Jg,GT]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_u,sn]}],"list-image":[{"list-image":["none",sn]}],"list-style-type":[{list:["none","disc","decimal",sn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_u,zd]}],"underline-offset":[{"underline-offset":["auto",_u,sn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",sn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",sn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),r1e]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",n1e]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},s1e]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:H()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[_u,sn]}],"outline-w":[{outline:[_u,zd]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[_u,zd]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Vd,a1e]}],"shadow-color":[{shadow:[Xv]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Vd,sn]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[A]}],saturate:[{saturate:[x]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[A]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",sn]}],duration:[{duration:ce()}],ease:[{ease:["linear","in","out","in-out",sn]}],delay:[{delay:ce()}],animate:[{animate:["none","spin","ping","pulse","bounce",sn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Yv,sn]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",sn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",sn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",sn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_u,zd,GT]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},d1e=Kbe(u1e);function pt(...e){return d1e(Sn(e))}const A1e=Qwe,Fne=S.forwardRef(({className:e,...t},n)=>c.jsx(one,{ref:n,className:pt("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Fne.displayName=one.displayName;const h1e=TN("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Mne=S.forwardRef(({className:e,variant:t,...n},r)=>c.jsx(lne,{ref:r,className:pt(h1e({variant:t}),e),...n}));Mne.displayName=lne.displayName;const f1e=S.forwardRef(({className:e,...t},n)=>c.jsx(dne,{ref:n,className:pt("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));f1e.displayName=dne.displayName;const Lne=S.forwardRef(({className:e,...t},n)=>c.jsx(Ane,{ref:n,className:pt("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(Da,{className:"h-4 w-4"})}));Lne.displayName=Ane.displayName;const Rne=S.forwardRef(({className:e,...t},n)=>c.jsx(cne,{ref:n,className:pt("text-sm font-semibold",e),...t}));Rne.displayName=cne.displayName;const Une=S.forwardRef(({className:e,...t},n)=>c.jsx(une,{ref:n,className:pt("text-sm opacity-90",e),...t}));Une.displayName=une.displayName;function p1e(){const{toasts:e}=Ih();return c.jsxs(A1e,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return c.jsxs(Mne,{...s,children:[c.jsxs("div",{className:"grid gap-1",children:[n&&c.jsx(Rne,{children:n}),r&&c.jsx(Une,{children:r})]}),i,c.jsx(Lne,{})]},t)}),c.jsx(Fne,{})]})}var R8=["light","dark"],m1e="(prefers-color-scheme: dark)",g1e=S.createContext(void 0),y1e={setTheme:e=>{},themes:[]},v1e=()=>{var e;return(e=S.useContext(g1e))!=null?e:y1e};S.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:s,value:a,attrs:o,nonce:l})=>{let u=s==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${o.map(p=>`'${p}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,A=i?R8.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(p,m=!1,g=!0)=>{let y=a?a[p]:p,v=m?p+"|| ''":`'${y}'`,x="";return i&&g&&!m&&R8.includes(p)&&(x+=`d.style.colorScheme = '${p}';`),n==="class"?m||y?x+=`c.add(${v})`:x+="null":y&&(x+=`d[s](n,${v})`),x},h=e?`!function(){${d}${f(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${m1e}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}${u?"":"else{"+f(s,!1,!1)+"}"}${A}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}else{${f(s,!1,!1)};}${A}}catch(t){}}();`;return S.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var x1e=e=>{switch(e){case"success":return C1e;case"info":return B1e;case"warning":return S1e;case"error":return _1e;default:return null}},w1e=Array(12).fill(0),b1e=({visible:e,className:t})=>re.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},re.createElement("div",{className:"sonner-spinner"},w1e.map((n,r)=>re.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),C1e=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.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"})),S1e=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},re.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"})),B1e=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.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"})),_1e=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.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"})),k1e=re.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"},re.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),E1e=()=>{let[e,t]=re.useState(document.hidden);return re.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},GO=1,N1e=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;let{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:GO++,a=this.toasts.find(l=>l.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:o,title:r}):l):this.addToast({title:r,...i,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),this.subscribers.forEach(n=>n({id:t,dismiss:!0})),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));let i=t instanceof Promise?t:t(),s=r!==void 0,a,o=i.then(async u=>{if(a=["resolve",u],re.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(T1e(u)&&!u.ok){s=!1;let d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,A=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description;this.create({id:r,type:"error",message:d,description:A})}else if(n.success!==void 0){s=!1;let d=typeof n.success=="function"?await n.success(u):n.success,A=typeof n.description=="function"?await n.description(u):n.description;this.create({id:r,type:"success",message:d,description:A})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){s=!1;let d=typeof n.error=="function"?await n.error(u):n.error,A=typeof n.description=="function"?await n.description(u):n.description;this.create({id:r,type:"error",message:d,description:A})}}).finally(()=>{var u;s&&(this.dismiss(r),r=void 0),(u=n.finally)==null||u.call(n)}),l=()=>new Promise((u,d)=>o.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{let r=(n==null?void 0:n.id)||GO++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ba=new N1e,j1e=(e,t)=>{let n=(t==null?void 0:t.id)||GO++;return Ba.addToast({title:e,...t,id:n}),n},T1e=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",P1e=j1e,I1e=()=>Ba.toasts,O1e=()=>Ba.getActiveToasts(),uw=Object.assign(P1e,{success:Ba.success,info:Ba.info,warning:Ba.warning,error:Ba.error,custom:Ba.custom,message:Ba.message,promise:Ba.promise,dismiss:Ba.dismiss,loading:Ba.loading},{getHistory:I1e,getToasts:O1e});function F1e(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}F1e(`: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 FC(e){return e.label!==void 0}var M1e=3,L1e="32px",R1e="16px",U8=4e3,U1e=356,D1e=14,Q1e=20,H1e=200;function El(...e){return e.filter(Boolean).join(" ")}function $1e(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var z1e=e=>{var t,n,r,i,s,a,o,l,u,d,A;let{invert:f,toast:h,unstyled:p,interacting:m,setHeights:g,visibleToasts:y,heights:v,index:x,toasts:b,expanded:w,removeToast:B,defaultRichColors:k,closeButton:N,style:j,cancelButtonStyle:L,actionButtonStyle:T,className:E="",descriptionClassName:F="",duration:M,position:D,gap:H,loadingIcon:q,expandByDefault:$,classNames:z,icons:Q,closeButtonAriaLabel:ce="Close toast",pauseWhenPageIsHidden:R}=e,[O,Y]=re.useState(null),[X,K]=re.useState(null),[Z,ae]=re.useState(!1),[ue,se]=re.useState(!1),[Ae,de]=re.useState(!1),[Se,Fe]=re.useState(!1),[te,ke]=re.useState(!1),[Ze,et]=re.useState(0),[Te,st]=re.useState(0),xe=re.useRef(h.duration||M||U8),Qe=re.useRef(null),ze=re.useRef(null),Rt=x===0,dt=x+1<=y,ye=h.type,Ee=h.dismissible!==!1,qe=h.className||"",Ue=h.descriptionClassName||"",Ge=re.useMemo(()=>v.findIndex(Lt=>Lt.toastId===h.id)||0,[v,h.id]),pe=re.useMemo(()=>{var Lt;return(Lt=h.closeButton)!=null?Lt:N},[h.closeButton,N]),mt=re.useMemo(()=>h.duration||M||U8,[h.duration,M]),ct=re.useRef(0),xt=re.useRef(0),Ft=re.useRef(0),$t=re.useRef(null),[At,Mt]=D.split("-"),Pt=re.useMemo(()=>v.reduce((Lt,qt,vn)=>vn>=Ge?Lt:Lt+qt.height,0),[v,Ge]),Wt=E1e(),Jn=h.invert||f,en=ye==="loading";xt.current=re.useMemo(()=>Ge*H+Pt,[Ge,Pt]),re.useEffect(()=>{xe.current=mt},[mt]),re.useEffect(()=>{ae(!0)},[]),re.useEffect(()=>{let Lt=ze.current;if(Lt){let qt=Lt.getBoundingClientRect().height;return st(qt),g(vn=>[{toastId:h.id,height:qt,position:h.position},...vn]),()=>g(vn=>vn.filter(Ur=>Ur.toastId!==h.id))}},[g,h.id]),re.useLayoutEffect(()=>{if(!Z)return;let Lt=ze.current,qt=Lt.style.height;Lt.style.height="auto";let vn=Lt.getBoundingClientRect().height;Lt.style.height=qt,st(vn),g(Ur=>Ur.find(yt=>yt.toastId===h.id)?Ur.map(yt=>yt.toastId===h.id?{...yt,height:vn}:yt):[{toastId:h.id,height:vn,position:h.position},...Ur])},[Z,h.title,h.description,g,h.id]);let St=re.useCallback(()=>{se(!0),et(xt.current),g(Lt=>Lt.filter(qt=>qt.toastId!==h.id)),setTimeout(()=>{B(h)},H1e)},[h,B,g,xt]);re.useEffect(()=>{if(h.promise&&ye==="loading"||h.duration===1/0||h.type==="loading")return;let Lt;return w||m||R&&Wt?(()=>{if(Ft.current<ct.current){let qt=new Date().getTime()-ct.current;xe.current=xe.current-qt}Ft.current=new Date().getTime()})():xe.current!==1/0&&(ct.current=new Date().getTime(),Lt=setTimeout(()=>{var qt;(qt=h.onAutoClose)==null||qt.call(h,h),St()},xe.current)),()=>clearTimeout(Lt)},[w,m,h,ye,R,Wt,St]),re.useEffect(()=>{h.delete&&St()},[St,h.delete]);function Nn(){var Lt,qt,vn;return Q!=null&&Q.loading?re.createElement("div",{className:El(z==null?void 0:z.loader,(Lt=h==null?void 0:h.classNames)==null?void 0:Lt.loader,"sonner-loader"),"data-visible":ye==="loading"},Q.loading):q?re.createElement("div",{className:El(z==null?void 0:z.loader,(qt=h==null?void 0:h.classNames)==null?void 0:qt.loader,"sonner-loader"),"data-visible":ye==="loading"},q):re.createElement(b1e,{className:El(z==null?void 0:z.loader,(vn=h==null?void 0:h.classNames)==null?void 0:vn.loader),visible:ye==="loading"})}return re.createElement("li",{tabIndex:0,ref:ze,className:El(E,qe,z==null?void 0:z.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,z==null?void 0:z.default,z==null?void 0:z[ye],(n=h==null?void 0:h.classNames)==null?void 0:n[ye]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:k,"data-styled":!(h.jsx||h.unstyled||p),"data-mounted":Z,"data-promise":!!h.promise,"data-swiped":te,"data-removed":ue,"data-visible":dt,"data-y-position":At,"data-x-position":Mt,"data-index":x,"data-front":Rt,"data-swiping":Ae,"data-dismissible":Ee,"data-type":ye,"data-invert":Jn,"data-swipe-out":Se,"data-swipe-direction":X,"data-expanded":!!(w||$&&Z),style:{"--index":x,"--toasts-before":x,"--z-index":b.length-x,"--offset":`${ue?Ze:xt.current}px`,"--initial-height":$?"auto":`${Te}px`,...j,...h.style},onDragEnd:()=>{de(!1),Y(null),$t.current=null},onPointerDown:Lt=>{en||!Ee||(Qe.current=new Date,et(xt.current),Lt.target.setPointerCapture(Lt.pointerId),Lt.target.tagName!=="BUTTON"&&(de(!0),$t.current={x:Lt.clientX,y:Lt.clientY}))},onPointerUp:()=>{var Lt,qt,vn,Ur;if(Se||!Ee)return;$t.current=null;let yt=Number(((Lt=ze.current)==null?void 0:Lt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Qi=Number(((qt=ze.current)==null?void 0:qt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),es=new Date().getTime()-((vn=Qe.current)==null?void 0:vn.getTime()),wr=O==="x"?yt:Qi,Xr=Math.abs(wr)/es;if(Math.abs(wr)>=Q1e||Xr>.11){et(xt.current),(Ur=h.onDismiss)==null||Ur.call(h,h),K(O==="x"?yt>0?"right":"left":Qi>0?"down":"up"),St(),Fe(!0),ke(!1);return}de(!1),Y(null)},onPointerMove:Lt=>{var qt,vn,Ur,yt;if(!$t.current||!Ee||((qt=window.getSelection())==null?void 0:qt.toString().length)>0)return;let Qi=Lt.clientY-$t.current.y,es=Lt.clientX-$t.current.x,wr=(vn=e.swipeDirections)!=null?vn:$1e(D);!O&&(Math.abs(es)>1||Math.abs(Qi)>1)&&Y(Math.abs(es)>Math.abs(Qi)?"x":"y");let Xr={x:0,y:0};O==="y"?(wr.includes("top")||wr.includes("bottom"))&&(wr.includes("top")&&Qi<0||wr.includes("bottom")&&Qi>0)&&(Xr.y=Qi):O==="x"&&(wr.includes("left")||wr.includes("right"))&&(wr.includes("left")&&es<0||wr.includes("right")&&es>0)&&(Xr.x=es),(Math.abs(Xr.x)>0||Math.abs(Xr.y)>0)&&ke(!0),(Ur=ze.current)==null||Ur.style.setProperty("--swipe-amount-x",`${Xr.x}px`),(yt=ze.current)==null||yt.style.setProperty("--swipe-amount-y",`${Xr.y}px`)}},pe&&!h.jsx?re.createElement("button",{"aria-label":ce,"data-disabled":en,"data-close-button":!0,onClick:en||!Ee?()=>{}:()=>{var Lt;St(),(Lt=h.onDismiss)==null||Lt.call(h,h)},className:El(z==null?void 0:z.closeButton,(i=h==null?void 0:h.classNames)==null?void 0:i.closeButton)},(s=Q==null?void 0:Q.close)!=null?s:k1e):null,h.jsx||S.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:re.createElement(re.Fragment,null,ye||h.icon||h.promise?re.createElement("div",{"data-icon":"",className:El(z==null?void 0:z.icon,(a=h==null?void 0:h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Nn():null,h.type!=="loading"?h.icon||(Q==null?void 0:Q[ye])||x1e(ye):null):null,re.createElement("div",{"data-content":"",className:El(z==null?void 0:z.content,(o=h==null?void 0:h.classNames)==null?void 0:o.content)},re.createElement("div",{"data-title":"",className:El(z==null?void 0:z.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?re.createElement("div",{"data-description":"",className:El(F,Ue,z==null?void 0:z.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),S.isValidElement(h.cancel)?h.cancel:h.cancel&&FC(h.cancel)?re.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||L,onClick:Lt=>{var qt,vn;FC(h.cancel)&&Ee&&((vn=(qt=h.cancel).onClick)==null||vn.call(qt,Lt),St())},className:El(z==null?void 0:z.cancelButton,(d=h==null?void 0:h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,S.isValidElement(h.action)?h.action:h.action&&FC(h.action)?re.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||T,onClick:Lt=>{var qt,vn;FC(h.action)&&((vn=(qt=h.action).onClick)==null||vn.call(qt,Lt),!Lt.defaultPrevented&&St())},className:El(z==null?void 0:z.actionButton,(A=h==null?void 0:h.classNames)==null?void 0:A.actionButton)},h.action.label):null))};function D8(){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 V1e(e,t){let n={};return[e,t].forEach((r,i)=>{let s=i===1,a=s?"--mobile-offset":"--offset",o=s?R1e:L1e;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=o:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(o)}),n}var K1e=S.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:s,closeButton:a,className:o,offset:l,mobileOffset:u,theme:d="light",richColors:A,duration:f,style:h,visibleToasts:p=M1e,toastOptions:m,dir:g=D8(),gap:y=D1e,loadingIcon:v,icons:x,containerAriaLabel:b="Notifications",pauseWhenPageIsHidden:w}=e,[B,k]=re.useState([]),N=re.useMemo(()=>Array.from(new Set([r].concat(B.filter(R=>R.position).map(R=>R.position)))),[B,r]),[j,L]=re.useState([]),[T,E]=re.useState(!1),[F,M]=re.useState(!1),[D,H]=re.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=re.useRef(null),$=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=re.useRef(null),Q=re.useRef(!1),ce=re.useCallback(R=>{k(O=>{var Y;return(Y=O.find(X=>X.id===R.id))!=null&&Y.delete||Ba.dismiss(R.id),O.filter(({id:X})=>X!==R.id)})},[]);return re.useEffect(()=>Ba.subscribe(R=>{if(R.dismiss){k(O=>O.map(Y=>Y.id===R.id?{...Y,delete:!0}:Y));return}setTimeout(()=>{lU.flushSync(()=>{k(O=>{let Y=O.findIndex(X=>X.id===R.id);return Y!==-1?[...O.slice(0,Y),{...O[Y],...R},...O.slice(Y+1)]:[R,...O]})})})}),[]),re.useEffect(()=>{if(d!=="system"){H(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;let R=window.matchMedia("(prefers-color-scheme: dark)");try{R.addEventListener("change",({matches:O})=>{H(O?"dark":"light")})}catch{R.addListener(({matches:Y})=>{try{H(Y?"dark":"light")}catch(X){console.error(X)}})}},[d]),re.useEffect(()=>{B.length<=1&&E(!1)},[B]),re.useEffect(()=>{let R=O=>{var Y,X;i.every(K=>O[K]||O.code===K)&&(E(!0),(Y=q.current)==null||Y.focus()),O.code==="Escape"&&(document.activeElement===q.current||(X=q.current)!=null&&X.contains(document.activeElement))&&E(!1)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[i]),re.useEffect(()=>{if(q.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,Q.current=!1)}},[q.current]),re.createElement("section",{ref:t,"aria-label":`${b} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((R,O)=>{var Y;let[X,K]=R.split("-");return B.length?re.createElement("ol",{key:R,dir:g==="auto"?D8():g,tabIndex:-1,ref:q,className:o,"data-sonner-toaster":!0,"data-theme":D,"data-y-position":X,"data-lifted":T&&B.length>1&&!s,"data-x-position":K,style:{"--front-toast-height":`${((Y=j[0])==null?void 0:Y.height)||0}px`,"--width":`${U1e}px`,"--gap":`${y}px`,...h,...V1e(l,u)},onBlur:Z=>{Q.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(Q.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||Q.current||(Q.current=!0,z.current=Z.relatedTarget)},onMouseEnter:()=>E(!0),onMouseMove:()=>E(!0),onMouseLeave:()=>{F||E(!1)},onDragEnd:()=>E(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},B.filter(Z=>!Z.position&&O===0||Z.position===R).map((Z,ae)=>{var ue,se;return re.createElement(z1e,{key:Z.id,icons:x,index:ae,toast:Z,defaultRichColors:A,duration:(ue=m==null?void 0:m.duration)!=null?ue:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:p,closeButton:(se=m==null?void 0:m.closeButton)!=null?se:a,interacting:F,position:R,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:ce,toasts:B.filter(Ae=>Ae.position==Z.position),heights:j.filter(Ae=>Ae.position==Z.position),setHeights:L,expandByDefault:s,gap:y,loadingIcon:v,expanded:T,pauseWhenPageIsHidden:w,swipeDirections:e.swipeDirections})})):null}))});const W1e=({...e})=>{const{theme:t="system"}=v1e();return c.jsx(K1e,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var q1e=gR[" useId ".trim().toString()]||(()=>{}),G1e=0;function il(e){const[t,n]=S.useState(q1e());return Ri(()=>{n(r=>r??String(G1e++))},[e]),t?`radix-${t}`:""}const Y1e=["top","right","bottom","left"],mh=Math.min,co=Math.max,E_=Math.round,MC=Math.floor,Yc=e=>({x:e,y:e}),X1e={left:"right",right:"left",bottom:"top",top:"bottom"},J1e={start:"end",end:"start"};function YO(e,t,n){return co(e,mh(t,n))}function ud(e,t){return typeof e=="function"?e(t):e}function dd(e){return e.split("-")[0]}function R0(e){return e.split("-")[1]}function vU(e){return e==="x"?"y":"x"}function xU(e){return e==="y"?"height":"width"}const Z1e=new Set(["top","bottom"]);function Hc(e){return Z1e.has(dd(e))?"y":"x"}function wU(e){return vU(Hc(e))}function e2e(e,t,n){n===void 0&&(n=!1);const r=R0(e),i=wU(e),s=xU(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=N_(a)),[a,N_(a)]}function t2e(e){const t=N_(e);return[XO(e),t,XO(t)]}function XO(e){return e.replace(/start|end/g,t=>J1e[t])}const Q8=["left","right"],H8=["right","left"],n2e=["top","bottom"],r2e=["bottom","top"];function i2e(e,t,n){switch(e){case"top":case"bottom":return n?t?H8:Q8:t?Q8:H8;case"left":case"right":return t?n2e:r2e;default:return[]}}function s2e(e,t,n,r){const i=R0(e);let s=i2e(dd(e),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(XO)))),s}function N_(e){return e.replace(/left|right|bottom|top/g,t=>X1e[t])}function a2e(e){return{top:0,right:0,bottom:0,left:0,...e}}function Dne(e){return typeof e!="number"?a2e(e):{top:e,right:e,bottom:e,left:e}}function j_(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function $8(e,t,n){let{reference:r,floating:i}=e;const s=Hc(t),a=wU(t),o=xU(a),l=dd(t),u=s==="y",d=r.x+r.width/2-i.width/2,A=r.y+r.height/2-i.height/2,f=r[o]/2-i[o]/2;let h;switch(l){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:A};break;case"left":h={x:r.x-i.width,y:A};break;default:h={x:r.x,y:r.y}}switch(R0(t)){case"start":h[a]-=f*(n&&u?-1:1);break;case"end":h[a]+=f*(n&&u?-1:1);break}return h}const o2e=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:A}=$8(u,r,l),f=r,h={},p=0;for(let m=0;m<o.length;m++){const{name:g,fn:y}=o[m],{x:v,y:x,data:b,reset:w}=await y({x:d,y:A,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});d=v??d,A=x??A,h={...h,[g]:{...h[g],...b}},w&&p<=50&&(p++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(u=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:d,y:A}=$8(u,f,l)),m=-1)}return{x:d,y:A,placement:f,strategy:i,middlewareData:h}};async function fb(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:A="floating",altBoundary:f=!1,padding:h=0}=ud(t,e),p=Dne(h),g=o[f?A==="floating"?"reference":"floating":A],y=j_(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:d,strategy:l})),v=A==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),b=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},w=j_(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:v,offsetParent:x,strategy:l}):v);return{top:(y.top-w.top+p.top)/b.y,bottom:(w.bottom-y.bottom+p.bottom)/b.y,left:(y.left-w.left+p.left)/b.x,right:(w.right-y.right+p.right)/b.x}}const l2e=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:u,padding:d=0}=ud(e,t)||{};if(u==null)return{};const A=Dne(d),f={x:n,y:r},h=wU(i),p=xU(h),m=await a.getDimensions(u),g=h==="y",y=g?"top":"left",v=g?"bottom":"right",x=g?"clientHeight":"clientWidth",b=s.reference[p]+s.reference[h]-f[h]-s.floating[p],w=f[h]-s.reference[h],B=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let k=B?B[x]:0;(!k||!await(a.isElement==null?void 0:a.isElement(B)))&&(k=o.floating[x]||s.floating[p]);const N=b/2-w/2,j=k/2-m[p]/2-1,L=mh(A[y],j),T=mh(A[v],j),E=L,F=k-m[p]-T,M=k/2-m[p]/2+N,D=YO(E,M,F),H=!l.arrow&&R0(i)!=null&&M!==D&&s.reference[p]/2-(M<E?L:T)-m[p]/2<0,q=H?M<E?M-E:M-F:0;return{[h]:f[h]+q,data:{[h]:D,centerOffset:M-D-q,...H&&{alignmentOffset:q}},reset:H}}}),c2e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:A=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=ud(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=dd(i),v=Hc(o),x=dd(o)===o,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),w=f||(x||!m?[N_(o)]:t2e(o)),B=p!=="none";!f&&B&&w.push(...s2e(o,m,p,b));const k=[o,...w],N=await fb(t,g),j=[];let L=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&j.push(N[y]),A){const M=e2e(i,a,b);j.push(N[M[0]],N[M[1]])}if(L=[...L,{placement:i,overflows:j}],!j.every(M=>M<=0)){var T,E;const M=(((T=s.flip)==null?void 0:T.index)||0)+1,D=k[M];if(D&&(!(A==="alignment"?v!==Hc(D):!1)||L.every($=>$.overflows[0]>0&&Hc($.placement)===v)))return{data:{index:M,overflows:L},reset:{placement:D}};let H=(E=L.filter(q=>q.overflows[0]<=0).sort((q,$)=>q.overflows[1]-$.overflows[1])[0])==null?void 0:E.placement;if(!H)switch(h){case"bestFit":{var F;const q=(F=L.filter($=>{if(B){const z=Hc($.placement);return z===v||z==="y"}return!0}).map($=>[$.placement,$.overflows.filter(z=>z>0).reduce((z,Q)=>z+Q,0)]).sort(($,z)=>$[1]-z[1])[0])==null?void 0:F[0];q&&(H=q);break}case"initialPlacement":H=o;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function z8(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function V8(e){return Y1e.some(t=>e[t]>=0)}const u2e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ud(e,t);switch(r){case"referenceHidden":{const s=await fb(t,{...i,elementContext:"reference"}),a=z8(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:V8(a)}}}case"escaped":{const s=await fb(t,{...i,altBoundary:!0}),a=z8(s,n.floating);return{data:{escapedOffsets:a,escaped:V8(a)}}}default:return{}}}}},Qne=new Set(["left","top"]);async function d2e(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=dd(n),o=R0(n),l=Hc(n)==="y",u=Qne.has(a)?-1:1,d=s&&l?-1:1,A=ud(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof A=="number"?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:A.mainAxis||0,crossAxis:A.crossAxis||0,alignmentAxis:A.alignmentAxis};return o&&typeof p=="number"&&(h=o==="end"?p*-1:p),l?{x:h*d,y:f*u}:{x:f*u,y:h*d}}const A2e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:a,middlewareData:o}=t,l=await d2e(t,e);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},h2e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:g=>{let{x:y,y:v}=g;return{x:y,y:v}}},...l}=ud(e,t),u={x:n,y:r},d=await fb(t,l),A=Hc(dd(i)),f=vU(A);let h=u[f],p=u[A];if(s){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",v=h+d[g],x=h-d[y];h=YO(v,h,x)}if(a){const g=A==="y"?"top":"left",y=A==="y"?"bottom":"right",v=p+d[g],x=p-d[y];p=YO(v,p,x)}const m=o.fn({...t,[f]:h,[A]:p});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:s,[A]:a}}}}}},f2e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=ud(e,t),d={x:n,y:r},A=Hc(i),f=vU(A);let h=d[f],p=d[A];const m=ud(o,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=f==="y"?"height":"width",b=s.reference[f]-s.floating[x]+g.mainAxis,w=s.reference[f]+s.reference[x]-g.mainAxis;h<b?h=b:h>w&&(h=w)}if(u){var y,v;const x=f==="y"?"width":"height",b=Qne.has(dd(i)),w=s.reference[A]-s.floating[x]+(b&&((y=a.offset)==null?void 0:y[A])||0)+(b?0:g.crossAxis),B=s.reference[A]+s.reference[x]+(b?0:((v=a.offset)==null?void 0:v[A])||0)-(b?g.crossAxis:0);p<w?p=w:p>B&&(p=B)}return{[f]:h,[A]:p}}}},p2e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:l=()=>{},...u}=ud(e,t),d=await fb(t,u),A=dd(i),f=R0(i),h=Hc(i)==="y",{width:p,height:m}=s.floating;let g,y;A==="top"||A==="bottom"?(g=A,y=f===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(y=A,g=f==="end"?"top":"bottom");const v=m-d.top-d.bottom,x=p-d.left-d.right,b=mh(m-d[g],v),w=mh(p-d[y],x),B=!t.middlewareData.shift;let k=b,N=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=v),B&&!f){const L=co(d.left,0),T=co(d.right,0),E=co(d.top,0),F=co(d.bottom,0);h?N=p-2*(L!==0||T!==0?L+T:co(d.left,d.right)):k=m-2*(E!==0||F!==0?E+F:co(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:k});const j=await a.getDimensions(o.floating);return p!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function PN(){return typeof window<"u"}function U0(e){return Hne(e)?(e.nodeName||"").toLowerCase():"#document"}function vo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cu(e){var t;return(t=(Hne(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hne(e){return PN()?e instanceof Node||e instanceof vo(e).Node:!1}function ac(e){return PN()?e instanceof Element||e instanceof vo(e).Element:!1}function ru(e){return PN()?e instanceof HTMLElement||e instanceof vo(e).HTMLElement:!1}function K8(e){return!PN()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vo(e).ShadowRoot}const m2e=new Set(["inline","contents"]);function n2(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=oc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!m2e.has(i)}const g2e=new Set(["table","td","th"]);function y2e(e){return g2e.has(U0(e))}const v2e=[":popover-open",":modal"];function IN(e){return v2e.some(t=>{try{return e.matches(t)}catch{return!1}})}const x2e=["transform","translate","scale","rotate","perspective"],w2e=["transform","translate","scale","rotate","perspective","filter"],b2e=["paint","layout","strict","content"];function bU(e){const t=CU(),n=ac(e)?oc(e):e;return x2e.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||w2e.some(r=>(n.willChange||"").includes(r))||b2e.some(r=>(n.contain||"").includes(r))}function C2e(e){let t=gh(e);for(;ru(t)&&!Vy(t);){if(bU(t))return t;if(IN(t))return null;t=gh(t)}return null}function CU(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const S2e=new Set(["html","body","#document"]);function Vy(e){return S2e.has(U0(e))}function oc(e){return vo(e).getComputedStyle(e)}function ON(e){return ac(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gh(e){if(U0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||K8(e)&&e.host||cu(e);return K8(t)?t.host:t}function $ne(e){const t=gh(e);return Vy(t)?e.ownerDocument?e.ownerDocument.body:e.body:ru(t)&&n2(t)?t:$ne(t)}function pb(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=$ne(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=vo(i);if(s){const o=JO(a);return t.concat(a,a.visualViewport||[],n2(i)?i:[],o&&n?pb(o):[])}return t.concat(i,pb(i,[],n))}function JO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zne(e){const t=oc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ru(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,o=E_(n)!==s||E_(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function SU(e){return ac(e)?e:e.contextElement}function Zg(e){const t=SU(e);if(!ru(t))return Yc(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=zne(t);let a=(s?E_(n.width):n.width)/r,o=(s?E_(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const B2e=Yc(0);function Vne(e){const t=vo(e);return!CU()||!t.visualViewport?B2e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _2e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vo(e)?!1:t}function Ip(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=SU(e);let a=Yc(1);t&&(r?ac(r)&&(a=Zg(r)):a=Zg(e));const o=_2e(s,n,r)?Vne(s):Yc(0);let l=(i.left+o.x)/a.x,u=(i.top+o.y)/a.y,d=i.width/a.x,A=i.height/a.y;if(s){const f=vo(s),h=r&&ac(r)?vo(r):r;let p=f,m=JO(p);for(;m&&r&&h!==p;){const g=Zg(m),y=m.getBoundingClientRect(),v=oc(m),x=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*g.x,b=y.top+(m.clientTop+parseFloat(v.paddingTop))*g.y;l*=g.x,u*=g.y,d*=g.x,A*=g.y,l+=x,u+=b,p=vo(m),m=JO(p)}}return j_({width:d,height:A,x:l,y:u})}function BU(e,t){const n=ON(e).scrollLeft;return t?t.left+n:Ip(cu(e)).left+n}function Kne(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:BU(e,r)),s=r.top+t.scrollTop;return{x:i,y:s}}function k2e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",a=cu(r),o=t?IN(t.floating):!1;if(r===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Yc(1);const d=Yc(0),A=ru(r);if((A||!A&&!s)&&((U0(r)!=="body"||n2(a))&&(l=ON(r)),ru(r))){const h=Ip(r);u=Zg(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const f=a&&!A&&!s?Kne(a,l,!0):Yc(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-l.scrollTop*u.y+d.y+f.y}}function E2e(e){return Array.from(e.getClientRects())}function N2e(e){const t=cu(e),n=ON(e),r=e.ownerDocument.body,i=co(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=co(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+BU(e);const o=-n.scrollTop;return oc(r).direction==="rtl"&&(a+=co(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}function j2e(e,t){const n=vo(e),r=cu(e),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const u=CU();(!u||u&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}return{width:s,height:a,x:o,y:l}}const T2e=new Set(["absolute","fixed"]);function P2e(e,t){const n=Ip(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=ru(e)?Zg(e):Yc(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:a,height:o,x:l,y:u}}function W8(e,t,n){let r;if(t==="viewport")r=j2e(e,n);else if(t==="document")r=N2e(cu(e));else if(ac(t))r=P2e(t,n);else{const i=Vne(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return j_(r)}function Wne(e,t){const n=gh(e);return n===t||!ac(n)||Vy(n)?!1:oc(n).position==="fixed"||Wne(n,t)}function I2e(e,t){const n=t.get(e);if(n)return n;let r=pb(e,[],!1).filter(o=>ac(o)&&U0(o)!=="body"),i=null;const s=oc(e).position==="fixed";let a=s?gh(e):e;for(;ac(a)&&!Vy(a);){const o=oc(a),l=bU(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&T2e.has(i.position)||n2(a)&&!l&&Wne(e,a))?r=r.filter(d=>d!==a):i=o,a=gh(a)}return t.set(e,r),r}function O2e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?IN(t)?[]:I2e(t,this._c):[].concat(n),r],o=a[0],l=a.reduce((u,d)=>{const A=W8(t,d,i);return u.top=co(A.top,u.top),u.right=mh(A.right,u.right),u.bottom=mh(A.bottom,u.bottom),u.left=co(A.left,u.left),u},W8(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function F2e(e){const{width:t,height:n}=zne(e);return{width:t,height:n}}function M2e(e,t,n){const r=ru(t),i=cu(t),s=n==="fixed",a=Ip(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=Yc(0);function u(){l.x=BU(i)}if(r||!r&&!s)if((U0(t)!=="body"||n2(i))&&(o=ON(t)),r){const h=Ip(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&u();s&&!r&&i&&u();const d=i&&!r&&!s?Kne(i,o):Yc(0),A=a.left+o.scrollLeft-l.x-d.x,f=a.top+o.scrollTop-l.y-d.y;return{x:A,y:f,width:a.width,height:a.height}}function YT(e){return oc(e).position==="static"}function q8(e,t){if(!ru(e)||oc(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return cu(e)===n&&(n=n.ownerDocument.body),n}function qne(e,t){const n=vo(e);if(IN(e))return n;if(!ru(e)){let i=gh(e);for(;i&&!Vy(i);){if(ac(i)&&!YT(i))return i;i=gh(i)}return n}let r=q8(e,t);for(;r&&y2e(r)&&YT(r);)r=q8(r,t);return r&&Vy(r)&&YT(r)&&!bU(r)?n:r||C2e(e)||n}const L2e=async function(e){const t=this.getOffsetParent||qne,n=this.getDimensions,r=await n(e.floating);return{reference:M2e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function R2e(e){return oc(e).direction==="rtl"}const U2e={convertOffsetParentRelativeRectToViewportRelativeRect:k2e,getDocumentElement:cu,getClippingRect:O2e,getOffsetParent:qne,getElementRects:L2e,getClientRects:E2e,getDimensions:F2e,getScale:Zg,isElement:ac,isRTL:R2e};function Gne(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function D2e(e,t){let n=null,r;const i=cu(e);function s(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:A,width:f,height:h}=u;if(o||t(),!f||!h)return;const p=MC(A),m=MC(i.clientWidth-(d+f)),g=MC(i.clientHeight-(A+h)),y=MC(d),x={rootMargin:-p+"px "+-m+"px "+-g+"px "+-y+"px",threshold:co(0,mh(1,l))||1};let b=!0;function w(B){const k=B[0].intersectionRatio;if(k!==l){if(!b)return a();k?a(!1,k):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!Gne(u,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(w,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,x)}n.observe(e)}return a(!0),s}function Q2e(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=SU(e),d=i||s?[...u?pb(u):[],...pb(t)]:[];d.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const A=u&&o?D2e(u,n):null;let f=-1,h=null;a&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let p,m=l?Ip(e):null;l&&g();function g(){const y=Ip(e);m&&!Gne(m,y)&&n(),m=y,p=requestAnimationFrame(g)}return n(),()=>{var y;d.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),A==null||A(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const H2e=A2e,$2e=h2e,z2e=c2e,V2e=p2e,K2e=u2e,G8=l2e,W2e=f2e,q2e=(e,t,n)=>{const r=new Map,i={platform:U2e,...n},s={...i.platform,_c:r};return o2e(e,t,{...i,platform:s})};var G2e=typeof document<"u",Y2e=function(){},BB=G2e?S.useLayoutEffect:Y2e;function T_(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 n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!T_(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!T_(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Yne(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Y8(e,t){const n=Yne(e);return Math.round(t*n)/n}function XT(e){const t=S.useRef(e);return BB(()=>{t.current=e}),t}function X2e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:l,open:u}=e,[d,A]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=S.useState(r);T_(f,r)||h(r);const[p,m]=S.useState(null),[g,y]=S.useState(null),v=S.useCallback($=>{$!==B.current&&(B.current=$,m($))},[]),x=S.useCallback($=>{$!==k.current&&(k.current=$,y($))},[]),b=s||p,w=a||g,B=S.useRef(null),k=S.useRef(null),N=S.useRef(d),j=l!=null,L=XT(l),T=XT(i),E=XT(u),F=S.useCallback(()=>{if(!B.current||!k.current)return;const $={placement:t,strategy:n,middleware:f};T.current&&($.platform=T.current),q2e(B.current,k.current,$).then(z=>{const Q={...z,isPositioned:E.current!==!1};M.current&&!T_(N.current,Q)&&(N.current=Q,Ph.flushSync(()=>{A(Q)}))})},[f,t,n,T,E]);BB(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,A($=>({...$,isPositioned:!1})))},[u]);const M=S.useRef(!1);BB(()=>(M.current=!0,()=>{M.current=!1}),[]),BB(()=>{if(b&&(B.current=b),w&&(k.current=w),b&&w){if(L.current)return L.current(b,w,F);F()}},[b,w,F,L,j]);const D=S.useMemo(()=>({reference:B,floating:k,setReference:v,setFloating:x}),[v,x]),H=S.useMemo(()=>({reference:b,floating:w}),[b,w]),q=S.useMemo(()=>{const $={position:n,left:0,top:0};if(!H.floating)return $;const z=Y8(H.floating,d.x),Q=Y8(H.floating,d.y);return o?{...$,transform:"translate("+z+"px, "+Q+"px)",...Yne(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:Q}},[n,o,H.floating,d.x,d.y]);return S.useMemo(()=>({...d,update:F,refs:D,elements:H,floatingStyles:q}),[d,F,D,H,q])}const J2e=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?G8({element:r.current,padding:i}).fn(n):{}:r?G8({element:r,padding:i}).fn(n):{}}}},Z2e=(e,t)=>({...H2e(e),options:[e,t]}),eCe=(e,t)=>({...$2e(e),options:[e,t]}),tCe=(e,t)=>({...W2e(e),options:[e,t]}),nCe=(e,t)=>({...z2e(e),options:[e,t]}),rCe=(e,t)=>({...V2e(e),options:[e,t]}),iCe=(e,t)=>({...K2e(e),options:[e,t]}),sCe=(e,t)=>({...J2e(e),options:[e,t]});var aCe="Arrow",Xne=S.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return c.jsx(_t.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});Xne.displayName=aCe;var oCe=Xne;function _U(e){const[t,n]=S.useState(void 0);return Ri(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,o=u.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var kU="Popper",[Jne,D0]=zs(kU),[lCe,Zne]=Jne(kU),ere=e=>{const{__scopePopper:t,children:n}=e,[r,i]=S.useState(null);return c.jsx(lCe,{scope:t,anchor:r,onAnchorChange:i,children:n})};ere.displayName=kU;var tre="PopperAnchor",nre=S.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=Zne(tre,n),a=S.useRef(null),o=tn(t,a);return S.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:c.jsx(_t.div,{...i,ref:o})});nre.displayName=tre;var EU="PopperContent",[cCe,uCe]=Jne(EU),rre=S.forwardRef((e,t)=>{var Z,ae,ue,se,Ae,de;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:A="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:p,...m}=e,g=Zne(EU,n),[y,v]=S.useState(null),x=tn(t,Se=>v(Se)),[b,w]=S.useState(null),B=_U(b),k=(B==null?void 0:B.width)??0,N=(B==null?void 0:B.height)??0,j=r+(s!=="center"?"-"+s:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},T=Array.isArray(u)?u:[u],E=T.length>0,F={padding:L,boundary:T.filter(ACe),altBoundary:E},{refs:M,floatingStyles:D,placement:H,isPositioned:q,middlewareData:$}=X2e({strategy:"fixed",placement:j,whileElementsMounted:(...Se)=>Q2e(...Se,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[Z2e({mainAxis:i+N,alignmentAxis:a}),l&&eCe({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?tCe():void 0,...F}),l&&nCe({...F}),rCe({...F,apply:({elements:Se,rects:Fe,availableWidth:te,availableHeight:ke})=>{const{width:Ze,height:et}=Fe.reference,Te=Se.floating.style;Te.setProperty("--radix-popper-available-width",`${te}px`),Te.setProperty("--radix-popper-available-height",`${ke}px`),Te.setProperty("--radix-popper-anchor-width",`${Ze}px`),Te.setProperty("--radix-popper-anchor-height",`${et}px`)}}),b&&sCe({element:b,padding:o}),hCe({arrowWidth:k,arrowHeight:N}),f&&iCe({strategy:"referenceHidden",...F})]}),[z,Q]=are(H),ce=Fi(p);Ri(()=>{q&&(ce==null||ce())},[q,ce]);const R=(Z=$.arrow)==null?void 0:Z.x,O=(ae=$.arrow)==null?void 0:ae.y,Y=((ue=$.arrow)==null?void 0:ue.centerOffset)!==0,[X,K]=S.useState();return Ri(()=>{y&&K(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:q?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(se=$.transformOrigin)==null?void 0:se.x,(Ae=$.transformOrigin)==null?void 0:Ae.y].join(" "),...((de=$.hide)==null?void 0:de.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(cCe,{scope:n,placedSide:z,onArrowChange:w,arrowX:R,arrowY:O,shouldHideArrow:Y,children:c.jsx(_t.div,{"data-side":z,"data-align":Q,...m,ref:x,style:{...m.style,animation:q?void 0:"none"}})})})});rre.displayName=EU;var ire="PopperArrow",dCe={top:"bottom",right:"left",bottom:"top",left:"right"},sre=S.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=uCe(ire,r),a=dCe[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(oCe,{...i,ref:n,style:{...i.style,display:"block"}})})});sre.displayName=ire;function ACe(e){return e!==null}var hCe=e=>({name:"transformOrigin",options:e,fn(t){var g,y,v;const{placement:n,rects:r,middlewareData:i}=t,a=((g=i.arrow)==null?void 0:g.centerOffset)!==0,o=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,d]=are(n),A={start:"0%",center:"50%",end:"100%"}[d],f=(((y=i.arrow)==null?void 0:y.x)??0)+o/2,h=(((v=i.arrow)==null?void 0:v.y)??0)+l/2;let p="",m="";return u==="bottom"?(p=a?A:`${f}px`,m=`${-l}px`):u==="top"?(p=a?A:`${f}px`,m=`${r.floating.height+l}px`):u==="right"?(p=`${-l}px`,m=a?A:`${h}px`):u==="left"&&(p=`${r.floating.width+l}px`,m=a?A:`${h}px`),{data:{x:p,y:m}}}});function are(e){const[t,n="center"]=e.split("-");return[t,n]}var NU=ere,FN=nre,jU=rre,TU=sre,[MN,ekt]=zs("Tooltip",[D0]),LN=D0(),ore="TooltipProvider",fCe=700,ZO="tooltip.open",[pCe,PU]=MN(ore),lre=e=>{const{__scopeTooltip:t,delayDuration:n=fCe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,a=S.useRef(!0),o=S.useRef(!1),l=S.useRef(0);return S.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),c.jsx(pCe,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:o,onPointerInTransitChange:S.useCallback(u=>{o.current=u},[]),disableHoverableContent:i,children:s})};lre.displayName=ore;var mb="Tooltip",[mCe,RN]=MN(mb),cre=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:s,disableHoverableContent:a,delayDuration:o}=e,l=PU(mb,e.__scopeTooltip),u=LN(t),[d,A]=S.useState(null),f=il(),h=S.useRef(0),p=a??l.disableHoverableContent,m=o??l.delayDuration,g=S.useRef(!1),[y,v]=wo({prop:r,defaultProp:i??!1,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(ZO))):l.onClose(),s==null||s(k)},caller:mb}),x=S.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),b=S.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,v(!0)},[v]),w=S.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v(!1)},[v]),B=S.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,v(!0),h.current=0},m)},[m,v]);return S.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),c.jsx(NU,{...u,children:c.jsx(mCe,{scope:t,contentId:f,open:y,stateAttribute:x,trigger:d,onTriggerChange:A,onTriggerEnter:S.useCallback(()=>{l.isOpenDelayedRef.current?B():b()},[l.isOpenDelayedRef,B,b]),onTriggerLeave:S.useCallback(()=>{p?w():(window.clearTimeout(h.current),h.current=0)},[w,p]),onOpen:b,onClose:w,disableHoverableContent:p,children:n})})};cre.displayName=mb;var e3="TooltipTrigger",ure=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=RN(e3,n),s=PU(e3,n),a=LN(n),o=S.useRef(null),l=tn(t,o,i.onTriggerChange),u=S.useRef(!1),d=S.useRef(!1),A=S.useCallback(()=>u.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener("pointerup",A),[A]),c.jsx(FN,{asChild:!0,...a,children:c.jsx(_t.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:at(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:at(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:at(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",A,{once:!0})}),onFocus:at(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:at(e.onBlur,i.onClose),onClick:at(e.onClick,i.onClose)})})});ure.displayName=e3;var gCe="TooltipPortal",[tkt,yCe]=MN(gCe,{forceMount:void 0}),Ky="TooltipContent",dre=S.forwardRef((e,t)=>{const n=yCe(Ky,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,a=RN(Ky,e.__scopeTooltip);return c.jsx(ga,{present:r||a.open,children:a.disableHoverableContent?c.jsx(Are,{side:i,...s,ref:t}):c.jsx(vCe,{side:i,...s,ref:t})})}),vCe=S.forwardRef((e,t)=>{const n=RN(Ky,e.__scopeTooltip),r=PU(Ky,e.__scopeTooltip),i=S.useRef(null),s=tn(t,i),[a,o]=S.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:A}=r,f=S.useCallback(()=>{o(null),A(!1)},[A]),h=S.useCallback((p,m)=>{const g=p.currentTarget,y={x:p.clientX,y:p.clientY},v=SCe(y,g.getBoundingClientRect()),x=BCe(y,v),b=_Ce(m.getBoundingClientRect()),w=ECe([...x,...b]);o(w),A(!0)},[A]);return S.useEffect(()=>()=>f(),[f]),S.useEffect(()=>{if(l&&d){const p=g=>h(g,d),m=g=>h(g,l);return l.addEventListener("pointerleave",p),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",p),d.removeEventListener("pointerleave",m)}}},[l,d,h,f]),S.useEffect(()=>{if(a){const p=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},v=(l==null?void 0:l.contains(g))||(d==null?void 0:d.contains(g)),x=!kCe(y,a);v?f():x&&(f(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[l,d,a,u,f]),c.jsx(Are,{...e,ref:s})}),[xCe,wCe]=MN(mb,{isInside:!1}),bCe=Hte("TooltipContent"),Are=S.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...o}=e,l=RN(Ky,n),u=LN(n),{onClose:d}=l;return S.useEffect(()=>(document.addEventListener(ZO,d),()=>document.removeEventListener(ZO,d)),[d]),S.useEffect(()=>{if(l.trigger){const A=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",A,{capture:!0}),()=>window.removeEventListener("scroll",A,{capture:!0})}},[l.trigger,d]),c.jsx(F0,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:A=>A.preventDefault(),onDismiss:d,children:c.jsxs(jU,{"data-state":l.stateAttribute,...u,...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:[c.jsx(bCe,{children:r}),c.jsx(xCe,{scope:n,isInside:!0,children:c.jsx(Cwe,{id:l.contentId,role:"tooltip",children:i||r})})]})})});dre.displayName=Ky;var hre="TooltipArrow",CCe=S.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=LN(n);return wCe(hre,n).isInside?null:c.jsx(TU,{...i,...r,ref:t})});CCe.displayName=hre;function SCe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function BCe(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function _Ce(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function kCe(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const o=t[s],l=t[a],u=o.x,d=o.y,A=l.x,f=l.y;d>r!=f>r&&n<(A-u)*(r-d)/(f-d)+u&&(i=!i)}return i}function ECe(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),NCe(t)}function NCe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var jCe=lre,TCe=cre,PCe=ure,fre=dre;const IU=jCe,OU=TCe,FU=PCe,UN=S.forwardRef(({className:e,sideOffset:t=4,...n},r)=>c.jsx(fre,{ref:r,sideOffset:t,className:pt("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md 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",e),...n}));UN.displayName=fre.displayName;var Q0=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Op=typeof window>"u"||"Deno"in globalThis;function ra(){}function ICe(e,t){return typeof e=="function"?e(t):e}function t3(e){return typeof e=="number"&&e>=0&&e!==1/0}function pre(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ZA(e,t){return typeof e=="function"?e(t):e}function Ho(e,t){return typeof e=="function"?e(t):e}function X8(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==MU(a,t.options))return!1}else if(!gb(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||s&&!s(t))}function J8(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Fp(t.options.mutationKey)!==Fp(s))return!1}else if(!gb(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function MU(e,t){return((t==null?void 0:t.queryKeyHashFn)||Fp)(e)}function Fp(e){return JSON.stringify(e,(t,n)=>n3(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function gb(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>gb(e[n],t[n])):!1}function mre(e,t){if(e===t)return e;const n=Z8(e)&&Z8(t);if(n||n3(e)&&n3(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),a=s.length,o=n?[]:{},l=new Set(r);let u=0;for(let d=0;d<a;d++){const A=n?d:s[d];(!n&&l.has(A)||n)&&e[A]===void 0&&t[A]===void 0?(o[A]=void 0,u++):(o[A]=mre(e[A],t[A]),o[A]===e[A]&&e[A]!==void 0&&u++)}return i===a&&u===i?e:o}return t}function P_(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Z8(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function n3(e){if(!e7(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!e7(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function e7(e){return Object.prototype.toString.call(e)==="[object Object]"}function OCe(e){return new Promise(t=>{setTimeout(t,e)})}function r3(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?mre(e,t):t}function FCe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function MCe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var LU=Symbol();function gre(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===LU?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function yre(e,t){return typeof e=="function"?e(...t):!!e}var Zf,wA,By,gZ,LCe=(gZ=class extends Q0{constructor(){super();It(this,Zf);It(this,wA);It(this,By);nt(this,By,t=>{if(!Op&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){fe(this,wA)||this.setEventListener(fe(this,By))}onUnsubscribe(){var t;this.hasListeners()||((t=fe(this,wA))==null||t.call(this),nt(this,wA,void 0))}setEventListener(t){var n;nt(this,By,t),(n=fe(this,wA))==null||n.call(this),nt(this,wA,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){fe(this,Zf)!==t&&(nt(this,Zf,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof fe(this,Zf)=="boolean"?fe(this,Zf):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Zf=new WeakMap,wA=new WeakMap,By=new WeakMap,gZ),RU=new LCe,_y,bA,ky,yZ,RCe=(yZ=class extends Q0{constructor(){super();It(this,_y,!0);It(this,bA);It(this,ky);nt(this,ky,t=>{if(!Op&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){fe(this,bA)||this.setEventListener(fe(this,ky))}onUnsubscribe(){var t;this.hasListeners()||((t=fe(this,bA))==null||t.call(this),nt(this,bA,void 0))}setEventListener(t){var n;nt(this,ky,t),(n=fe(this,bA))==null||n.call(this),nt(this,bA,t(this.setOnline.bind(this)))}setOnline(t){fe(this,_y)!==t&&(nt(this,_y,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return fe(this,_y)}},_y=new WeakMap,bA=new WeakMap,ky=new WeakMap,yZ),I_=new RCe;function i3(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function UCe(e){return Math.min(1e3*2**e,3e4)}function vre(e){return(e??"online")==="online"?I_.isOnline():!0}var xre=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function JT(e){return e instanceof xre}function wre(e){let t=!1,n=0,r=!1,i;const s=i3(),a=m=>{var g;r||(f(new xre(m)),(g=e.abort)==null||g.call(e))},o=()=>{t=!0},l=()=>{t=!1},u=()=>RU.isFocused()&&(e.networkMode==="always"||I_.isOnline())&&e.canRun(),d=()=>vre(e.networkMode)&&e.canRun(),A=m=>{var g;r||(r=!0,(g=e.onSuccess)==null||g.call(e,m),i==null||i(),s.resolve(m))},f=m=>{var g;r||(r=!0,(g=e.onError)==null||g.call(e,m),i==null||i(),s.reject(m))},h=()=>new Promise(m=>{var g;i=y=>{(r||u())&&m(y)},(g=e.onPause)==null||g.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),p=()=>{if(r)return;let m;const g=n===0?e.initialPromise:void 0;try{m=g??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(A).catch(y=>{var B;if(r)return;const v=e.retry??(Op?0:3),x=e.retryDelay??UCe,b=typeof x=="function"?x(n,y):x,w=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,y);if(t||!w){f(y);return}n++,(B=e.onFail)==null||B.call(e,n,y),OCe(b).then(()=>u()?void 0:h()).then(()=>{t?f(y):p()})})};return{promise:s,cancel:a,continue:()=>(i==null||i(),s),cancelRetry:o,continueRetry:l,canStart:d,start:()=>(d()?p():h().then(p),s)}}var DCe=e=>setTimeout(e,0);function QCe(){let e=[],t=0,n=o=>{o()},r=o=>{o()},i=DCe;const s=o=>{t?e.push(o):i(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&i(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||a()}return l},batchCalls:o=>(...l)=>{s(()=>{o(...l)})},schedule:s,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{i=o}}}var Ii=QCe(),ep,vZ,bre=(vZ=class{constructor(){It(this,ep)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),t3(this.gcTime)&&nt(this,ep,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Op?1/0:5*60*1e3))}clearGcTimeout(){fe(this,ep)&&(clearTimeout(fe(this,ep)),nt(this,ep,void 0))}},ep=new WeakMap,vZ),Ey,tp,Qo,np,Is,H1,rp,Ll,Fu,xZ,HCe=(xZ=class extends bre{constructor(t){super();It(this,Ll);It(this,Ey);It(this,tp);It(this,Qo);It(this,np);It(this,Is);It(this,H1);It(this,rp);nt(this,rp,!1),nt(this,H1,t.defaultOptions),this.setOptions(t.options),this.observers=[],nt(this,np,t.client),nt(this,Qo,fe(this,np).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,nt(this,Ey,$Ce(this.options)),this.state=t.state??fe(this,Ey),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=fe(this,Is))==null?void 0:t.promise}setOptions(t){this.options={...fe(this,H1),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&fe(this,Qo).remove(this)}setData(t,n){const r=r3(this.state.data,t,this.options);return on(this,Ll,Fu).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){on(this,Ll,Fu).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=fe(this,Is))==null?void 0:r.promise;return(i=fe(this,Is))==null||i.cancel(t),n?n.then(ra).catch(ra):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(fe(this,Ey))}isActive(){return this.observers.some(t=>Ho(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===LU||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ZA(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!pre(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=fe(this,Is))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=fe(this,Is))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),fe(this,Qo).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(fe(this,Is)&&(fe(this,rp)?fe(this,Is).cancel({revert:!0}):fe(this,Is).cancelRetry()),this.scheduleGc()),fe(this,Qo).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||on(this,Ll,Fu).call(this,{type:"invalidate"})}fetch(t,n){var u,d,A;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(fe(this,Is))return fe(this,Is).continueRetry(),fe(this,Is).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(nt(this,rp,!0),r.signal)})},s=()=>{const f=gre(this.options,n),p=(()=>{const m={client:fe(this,np),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return nt(this,rp,!1),this.options.persister?this.options.persister(f,p,this):f(p)},o=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:fe(this,np),state:this.state,fetchFn:s};return i(f),f})();(u=this.options.behavior)==null||u.onFetch(o,this),nt(this,tp,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&on(this,Ll,Fu).call(this,{type:"fetch",meta:(A=o.fetchOptions)==null?void 0:A.meta});const l=f=>{var h,p,m,g;JT(f)&&f.silent||on(this,Ll,Fu).call(this,{type:"error",error:f}),JT(f)||((p=(h=fe(this,Qo).config).onError)==null||p.call(h,f,this),(g=(m=fe(this,Qo).config).onSettled)==null||g.call(m,this.state.data,f,this)),this.scheduleGc()};return nt(this,Is,wre({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,p,m,g;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){l(y);return}(p=(h=fe(this,Qo).config).onSuccess)==null||p.call(h,f,this),(g=(m=fe(this,Qo).config).onSettled)==null||g.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{on(this,Ll,Fu).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{on(this,Ll,Fu).call(this,{type:"pause"})},onContinue:()=>{on(this,Ll,Fu).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),fe(this,Is).start()}},Ey=new WeakMap,tp=new WeakMap,Qo=new WeakMap,np=new WeakMap,Is=new WeakMap,H1=new WeakMap,rp=new WeakMap,Ll=new WeakSet,Fu=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Cre(r.data,this.options),fetchMeta:t.meta??null};case"success":return nt(this,tp,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return JT(i)&&i.revert&&fe(this,tp)?{...fe(this,tp),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ii.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),fe(this,Qo).notify({query:this,type:"updated",action:t})})},xZ);function Cre(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vre(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $Ce(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Oc,wZ,zCe=(wZ=class extends Q0{constructor(t={}){super();It(this,Oc);this.config=t,nt(this,Oc,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??MU(i,n);let a=this.get(s);return a||(a=new HCe({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){fe(this,Oc).has(t.queryHash)||(fe(this,Oc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=fe(this,Oc).get(t.queryHash);n&&(t.destroy(),n===t&&fe(this,Oc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ii.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return fe(this,Oc).get(t)}getAll(){return[...fe(this,Oc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>X8(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>X8(t,r)):n}notify(t){Ii.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ii.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ii.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Oc=new WeakMap,wZ),Fc,Zs,ip,Mc,eA,bZ,VCe=(bZ=class extends bre{constructor(t){super();It(this,Mc);It(this,Fc);It(this,Zs);It(this,ip);this.mutationId=t.mutationId,nt(this,Zs,t.mutationCache),nt(this,Fc,[]),this.state=t.state||Sre(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){fe(this,Fc).includes(t)||(fe(this,Fc).push(t),this.clearGcTimeout(),fe(this,Zs).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){nt(this,Fc,fe(this,Fc).filter(n=>n!==t)),this.scheduleGc(),fe(this,Zs).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){fe(this,Fc).length||(this.state.status==="pending"?this.scheduleGc():fe(this,Zs).remove(this))}continue(){var t;return((t=fe(this,ip))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,o,l,u,d,A,f,h,p,m,g,y,v,x,b,w,B,k,N;const n=()=>{on(this,Mc,eA).call(this,{type:"continue"})};nt(this,ip,wre({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(j,L)=>{on(this,Mc,eA).call(this,{type:"failed",failureCount:j,error:L})},onPause:()=>{on(this,Mc,eA).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>fe(this,Zs).canRun(this)}));const r=this.state.status==="pending",i=!fe(this,ip).canStart();try{if(r)n();else{on(this,Mc,eA).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(s=fe(this,Zs).config).onMutate)==null?void 0:a.call(s,t,this));const L=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));L!==this.state.context&&on(this,Mc,eA).call(this,{type:"pending",context:L,variables:t,isPaused:i})}const j=await fe(this,ip).start();return await((d=(u=fe(this,Zs).config).onSuccess)==null?void 0:d.call(u,j,t,this.state.context,this)),await((f=(A=this.options).onSuccess)==null?void 0:f.call(A,j,t,this.state.context)),await((p=(h=fe(this,Zs).config).onSettled)==null?void 0:p.call(h,j,null,this.state.variables,this.state.context,this)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,j,null,t,this.state.context)),on(this,Mc,eA).call(this,{type:"success",data:j}),j}catch(j){try{throw await((v=(y=fe(this,Zs).config).onError)==null?void 0:v.call(y,j,t,this.state.context,this)),await((b=(x=this.options).onError)==null?void 0:b.call(x,j,t,this.state.context)),await((B=(w=fe(this,Zs).config).onSettled)==null?void 0:B.call(w,void 0,j,this.state.variables,this.state.context,this)),await((N=(k=this.options).onSettled)==null?void 0:N.call(k,void 0,j,t,this.state.context)),j}finally{on(this,Mc,eA).call(this,{type:"error",error:j})}}finally{fe(this,Zs).runNext(this)}}},Fc=new WeakMap,Zs=new WeakMap,ip=new WeakMap,Mc=new WeakSet,eA=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ii.batch(()=>{fe(this,Fc).forEach(r=>{r.onMutationUpdate(t)}),fe(this,Zs).notify({mutation:this,type:"updated",action:t})})},bZ);function Sre(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $u,Rl,$1,CZ,KCe=(CZ=class extends Q0{constructor(t={}){super();It(this,$u);It(this,Rl);It(this,$1);this.config=t,nt(this,$u,new Set),nt(this,Rl,new Map),nt(this,$1,0)}build(t,n,r){const i=new VCe({mutationCache:this,mutationId:++pC(this,$1)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){fe(this,$u).add(t);const n=LC(t);if(typeof n=="string"){const r=fe(this,Rl).get(n);r?r.push(t):fe(this,Rl).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(fe(this,$u).delete(t)){const n=LC(t);if(typeof n=="string"){const r=fe(this,Rl).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&fe(this,Rl).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=LC(t);if(typeof n=="string"){const r=fe(this,Rl).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=LC(t);if(typeof n=="string"){const i=(r=fe(this,Rl).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ii.batch(()=>{fe(this,$u).forEach(t=>{this.notify({type:"removed",mutation:t})}),fe(this,$u).clear(),fe(this,Rl).clear()})}getAll(){return Array.from(fe(this,$u))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>J8(n,r))}findAll(t={}){return this.getAll().filter(n=>J8(t,n))}notify(t){Ii.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ii.batch(()=>Promise.all(t.map(n=>n.continue().catch(ra))))}},$u=new WeakMap,Rl=new WeakMap,$1=new WeakMap,CZ);function LC(e){var t;return(t=e.options.scope)==null?void 0:t.id}function t7(e){return{onFetch:(t,n)=>{var d,A,f,h,p;const r=t.options,i=(f=(A=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:A.fetchMore)==null?void 0:f.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],a=((p=t.state.data)==null?void 0:p.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const g=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=gre(t.options,t.fetchOptions),v=async(x,b,w)=>{if(m)return Promise.reject();if(b==null&&x.pages.length)return Promise.resolve(x);const k=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:b,direction:w?"backward":"forward",meta:t.options.meta};return g(T),T})(),N=await y(k),{maxPages:j}=t.options,L=w?MCe:FCe;return{pages:L(x.pages,N,j),pageParams:L(x.pageParams,b,j)}};if(i&&s.length){const x=i==="backward",b=x?WCe:n7,w={pages:s,pageParams:a},B=b(r,w);o=await v(w,B,x)}else{const x=e??s.length;do{const b=l===0?a[0]??r.initialPageParam:n7(r,o);if(l>0&&b==null)break;o=await v(o,b),l++}while(l<x)}return o};t.options.persister?t.fetchFn=()=>{var m,g;return(g=(m=t.options).persister)==null?void 0:g.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function n7(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function WCe(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var zr,CA,SA,Ny,jy,BA,Ty,Py,SZ,qCe=(SZ=class{constructor(e={}){It(this,zr);It(this,CA);It(this,SA);It(this,Ny);It(this,jy);It(this,BA);It(this,Ty);It(this,Py);nt(this,zr,e.queryCache||new zCe),nt(this,CA,e.mutationCache||new KCe),nt(this,SA,e.defaultOptions||{}),nt(this,Ny,new Map),nt(this,jy,new Map),nt(this,BA,0)}mount(){pC(this,BA)._++,fe(this,BA)===1&&(nt(this,Ty,RU.subscribe(async e=>{e&&(await this.resumePausedMutations(),fe(this,zr).onFocus())})),nt(this,Py,I_.subscribe(async e=>{e&&(await this.resumePausedMutations(),fe(this,zr).onOnline())})))}unmount(){var e,t;pC(this,BA)._--,fe(this,BA)===0&&((e=fe(this,Ty))==null||e.call(this),nt(this,Ty,void 0),(t=fe(this,Py))==null||t.call(this),nt(this,Py,void 0))}isFetching(e){return fe(this,zr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return fe(this,CA).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=fe(this,zr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=fe(this,zr).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ZA(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return fe(this,zr).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=fe(this,zr).get(r.queryHash),s=i==null?void 0:i.state.data,a=ICe(t,s);if(a!==void 0)return fe(this,zr).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ii.batch(()=>fe(this,zr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=fe(this,zr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=fe(this,zr);Ii.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=fe(this,zr);return Ii.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ii.batch(()=>fe(this,zr).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(ra).catch(ra)}invalidateQueries(e,t={}){return Ii.batch(()=>(fe(this,zr).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ii.batch(()=>fe(this,zr).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(ra)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(ra)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=fe(this,zr).build(this,t);return n.isStaleByTime(ZA(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ra).catch(ra)}fetchInfiniteQuery(e){return e.behavior=t7(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ra).catch(ra)}ensureInfiniteQueryData(e){return e.behavior=t7(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return I_.isOnline()?fe(this,CA).resumePausedMutations():Promise.resolve()}getQueryCache(){return fe(this,zr)}getMutationCache(){return fe(this,CA)}getDefaultOptions(){return fe(this,SA)}setDefaultOptions(e){nt(this,SA,e)}setQueryDefaults(e,t){fe(this,Ny).set(Fp(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...fe(this,Ny).values()],n={};return t.forEach(r=>{gb(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){fe(this,jy).set(Fp(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...fe(this,jy).values()],n={};return t.forEach(r=>{gb(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...fe(this,SA).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=MU(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===LU&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...fe(this,SA).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){fe(this,zr).clear(),fe(this,CA).clear()}},zr=new WeakMap,CA=new WeakMap,SA=new WeakMap,Ny=new WeakMap,jy=new WeakMap,BA=new WeakMap,Ty=new WeakMap,Py=new WeakMap,SZ),Ca,mn,z1,ea,sp,Iy,_A,kA,V1,Oy,Fy,ap,op,EA,My,Mn,Ix,s3,a3,o3,l3,c3,u3,d3,Bre,BZ,GCe=(BZ=class extends Q0{constructor(t,n){super();It(this,Mn);It(this,Ca);It(this,mn);It(this,z1);It(this,ea);It(this,sp);It(this,Iy);It(this,_A);It(this,kA);It(this,V1);It(this,Oy);It(this,Fy);It(this,ap);It(this,op);It(this,EA);It(this,My,new Set);this.options=n,nt(this,Ca,t),nt(this,kA,null),nt(this,_A,i3()),this.options.experimental_prefetchInRender||fe(this,_A).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(fe(this,mn).addObserver(this),r7(fe(this,mn),this.options)?on(this,Mn,Ix).call(this):this.updateResult(),on(this,Mn,l3).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return A3(fe(this,mn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return A3(fe(this,mn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,on(this,Mn,c3).call(this),on(this,Mn,u3).call(this),fe(this,mn).removeObserver(this)}setOptions(t){const n=this.options,r=fe(this,mn);if(this.options=fe(this,Ca).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ho(this.options.enabled,fe(this,mn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");on(this,Mn,d3).call(this),fe(this,mn).setOptions(this.options),n._defaulted&&!P_(this.options,n)&&fe(this,Ca).getQueryCache().notify({type:"observerOptionsUpdated",query:fe(this,mn),observer:this});const i=this.hasListeners();i&&i7(fe(this,mn),r,this.options,n)&&on(this,Mn,Ix).call(this),this.updateResult(),i&&(fe(this,mn)!==r||Ho(this.options.enabled,fe(this,mn))!==Ho(n.enabled,fe(this,mn))||ZA(this.options.staleTime,fe(this,mn))!==ZA(n.staleTime,fe(this,mn)))&&on(this,Mn,s3).call(this);const s=on(this,Mn,a3).call(this);i&&(fe(this,mn)!==r||Ho(this.options.enabled,fe(this,mn))!==Ho(n.enabled,fe(this,mn))||s!==fe(this,EA))&&on(this,Mn,o3).call(this,s)}getOptimisticResult(t){const n=fe(this,Ca).getQueryCache().build(fe(this,Ca),t),r=this.createResult(n,t);return XCe(this,r)&&(nt(this,ea,r),nt(this,Iy,this.options),nt(this,sp,fe(this,mn).state)),r}getCurrentResult(){return fe(this,ea)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){fe(this,My).add(t)}getCurrentQuery(){return fe(this,mn)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=fe(this,Ca).defaultQueryOptions(t),r=fe(this,Ca).getQueryCache().build(fe(this,Ca),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return on(this,Mn,Ix).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),fe(this,ea)))}createResult(t,n){var j;const r=fe(this,mn),i=this.options,s=fe(this,ea),a=fe(this,sp),o=fe(this,Iy),u=t!==r?t.state:fe(this,z1),{state:d}=t;let A={...d},f=!1,h;if(n._optimisticResults){const L=this.hasListeners(),T=!L&&r7(t,n),E=L&&i7(t,r,n,i);(T||E)&&(A={...A,...Cre(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(A.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:g}=A;h=A.data;let y=!1;if(n.placeholderData!==void 0&&h===void 0&&g==="pending"){let L;s!=null&&s.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(L=s.data,y=!0):L=typeof n.placeholderData=="function"?n.placeholderData((j=fe(this,Fy))==null?void 0:j.state.data,fe(this,Fy)):n.placeholderData,L!==void 0&&(g="success",h=r3(s==null?void 0:s.data,L,n),f=!0)}if(n.select&&h!==void 0&&!y)if(s&&h===(a==null?void 0:a.data)&&n.select===fe(this,V1))h=fe(this,Oy);else try{nt(this,V1,n.select),h=n.select(h),h=r3(s==null?void 0:s.data,h,n),nt(this,Oy,h),nt(this,kA,null)}catch(L){nt(this,kA,L)}fe(this,kA)&&(p=fe(this,kA),h=fe(this,Oy),m=Date.now(),g="error");const v=A.fetchStatus==="fetching",x=g==="pending",b=g==="error",w=x&&v,B=h!==void 0,N={status:g,fetchStatus:A.fetchStatus,isPending:x,isSuccess:g==="success",isError:b,isInitialLoading:w,isLoading:w,data:h,dataUpdatedAt:A.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:A.fetchFailureCount,failureReason:A.fetchFailureReason,errorUpdateCount:A.errorUpdateCount,isFetched:A.dataUpdateCount>0||A.errorUpdateCount>0,isFetchedAfterMount:A.dataUpdateCount>u.dataUpdateCount||A.errorUpdateCount>u.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:b&&!B,isPaused:A.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&B,isStale:UU(t,n),refetch:this.refetch,promise:fe(this,_A),isEnabled:Ho(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=F=>{N.status==="error"?F.reject(N.error):N.data!==void 0&&F.resolve(N.data)},T=()=>{const F=nt(this,_A,N.promise=i3());L(F)},E=fe(this,_A);switch(E.status){case"pending":t.queryHash===r.queryHash&&L(E);break;case"fulfilled":(N.status==="error"||N.data!==E.value)&&T();break;case"rejected":(N.status!=="error"||N.error!==E.reason)&&T();break}}return N}updateResult(){const t=fe(this,ea),n=this.createResult(fe(this,mn),this.options);if(nt(this,sp,fe(this,mn).state),nt(this,Iy,this.options),fe(this,sp).data!==void 0&&nt(this,Fy,fe(this,mn)),P_(n,t))return;nt(this,ea,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!fe(this,My).size)return!0;const a=new Set(s??fe(this,My));return this.options.throwOnError&&a.add("error"),Object.keys(fe(this,ea)).some(o=>{const l=o;return fe(this,ea)[l]!==t[l]&&a.has(l)})};on(this,Mn,Bre).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&on(this,Mn,l3).call(this)}},Ca=new WeakMap,mn=new WeakMap,z1=new WeakMap,ea=new WeakMap,sp=new WeakMap,Iy=new WeakMap,_A=new WeakMap,kA=new WeakMap,V1=new WeakMap,Oy=new WeakMap,Fy=new WeakMap,ap=new WeakMap,op=new WeakMap,EA=new WeakMap,My=new WeakMap,Mn=new WeakSet,Ix=function(t){on(this,Mn,d3).call(this);let n=fe(this,mn).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ra)),n},s3=function(){on(this,Mn,c3).call(this);const t=ZA(this.options.staleTime,fe(this,mn));if(Op||fe(this,ea).isStale||!t3(t))return;const r=pre(fe(this,ea).dataUpdatedAt,t)+1;nt(this,ap,setTimeout(()=>{fe(this,ea).isStale||this.updateResult()},r))},a3=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(fe(this,mn)):this.options.refetchInterval)??!1},o3=function(t){on(this,Mn,u3).call(this),nt(this,EA,t),!(Op||Ho(this.options.enabled,fe(this,mn))===!1||!t3(fe(this,EA))||fe(this,EA)===0)&&nt(this,op,setInterval(()=>{(this.options.refetchIntervalInBackground||RU.isFocused())&&on(this,Mn,Ix).call(this)},fe(this,EA)))},l3=function(){on(this,Mn,s3).call(this),on(this,Mn,o3).call(this,on(this,Mn,a3).call(this))},c3=function(){fe(this,ap)&&(clearTimeout(fe(this,ap)),nt(this,ap,void 0))},u3=function(){fe(this,op)&&(clearInterval(fe(this,op)),nt(this,op,void 0))},d3=function(){const t=fe(this,Ca).getQueryCache().build(fe(this,Ca),this.options);if(t===fe(this,mn))return;const n=fe(this,mn);nt(this,mn,t),nt(this,z1,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Bre=function(t){Ii.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(fe(this,ea))}),fe(this,Ca).getQueryCache().notify({query:fe(this,mn),type:"observerResultsUpdated"})})},BZ);function YCe(e,t){return Ho(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function r7(e,t){return YCe(e,t)||e.state.data!==void 0&&A3(e,t,t.refetchOnMount)}function A3(e,t,n){if(Ho(t.enabled,e)!==!1&&ZA(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&UU(e,t)}return!1}function i7(e,t,n,r){return(e!==t||Ho(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&UU(e,n)}function UU(e,t){return Ho(t.enabled,e)!==!1&&e.isStaleByTime(ZA(t.staleTime,e))}function XCe(e,t){return!P_(e.getCurrentResult(),t)}var NA,jA,Sa,zu,sd,_B,h3,_Z,JCe=(_Z=class extends Q0{constructor(n,r){super();It(this,sd);It(this,NA);It(this,jA);It(this,Sa);It(this,zu);nt(this,NA,n),this.setOptions(r),this.bindMethods(),on(this,sd,_B).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=fe(this,NA).defaultMutationOptions(n),P_(this.options,r)||fe(this,NA).getMutationCache().notify({type:"observerOptionsUpdated",mutation:fe(this,Sa),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Fp(r.mutationKey)!==Fp(this.options.mutationKey)?this.reset():((i=fe(this,Sa))==null?void 0:i.state.status)==="pending"&&fe(this,Sa).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=fe(this,Sa))==null||n.removeObserver(this)}onMutationUpdate(n){on(this,sd,_B).call(this),on(this,sd,h3).call(this,n)}getCurrentResult(){return fe(this,jA)}reset(){var n;(n=fe(this,Sa))==null||n.removeObserver(this),nt(this,Sa,void 0),on(this,sd,_B).call(this),on(this,sd,h3).call(this)}mutate(n,r){var i;return nt(this,zu,r),(i=fe(this,Sa))==null||i.removeObserver(this),nt(this,Sa,fe(this,NA).getMutationCache().build(fe(this,NA),this.options)),fe(this,Sa).addObserver(this),fe(this,Sa).execute(n)}},NA=new WeakMap,jA=new WeakMap,Sa=new WeakMap,zu=new WeakMap,sd=new WeakSet,_B=function(){var r;const n=((r=fe(this,Sa))==null?void 0:r.state)??Sre();nt(this,jA,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},h3=function(n){Ii.batch(()=>{var r,i,s,a,o,l,u,d;if(fe(this,zu)&&this.hasListeners()){const A=fe(this,jA).variables,f=fe(this,jA).context;(n==null?void 0:n.type)==="success"?((i=(r=fe(this,zu)).onSuccess)==null||i.call(r,n.data,A,f),(a=(s=fe(this,zu)).onSettled)==null||a.call(s,n.data,null,A,f)):(n==null?void 0:n.type)==="error"&&((l=(o=fe(this,zu)).onError)==null||l.call(o,n.error,A,f),(d=(u=fe(this,zu)).onSettled)==null||d.call(u,void 0,n.error,A,f))}this.listeners.forEach(A=>{A(fe(this,jA))})})},_Z),_re=S.createContext(void 0),Ji=e=>{const t=S.useContext(_re);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZCe=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(_re.Provider,{value:e,children:t})),kre=S.createContext(!1),eSe=()=>S.useContext(kre);kre.Provider;function tSe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var nSe=S.createContext(tSe()),rSe=()=>S.useContext(nSe),iSe=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},sSe=e=>{S.useEffect(()=>{e.clearReset()},[e])},aSe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||yre(n,[e.error,r])),oSe=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},lSe=(e,t)=>e.isLoading&&e.isFetching&&!t,cSe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,s7=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function uSe(e,t,n){var A,f,h,p,m;const r=eSe(),i=rSe(),s=Ji(),a=s.defaultQueryOptions(e);(f=(A=s.getDefaultOptions().queries)==null?void 0:A._experimental_beforeQuery)==null||f.call(A,a),a._optimisticResults=r?"isRestoring":"optimistic",oSe(a),iSe(a,i),sSe(i);const o=!s.getQueryCache().get(a.queryHash),[l]=S.useState(()=>new t(s,a)),u=l.getOptimisticResult(a),d=!r&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(g=>{const y=d?l.subscribe(Ii.batchCalls(g)):ra;return l.updateResult(),y},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),S.useEffect(()=>{l.setOptions(a)},[a,l]),cSe(a,u))throw s7(a,l,i);if(aSe({result:u,errorResetBoundary:i,throwOnError:a.throwOnError,query:s.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw u.error;if((p=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||p.call(h,a,u),a.experimental_prefetchInRender&&!Op&&lSe(u,r)){const g=o?s7(a,l,i):(m=s.getQueryCache().get(a.queryHash))==null?void 0:m.promise;g==null||g.catch(ra).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?u:l.trackResult(u)}function Lr(e,t){return uSe(e,GCe)}function bs(e,t){const n=Ji(),[r]=S.useState(()=>new JCe(n,e));S.useEffect(()=>{r.setOptions(e)},[r,e]);const i=S.useSyncExternalStore(S.useCallback(a=>r.subscribe(Ii.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=S.useCallback((a,o)=>{r.mutate(a,o).catch(ra)},[r]);if(i.error&&yre(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}/**
* @remix-run/router v1.23.0
*
* 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
*/function yb(){return yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yb.apply(this,arguments)}var OA;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(OA||(OA={}));const a7="popstate";function dSe(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:a,hash:o}=r.location;return f3("",{pathname:s,search:a,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:O_(i)}return hSe(t,n,null,e)}function di(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ere(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ASe(){return Math.random().toString(36).substr(2,8)}function o7(e,t){return{usr:e.state,key:e.key,idx:t}}function f3(e,t,n,r){return n===void 0&&(n=null),yb({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?H0(t):t,{state:n,key:t&&t.key||r||ASe()})}function O_(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function H0(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function hSe(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,o=OA.Pop,l=null,u=d();u==null&&(u=0,a.replaceState(yb({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function A(){o=OA.Pop;let g=d(),y=g==null?null:g-u;u=g,l&&l({action:o,location:m.location,delta:y})}function f(g,y){o=OA.Push;let v=f3(m.location,g,y);u=d()+1;let x=o7(v,u),b=m.createHref(v);try{a.pushState(x,"",b)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(b)}s&&l&&l({action:o,location:m.location,delta:1})}function h(g,y){o=OA.Replace;let v=f3(m.location,g,y);u=d();let x=o7(v,u),b=m.createHref(v);a.replaceState(x,"",b),s&&l&&l({action:o,location:m.location,delta:0})}function p(g){let y=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof g=="string"?g:O_(g);return v=v.replace(/ $/,"%20"),di(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let m={get action(){return o},get location(){return e(i,a)},listen(g){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(a7,A),l=g,()=>{i.removeEventListener(a7,A),l=null}},createHref(g){return t(i,g)},createURL:p,encodeLocation(g){let y=p(g);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:h,go(g){return a.go(g)}};return m}var l7;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(l7||(l7={}));function fSe(e,t,n){return n===void 0&&(n="/"),pSe(e,t,n,!1)}function pSe(e,t,n,r){let i=typeof t=="string"?H0(t):t,s=DU(i.pathname||"/",n);if(s==null)return null;let a=Nre(e);mSe(a);let o=null;for(let l=0;o==null&&l<a.length;++l){let u=kSe(s);o=BSe(a[l],u,r)}return o}function Nre(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,a,o)=>{let l={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};l.relativePath.startsWith("/")&&(di(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=eh([r,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(di(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Nre(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:CSe(u,s.index),routesMeta:d})};return e.forEach((s,a)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,a);else for(let l of jre(s.path))i(s,a,l)}),t}function jre(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let a=jre(r.join("/")),o=[];return o.push(...a.map(l=>l===""?s:[s,l].join("/"))),i&&o.push(...a),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function mSe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:SSe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const gSe=/^:[\w-]+$/,ySe=3,vSe=2,xSe=1,wSe=10,bSe=-2,c7=e=>e==="*";function CSe(e,t){let n=e.split("/"),r=n.length;return n.some(c7)&&(r+=bSe),t&&(r+=vSe),n.filter(i=>!c7(i)).reduce((i,s)=>i+(gSe.test(s)?ySe:s===""?xSe:wSe),r)}function SSe(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function BSe(e,t,n){let{routesMeta:r}=e,i={},s="/",a=[];for(let o=0;o<r.length;++o){let l=r[o],u=o===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",A=u7({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!A&&u&&n&&!r[r.length-1].route.index&&(A=u7({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!A)return null;Object.assign(i,A.params),a.push({params:i,pathname:eh([s,A.pathname]),pathnameBase:TSe(eh([s,A.pathnameBase])),route:f}),A.pathnameBase!=="/"&&(s=eh([s,A.pathnameBase]))}return a}function u7(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=_Se(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((u,d,A)=>{let{paramName:f,isOptional:h}=d;if(f==="*"){let m=o[A]||"";a=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const p=o[A];return h&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:e}}function _Se(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ere(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l)=>(r.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function kSe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ere(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function DU(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ESe(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?H0(e):e;return{pathname:n?n.startsWith("/")?n:NSe(n,t):t,search:PSe(r),hash:ISe(i)}}function NSe(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function ZT(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function jSe(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function QU(e,t){let n=jSe(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function HU(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=H0(e):(i=yb({},e),di(!i.pathname||!i.pathname.includes("?"),ZT("?","pathname","search",i)),di(!i.pathname||!i.pathname.includes("#"),ZT("#","pathname","hash",i)),di(!i.search||!i.search.includes("#"),ZT("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,o;if(a==null)o=n;else{let A=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),A-=1;i.pathname=f.join("/")}o=A>=0?t[A]:"/"}let l=ESe(i,o),u=a&&a!=="/"&&a.endsWith("/"),d=(s||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const eh=e=>e.join("/").replace(/\/\/+/g,"/"),TSe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),PSe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ISe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function OSe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Tre=["post","put","patch","delete"];new Set(Tre);const FSe=["get",...Tre];new Set(FSe);/**
* React Router v6.30.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
*/function vb(){return vb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vb.apply(this,arguments)}const $U=S.createContext(null),MSe=S.createContext(null),Oh=S.createContext(null),DN=S.createContext(null),xd=S.createContext({outlet:null,matches:[],isDataRoute:!1}),Pre=S.createContext(null);function LSe(e,t){let{relative:n}=t===void 0?{}:t;$0()||di(!1);let{basename:r,navigator:i}=S.useContext(Oh),{hash:s,pathname:a,search:o}=Ore(e,{relative:n}),l=a;return r!=="/"&&(l=a==="/"?r:eh([r,a])),i.createHref({pathname:l,search:o,hash:s})}function $0(){return S.useContext(DN)!=null}function ml(){return $0()||di(!1),S.useContext(DN).location}function Ire(e){S.useContext(Oh).static||S.useLayoutEffect(e)}function wd(){let{isDataRoute:e}=S.useContext(xd);return e?YSe():RSe()}function RSe(){$0()||di(!1);let e=S.useContext($U),{basename:t,future:n,navigator:r}=S.useContext(Oh),{matches:i}=S.useContext(xd),{pathname:s}=ml(),a=JSON.stringify(QU(i,n.v7_relativeSplatPath)),o=S.useRef(!1);return Ire(()=>{o.current=!0}),S.useCallback(function(u,d){if(d===void 0&&(d={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let A=HU(u,JSON.parse(a),s,d.relative==="path");e==null&&t!=="/"&&(A.pathname=A.pathname==="/"?t:eh([t,A.pathname])),(d.replace?r.replace:r.push)(A,d.state,d)},[t,r,a,s,e])}function tm(){let{matches:e}=S.useContext(xd),t=e[e.length-1];return t?t.params:{}}function Ore(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=S.useContext(Oh),{matches:i}=S.useContext(xd),{pathname:s}=ml(),a=JSON.stringify(QU(i,r.v7_relativeSplatPath));return S.useMemo(()=>HU(e,JSON.parse(a),s,n==="path"),[e,a,s,n])}function USe(e,t){return DSe(e,t)}function DSe(e,t,n,r){$0()||di(!1);let{navigator:i}=S.useContext(Oh),{matches:s}=S.useContext(xd),a=s[s.length-1],o=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u=ml(),d;if(t){var A;let g=typeof t=="string"?H0(t):t;l==="/"||(A=g.pathname)!=null&&A.startsWith(l)||di(!1),d=g}else d=u;let f=d.pathname||"/",h=f;if(l!=="/"){let g=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(g.length).join("/")}let p=fSe(e,{pathname:h}),m=VSe(p&&p.map(g=>Object.assign({},g,{params:Object.assign({},o,g.params),pathname:eh([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:eh([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),s,n,r);return t&&m?S.createElement(DN.Provider,{value:{location:vb({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:OA.Pop}},m):m}function QSe(){let e=GSe(),t=OSe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:i},n):null,null)}const HSe=S.createElement(QSe,null);class $Se extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?S.createElement(xd.Provider,{value:this.props.routeContext},S.createElement(Pre.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zSe(e){let{routeContext:t,match:n,children:r}=e,i=S.useContext($U);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(xd.Provider,{value:t},r)}function VSe(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=(i=n)==null?void 0:i.errors;if(o!=null){let d=a.findIndex(A=>A.route.id&&(o==null?void 0:o[A.route.id])!==void 0);d>=0||di(!1),a=a.slice(0,Math.min(a.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let A=a[d];if((A.route.HydrateFallback||A.route.hydrateFallbackElement)&&(u=d),A.route.id){let{loaderData:f,errors:h}=n,p=A.route.loader&&f[A.route.id]===void 0&&(!h||h[A.route.id]===void 0);if(A.route.lazy||p){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,A,f)=>{let h,p=!1,m=null,g=null;n&&(h=o&&A.route.id?o[A.route.id]:void 0,m=A.route.errorElement||HSe,l&&(u<0&&f===0?(p=!0,g=null):u===f&&(p=!0,g=A.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,f+1)),v=()=>{let x;return h?x=m:p?x=g:A.route.Component?x=S.createElement(A.route.Component,null):A.route.element?x=A.route.element:x=d,S.createElement(zSe,{match:A,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:x})};return n&&(A.route.ErrorBoundary||A.route.errorElement||f===0)?S.createElement($Se,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var Fre=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Fre||{}),F_=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(F_||{});function KSe(e){let t=S.useContext($U);return t||di(!1),t}function WSe(e){let t=S.useContext(MSe);return t||di(!1),t}function qSe(e){let t=S.useContext(xd);return t||di(!1),t}function Mre(e){let t=qSe(),n=t.matches[t.matches.length-1];return n.route.id||di(!1),n.route.id}function GSe(){var e;let t=S.useContext(Pre),n=WSe(F_.UseRouteError),r=Mre(F_.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function YSe(){let{router:e}=KSe(Fre.UseNavigateStable),t=Mre(F_.UseNavigateStable),n=S.useRef(!1);return Ire(()=>{n.current=!0}),S.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,vb({fromRouteId:t},s)))},[e,t])}function XSe(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Lre(e){let{to:t,replace:n,state:r,relative:i}=e;$0()||di(!1);let{future:s,static:a}=S.useContext(Oh),{matches:o}=S.useContext(xd),{pathname:l}=ml(),u=wd(),d=HU(t,QU(o,s.v7_relativeSplatPath),l,i==="path"),A=JSON.stringify(d);return S.useEffect(()=>u(JSON.parse(A),{replace:n,state:r,relative:i}),[u,A,i,n,r]),null}function Qt(e){di(!1)}function JSe(e){let{basename:t="/",children:n=null,location:r,navigationType:i=OA.Pop,navigator:s,static:a=!1,future:o}=e;$0()&&di(!1);let l=t.replace(/^\/*/,"/"),u=S.useMemo(()=>({basename:l,navigator:s,static:a,future:vb({v7_relativeSplatPath:!1},o)}),[l,o,s,a]);typeof r=="string"&&(r=H0(r));let{pathname:d="/",search:A="",hash:f="",state:h=null,key:p="default"}=r,m=S.useMemo(()=>{let g=DU(d,l);return g==null?null:{location:{pathname:g,search:A,hash:f,state:h,key:p},navigationType:i}},[l,d,A,f,h,p,i]);return m==null?null:S.createElement(Oh.Provider,{value:u},S.createElement(DN.Provider,{children:n,value:m}))}function ZSe(e){let{children:t,location:n}=e;return USe(p3(t),n)}new Promise(()=>{});function p3(e,t){t===void 0&&(t=[]);let n=[];return S.Children.forEach(e,(r,i)=>{if(!S.isValidElement(r))return;let s=[...t,i];if(r.type===S.Fragment){n.push.apply(n,p3(r.props.children,s));return}r.type!==Qt&&di(!1),!r.props.index||!r.props.children||di(!1);let a={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=p3(r.props.children,s)),n.push(a)}),n}/**
* React Router DOM v6.30.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
*/function m3(){return m3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m3.apply(this,arguments)}function eBe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function tBe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nBe(e,t){return e.button===0&&(!t||t==="_self")&&!tBe(e)}function g3(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function rBe(e,t){let n=g3(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(s=>{n.append(i,s)})}),n}const iBe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],sBe="6";try{window.__reactRouterVersion=sBe}catch{}const aBe="startTransition",d7=gR[aBe];function oBe(e){let{basename:t,children:n,future:r,window:i}=e,s=S.useRef();s.current==null&&(s.current=dSe({window:i,v5Compat:!0}));let a=s.current,[o,l]=S.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},d=S.useCallback(A=>{u&&d7?d7(()=>l(A)):l(A)},[l,u]);return S.useLayoutEffect(()=>a.listen(d),[a,d]),S.useEffect(()=>XSe(r),[r]),S.createElement(JSe,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a,future:r})}const lBe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cBe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tt=S.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:a,state:o,target:l,to:u,preventScrollReset:d,viewTransition:A}=t,f=eBe(t,iBe),{basename:h}=S.useContext(Oh),p,m=!1;if(typeof u=="string"&&cBe.test(u)&&(p=u,lBe))try{let x=new URL(window.location.href),b=u.startsWith("//")?new URL(x.protocol+u):new URL(u),w=DU(b.pathname,h);b.origin===x.origin&&w!=null?u=w+b.search+b.hash:m=!0}catch{}let g=LSe(u,{relative:i}),y=uBe(u,{replace:a,state:o,target:l,preventScrollReset:d,relative:i,viewTransition:A});function v(x){r&&r(x),x.defaultPrevented||y(x)}return S.createElement("a",m3({},f,{href:p||g,onClick:m||s?r:v,ref:n,target:l}))});var A7;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(A7||(A7={}));var h7;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(h7||(h7={}));function uBe(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:a,viewTransition:o}=t===void 0?{}:t,l=wd(),u=ml(),d=Ore(e,{relative:a});return S.useCallback(A=>{if(nBe(A,n)){A.preventDefault();let f=r!==void 0?r:O_(u)===O_(d);l(e,{replace:f,state:i,preventScrollReset:s,relative:a,viewTransition:o})}},[u,l,d,r,i,n,e,s,a,o])}function dBe(e){let t=S.useRef(g3(e)),n=S.useRef(!1),r=ml(),i=S.useMemo(()=>rBe(r.search,n.current?null:t.current),[r.search]),s=wd(),a=S.useCallback((o,l)=>{const u=g3(typeof o=="function"?o(i):o);n.current=!0,s("?"+u,l)},[s,i]);return[i,a]}var ABe=typeof Element<"u",hBe=typeof Map=="function",fBe=typeof Set=="function",pBe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function kB(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!kB(e[r],t[r]))return!1;return!0}var s;if(hBe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(s=e.entries();!(r=s.next()).done;)if(!t.has(r.value[0]))return!1;for(s=e.entries();!(r=s.next()).done;)if(!kB(r.value[1],t.get(r.value[0])))return!1;return!0}if(fBe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(s=e.entries();!(r=s.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(pBe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(ABe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!kB(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var mBe=function(t,n){try{return kB(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const gBe=Bn(mBe);var yBe=function(e,t,n,r,i,s,a,o){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,s,a,o],d=0;l=new Error(t.replace(/%s/g,function(){return u[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},vBe=yBe;const f7=Bn(vBe);var xBe=function(t,n,r,i){var s=r?r.call(i,t,n):void 0;if(s!==void 0)return!!s;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var a=Object.keys(t),o=Object.keys(n);if(a.length!==o.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),u=0;u<a.length;u++){var d=a[u];if(!l(d))return!1;var A=t[d],f=n[d];if(s=r?r.call(i,A,f,d):void 0,s===!1||s===void 0&&A!==f)return!1}return!0};const wBe=Bn(xBe);var Rre=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Rre||{}),eP={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},p7=Object.values(Rre),zU={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},bBe=Object.entries(zU).reduce((e,[t,n])=>(e[n]=t,e),{}),Wl="data-rh",ey={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},ty=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},CBe=e=>{let t=ty(e,"title");const n=ty(e,ey.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=ty(e,ey.DEFAULT_TITLE);return t||r||void 0},SBe=e=>ty(e,ey.ON_CHANGE_CLIENT_STATE)||(()=>{}),tP=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),BBe=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const i=Object.keys(r);for(let s=0;s<i.length;s+=1){const o=i[s].toLowerCase();if(e.indexOf(o)!==-1&&r[o])return n.concat(r)}}return n},[]),_Be=e=>console&&typeof console.warn=="function"&&console.warn(e),Jv=(e,t,n)=>{const r={};return n.filter(i=>Array.isArray(i[e])?!0:(typeof i[e]<"u"&&_Be(`Helmet: ${e} should be of type "Array". Instead found type "${typeof i[e]}"`),!1)).map(i=>i[e]).reverse().reduce((i,s)=>{const a={};s.filter(l=>{let u;const d=Object.keys(l);for(let f=0;f<d.length;f+=1){const h=d[f],p=h.toLowerCase();t.indexOf(p)!==-1&&!(u==="rel"&&l[u].toLowerCase()==="canonical")&&!(p==="rel"&&l[p].toLowerCase()==="stylesheet")&&(u=p),t.indexOf(h)!==-1&&(h==="innerHTML"||h==="cssText"||h==="itemprop")&&(u=h)}if(!u||!l[u])return!1;const A=l[u].toLowerCase();return r[u]||(r[u]={}),a[u]||(a[u]={}),r[u][A]?!1:(a[u][A]=!0,!0)}).reverse().forEach(l=>i.push(l));const o=Object.keys(a);for(let l=0;l<o.length;l+=1){const u=o[l],d={...r[u],...a[u]};r[u]=d}return i},[]).reverse()},kBe=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},EBe=e=>({baseTag:BBe(["href"],e),bodyAttributes:tP("bodyAttributes",e),defer:ty(e,ey.DEFER),encode:ty(e,ey.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:tP("htmlAttributes",e),linkTags:Jv("link",["rel","href"],e),metaTags:Jv("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Jv("noscript",["innerHTML"],e),onChangeClientState:SBe(e),scriptTags:Jv("script",["src","innerHTML"],e),styleTags:Jv("style",["cssText"],e),title:CBe(e),titleAttributes:tP("titleAttributes",e),prioritizeSeoTags:kBe(e,ey.PRIORITIZE_SEO_TAGS)}),Ure=e=>Array.isArray(e)?e.join(""):e,NBe=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},nP=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(NBe(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},m7=(e,t)=>({...e,[t]:void 0}),jBe=["noscript","script","style"],y3=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Dre=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),TBe=(e,t,n,r)=>{const i=Dre(n),s=Ure(t);return i?`<${e} ${Wl}="true" ${i}>${y3(s,r)}</${e}>`:`<${e} ${Wl}="true">${y3(s,r)}</${e}>`},PBe=(e,t,n=!0)=>t.reduce((r,i)=>{const s=i,a=Object.keys(s).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,d)=>{const A=typeof s[d]>"u"?d:`${d}="${y3(s[d],n)}"`;return u?`${u} ${A}`:A},""),o=s.innerHTML||s.cssText||"",l=jBe.indexOf(e)===-1;return`${r}<${e} ${Wl}="true" ${a}${l?"/>":`>${o}</${e}>`}`},""),Qre=(e,t={})=>Object.keys(e).reduce((n,r)=>{const i=zU[r];return n[i||r]=e[r],n},t),IBe=(e,t,n)=>{const r={key:t,[Wl]:!0},i=Qre(n,r);return[re.createElement("title",i,t)]},EB=(e,t)=>t.map((n,r)=>{const i={key:r,[Wl]:!0};return Object.keys(n).forEach(s=>{const o=zU[s]||s;if(o==="innerHTML"||o==="cssText"){const l=n.innerHTML||n.cssText;i.dangerouslySetInnerHTML={__html:l}}else i[o]=n[s]}),re.createElement(e,i)}),Uo=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>IBe(e,t.title,t.titleAttributes),toString:()=>TBe(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Qre(t),toString:()=>Dre(t)};default:return{toComponent:()=>EB(e,t),toString:()=>PBe(e,t,n)}}},OBe=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const i=nP(e,eP.meta),s=nP(t,eP.link),a=nP(n,eP.script);return{priorityMethods:{toComponent:()=>[...EB("meta",i.priority),...EB("link",s.priority),...EB("script",a.priority)],toString:()=>`${Uo("meta",i.priority,r)} ${Uo("link",s.priority,r)} ${Uo("script",a.priority,r)}`},metaTags:i.default,linkTags:s.default,scriptTags:a.default}},FBe=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:s,styleTags:a,title:o="",titleAttributes:l,prioritizeSeoTags:u}=e;let{linkTags:d,metaTags:A,scriptTags:f}=e,h={toComponent:()=>{},toString:()=>""};return u&&({priorityMethods:h,linkTags:d,metaTags:A,scriptTags:f}=OBe(e)),{priority:h,base:Uo("base",t,r),bodyAttributes:Uo("bodyAttributes",n,r),htmlAttributes:Uo("htmlAttributes",i,r),link:Uo("link",d,r),meta:Uo("meta",A,r),noscript:Uo("noscript",s,r),script:Uo("script",f,r),style:Uo("style",a,r),title:Uo("title",{title:o,titleAttributes:l},r)}},v3=FBe,RC=[],Hre=!!(typeof window<"u"&&window.document&&window.document.createElement),x3=class{constructor(e,t){dn(this,"instances",[]);dn(this,"canUseDOM",Hre);dn(this,"context");dn(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?RC:this.instances,add:e=>{(this.canUseDOM?RC:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?RC:this.instances).indexOf(e);(this.canUseDOM?RC:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=v3({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},MBe={},$re=re.createContext(MBe),lp,zre=(lp=class extends S.Component{constructor(n){super(n);dn(this,"helmetData");this.helmetData=new x3(this.props.context||{},lp.canUseDOM)}render(){return re.createElement($re.Provider,{value:this.helmetData.value},this.props.children)}},dn(lp,"canUseDOM",Hre),lp),Lm=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${Wl}]`),i=[].slice.call(r),s=[];let a;return t&&t.length&&t.forEach(o=>{const l=document.createElement(e);for(const u in o)if(Object.prototype.hasOwnProperty.call(o,u))if(u==="innerHTML")l.innerHTML=o.innerHTML;else if(u==="cssText")l.styleSheet?l.styleSheet.cssText=o.cssText:l.appendChild(document.createTextNode(o.cssText));else{const d=u,A=typeof o[d]>"u"?"":o[d];l.setAttribute(u,A)}l.setAttribute(Wl,"true"),i.some((u,d)=>(a=d,l.isEqualNode(u)))?i.splice(a,1):s.push(l)}),i.forEach(o=>{var l;return(l=o.parentNode)==null?void 0:l.removeChild(o)}),s.forEach(o=>n.appendChild(o)),{oldTags:i,newTags:s}},w3=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(Wl),i=r?r.split(","):[],s=[...i],a=Object.keys(t);for(const o of a){const l=t[o]||"";n.getAttribute(o)!==l&&n.setAttribute(o,l),i.indexOf(o)===-1&&i.push(o);const u=s.indexOf(o);u!==-1&&s.splice(u,1)}for(let o=s.length-1;o>=0;o-=1)n.removeAttribute(s[o]);i.length===s.length?n.removeAttribute(Wl):n.getAttribute(Wl)!==a.join(",")&&n.setAttribute(Wl,a.join(","))},LBe=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=Ure(e)),w3("title",t)},g7=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:s,metaTags:a,noscriptTags:o,onChangeClientState:l,scriptTags:u,styleTags:d,title:A,titleAttributes:f}=e;w3("body",r),w3("html",i),LBe(A,f);const h={baseTag:Lm("base",n),linkTags:Lm("link",s),metaTags:Lm("meta",a),noscriptTags:Lm("noscript",o),scriptTags:Lm("script",u),styleTags:Lm("style",d)},p={},m={};Object.keys(h).forEach(g=>{const{newTags:y,oldTags:v}=h[g];y.length&&(p[g]=y),v.length&&(m[g]=h[g].oldTags)}),t&&t(),l(e,p,m)},Zv=null,RBe=e=>{Zv&&cancelAnimationFrame(Zv),e.defer?Zv=requestAnimationFrame(()=>{g7(e,()=>{Zv=null})}):(g7(e),Zv=null)},UBe=RBe,y7=class extends S.Component{constructor(){super(...arguments);dn(this,"rendered",!1)}shouldComponentUpdate(t){return!wBe(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const i=EBe(t.get().map(s=>{const a={...s.props};return delete a.context,a}));zre.canUseDOM?UBe(i):v3&&(r=v3(i)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},K4,Mr=(K4=class extends S.Component{shouldComponentUpdate(e){return!gBe(m7(this.props,"helmetData"),m7(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}warnOnInvalidChildren(e,t){return f7(p7.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${p7.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),f7(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return re.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:i,...s}=r.props,a=Object.keys(s).reduce((l,u)=>(l[bBe[u]||u]=s[u],l),{});let{type:o}=r;switch(typeof o=="symbol"?o=o.toString():this.warnOnInvalidChildren(r,i),o){case"Symbol(react.fragment)":t=this.mapChildrenToProps(i,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,a,i);break;default:t=this.mapObjectTypeChildren(r,t,a,i);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof x3)){const i=r;r=new x3(i.context,!0),delete n.helmetData}return r?re.createElement(y7,{...n,context:r.value}):re.createElement($re.Consumer,null,i=>re.createElement(y7,{...n,context:i}))}},dn(K4,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),K4);const DBe=["bot","Bot","crawler","Crawler","spider","Spider","GPT","Claude","Perplexity","Anthropic","Amazonbot","meta-externalagent","FacebookExternalHit","Bytespider","CCBot","cohere","Bingbot","bingbot","Googlebot","Google-Extended","AppleBot","DuckDuckBot","YandexBot","OAI-SearchBot"];function QBe(){const e=navigator.userAgent;if(!DBe.some(i=>e.includes(i)))return;fetch("https://khmmwvmdbhaplcfcndjx.supabase.co/functions/v1/log-crawler",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtobW13dm1kYmhhcGxjZmNuZGp4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzcwNTQ1MDcsImV4cCI6MjA5MjYzMDUwN30.c5aUVQ4shbnMOIIkDZRP7geMUb64HPKYg4jQFuBH52Q"},body:JSON.stringify({user_agent:e,page_path:window.location.pathname,full_url:window.location.href,site_domain:window.location.hostname,status_code:200})}).catch(()=>{})}const HBe=()=>{const{pathname:e,hash:t}=ml();return S.useEffect(()=>{if(t){const n=document.querySelector(t);n&&n.scrollIntoView({behavior:"smooth"})}else window.scrollTo(0,0)},[e,t]),null},VU=S.createContext({});function KU(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Vre=typeof window<"u",Kre=Vre?S.useLayoutEffect:S.useEffect,QN=S.createContext(null);function WU(e,t){e.indexOf(t)===-1&&e.push(t)}function qU(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const iu=(e,t,n)=>n>t?t:n<e?e:n;let HN=()=>{},Wy=()=>{};const Ad={},Wre=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function qre(e){return typeof e=="object"&&e!==null}const Gre=e=>/^0[^.\s]+$/u.test(e);function GU(e){let t;return()=>(t===void 0&&(t=e()),t)}const sl=e=>e,$Be=(e,t)=>n=>t(e(n)),r2=(...e)=>e.reduce($Be),xb=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class YU{constructor(){this.subscriptions=[]}add(t){return WU(this.subscriptions,t),()=>qU(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const a=this.subscriptions[s];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Xc=e=>e*1e3,Jo=e=>e/1e3;function Yre(e,t){return t?e*(1e3/t):0}const Xre=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,zBe=1e-7,VBe=12;function KBe(e,t,n,r,i){let s,a,o=0;do a=t+(n-t)/2,s=Xre(a,r,i)-e,s>0?n=a:t=a;while(Math.abs(s)>zBe&&++o<VBe);return a}function i2(e,t,n,r){if(e===t&&n===r)return sl;const i=s=>KBe(s,0,1,e,n);return s=>s===0||s===1?s:Xre(i(s),t,r)}const Jre=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Zre=e=>t=>1-e(1-t),eie=i2(.33,1.53,.69,.99),XU=Zre(eie),tie=Jre(XU),nie=e=>(e*=2)<1?.5*XU(e):.5*(2-Math.pow(2,-10*(e-1))),JU=e=>1-Math.sin(Math.acos(e)),rie=Zre(JU),iie=Jre(JU),WBe=i2(.42,0,1,1),qBe=i2(0,0,.58,1),sie=i2(.42,0,.58,1),GBe=e=>Array.isArray(e)&&typeof e[0]!="number",aie=e=>Array.isArray(e)&&typeof e[0]=="number",v7={linear:sl,easeIn:WBe,easeInOut:sie,easeOut:qBe,circIn:JU,circInOut:iie,circOut:rie,backIn:XU,backInOut:tie,backOut:eie,anticipate:nie},YBe=e=>typeof e=="string",x7=e=>{if(aie(e)){Wy(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return i2(t,n,r,i)}else if(YBe(e))return Wy(v7[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),v7[e];return e},UC=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],w7={value:null,addProjectionMetrics:null};function XBe(e,t){let n=new Set,r=new Set,i=!1,s=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1},l=0;function u(A){a.has(A)&&(d.schedule(A),e()),l++,A(o)}const d={schedule:(A,f=!1,h=!1)=>{const m=h&&i?n:r;return f&&a.add(A),m.has(A)||m.add(A),A},cancel:A=>{r.delete(A),a.delete(A)},process:A=>{if(o=A,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&w7.value&&w7.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,d.process(A))}};return d}const JBe=40;function oie(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=UC.reduce((x,b)=>(x[b]=XBe(s,t?b:void 0),x),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:d,update:A,preRender:f,render:h,postRender:p}=a,m=()=>{const x=Ad.useManualTiming?i.timestamp:performance.now();n=!1,Ad.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(x-i.timestamp,JBe),1)),i.timestamp=x,i.isProcessing=!0,o.process(i),l.process(i),u.process(i),d.process(i),A.process(i),f.process(i),h.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},g=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:UC.reduce((x,b)=>{const w=a[b];return x[b]=(B,k=!1,N=!1)=>(n||g(),w.schedule(B,k,N)),x},{}),cancel:x=>{for(let b=0;b<UC.length;b++)a[UC[b]].cancel(x)},state:i,steps:a}}const{schedule:xr,cancel:yh,state:hs,steps:rP}=oie(typeof requestAnimationFrame<"u"?requestAnimationFrame:sl,!0);let NB;function ZBe(){NB=void 0}const sa={now:()=>(NB===void 0&&sa.set(hs.isProcessing||Ad.useManualTiming?hs.timestamp:performance.now()),NB),set:e=>{NB=e,queueMicrotask(ZBe)}},lie=e=>t=>typeof t=="string"&&t.startsWith(e),cie=lie("--"),e_e=lie("var(--"),ZU=e=>e_e(e)?t_e.test(e.split("/*")[0].trim()):!1,t_e=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function b7(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const z0={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},wb={...z0,transform:e=>iu(0,1,e)},DC={...z0,default:1},dw=e=>Math.round(e*1e5)/1e5,eD=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function n_e(e){return e==null}const r_e=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tD=(e,t)=>n=>!!(typeof n=="string"&&r_e.test(n)&&n.startsWith(e)||t&&!n_e(n)&&Object.prototype.hasOwnProperty.call(n,t)),uie=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,a,o]=r.match(eD);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},i_e=e=>iu(0,255,e),iP={...z0,transform:e=>Math.round(i_e(e))},Rf={test:tD("rgb","red"),parse:uie("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+iP.transform(e)+", "+iP.transform(t)+", "+iP.transform(n)+", "+dw(wb.transform(r))+")"};function s_e(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const b3={test:tD("#"),parse:s_e,transform:Rf.transform},s2=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),tA=s2("deg"),Jc=s2("%"),ht=s2("px"),a_e=s2("vh"),o_e=s2("vw"),C7={...Jc,parse:e=>Jc.parse(e)/100,transform:e=>Jc.transform(e*100)},Fg={test:tD("hsl","hue"),parse:uie("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Jc.transform(dw(t))+", "+Jc.transform(dw(n))+", "+dw(wb.transform(r))+")"},vi={test:e=>Rf.test(e)||b3.test(e)||Fg.test(e),parse:e=>Rf.test(e)?Rf.parse(e):Fg.test(e)?Fg.parse(e):b3.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Rf.transform(e):Fg.transform(e),getAnimatableNone:e=>{const t=vi.parse(e);return t.alpha=0,vi.transform(t)}},l_e=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function c_e(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(eD))==null?void 0:t.length)||0)+(((n=e.match(l_e))==null?void 0:n.length)||0)>0}const die="number",Aie="color",u_e="var",d_e="var(",S7="${}",A_e=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function bb(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const o=t.replace(A_e,l=>(vi.test(l)?(r.color.push(s),i.push(Aie),n.push(vi.parse(l))):l.startsWith(d_e)?(r.var.push(s),i.push(u_e),n.push(l)):(r.number.push(s),i.push(die),n.push(parseFloat(l))),++s,S7)).split(S7);return{values:n,split:o,indexes:r,types:i}}function hie(e){return bb(e).values}function fie(e){const{split:t,types:n}=bb(e),r=t.length;return i=>{let s="";for(let a=0;a<r;a++)if(s+=t[a],i[a]!==void 0){const o=n[a];o===die?s+=dw(i[a]):o===Aie?s+=vi.transform(i[a]):s+=i[a]}return s}}const h_e=e=>typeof e=="number"?0:vi.test(e)?vi.getAnimatableNone(e):e;function f_e(e){const t=hie(e);return fie(e)(t.map(h_e))}const vh={test:c_e,parse:hie,createTransformer:fie,getAnimatableNone:f_e};function sP(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function p_e({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,a=0;if(!t)i=s=a=n;else{const o=n<.5?n*(1+t):n+t-n*t,l=2*n-o;i=sP(l,o,e+1/3),s=sP(l,o,e),a=sP(l,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}function M_(e,t){return n=>n>0?t:e}const Ir=(e,t,n)=>e+(t-e)*n,aP=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},m_e=[b3,Rf,Fg],g_e=e=>m_e.find(t=>t.test(e));function B7(e){const t=g_e(e);if(HN(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Fg&&(n=p_e(n)),n}const _7=(e,t)=>{const n=B7(e),r=B7(t);if(!n||!r)return M_(e,t);const i={...n};return s=>(i.red=aP(n.red,r.red,s),i.green=aP(n.green,r.green,s),i.blue=aP(n.blue,r.blue,s),i.alpha=Ir(n.alpha,r.alpha,s),Rf.transform(i))},C3=new Set(["none","hidden"]);function y_e(e,t){return C3.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function v_e(e,t){return n=>Ir(e,t,n)}function nD(e){return typeof e=="number"?v_e:typeof e=="string"?ZU(e)?M_:vi.test(e)?_7:b_e:Array.isArray(e)?pie:typeof e=="object"?vi.test(e)?_7:x_e:M_}function pie(e,t){const n=[...e],r=n.length,i=e.map((s,a)=>nD(s)(s,t[a]));return s=>{for(let a=0;a<r;a++)n[a]=i[a](s);return n}}function x_e(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=nD(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function w_e(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][r[s]],o=e.values[a]??0;n[i]=o,r[s]++}return n}const b_e=(e,t)=>{const n=vh.createTransformer(t),r=bb(e),i=bb(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?C3.has(e)&&!i.values.length||C3.has(t)&&!r.values.length?y_e(e,t):r2(pie(w_e(r,i),i.values),n):(HN(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),M_(e,t))};function mie(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ir(e,t,n):nD(e)(e,t)}const C_e=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>xr.update(t,n),stop:()=>yh(t),now:()=>hs.isProcessing?hs.timestamp:sa.now()}},gie=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},L_=2e4;function rD(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<L_;)t+=n,r=e.next(t);return t>=L_?1/0:t}function S_e(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(rD(r),L_);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Jo(i)}}const B_e=5;function yie(e,t,n){const r=Math.max(t-B_e,0);return Yre(n-e(r),t-r)}const jr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},oP=.001;function __e({duration:e=jr.duration,bounce:t=jr.bounce,velocity:n=jr.velocity,mass:r=jr.mass}){let i,s;HN(e<=Xc(jr.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=iu(jr.minDamping,jr.maxDamping,a),e=iu(jr.minDuration,jr.maxDuration,Jo(e)),a<1?(i=u=>{const d=u*a,A=d*e,f=d-n,h=S3(u,a),p=Math.exp(-A);return oP-f/h*p},s=u=>{const A=u*a*e,f=A*n+n,h=Math.pow(a,2)*Math.pow(u,2)*e,p=Math.exp(-A),m=S3(Math.pow(u,2),a);return(-i(u)+oP>0?-1:1)*((f-h)*p)/m}):(i=u=>{const d=Math.exp(-u*e),A=(u-n)*e+1;return-oP+d*A},s=u=>{const d=Math.exp(-u*e),A=(n-u)*(e*e);return d*A});const o=5/e,l=E_e(i,s,o);if(e=Xc(e),isNaN(l))return{stiffness:jr.stiffness,damping:jr.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const k_e=12;function E_e(e,t,n){let r=n;for(let i=1;i<k_e;i++)r=r-e(r)/t(r);return r}function S3(e,t){return e*Math.sqrt(1-t*t)}const N_e=["duration","bounce"],j_e=["stiffness","damping","mass"];function k7(e,t){return t.some(n=>e[n]!==void 0)}function T_e(e){let t={velocity:jr.velocity,stiffness:jr.stiffness,damping:jr.damping,mass:jr.mass,isResolvedFromDuration:!1,...e};if(!k7(e,j_e)&&k7(e,N_e))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*iu(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:jr.mass,stiffness:i,damping:s}}else{const n=__e(e);t={...t,...n,mass:jr.mass},t.isResolvedFromDuration=!0}return t}function R_(e=jr.visualDuration,t=jr.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],o={done:!1,value:s},{stiffness:l,damping:u,mass:d,duration:A,velocity:f,isResolvedFromDuration:h}=T_e({...n,velocity:-Jo(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*d)),g=a-s,y=Jo(Math.sqrt(l/d)),v=Math.abs(g)<5;r||(r=v?jr.restSpeed.granular:jr.restSpeed.default),i||(i=v?jr.restDelta.granular:jr.restDelta.default);let x;if(m<1){const w=S3(y,m);x=B=>{const k=Math.exp(-m*y*B);return a-k*((p+m*y*g)/w*Math.sin(w*B)+g*Math.cos(w*B))}}else if(m===1)x=w=>a-Math.exp(-y*w)*(g+(p+y*g)*w);else{const w=y*Math.sqrt(m*m-1);x=B=>{const k=Math.exp(-m*y*B),N=Math.min(w*B,300);return a-k*((p+m*y*g)*Math.sinh(N)+w*g*Math.cosh(N))/w}}const b={calculatedDuration:h&&A||null,next:w=>{const B=x(w);if(h)o.done=w>=A;else{let k=w===0?p:0;m<1&&(k=w===0?Xc(p):yie(x,w,B));const N=Math.abs(k)<=r,j=Math.abs(a-B)<=i;o.done=N&&j}return o.value=o.done?a:B,o},toString:()=>{const w=Math.min(rD(b),L_),B=gie(k=>b.next(w*k).value,w,30);return w+"ms "+B},toTransition:()=>{}};return b}R_.applyToOptions=e=>{const t=S_e(e,100,R_);return e.ease=t.ease,e.duration=Xc(t.duration),e.type="keyframes",e};function B3({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:d}){const A=e[0],f={done:!1,value:A},h=N=>o!==void 0&&N<o||l!==void 0&&N>l,p=N=>o===void 0?l:l===void 0||Math.abs(o-N)<Math.abs(l-N)?o:l;let m=n*t;const g=A+m,y=a===void 0?g:a(g);y!==g&&(m=y-A);const v=N=>-m*Math.exp(-N/r),x=N=>y+v(N),b=N=>{const j=v(N),L=x(N);f.done=Math.abs(j)<=u,f.value=f.done?y:L};let w,B;const k=N=>{h(f.value)&&(w=N,B=R_({keyframes:[f.value,p(f.value)],velocity:yie(x,N,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return k(0),{calculatedDuration:null,next:N=>{let j=!1;return!B&&w===void 0&&(j=!0,b(N),k(N)),w!==void 0&&N>=w?B.next(N-w):(!j&&b(N),f)}}}function P_e(e,t,n){const r=[],i=n||Ad.mix||mie,s=e.length-1;for(let a=0;a<s;a++){let o=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||sl:t;o=r2(l,o)}r.push(o)}return r}function I_e(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Wy(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=P_e(t,r,i),l=o.length,u=d=>{if(a&&d<e[0])return t[0];let A=0;if(l>1)for(;A<e.length-2&&!(d<e[A+1]);A++);const f=xb(e[A],e[A+1],d);return o[A](f)};return n?d=>u(iu(e[0],e[s-1],d)):u}function O_e(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=xb(0,t,r);e.push(Ir(n,1,i))}}function F_e(e){const t=[0];return O_e(t,e.length-1),t}function M_e(e,t){return e.map(n=>n*t)}function L_e(e,t){return e.map(()=>t||sie).splice(0,e.length-1)}function Aw({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=GBe(r)?r.map(x7):x7(r),s={done:!1,value:t[0]},a=M_e(n&&n.length===t.length?n:F_e(t),e),o=I_e(a,t,{ease:Array.isArray(i)?i:L_e(t,i)});return{calculatedDuration:e,next:l=>(s.value=o(l),s.done=l>=e,s)}}const R_e=e=>e!==null;function iD(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(R_e),o=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const U_e={decay:B3,inertia:B3,tween:Aw,keyframes:Aw,spring:R_};function vie(e){typeof e.type=="string"&&(e.type=U_e[e.type])}class sD{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const D_e=e=>e/100;class aD extends sD{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==sa.now()&&this.tick(sa.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;vie(t);const{type:n=Aw,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:a=0}=t;let{keyframes:o}=t;const l=n||Aw;l!==Aw&&typeof o[0]!="number"&&(this.mixKeyframes=r2(D_e,mie(o[0],o[1])),o=[0,100]);const u=l({...t,keyframes:o});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...o].reverse(),velocity:-a})),u.calculatedDuration===null&&(u.calculatedDuration=rD(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:A,repeatType:f,repeatDelay:h,type:p,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,b=r;if(A){const N=Math.min(this.currentTime,i)/o;let j=Math.floor(N),L=N%1;!L&&N>=1&&(L=1),L===1&&j--,j=Math.min(j,A+1),!!(j%2)&&(f==="reverse"?(L=1-L,h&&(L-=h/o)):f==="mirror"&&(b=a)),x=iu(0,1,L)*o}const w=v?{done:!1,value:d[0]}:b.next(x);s&&(w.value=s(w.value));let{done:B}=w;!v&&l!==null&&(B=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return k&&p!==B3&&(w.value=iD(d,this.options,g,this.speed)),m&&m(w.value),k&&this.finish(),w}then(t,n){return this.finished.then(t,n)}get duration(){return Jo(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Jo(t)}get time(){return Jo(this.currentTime)}set time(t){var n;t=Xc(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(sa.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Jo(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=C_e,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(sa.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Q_e(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Uf=e=>e*180/Math.PI,_3=e=>{const t=Uf(Math.atan2(e[1],e[0]));return k3(t)},H_e={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:_3,rotateZ:_3,skewX:e=>Uf(Math.atan(e[1])),skewY:e=>Uf(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},k3=e=>(e=e%360,e<0&&(e+=360),e),E7=_3,N7=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),j7=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),$_e={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:N7,scaleY:j7,scale:e=>(N7(e)+j7(e))/2,rotateX:e=>k3(Uf(Math.atan2(e[6],e[5]))),rotateY:e=>k3(Uf(Math.atan2(-e[2],e[0]))),rotateZ:E7,rotate:E7,skewX:e=>Uf(Math.atan(e[4])),skewY:e=>Uf(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function E3(e){return e.includes("scale")?1:0}function N3(e,t){if(!e||e==="none")return E3(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=$_e,i=n;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=H_e,i=o}if(!i)return E3(t);const s=r[t],a=i[1].split(",").map(V_e);return typeof s=="function"?s(a):a[s]}const z_e=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return N3(n,t)};function V_e(e){return parseFloat(e.trim())}const V0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],K0=new Set(V0),T7=e=>e===z0||e===ht,K_e=new Set(["x","y","z"]),W_e=V0.filter(e=>!K_e.has(e));function q_e(e){const t=[];return W_e.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const FA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>N3(t,"x"),y:(e,{transform:t})=>N3(t,"y")};FA.translateX=FA.x;FA.translateY=FA.y;const hp=new Set;let j3=!1,T3=!1,P3=!1;function xie(){if(T3){const e=Array.from(hp).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=q_e(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,a])=>{var o;(o=r.getValue(s))==null||o.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}T3=!1,j3=!1,hp.forEach(e=>e.complete(P3)),hp.clear()}function wie(){hp.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(T3=!0)})}function G_e(){P3=!0,wie(),xie(),P3=!1}class oD{constructor(t,n,r,i,s,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(hp.add(this),j3||(j3=!0,xr.read(wie),xr.resolveKeyframes(xie))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i==null?void 0:i.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const o=r.readValue(n,a);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=a),i&&s===void 0&&i.set(t[0])}Q_e(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),hp.delete(this)}cancel(){this.state==="scheduled"&&(hp.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Y_e=e=>e.startsWith("--");function X_e(e,t,n){Y_e(t)?e.style.setProperty(t,n):e.style[t]=n}const J_e=GU(()=>window.ScrollTimeline!==void 0),Z_e={};function eke(e,t){const n=GU(e);return()=>Z_e[t]??n()}const bie=eke(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ox=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,P7={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ox([0,.65,.55,1]),circOut:Ox([.55,0,1,.45]),backIn:Ox([.31,.01,.66,-.59]),backOut:Ox([.33,1.53,.69,.99])};function Cie(e,t){if(e)return typeof e=="function"?bie()?gie(e,t):"ease-out":aie(e)?Ox(e):Array.isArray(e)?e.map(n=>Cie(n,t)||P7.easeOut):P7[e]}function tke(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:a="loop",ease:o="easeOut",times:l}={},u=void 0){const d={[t]:n};l&&(d.offset=l);const A=Cie(o,i);Array.isArray(A)&&(d.easing=A);const f={delay:r,duration:i,easing:Array.isArray(A)?"linear":A,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function Sie(e){return typeof e=="function"&&"applyToOptions"in e}function nke({type:e,...t}){return Sie(e)&&bie()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class rke extends sD{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:a=!1,finalKeyframe:o,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=a,this.options=t,Wy(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=nke(t);this.animation=tke(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const d=iD(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):X_e(n,r,d),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Jo(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Jo(t)}get time(){return Jo(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Xc(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&J_e()?(this.animation.timeline=t,sl):n(this)}}const Bie={anticipate:nie,backInOut:tie,circInOut:iie};function ike(e){return e in Bie}function ske(e){typeof e.ease=="string"&&ike(e.ease)&&(e.ease=Bie[e.ease])}const lP=10;class ake extends rke{constructor(t){ske(t),vie(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const o=new aD({...a,autoplay:!1}),l=Math.max(lP,sa.now()-this.startTime),u=iu(0,lP,l-lP);n.setWithVelocity(o.sample(Math.max(0,l-u)).value,o.sample(l).value,u),o.stop()}}const I7=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(vh.test(e)||e==="0")&&!e.startsWith("url("));function oke(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function lke(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=I7(i,t),o=I7(s,t);return HN(a===o,`You are trying to animate ${t} from "${i}" to "${s}". "${a?s:i}" is not an animatable value.`,"value-not-animatable"),!a||!o?!1:oke(e)||(n==="spring"||Sie(n))&&r}function I3(e){e.duration=0,e.type="keyframes"}const cke=new Set(["opacity","clipPath","filter","transform"]),uke=GU(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function dke(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:a}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return uke()&&n&&cke.has(n)&&(n!=="transform"||!u)&&!l&&!r&&i!=="mirror"&&s!==0&&a!=="inertia"}const Ake=40;class hke extends sD{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",keyframes:o,name:l,motionValue:u,element:d,...A}){var p;super(),this.stop=()=>{var m,g;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=sa.now();const f={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:a,name:l,motionValue:u,element:d,...A},h=(d==null?void 0:d.KeyframeResolver)||oD;this.keyframeResolver=new h(o,(m,g,y)=>this.onKeyframesResolved(m,g,f,!y),l,u,d),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,n,r,i){var g,y;this.keyframeResolver=void 0;const{name:s,type:a,velocity:o,delay:l,isHandoff:u,onUpdate:d}=r;this.resolvedAt=sa.now(),lke(t,s,a,o)||((Ad.instantAnimations||!l)&&(d==null||d(iD(t,r,n))),t[0]=t[t.length-1],I3(r),r.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Ake?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!u&&dke(f),p=(y=(g=f.motionValue)==null?void 0:g.owner)==null?void 0:y.current,m=h?new ake({...f,element:p}):new aD(f);m.finished.then(()=>{this.notifyFinished()}).catch(sl),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),G_e()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function _ie(e,t,n,r=0,i=1){const s=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),a=e.size,o=(a-1)*r;return typeof n=="function"?n(s,a):i===1?s*r:o-s*r}const fke=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pke(e){const t=fke.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const mke=4;function kie(e,t,n=1){Wy(n<=mke,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=pke(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return Wre(a)?parseFloat(a):a}return ZU(i)?kie(i,t,n+1):i}const gke={type:"spring",stiffness:500,damping:25,restSpeed:10},yke=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vke={type:"keyframes",duration:.8},xke={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wke=(e,{keyframes:t})=>t.length>2?vke:K0.has(e)?e.startsWith("scale")?yke(t[1]):gke:xke,bke=e=>e!==null;function Cke(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(bke),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}function lD(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function Ske({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:a,repeatDelay:o,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const cD=(e,t,n,r={},i,s)=>a=>{const o=lD(r,e)||{},l=o.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Xc(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:f=>{t.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:s?void 0:i};Ske(o)||Object.assign(d,wke(e,d)),d.duration&&(d.duration=Xc(d.duration)),d.repeatDelay&&(d.repeatDelay=Xc(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let A=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(I3(d),d.delay===0&&(A=!0)),(Ad.instantAnimations||Ad.skipAnimations)&&(A=!0,I3(d),d.delay=0),d.allowFlatten=!o.type&&!o.ease,A&&!s&&t.get()!==void 0){const f=Cke(d.keyframes,o);if(f!==void 0){xr.update(()=>{d.onUpdate(f),d.onComplete()});return}}return o.isSync?new aD(d):new hke(d)};function O7(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function uD(e,t,n,r){if(typeof t=="function"){const[i,s]=O7(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=O7(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function ny(e,t,n){const r=e.getProps();return uD(r,t,n!==void 0?n:r.custom,e)}const Eie=new Set(["width","height","top","left","right","bottom",...V0]),F7=30,Bke=e=>!isNaN(parseFloat(e));class _ke{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=sa.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=sa.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Bke(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new YU);const r=this.events[t].add(n);return t==="change"?()=>{r(),xr.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=sa.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>F7)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,F7);return Yre(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function qy(e,t){return new _ke(e,t)}const O3=e=>Array.isArray(e);function kke(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qy(n))}function Eke(e){return O3(e)?e[e.length-1]||0:e}function Nke(e,t){const n=ny(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const a in s){const o=Eke(s[a]);kke(e,a,o)}}const Qs=e=>!!(e&&e.getVelocity);function jke(e){return!!(Qs(e)&&e.add)}function F3(e,t){const n=e.getValue("willChange");if(jke(n))return n.add(t);if(!n&&Ad.WillChange){const r=new Ad.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function dD(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Tke="framerAppearId",Nie="data-"+dD(Tke);function jie(e){return e.props[Nie]}function Pke({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Tie(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:a,...o}=t;r&&(s=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const d in o){const A=e.getValue(d,e.latestValues[d]??null),f=o[d];if(f===void 0||u&&Pke(u,d))continue;const h={delay:n,...lD(s||{},d)},p=A.get();if(p!==void 0&&!A.isAnimating&&!Array.isArray(f)&&f===p&&!h.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=jie(e);if(y){const v=window.MotionHandoffAnimation(y,d,xr);v!==null&&(h.startTime=v,m=!0)}}F3(e,d),A.start(cD(d,A,f,e.shouldReduceMotion&&Eie.has(d)?{type:!1}:h,e,m));const g=A.animation;g&&l.push(g)}return a&&Promise.all(l).then(()=>{xr.update(()=>{a&&Nke(e,a)})}),l}function M3(e,t,n={}){var l;const r=ny(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Tie(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:A,staggerDirection:f}=i;return Ike(e,t,u,d,A,f,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[u,d]=o==="beforeChildren"?[s,a]:[a,s];return u().then(()=>d())}else return Promise.all([s(),a(n.delay)])}function Ike(e,t,n=0,r=0,i=0,s=1,a){const o=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),o.push(M3(l,t,{...a,delay:n+(typeof r=="function"?0:r)+_ie(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}function Oke(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>M3(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=M3(e,t,n);else{const i=typeof t=="function"?ny(e,t,n.custom):t;r=Promise.all(Tie(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Fke={test:e=>e==="auto",parse:e=>e},Pie=e=>t=>t.test(e),Iie=[z0,ht,Jc,tA,o_e,a_e,Fke],M7=e=>Iie.find(Pie(e));function Mke(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Gre(e):!0}const Lke=new Set(["brightness","contrast","saturate","opacity"]);function Rke(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(eD)||[];if(!r)return e;const i=n.replace(r,"");let s=Lke.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const Uke=/\b([a-z-]*)\(.*?\)/gu,L3={...vh,getAnimatableNone:e=>{const t=e.match(Uke);return t?t.map(Rke).join(" "):e}},L7={...z0,transform:Math.round},Dke={rotate:tA,rotateX:tA,rotateY:tA,rotateZ:tA,scale:DC,scaleX:DC,scaleY:DC,scaleZ:DC,skew:tA,skewX:tA,skewY:tA,distance:ht,translateX:ht,translateY:ht,translateZ:ht,x:ht,y:ht,z:ht,perspective:ht,transformPerspective:ht,opacity:wb,originX:C7,originY:C7,originZ:ht},AD={borderWidth:ht,borderTopWidth:ht,borderRightWidth:ht,borderBottomWidth:ht,borderLeftWidth:ht,borderRadius:ht,borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomRightRadius:ht,borderBottomLeftRadius:ht,width:ht,maxWidth:ht,height:ht,maxHeight:ht,top:ht,right:ht,bottom:ht,left:ht,inset:ht,insetBlock:ht,insetBlockStart:ht,insetBlockEnd:ht,insetInline:ht,insetInlineStart:ht,insetInlineEnd:ht,padding:ht,paddingTop:ht,paddingRight:ht,paddingBottom:ht,paddingLeft:ht,paddingBlock:ht,paddingBlockStart:ht,paddingBlockEnd:ht,paddingInline:ht,paddingInlineStart:ht,paddingInlineEnd:ht,margin:ht,marginTop:ht,marginRight:ht,marginBottom:ht,marginLeft:ht,marginBlock:ht,marginBlockStart:ht,marginBlockEnd:ht,marginInline:ht,marginInlineStart:ht,marginInlineEnd:ht,fontSize:ht,backgroundPositionX:ht,backgroundPositionY:ht,...Dke,zIndex:L7,fillOpacity:wb,strokeOpacity:wb,numOctaves:L7},Qke={...AD,color:vi,backgroundColor:vi,outlineColor:vi,fill:vi,stroke:vi,borderColor:vi,borderTopColor:vi,borderRightColor:vi,borderBottomColor:vi,borderLeftColor:vi,filter:L3,WebkitFilter:L3},Oie=e=>Qke[e];function Fie(e,t){let n=Oie(e);return n!==L3&&(n=vh),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Hke=new Set(["auto","none","0"]);function $ke(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!Hke.has(s)&&bb(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=Fie(n,i)}class zke extends oD{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let A=t[d];if(typeof A=="string"&&(A=A.trim(),ZU(A))){const f=kie(A,n.current);f!==void 0&&(t[d]=f),d===t.length-1&&(this.finalKeyframe=A)}}if(this.resolveNoneKeyframes(),!Eie.has(r)||t.length!==2)return;const[i,s]=t,a=M7(i),o=M7(s),l=b7(i),u=b7(s);if(l!==u&&FA[r]){this.needsMeasurement=!0;return}if(a!==o)if(T7(a)&&T7(o))for(let d=0;d<t.length;d++){const A=t[d];typeof A=="string"&&(t[d]=parseFloat(A))}else FA[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Mke(t[i]))&&r.push(i);r.length&&$ke(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=FA[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var o;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,a=r[s];r[s]=FA[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Mie(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const Lie=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function R3(e){return qre(e)&&"offsetHeight"in e}const{schedule:hD,cancel:rkt}=oie(queueMicrotask,!1),Ol={x:!1,y:!1};function Rie(){return Ol.x||Ol.y}function Vke(e){return e==="x"||e==="y"?Ol[e]?null:(Ol[e]=!0,()=>{Ol[e]=!1}):Ol.x||Ol.y?null:(Ol.x=Ol.y=!0,()=>{Ol.x=Ol.y=!1})}function Uie(e,t){const n=Mie(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function R7(e){return!(e.pointerType==="touch"||Rie())}function Kke(e,t,n={}){const[r,i,s]=Uie(e,n),a=o=>{if(!R7(o))return;const{target:l}=o,u=t(l,o);if(typeof u!="function"||!l)return;const d=A=>{R7(A)&&(u(A),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,i)};return r.forEach(o=>{o.addEventListener("pointerenter",a,i)}),s}const Die=(e,t)=>t?e===t?!0:Die(e,t.parentElement):!1,fD=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Wke=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Qie(e){return Wke.has(e.tagName)||e.isContentEditable===!0}const jB=new WeakSet;function U7(e){return t=>{t.key==="Enter"&&e(t)}}function cP(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const qke=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=U7(()=>{if(jB.has(n))return;cP(n,"down");const i=U7(()=>{cP(n,"up")}),s=()=>cP(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function D7(e){return fD(e)&&!Rie()}function Gke(e,t,n={}){const[r,i,s]=Uie(e,n),a=o=>{const l=o.currentTarget;if(!D7(o))return;jB.add(l);const u=t(l,o),d=(h,p)=>{window.removeEventListener("pointerup",A),window.removeEventListener("pointercancel",f),jB.has(l)&&jB.delete(l),D7(h)&&typeof u=="function"&&u(h,{success:p})},A=h=>{d(h,l===window||l===document||n.useGlobalTarget||Die(l,h.target))},f=h=>{d(h,!1)};window.addEventListener("pointerup",A,i),window.addEventListener("pointercancel",f,i)};return r.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",a,i),R3(o)&&(o.addEventListener("focus",u=>qke(u,i)),!Qie(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),s}function Hie(e){return qre(e)&&"ownerSVGElement"in e}function Yke(e){return Hie(e)&&e.tagName==="svg"}const Xke=[...Iie,vi,vh],Jke=e=>Xke.find(Pie(e)),Q7=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mg=()=>({x:Q7(),y:Q7()}),H7=()=>({min:0,max:0}),Ti=()=>({x:H7(),y:H7()}),U3={current:null},$ie={current:!1},Zke=typeof window<"u";function eEe(){if($ie.current=!0,!!Zke)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>U3.current=e.matches;e.addEventListener("change",t),t()}else U3.current=!1}const tEe=new WeakMap;function $N(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Cb(e){return typeof e=="string"||Array.isArray(e)}const pD=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mD=["initial",...pD];function zN(e){return $N(e.animate)||mD.some(t=>Cb(e[t]))}function zie(e){return!!(zN(e)||e.variants)}function nEe(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Qs(i))e.addValue(r,i);else if(Qs(s))e.addValue(r,qy(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,qy(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const $7=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let U_={};function Vie(e){U_=e}function rEe(){return U_}class iEe{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=oD,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=sa.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,xr.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=!!s,this.isControllingVariants=zN(n),this.isVariantNode=zie(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...A}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in A){const h=A[f];l[f]!==void 0&&Qs(h)&&h.set(l[f])}}mount(t){var n;this.current=t,tEe.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:($ie.current||eEe(),this.shouldReduceMotion=U3.current),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),yh(this.notifyUpdate),yh(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=K0.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&xr.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in U_){const n=U_[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ti()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<$7.length;r++){const i=$7[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,a=t[s];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=nEe(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=qy(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Wre(r)||Gre(r))?r=parseFloat(r):!Jke(r)&&vh.test(n)&&(r=Fie(t,n)),this.setBaseTarget(t,Qs(r)?r.get():r)),Qs(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=uD(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Qs(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new YU),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){hD.render(this.render)}}class Kie extends iEe{constructor(){super(...arguments),this.KeyframeResolver=zke}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Qs(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Fh{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Wie({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function sEe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function aEe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function uP(e){return e===void 0||e===1}function D3({scale:e,scaleX:t,scaleY:n}){return!uP(e)||!uP(t)||!uP(n)}function bf(e){return D3(e)||qie(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qie(e){return z7(e.x)||z7(e.y)}function z7(e){return e&&e!=="0%"}function D_(e,t,n){const r=e-n,i=t*r;return n+i}function V7(e,t,n,r,i){return i!==void 0&&(e=D_(e,i,r)),D_(e,n,r)+t}function Q3(e,t=0,n=1,r,i){e.min=V7(e.min,t,n,r,i),e.max=V7(e.max,t,n,r,i)}function Gie(e,{x:t,y:n}){Q3(e.x,t.translate,t.scale,t.originPoint),Q3(e.y,n.translate,n.scale,n.originPoint)}const K7=.999999999999,W7=1.0000000000001;function oEe(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,a;for(let o=0;o<i;o++){s=n[o],a=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Rg(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Gie(e,a)),r&&bf(s.latestValues)&&Rg(e,s.latestValues))}t.x<W7&&t.x>K7&&(t.x=1),t.y<W7&&t.y>K7&&(t.y=1)}function Lg(e,t){e.min=e.min+t,e.max=e.max+t}function q7(e,t,n,r,i=.5){const s=Ir(e.min,e.max,i);Q3(e,t,n,s,r)}function Rg(e,t){q7(e.x,t.x,t.scaleX,t.scale,t.originX),q7(e.y,t.y,t.scaleY,t.scale,t.originY)}function Yie(e,t){return Wie(aEe(e.getBoundingClientRect(),t))}function lEe(e,t,n){const r=Yie(e,n),{scroll:i}=t;return i&&(Lg(r.x,i.offset.x),Lg(r.y,i.offset.y)),r}const cEe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},uEe=V0.length;function dEe(e,t,n){let r="",i=!0;for(let s=0;s<uEe;s++){const a=V0[s],o=e[a];if(o===void 0)continue;let l=!0;if(typeof o=="number")l=o===(a.startsWith("scale")?1:0);else{const u=parseFloat(o);l=a.startsWith("scale")?u===1:u===0}if(!l||n){const u=Lie(o,AD[a]);if(!l){i=!1;const d=cEe[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function gD(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let a=!1,o=!1;for(const l in t){const u=t[l];if(K0.has(l)){a=!0;continue}else if(cie(l)){i[l]=u;continue}else{const d=Lie(u,AD[l]);l.startsWith("origin")?(o=!0,s[l]=d):r[l]=d}}if(t.transform||(a||n?r.transform=dEe(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${u} ${d}`}}function Xie(e,{style:t,vars:n},r,i){const s=e.style;let a;for(a in t)s[a]=t[a];i==null||i.applyProjectionStyles(s,r);for(a in n)s.setProperty(a,n[a])}function G7(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ex={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ht.test(e))e=parseFloat(e);else return e;const n=G7(e,t.target.x),r=G7(e,t.target.y);return`${n}% ${r}%`}},AEe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=vh.parse(e);if(i.length>5)return r;const s=vh.createTransformer(e),a=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;i[0+a]/=o,i[1+a]/=l;const u=Ir(o,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),s(i)}},H3={borderRadius:{...ex,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ex,borderTopRightRadius:ex,borderBottomLeftRadius:ex,borderBottomRightRadius:ex,boxShadow:AEe};function Jie(e,{layout:t,layoutId:n}){return K0.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!H3[e]||e==="opacity")}function yD(e,t,n){var a;const r=e.style,i=t==null?void 0:t.style,s={};if(!r)return s;for(const o in r)(Qs(r[o])||i&&Qs(i[o])||Jie(o,e)||((a=n==null?void 0:n.getValue(o))==null?void 0:a.liveStyle)!==void 0)&&(s[o]=r[o]);return s}function hEe(e){return window.getComputedStyle(e)}class fEe extends Kie{constructor(){super(...arguments),this.type="html",this.renderInstance=Xie}readValueFromInstance(t,n){var r;if(K0.has(n))return(r=this.projection)!=null&&r.isProjecting?E3(n):z_e(t,n);{const i=hEe(t),s=(cie(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Yie(t,n)}build(t,n,r){gD(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return yD(t,n,r)}}const pEe={offset:"stroke-dashoffset",array:"stroke-dasharray"},mEe={offset:"strokeDashoffset",array:"strokeDasharray"};function gEe(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?pEe:mEe;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const yEe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Zie(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:a=0,...o},l,u,d){if(gD(e,o,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:A,style:f}=e;A.transform&&(f.transform=A.transform,delete A.transform),(f.transform||A.transformOrigin)&&(f.transformOrigin=A.transformOrigin??"50% 50%",delete A.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete A.transformBox);for(const h of yEe)A[h]!==void 0&&(f[h]=A[h],delete A[h]);t!==void 0&&(A.x=t),n!==void 0&&(A.y=n),r!==void 0&&(A.scale=r),i!==void 0&&gEe(A,i,s,a,!1)}const ese=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),tse=e=>typeof e=="string"&&e.toLowerCase()==="svg";function vEe(e,t,n,r){Xie(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(ese.has(i)?i:dD(i),t.attrs[i])}function nse(e,t,n){const r=yD(e,t,n);for(const i in e)if(Qs(e[i])||Qs(t[i])){const s=V0.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}class xEe extends Kie{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ti}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(K0.has(n)){const r=Oie(n);return r&&r.default||0}return n=ese.has(n)?n:dD(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return nse(t,n,r)}build(t,n,r){Zie(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){vEe(t,n,r,i)}mount(t){this.isSVGTag=tse(t.tagName),super.mount(t)}}const wEe=mD.length;function rse(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?rse(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<wEe;n++){const r=mD[n],i=e.props[r];(Cb(i)||i===!1)&&(t[r]=i)}return t}function ise(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const bEe=[...pD].reverse(),CEe=pD.length;function SEe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Oke(e,n,r)))}function BEe(e){let t=SEe(e),n=Y7(),r=!0;const i=l=>(u,d)=>{var f;const A=ny(e,d,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(A){const{transition:h,transitionEnd:p,...m}=A;u={...u,...m,...p}}return u};function s(l){t=l(e)}function a(l){const{props:u}=e,d=rse(e.parent)||{},A=[],f=new Set;let h={},p=1/0;for(let g=0;g<CEe;g++){const y=bEe[g],v=n[y],x=u[y]!==void 0?u[y]:d[y],b=Cb(x),w=y===l?v.isActive:null;w===!1&&(p=g);let B=x===d[y]&&x!==u[y]&&b;if(B&&r&&e.manuallyAnimateOnMount&&(B=!1),v.protectedKeys={...h},!v.isActive&&w===null||!x&&!v.prevProp||$N(x)||typeof x=="boolean")continue;const k=_Ee(v.prevProp,x);let N=k||y===l&&v.isActive&&!B&&b||g>p&&b,j=!1;const L=Array.isArray(x)?x:[x];let T=L.reduce(i(y),{});w===!1&&(T={});const{prevResolvedValues:E={}}=v,F={...E,...T},M=q=>{N=!0,f.has(q)&&(j=!0,f.delete(q)),v.needsAnimating[q]=!0;const $=e.getValue(q);$&&($.liveStyle=!1)};for(const q in F){const $=T[q],z=E[q];if(h.hasOwnProperty(q))continue;let Q=!1;O3($)&&O3(z)?Q=!ise($,z):Q=$!==z,Q?$!=null?M(q):f.add(q):$!==void 0&&f.has(q)?M(q):v.protectedKeys[q]=!0}v.prevProp=x,v.prevResolvedValues=T,v.isActive&&(h={...h,...T}),r&&e.blockInitialAnimation&&(N=!1);const D=B&&k;N&&(!D||j)&&A.push(...L.map(q=>{const $={type:y};if(typeof q=="string"&&r&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:z}=e,Q=ny(z,q);if(z.enteringChildren&&Q){const{delayChildren:ce}=Q.transition||{};$.delay=_ie(z.enteringChildren,e,ce)}}return{animation:q,options:$}}))}if(f.size){const g={};if(typeof u.initial!="boolean"){const y=ny(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(g.transition=y.transition)}f.forEach(y=>{const v=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),g[y]=v??null}),A.push({animation:g})}let m=!!A.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(A):Promise.resolve()}function o(l,u){var A;if(n[l].isActive===u)return Promise.resolve();(A=e.variantChildren)==null||A.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const d=a(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:o,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Y7()}}}function _Ee(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ise(t,e):!1}function hf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Y7(){return{animate:hf(!0),whileInView:hf(),whileHover:hf(),whileTap:hf(),whileDrag:hf(),whileFocus:hf(),exit:hf()}}function X7(e,t){e.min=t.min,e.max=t.max}function Nl(e,t){X7(e.x,t.x),X7(e.y,t.y)}function J7(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const sse=1e-4,kEe=1-sse,EEe=1+sse,ase=.01,NEe=0-ase,jEe=0+ase;function aa(e){return e.max-e.min}function TEe(e,t,n){return Math.abs(e-t)<=n}function Z7(e,t,n,r=.5){e.origin=r,e.originPoint=Ir(t.min,t.max,e.origin),e.scale=aa(n)/aa(t),e.translate=Ir(n.min,n.max,e.origin)-e.originPoint,(e.scale>=kEe&&e.scale<=EEe||isNaN(e.scale))&&(e.scale=1),(e.translate>=NEe&&e.translate<=jEe||isNaN(e.translate))&&(e.translate=0)}function hw(e,t,n,r){Z7(e.x,t.x,n.x,r?r.originX:void 0),Z7(e.y,t.y,n.y,r?r.originY:void 0)}function ez(e,t,n){e.min=n.min+t.min,e.max=e.min+aa(t)}function PEe(e,t,n){ez(e.x,t.x,n.x),ez(e.y,t.y,n.y)}function tz(e,t,n){e.min=t.min-n.min,e.max=e.min+aa(t)}function Q_(e,t,n){tz(e.x,t.x,n.x),tz(e.y,t.y,n.y)}function nz(e,t,n,r,i){return e-=t,e=D_(e,1/n,r),i!==void 0&&(e=D_(e,1/i,r)),e}function IEe(e,t=0,n=1,r=.5,i,s=e,a=e){if(Jc.test(t)&&(t=parseFloat(t),t=Ir(a.min,a.max,t/100)-a.min),typeof t!="number")return;let o=Ir(s.min,s.max,r);e===s&&(o-=t),e.min=nz(e.min,t,n,o,i),e.max=nz(e.max,t,n,o,i)}function rz(e,t,[n,r,i],s,a){IEe(e,t[n],t[r],t[i],t.scale,s,a)}const OEe=["x","scaleX","originX"],FEe=["y","scaleY","originY"];function iz(e,t,n,r){rz(e.x,t,OEe,n?n.x:void 0,r?r.x:void 0),rz(e.y,t,FEe,n?n.y:void 0,r?r.y:void 0)}function sz(e){return e.translate===0&&e.scale===1}function ose(e){return sz(e.x)&&sz(e.y)}function az(e,t){return e.min===t.min&&e.max===t.max}function MEe(e,t){return az(e.x,t.x)&&az(e.y,t.y)}function oz(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function lse(e,t){return oz(e.x,t.x)&&oz(e.y,t.y)}function lz(e){return aa(e.x)/aa(e.y)}function cz(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Lo(e){return[e("x"),e("y")]}function LEe(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||s||a)&&(r=`translate3d(${i}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:A,rotateY:f,skewX:h,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),A&&(r+=`rotateX(${A}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return(o!==1||l!==1)&&(r+=`scale(${o}, ${l})`),r||"none"}const cse=["TopLeft","TopRight","BottomLeft","BottomRight"],REe=cse.length,uz=e=>typeof e=="string"?parseFloat(e):e,dz=e=>typeof e=="number"||ht.test(e);function UEe(e,t,n,r,i,s){i?(e.opacity=Ir(0,n.opacity??1,DEe(r)),e.opacityExit=Ir(t.opacity??1,0,QEe(r))):s&&(e.opacity=Ir(t.opacity??1,n.opacity??1,r));for(let a=0;a<REe;a++){const o=`border${cse[a]}Radius`;let l=Az(t,o),u=Az(n,o);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||dz(l)===dz(u)?(e[o]=Math.max(Ir(uz(l),uz(u),r),0),(Jc.test(u)||Jc.test(l))&&(e[o]+="%")):e[o]=u}(t.rotate||n.rotate)&&(e.rotate=Ir(t.rotate||0,n.rotate||0,r))}function Az(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const DEe=use(0,.5,rie),QEe=use(.5,.95,sl);function use(e,t,n){return r=>r<e?0:r>t?1:n(xb(e,t,r))}function HEe(e,t,n){const r=Qs(e)?e:qy(e);return r.start(cD("",r,t,n)),r.animation}function Sb(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const $Ee=(e,t)=>e.depth-t.depth;class zEe{constructor(){this.children=[],this.isDirty=!1}add(t){WU(this.children,t),this.isDirty=!0}remove(t){qU(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($Ee),this.isDirty=!1,this.children.forEach(t)}}function VEe(e,t){const n=sa.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(yh(r),e(s-t))};return xr.setup(r,!0),()=>yh(r)}function TB(e){return Qs(e)?e.get():e}class KEe{constructor(){this.members=[]}add(t){WU(this.members,t),t.scheduleRender()}remove(t){if(qU(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const i=r.options.layoutDependency,s=t.options.layoutDependency;i!==void 0&&s!==void 0&&i===s||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const PB={hasAnimatedSinceResize:!0,hasEverUpdated:!1},dP=["","X","Y","Z"],WEe=1e3;let qEe=0;function AP(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function dse(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=jie(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",xr,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&dse(r)}function Ase({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},o=t==null?void 0:t()){this.id=qEe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(XEe),this.nodes.forEach(tNe),this.nodes.forEach(nNe),this.nodes.forEach(JEe)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new zEe)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new YU),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const l=this.eventHandlers.get(a);l&&l.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Hie(a)&&!Yke(a),this.instance=a;const{layoutId:o,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||o)&&(this.isLayoutDirty=!0),e){let d,A=0;const f=()=>this.root.updateBlockedByResize=!1;xr.read(()=>{A=window.innerWidth}),e(a,()=>{const h=window.innerWidth;h!==A&&(A=h,this.root.updateBlockedByResize=!0,d&&d(),d=VEe(f,250),PB.hasAnimatedSinceResize&&(PB.hasAnimatedSinceResize=!1,this.nodes.forEach(pz)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&u&&(o||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:A,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||oNe,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=u.getProps(),y=!this.targetLayout||!lse(this.targetLayout,h),v=!A&&f;if(this.options.layoutRoot||this.resumeFrom||v||A&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...lD(p,"layout"),onPlay:m,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(d,v)}else A||pz(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),yh(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rNe),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&dse(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const A=this.path[d];A.shouldResetTransform=!0,A.updateScroll("snapshot"),A.options.layoutRoot&&A.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(hz);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(fz);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(eNe),this.nodes.forEach(GEe),this.nodes.forEach(YEe)):this.nodes.forEach(fz),this.clearAllSnapshots();const o=sa.now();hs.delta=iu(0,1e3/60,o-hs.timestamp),hs.timestamp=o,hs.isProcessing=!0,rP.update.process(hs),rP.preRender.process(hs),rP.render.process(hs),hs.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hD.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ZEe),this.sharedNodes.forEach(iNe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!aa(this.snapshot.measuredBox.x)&&!aa(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ti(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!ose(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&this.instance&&(o||bf(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return a&&(l=this.removeTransform(l)),lNe(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return Ti();const o=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(cNe))){const{scroll:d}=this.root;d&&(Lg(o.x,d.offset.x),Lg(o.y,d.offset.y))}return o}removeElementScroll(a){var l;const o=Ti();if(Nl(o,a),(l=this.scroll)!=null&&l.wasRoot)return o;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:A,options:f}=d;d!==this.root&&A&&f.layoutScroll&&(A.wasRoot&&Nl(o,a),Lg(o.x,A.offset.x),Lg(o.y,A.offset.y))}return o}applyTransform(a,o=!1){const l=Ti();Nl(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Rg(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),bf(d.latestValues)&&Rg(l,d.latestValues)}return bf(this.latestValues)&&Rg(l,this.latestValues),l}removeTransform(a){const o=Ti();Nl(o,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!bf(u.latestValues))continue;D3(u.latestValues)&&u.updateSnapshot();const d=Ti(),A=u.measurePageBox();Nl(d,A),iz(o,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return bf(this.latestValues)&&iz(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==hs.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var h;const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==o;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:A}=this.options;if(!this.layout||!(d||A))return;this.resolvedRelativeTargetAt=hs.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ti(),this.targetWithTransforms=Ti()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),PEe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Nl(this.target,this.layout.layoutBox),Gie(this.target,this.targetDelta)):Nl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||D3(this.parent.latestValues)||qie(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,o,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ti(),this.relativeTargetOrigin=Ti(),Q_(this.relativeTargetOrigin,o,l),Nl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const a=this.getLead(),o=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===hs.timestamp&&(l=!1),l)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Nl(this.layoutCorrected,this.layout.layoutBox);const A=this.treeScale.x,f=this.treeScale.y;oEe(this.layoutCorrected,this.treeScale,this.path,o),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ti());const{target:h}=a;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(J7(this.prevProjectionDelta.x,this.projectionDelta.x),J7(this.prevProjectionDelta.y,this.projectionDelta.y)),hw(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==A||this.treeScale.y!==f||!cz(this.projectionDelta.x,this.prevProjectionDelta.x)||!cz(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mg(),this.projectionDelta=Mg(),this.projectionDeltaWithTransform=Mg()}setAnimationOrigin(a,o=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},A=Mg();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=Ti(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,g=this.getStack(),y=!g||g.members.length<=1,v=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(aNe));this.animationProgress=0;let x;this.mixTargetDelta=b=>{const w=b/1e3;mz(A.x,a.x,w),mz(A.y,a.y,w),this.setTargetDelta(A),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Q_(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sNe(this.relativeTarget,this.relativeTargetOrigin,f,w),x&&MEe(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Ti()),Nl(x,this.relativeTarget)),m&&(this.animationValues=d,UEe(d,u,this.latestValues,w,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var o,l,u;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(yh(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xr.update(()=>{PB.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=qy(0)),this.currentAnimation=HEe(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),a.onUpdate&&a.onUpdate(d)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(WEe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:l,layout:u,latestValues:d}=a;if(!(!o||!l||!u)){if(this!==a&&this.layout&&u&&hse(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ti();const A=aa(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+A;const f=aa(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Nl(o,l),Rg(o,d),hw(this.projectionDeltaWithTransform,this.layoutCorrected,o,d)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new KEe),this.sharedNodes.get(a).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const u={};l.z&&AP("z",a,u,this.animationValues);for(let d=0;d<dP.length;d++)AP(`rotate${dP[d]}`,a,u,this.animationValues),AP(`skew${dP[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}applyProjectionStyles(a,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=TB(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=TB(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!bf(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let A=LEe(this.projectionDeltaWithTransform,this.treeScale,d);l&&(A=l(d,A)),a.transform=A;const{x:f,y:h}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?a.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const p in H3){if(d[p]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=H3[p],v=A==="none"?d[p]:m(d[p],u);if(g){const x=g.length;for(let b=0;b<x;b++)a[g[b]]=v}else y?this.options.visualElement.renderState.vars[p]=v:a[p]=v}this.options.layoutId&&(a.pointerEvents=u===this?TB(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var o;return(o=a.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(hz),this.root.sharedNodes.clear()}}}function GEe(e){e.updateLayout()}function YEe(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,a=t.source!==e.layout.source;s==="size"?Lo(A=>{const f=a?t.measuredBox[A]:t.layoutBox[A],h=aa(f);f.min=r[A].min,f.max=f.min+h}):hse(s,t.layoutBox,r)&&Lo(A=>{const f=a?t.measuredBox[A]:t.layoutBox[A],h=aa(r[A]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[A].max=e.relativeTarget[A].min+h)});const o=Mg();hw(o,r,t.layoutBox);const l=Mg();a?hw(l,e.applyTransform(i,!0),t.measuredBox):hw(l,r,t.layoutBox);const u=!ose(o);let d=!1;if(!e.resumeFrom){const A=e.getClosestProjectingParent();if(A&&!A.resumeFrom){const{snapshot:f,layout:h}=A;if(f&&h){const p=Ti();Q_(p,t.layoutBox,f.layoutBox);const m=Ti();Q_(m,r,h.layoutBox),lse(p,m)||(d=!0),A.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=A)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function XEe(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function JEe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ZEe(e){e.clearSnapshot()}function hz(e){e.clearMeasurements()}function fz(e){e.isLayoutDirty=!1}function eNe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function pz(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tNe(e){e.resolveTargetDelta()}function nNe(e){e.calcProjection()}function rNe(e){e.resetSkewAndRotation()}function iNe(e){e.removeLeadSnapshot()}function mz(e,t,n){e.translate=Ir(t.translate,0,n),e.scale=Ir(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function gz(e,t,n,r){e.min=Ir(t.min,n.min,r),e.max=Ir(t.max,n.max,r)}function sNe(e,t,n,r){gz(e.x,t.x,n.x,r),gz(e.y,t.y,n.y,r)}function aNe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const oNe={duration:.45,ease:[.4,0,.1,1]},yz=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),vz=yz("applewebkit/")&&!yz("chrome/")?Math.round:sl;function xz(e){e.min=vz(e.min),e.max=vz(e.max)}function lNe(e){xz(e.x),xz(e.y)}function hse(e,t,n){return e==="position"||e==="preserve-aspect"&&!TEe(lz(t),lz(n),.2)}function cNe(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const uNe=Ase({attachResizeListener:(e,t)=>Sb(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),hP={current:void 0},fse=Ase({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hP.current){const e=new uNe({});e.mount(window),e.setOptions({layoutScroll:!0}),hP.current=e}return hP.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),vD=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function wz(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function dNe(...e){return t=>{let n=!1;const r=e.map(i=>{const s=wz(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():wz(e[i],null)}}}}function ANe(...e){return S.useCallback(dNe(...e),e)}class hNe extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=R3(r)&&r.offsetWidth||0,s=R3(r)&&r.offsetHeight||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=s-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function fNe({children:e,isPresent:t,anchorX:n,anchorY:r,root:i}){var A;const s=S.useId(),a=S.useRef(null),o=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=S.useContext(vD),u=((A=e.props)==null?void 0:A.ref)??(e==null?void 0:e.ref),d=ANe(a,u);return S.useInsertionEffect(()=>{const{width:f,height:h,top:p,left:m,right:g,bottom:y}=o.current;if(t||!a.current||!f||!h)return;const v=n==="left"?`left: ${m}`:`right: ${g}`,x=r==="bottom"?`bottom: ${y}`:`top: ${p}`;a.current.dataset.motionPopId=s;const b=document.createElement("style");l&&(b.nonce=l);const w=i??document.head;return w.appendChild(b),b.sheet&&b.sheet.insertRule(`
[data-motion-pop-id="${s}"] {
position: absolute !important;
width: ${f}px !important;
height: ${h}px !important;
${v}px !important;
${x}px !important;
}
`),()=>{w.contains(b)&&w.removeChild(b)}},[t]),c.jsx(hNe,{isPresent:t,childRef:a,sizeRef:o,children:S.cloneElement(e,{ref:d})})}const pNe=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:a,anchorX:o,anchorY:l,root:u})=>{const d=KU(mNe),A=S.useId();let f=!0,h=S.useMemo(()=>(f=!1,{id:A,initial:t,isPresent:n,custom:i,onExitComplete:p=>{d.set(p,!0);for(const m of d.values())if(!m)return;r&&r()},register:p=>(d.set(p,!1),()=>d.delete(p))}),[n,d,r]);return s&&f&&(h={...h}),S.useMemo(()=>{d.forEach((p,m)=>d.set(m,!1))},[n]),S.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),a==="popLayout"&&(e=c.jsx(fNe,{isPresent:n,anchorX:o,anchorY:l,root:u,children:e})),c.jsx(QN.Provider,{value:h,children:e})};function mNe(){return new Map}function pse(e=!0){const t=S.useContext(QN);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=S.useId();S.useEffect(()=>{if(e)return i(s)},[e]);const a=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const QC=e=>e.key||"";function bz(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const ry=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:a=!1,anchorX:o="left",anchorY:l="top",root:u})=>{const[d,A]=pse(a),f=S.useMemo(()=>bz(e),[e]),h=a&&!d?[]:f.map(QC),p=S.useRef(!0),m=S.useRef(f),g=KU(()=>new Map),y=S.useRef(new Set),[v,x]=S.useState(f),[b,w]=S.useState(f);Kre(()=>{p.current=!1,m.current=f;for(let N=0;N<b.length;N++){const j=QC(b[N]);h.includes(j)?(g.delete(j),y.current.delete(j)):g.get(j)!==!0&&g.set(j,!1)}},[b,h.length,h.join("-")]);const B=[];if(f!==v){let N=[...f];for(let j=0;j<b.length;j++){const L=b[j],T=QC(L);h.includes(T)||(N.splice(j,0,L),B.push(L))}return s==="wait"&&B.length&&(N=B),w(bz(N)),x(f),null}const{forceRender:k}=S.useContext(VU);return c.jsx(c.Fragment,{children:b.map(N=>{const j=QC(N),L=a&&!d?!1:f===b||h.includes(j),T=()=>{if(y.current.has(j))return;if(y.current.add(j),g.has(j))g.set(j,!0);else return;let E=!0;g.forEach(F=>{F||(E=!1)}),E&&(k==null||k(),w(m.current),a&&(A==null||A()),r&&r())};return c.jsx(pNe,{isPresent:L,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:u,onExitComplete:L?void 0:T,anchorX:o,anchorY:l,children:N},j)})})},mse=S.createContext({strict:!1}),Cz={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Sz=!1;function gNe(){if(Sz)return;const e={};for(const t in Cz)e[t]={isEnabled:n=>Cz[t].some(r=>!!n[r])};Vie(e),Sz=!0}function gse(){return gNe(),rEe()}function yNe(e){const t=gse();for(const n in e)t[n]={...t[n],...e[n]};Vie(t)}const vNe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function H_(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||vNe.has(e)}let yse=e=>!H_(e);function xNe(e){typeof e=="function"&&(yse=t=>t.startsWith("on")?!H_(t):e(t))}try{xNe(require("@emotion/is-prop-valid").default)}catch{}function wNe(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(yse(i)||n===!0&&H_(i)||!t&&!H_(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const VN=S.createContext({});function bNe(e,t){if(zN(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Cb(n)?n:void 0,animate:Cb(r)?r:void 0}}return e.inherit!==!1?t:{}}function CNe(e){const{initial:t,animate:n}=bNe(e,S.useContext(VN));return S.useMemo(()=>({initial:t,animate:n}),[Bz(t),Bz(n)])}function Bz(e){return Array.isArray(e)?e.join(" "):e}const xD=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vse(e,t,n){for(const r in t)!Qs(t[r])&&!Jie(r,n)&&(e[r]=t[r])}function SNe({transformTemplate:e},t){return S.useMemo(()=>{const n=xD();return gD(n,t,e),Object.assign({},n.vars,n.style)},[t])}function BNe(e,t){const n=e.style||{},r={};return vse(r,n,e),Object.assign(r,SNe(e,t)),r}function _Ne(e,t){const n={},r=BNe(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const xse=()=>({...xD(),attrs:{}});function kNe(e,t,n,r){const i=S.useMemo(()=>{const s=xse();return Zie(s,t,tse(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};vse(s,e.style,e),i.style={...s,...i.style}}return i}const ENe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function wD(e){return typeof e!="string"||e.includes("-")?!1:!!(ENe.indexOf(e)>-1||/[A-Z]/u.test(e))}function NNe(e,t,n,{latestValues:r},i,s=!1,a){const l=(a??wD(e)?kNe:_Ne)(t,r,i,e),u=wNe(t,typeof e=="string",s),d=e!==S.Fragment?{...u,...l,ref:n}:{},{children:A}=t,f=S.useMemo(()=>Qs(A)?A.get():A,[A]);return S.createElement(e,{...d,children:f})}function jNe({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:TNe(n,r,i,e),renderState:t()}}function TNe(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=TB(s[f]);let{initial:a,animate:o}=e;const l=zN(e),u=zie(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),o===void 0&&(o=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const A=d?o:a;if(A&&typeof A!="boolean"&&!$N(A)){const f=Array.isArray(A)?A:[A];for(let h=0;h<f.length;h++){const p=uD(e,f[h]);if(p){const{transitionEnd:m,transition:g,...y}=p;for(const v in y){let x=y[v];if(Array.isArray(x)){const b=d?x.length-1:0;x=x[b]}x!==null&&(i[v]=x)}for(const v in m)i[v]=m[v]}}}return i}const wse=e=>(t,n)=>{const r=S.useContext(VN),i=S.useContext(QN),s=()=>jNe(e,t,r,i);return n?s():KU(s)},PNe=wse({scrapeMotionValuesFromProps:yD,createRenderState:xD}),INe=wse({scrapeMotionValuesFromProps:nse,createRenderState:xse}),ONe=Symbol.for("motionComponentSymbol");function FNe(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const i=S.useRef(null);return S.useCallback(s=>{var o;s&&((o=e.onMount)==null||o.call(e,s)),t&&(s?t.mount(s):t.unmount());const a=r.current;if(typeof a=="function")if(s){const l=a(s);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):a(s);else a&&(a.current=s)},[t])}const bse=S.createContext({});function Fx(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function MNe(e,t,n,r,i,s){var y,v;const{visualElement:a}=S.useContext(VN),o=S.useContext(mse),l=S.useContext(QN),u=S.useContext(vD).reducedMotion,d=S.useRef(null),A=S.useRef(!1);r=r||o.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,isSVG:s}),A.current&&d.current&&(d.current.manuallyAnimateOnMount=!0));const f=d.current,h=S.useContext(bse);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&LNe(d.current,n,i,h);const p=S.useRef(!1);S.useInsertionEffect(()=>{f&&p.current&&f.update(n,l)});const m=n[Nie],g=S.useRef(!!m&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,m))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,m)));return Kre(()=>{A.current=!0,f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),g.current&&f.animationState&&f.animationState.animateChanges())}),S.useEffect(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,m)}),g.current=!1),f.enteringChildren=void 0)}),f}function LNe(e,t,n,r){const{layoutId:i,layout:s,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Cse(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!a||o&&Fx(o),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u})}function Cse(e){if(e)return e.options.allowProjection!==!1?e.projection:Cse(e.parent)}function fP(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&yNe(r);const s=n?n==="svg":wD(e),a=s?INe:PNe;function o(u,d){let A;const f={...S.useContext(vD),...u,layoutId:RNe(u)},{isStatic:h}=f,p=CNe(u),m=a(u,h);if(!h&&Vre){UNe();const g=DNe(f);A=g.MeasureLayout,p.visualElement=MNe(e,m,f,i,g.ProjectionNode,s)}return c.jsxs(VN.Provider,{value:p,children:[A&&p.visualElement?c.jsx(A,{visualElement:p.visualElement,...f}):null,NNe(e,u,FNe(m,p.visualElement,d),m,h,t,s)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(o);return l[ONe]=e,l}function RNe({layoutId:e}){const t=S.useContext(VU).id;return t&&e!==void 0?t+"-"+e:e}function UNe(e,t){S.useContext(mse).strict}function DNe(e){const t=gse(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function QNe(e,t){if(typeof Proxy>"u")return fP;const n=new Map,r=(s,a)=>fP(s,a,e,t),i=(s,a)=>r(s,a);return new Proxy(i,{get:(s,a)=>a==="create"?r:(n.has(a)||n.set(a,fP(a,void 0,e,t)),n.get(a))})}const HNe=(e,t)=>t.isSVG??wD(e)?new xEe(t):new fEe(t,{allowProjection:e!==S.Fragment});class $Ne extends Fh{constructor(t){super(t),t.animationState||(t.animationState=BEe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();$N(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let zNe=0;class VNe extends Fh{constructor(){super(...arguments),this.id=zNe++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const KNe={animation:{Feature:$Ne},exit:{Feature:VNe}};function a2(e){return{point:{x:e.pageX,y:e.pageY}}}const WNe=e=>t=>fD(t)&&e(t,a2(t));function fw(e,t,n,r){return Sb(e,t,WNe(n),r)}const Sse=({current:e})=>e?e.ownerDocument.defaultView:null,_z=(e,t)=>Math.abs(e-t);function qNe(e,t){const n=_z(e.x,t.x),r=_z(e.y,t.y);return Math.sqrt(n**2+r**2)}const kz=new Set(["auto","scroll"]);class Bse{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=mP(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=qNe(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;const{point:g}=h,{timestamp:y}=hs;this.history.push({...g,timestamp:y});const{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,h)},this.handlePointerMove=(h,p)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=pP(p,this.transformPagePoint),xr.update(this.updatePoint,!0)},this.handlePointerUp=(h,p)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=mP(h.type==="pointercancel"?this.lastMoveEventInfo:pP(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,v),g&&g(h,v)},!fD(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const l=a2(t),u=pP(l,this.transformPagePoint),{point:d}=u,{timestamp:A}=hs;this.history=[{...d,timestamp:A}];const{onSessionStart:f}=n;f&&f(t,mP(u,this.history)),this.removeListeners=r2(fw(this.contextWindow,"pointermove",this.handlePointerMove),fw(this.contextWindow,"pointerup",this.handlePointerUp),fw(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(kz.has(r.overflowX)||kz.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:i.x-n.x,y:i.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,i),xr.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),yh(this.updatePoint)}}function pP(e,t){return t?{point:t(e.point)}:e}function Ez(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mP({point:e},t){return{point:e,delta:Ez(e,_se(t)),offset:Ez(e,GNe(t)),velocity:YNe(t,.1)}}function GNe(e){return e[0]}function _se(e){return e[e.length-1]}function YNe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=_se(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Xc(t)));)n--;if(!r)return{x:0,y:0};const s=Jo(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function XNe(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ir(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ir(n,e,r.max):Math.min(e,n)),e}function Nz(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function JNe(e,{top:t,left:n,bottom:r,right:i}){return{x:Nz(e.x,n,i),y:Nz(e.y,t,r)}}function jz(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ZNe(e,t){return{x:jz(e.x,t.x),y:jz(e.y,t.y)}}function e5e(e,t){let n=.5;const r=aa(e),i=aa(t);return i>r?n=xb(t.min,t.max-r,e.min):r>i&&(n=xb(e.min,e.max-i,t.min)),iu(0,1,n)}function t5e(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const $3=.35;function n5e(e=$3){return e===!1?e=0:e===!0&&(e=$3),{x:Tz(e,"left","right"),y:Tz(e,"top","bottom")}}function Tz(e,t,n){return{min:Pz(e,t),max:Pz(e,n)}}function Pz(e,t){return typeof e=="number"?e:e[t]||0}const r5e=new WeakMap;class i5e{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ti(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=A=>{n?(this.stopAnimation(),this.snapToCursor(a2(A).point)):this.pauseAnimation()},a=(A,f)=>{this.stopAnimation();const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Vke(h),!this.openDragLock))return;this.latestPointerEvent=A,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Lo(y=>{let v=this.getAxisMotionValue(y).get()||0;if(Jc.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[y];b&&(v=aa(b)*(parseFloat(v)/100))}}this.originPoint[y]=v}),m&&xr.postRender(()=>m(A,f)),F3(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(A,f)=>{this.latestPointerEvent=A,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:m,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=f;if(p&&this.currentDirection===null){this.currentDirection=s5e(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&g(A,f)},l=(A,f)=>{this.latestPointerEvent=A,this.latestPanInfo=f,this.stop(A,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Lo(A=>{var f;return this.getAnimationState(A)==="paused"&&((f=this.getAxisMotionValue(A).animation)==null?void 0:f.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Bse(t,{onSessionStart:s,onStart:a,onMove:o,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Sse(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:o}=this.getProps();o&&xr.postRender(()=>o(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!HC(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=XNe(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&Fx(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=JNe(r.layoutBox,t):this.constraints=!1,this.elastic=n5e(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Lo(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=t5e(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Fx(t))return!1;const r=t.current;Wy(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=lEe(r,i.root,this.visualElement.getTransformPagePoint());let a=ZNe(i.layout.layoutBox,s);if(n){const o=n(sEe(a));this.hasMutatedConstraints=!!o,o&&(a=Wie(o))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},u=Lo(d=>{if(!HC(d,n,this.currentDirection))return;let A=l&&l[d]||{};a&&(A={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...A};return this.startAxisValueAnimation(d,p)});return Promise.all(u).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return F3(this.visualElement,t),r.start(cD(t,r,0,n,this.visualElement,!1))}stopAnimation(){Lo(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Lo(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Lo(n=>{const{drag:r}=this.getProps();if(!HC(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:o}=i.layout.layoutBox[n],l=s.get()||0;s.set(t[n]-Ir(a,o,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Fx(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Lo(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const l=o.get();i[a]=e5e({min:l,max:l},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Lo(a=>{if(!HC(a,t,null))return;const o=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];o.set(Ir(l,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;r5e.set(this.visualElement,this);const t=this.visualElement.current,n=fw(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps(),A=l.target,f=A!==t&&Qie(A);u&&d&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Fx(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),xr.read(r);const a=Sb(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Lo(d=>{const A=this.getAxisMotionValue(d);A&&(this.originPoint[d]+=l[d].translate,A.set(A.get()+l[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:a=$3,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:a,dragMomentum:o}}}function HC(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function s5e(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class a5e extends Fh{constructor(t){super(t),this.removeGroupControls=sl,this.removeListeners=sl,this.controls=new i5e(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||sl}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Iz=e=>(t,n)=>{e&&xr.postRender(()=>e(t,n))};class o5e extends Fh{constructor(){super(...arguments),this.removePointerDownListener=sl}onPointerDown(t){this.session=new Bse(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sse(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Iz(t),onStart:Iz(n),onMove:r,onEnd:(s,a)=>{delete this.session,i&&xr.postRender(()=>i(s,a))}}}mount(){this.removePointerDownListener=fw(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let gP=!1;class l5e extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),gP&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),PB.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:a}=r;return a&&(a.isPresent=s,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),gP=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||xr.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),hD.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;gP=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function kse(e){const[t,n]=pse(),r=S.useContext(VU);return c.jsx(l5e,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(bse),isPresent:t,safeToRemove:n})}const c5e={pan:{Feature:o5e},drag:{Feature:a5e,ProjectionNode:fse,MeasureLayout:kse}};function Oz(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&xr.postRender(()=>s(t,a2(t)))}class u5e extends Fh{mount(){const{current:t}=this.node;t&&(this.unmount=Kke(t,(n,r)=>(Oz(this.node,r,"Start"),i=>Oz(this.node,i,"End"))))}unmount(){}}class d5e extends Fh{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=r2(Sb(this.node.current,"focus",()=>this.onFocus()),Sb(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Fz(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&xr.postRender(()=>s(t,a2(t)))}class A5e extends Fh{mount(){const{current:t}=this.node;t&&(this.unmount=Gke(t,(n,r)=>(Fz(this.node,r,"Start"),(i,{success:s})=>Fz(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const z3=new WeakMap,yP=new WeakMap,h5e=e=>{const t=z3.get(e.target);t&&t(e)},f5e=e=>{e.forEach(h5e)};function p5e({root:e,...t}){const n=e||document;yP.has(n)||yP.set(n,{});const r=yP.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(f5e,{root:e,...t})),r[i]}function m5e(e,t,n){const r=p5e(t);return z3.set(e,n),r.observe(e),()=>{z3.delete(e),r.unobserve(e)}}const g5e={some:0,all:1};class y5e extends Fh{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:g5e[i]},o=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:A}=this.node.getProps(),f=u?d:A;f&&f(l)};return m5e(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(v5e(t,n))&&this.startObserver()}unmount(){}}function v5e({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const x5e={inView:{Feature:y5e},tap:{Feature:A5e},focus:{Feature:d5e},hover:{Feature:u5e}},w5e={layout:{ProjectionNode:fse,MeasureLayout:kse}},b5e={...KNe,...x5e,...c5e,...w5e},ri=QNe(b5e,HNe),C5e={some:0,all:1};function S5e(e,t,{root:n,margin:r,amount:i="some"}={}){const s=Mie(e),a=new WeakMap,o=u=>{u.forEach(d=>{const A=a.get(d.target);if(d.isIntersecting!==!!A)if(d.isIntersecting){const f=t(d.target,d);typeof f=="function"?a.set(d.target,f):l.unobserve(d.target)}else typeof A=="function"&&(A(d),a.delete(d.target))})},l=new IntersectionObserver(o,{root:n,rootMargin:r,threshold:typeof i=="number"?i:C5e[i]});return s.forEach(u=>l.observe(u)),()=>l.disconnect()}function B5e(e,{root:t,margin:n,amount:r,once:i=!1,initial:s=!1}={}){const[a,o]=S.useState(s);return S.useEffect(()=>{if(!e.current||i&&a)return;const l=()=>(o(!0),i?void 0:()=>o(!1)),u={root:t&&t.current||void 0,margin:n,amount:r};return S5e(e.current,l,u)},[t,e,n,i,r]),a}var Rc=function(){return Rc=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Rc.apply(this,arguments)};function W0(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function _5e(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(d){try{u(r.next(d))}catch(A){a(A)}}function l(d){try{u(r.throw(d))}catch(A){a(A)}}function u(d){d.done?s(d.value):i(d.value).then(o,l)}u((r=r.apply(e,t||[])).next())})}function k5e(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}const E5e=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class bD extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class N5e extends bD{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Mz extends bD{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Lz extends bD{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var V3;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(V3||(V3={}));class j5e{constructor(t,{headers:n={},customFetch:r,region:i=V3.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=E5e(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return _5e(this,arguments,void 0,function*(n,r={}){var i;let s,a;try{const{headers:o,method:l,body:u,signal:d,timeout:A}=r;let f={},{region:h}=r;h||(h=this.region);const p=new URL(`${this.url}/${n}`);h&&h!=="any"&&(f["x-region"]=h,p.searchParams.set("forceFunctionRegion",h));let m;u&&(o&&!Object.prototype.hasOwnProperty.call(o,"Content-Type")||!o)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",m=u):typeof u=="string"?(f["Content-Type"]="text/plain",m=u):typeof FormData<"u"&&u instanceof FormData?m=u:(f["Content-Type"]="application/json",m=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?m=JSON.stringify(u):m=u;let g=d;A&&(a=new AbortController,s=setTimeout(()=>a.abort(),A),d?(g=a.signal,d.addEventListener("abort",()=>a.abort())):g=a.signal);const y=yield this.fetch(p.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),o),body:m,signal:g}).catch(w=>{throw new N5e(w)}),v=y.headers.get("x-relay-error");if(v&&v==="true")throw new Mz(y);if(!y.ok)throw new Lz(y);let x=((i=y.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),b;return x==="application/json"?b=yield y.json():x==="application/octet-stream"||x==="application/pdf"?b=yield y.blob():x==="text/event-stream"?b=y:x==="multipart/form-data"?b=yield y.formData():b=yield y.text(),{data:b,error:null,response:y}}catch(o){return{data:null,error:o,response:o instanceof Lz||o instanceof Mz?o.context:void 0}}finally{s&&clearTimeout(s)}})}}var T5e=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}},P5e=class{constructor(e){var t,n;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let i=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async s=>{let a=null,o=null,l=null,u=s.status,d=s.statusText;if(s.ok){var A,f;if(n.method!=="HEAD"){var h;const y=await s.text();y===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((h=n.headers.get("Accept"))===null||h===void 0)&&h.includes("application/vnd.pgrst.plan+text"))?o=y:o=JSON.parse(y))}const m=(A=n.headers.get("Prefer"))===null||A===void 0?void 0:A.match(/count=(exact|planned|estimated)/),g=(f=s.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");m&&g&&g.length>1&&(l=parseInt(g[1])),n.isMaybeSingle&&n.method==="GET"&&Array.isArray(o)&&(o.length>1?(a={code:"PGRST116",details:`Results contain ${o.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},o=null,l=null,u=406,d="Not Acceptable"):o.length===1?o=o[0]:o=null)}else{var p;const m=await s.text();try{a=JSON.parse(m),Array.isArray(a)&&s.status===404&&(o=[],a=null,u=200,d="OK")}catch{s.status===404&&m===""?(u=204,d="No Content"):a={message:m}}if(a&&n.isMaybeSingle&&(!(a==null||(p=a.details)===null||p===void 0)&&p.includes("0 rows"))&&(a=null,u=200,d="OK"),a&&n.shouldThrowOnError)throw new T5e(a)}return{error:a,data:o,count:l,status:u,statusText:d}});return this.shouldThrowOnError||(i=i.catch(s=>{var a;let o="";const l=s==null?void 0:s.cause;if(l){var u,d,A,f;const p=(u=l==null?void 0:l.message)!==null&&u!==void 0?u:"",m=(d=l==null?void 0:l.code)!==null&&d!==void 0?d:"";o=`${(A=s==null?void 0:s.name)!==null&&A!==void 0?A:"FetchError"}: ${s==null?void 0:s.message}`,o+=`
Caused by: ${(f=l==null?void 0:l.name)!==null&&f!==void 0?f:"Error"}: ${p}`,m&&(o+=` (${m})`),l!=null&&l.stack&&(o+=`
${l.stack}`)}else{var h;o=(h=s==null?void 0:s.stack)!==null&&h!==void 0?h:""}return{error:{message:`${(a=s==null?void 0:s.name)!==null&&a!==void 0?a:"FetchError"}: ${s==null?void 0:s.message}`,details:o,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),i.then(e,t)}returns(){return this}overrideTypes(){return this}},I5e=class extends P5e{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){const s=i?`${i}.order`:"order",a=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const i=typeof r>"u"?"offset":`${r}.offset`,s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(s,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:s="text"}={}){var a;const o=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${s}; for="${l}"; options=${o};`),s==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Rz=new RegExp("[,()]");var hg=class extends I5e{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Rz.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Rz.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let i="";r==="plain"?i="pl":r==="phrase"?i="ph":r==="websearch"&&(i="w");const s=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${i}fts${s}.${t}`),this}match(e){return Object.entries(e).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},O5e=class{constructor(e,{headers:t={},schema:n,fetch:r}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},i=n?"HEAD":"GET";let s=!1;const a=(e??"*").split("").map(u=>/\s/.test(u)&&!s?"":(u==='"'&&(s=!s),u)).join(""),{url:o,headers:l}=this.cloneRequestState();return o.searchParams.set("select",a),r&&l.append("Prefer",`count=${r}`),new hg({method:i,url:o,headers:l,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const i="POST",{url:s,headers:a}=this.cloneRequestState();if(t&&a.append("Prefer",`count=${t}`),n||a.append("Prefer","missing=default"),Array.isArray(e)){const o=e.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(o.length>0){const l=[...new Set(o)].map(u=>`"${u}"`);s.searchParams.set("columns",l.join(","))}}return new hg({method:i,url:s,headers:a,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){var s;const a="POST",{url:o,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&o.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),i||l.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,A)=>d.concat(Object.keys(A)),[]);if(u.length>0){const d=[...new Set(u)].map(A=>`"${A}"`);o.searchParams.set("columns",d.join(","))}}return new hg({method:a,url:o,headers:l,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}update(e,{count:t}={}){var n;const r="PATCH",{url:i,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new hg({method:r,url:i,headers:s,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new hg({method:n,url:r,headers:i,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch})}},F5e=class Ese{constructor(t,{headers:n={},schema:r,fetch:i}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.fetch=i}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new O5e(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new Ese(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:i=!1,count:s}={}){var a;let o;const l=new URL(`${this.url}/rpc/${t}`);let u;const d=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(d)),A=r&&Object.values(n).some(d);A?(o="POST",u=n):r||i?(o=r?"HEAD":"GET",Object.entries(n).filter(([h,p])=>p!==void 0).map(([h,p])=>[h,Array.isArray(p)?`{${p.join(",")}}`:`${p}`]).forEach(([h,p])=>{l.searchParams.append(h,p)})):(o="POST",u=n);const f=new Headers(this.headers);return A?f.set("Prefer",s?`count=${s},return=minimal`:"return=minimal"):s&&f.set("Prefer",`count=${s}`),new hg({method:o,url:l,headers:f,schema:this.schemaName,body:u,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}};class M5e{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const i=r.node,s=parseInt(i.replace(/^v/,"").split(".")[0]);return s>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
import ws from "ws"
new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const L5e="2.93.2",R5e=`realtime-js/${L5e}`,U5e="1.0.0",Nse="2.0.0",Uz=Nse,K3=1e4,D5e=1e3,Q5e=100;var lA;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(lA||(lA={}));var ji;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(ji||(ji={}));var Dl;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Dl||(Dl={}));var W3;(function(e){e.websocket="websocket"})(W3||(W3={}));var Nf;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Nf||(Nf={}));class H5e{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const i=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(t){var n,r;const i=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},a=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,a)}_encodeUserBroadcastPush(t,n,r){var i,s;const a=t.topic,o=(i=t.ref)!==null&&i!==void 0?i:"",l=(s=t.join_ref)!==null&&s!==void 0?s:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},A=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`ref length ${o.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(A.length>255)throw new Error(`metadata length ${A.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+o.length+a.length+u.length+A.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);let p=new DataView(h),m=0;p.setUint8(m++,this.KINDS.userBroadcastPush),p.setUint8(m++,l.length),p.setUint8(m++,o.length),p.setUint8(m++,a.length),p.setUint8(m++,u.length),p.setUint8(m++,A.length),p.setUint8(m++,n),Array.from(l,y=>p.setUint8(m++,y.charCodeAt(0))),Array.from(o,y=>p.setUint8(m++,y.charCodeAt(0))),Array.from(a,y=>p.setUint8(m++,y.charCodeAt(0))),Array.from(u,y=>p.setUint8(m++,y.charCodeAt(0))),Array.from(A,y=>p.setUint8(m++,y.charCodeAt(0)));var g=new Uint8Array(h.byteLength+r.byteLength);return g.set(new Uint8Array(h),0),g.set(new Uint8Array(r),h.byteLength),g.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[i,s,a,o,l]=r;return n({join_ref:i,ref:s,topic:a,event:o,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),i=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,i)}}_decodeUserBroadcast(t,n,r){const i=n.getUint8(1),s=n.getUint8(2),a=n.getUint8(3),o=n.getUint8(4);let l=this.HEADER_LENGTH+4;const u=r.decode(t.slice(l,l+i));l=l+i;const d=r.decode(t.slice(l,l+s));l=l+s;const A=r.decode(t.slice(l,l+a));l=l+a;const f=t.slice(l,t.byteLength),h=o===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,p={type:this.BROADCAST_EVENT,event:d,payload:h};return a>0&&(p.meta=JSON.parse(A)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:p}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}class jse{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var nr;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(nr||(nr={}));const Dz=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((s,a)=>(s[a]=$5e(a,e,t,i),s),{}):{}},$5e=(e,t,n,r)=>{const i=t.find(o=>o.name===e),s=i==null?void 0:i.type,a=n[e];return s&&!r.includes(s)?Tse(s,a):q3(a)},Tse=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return W5e(t,n)}switch(e){case nr.bool:return z5e(t);case nr.float4:case nr.float8:case nr.int2:case nr.int4:case nr.int8:case nr.numeric:case nr.oid:return V5e(t);case nr.json:case nr.jsonb:return K5e(t);case nr.timestamp:return q5e(t);case nr.abstime:case nr.date:case nr.daterange:case nr.int4range:case nr.int8range:case nr.money:case nr.reltime:case nr.text:case nr.time:case nr.timestamptz:case nr.timetz:case nr.tsrange:case nr.tstzrange:return q3(t);default:return q3(t)}},q3=e=>e,z5e=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},V5e=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},K5e=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},W5e=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let s;const a=e.slice(1,n);try{s=JSON.parse("["+a+"]")}catch{s=a?a.split(","):[]}return s.map(o=>Tse(t,o))}return e},q5e=e=>typeof e=="string"?e.replace(" ","T"):e,Pse=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class vP{constructor(t,n,r={},i=K3){this.channel=t,this.event=n,this.payload=r,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var Qz;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Qz||(Qz={}));class pw{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},i=>{const{onJoin:s,onLeave:a,onSync:o}=this.caller;this.joinRef=this.channel._joinRef(),this.state=pw.syncState(this.state,i,s,a),this.pendingDiffs.forEach(l=>{this.state=pw.syncDiff(this.state,l,s,a)}),this.pendingDiffs=[],o()}),this.channel._on(r.diff,{},i=>{const{onJoin:s,onLeave:a,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=pw.syncDiff(this.state,i,s,a),o())}),this.onJoin((i,s,a)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:s,newPresences:a})}),this.onLeave((i,s,a)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:s,leftPresences:a})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,i){const s=this.cloneDeep(t),a=this.transformState(n),o={},l={};return this.map(s,(u,d)=>{a[u]||(l[u]=d)}),this.map(a,(u,d)=>{const A=s[u];if(A){const f=d.map(g=>g.presence_ref),h=A.map(g=>g.presence_ref),p=d.filter(g=>h.indexOf(g.presence_ref)<0),m=A.filter(g=>f.indexOf(g.presence_ref)<0);p.length>0&&(o[u]=p),m.length>0&&(l[u]=m)}else o[u]=d}),this.syncDiff(s,{joins:o,leaves:l},r,i)}static syncDiff(t,n,r,i){const{joins:s,leaves:a}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),i||(i=()=>{}),this.map(s,(o,l)=>{var u;const d=(u=t[o])!==null&&u!==void 0?u:[];if(t[o]=this.cloneDeep(l),d.length>0){const A=t[o].map(h=>h.presence_ref),f=d.filter(h=>A.indexOf(h.presence_ref)<0);t[o].unshift(...f)}r(o,d,l)}),this.map(a,(o,l)=>{let u=t[o];if(!u)return;const d=l.map(A=>A.presence_ref);u=u.filter(A=>d.indexOf(A.presence_ref)<0),t[o]=u,i(o,u,l),u.length===0&&delete t[o]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[r];return"metas"in i?n[r]=i.metas.map(s=>(s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s)):n[r]=i,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Hz;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Hz||(Hz={}));var mw;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(mw||(mw={}));var Ru;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Ru||(Ru={}));class Ug{constructor(t,n={config:{}},r){var i,s;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=ji.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new vP(this,Dl.join,this.params,this.timeout),this.rejoinTimer=new jse(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=ji.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(a=>a.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=ji.closed,this.socket._remove(this)}),this._onError(a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=ji.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=ji.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",a=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,a),this.state=ji.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Dl.reply,{},(a,o)=>{this._trigger(this._replyEventName(o),a)}),this.presence=new pw(this),this.broadcastEndpointURL=Pse(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((s=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||s===void 0)&&s.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,i,s;if(this.socket.isConnected()||this.socket.connect(),this.state==ji.closed){const{config:{broadcast:a,presence:o,private:l}}=this.params,u=(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(h=>h.filter))!==null&&i!==void 0?i:[],d=!!this.bindings[mw.PRESENCE]&&this.bindings[mw.PRESENCE].length>0||((s=this.params.config.presence)===null||s===void 0?void 0:s.enabled)===!0,A={},f={broadcast:a,presence:Object.assign(Object.assign({},o),{enabled:d}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(A.access_token=this.socket.accessTokenValue),this._onError(h=>t==null?void 0:t(Ru.CHANNEL_ERROR,h)),this._onClose(()=>t==null?void 0:t(Ru.CLOSED)),this.updateJoinPayload(Object.assign({config:f},A)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:h})=>{var p;if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t(Ru.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,g=(p=m==null?void 0:m.length)!==null&&p!==void 0?p:0,y=[];for(let v=0;v<g;v++){const x=m[v],{filter:{event:b,schema:w,table:B,filter:k}}=x,N=h&&h[v];if(N&&N.event===b&&Ug.isFilterValueEqual(N.schema,w)&&Ug.isFilterValueEqual(N.table,B)&&Ug.isFilterValueEqual(N.filter,k))y.push(Object.assign(Object.assign({},x),{id:N.id}));else{this.unsubscribe(),this.state=ji.errored,t==null||t(Ru.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=y,t&&t(Ru.SUBSCRIBED);return}}).receive("error",h=>{this.state=ji.errored,t==null||t(Ru.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Ru.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===ji.joined&&t===mw.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,n,r)}async httpSend(t,n,r={}){var i;if(n==null)return Promise.reject("Payload is required for httpSend()");const s={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(s.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a={method:"POST",headers:s,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},o=await this._fetchWithTimeout(this.broadcastEndpointURL,a,(i=r.timeout)!==null&&i!==void 0?i:this.timeout);if(o.status===202)return{success:!0};let l=o.statusText;try{const u=await o.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,i;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:s,payload:a}=t,o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:a,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var a,o,l;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(o=(a=this.params)===null||a===void 0?void 0:a.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.ack)&&s("ok"),u.receive("ok",()=>s("ok")),u.receive("error",()=>s("error")),u.receive("timeout",()=>s("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=ji.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Dl.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(i=>{r=new vP(this,Dl.leave,{},t),r.receive("ok",()=>{n(),i("ok")}).receive("timeout",()=>{n(),i("timed out")}).receive("error",()=>{i("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ji.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const i=new AbortController,s=setTimeout(()=>i.abort(),r),a=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(s),a}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new vP(this,t,n,r);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>Q5e){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var i,s;const a=t.toLocaleLowerCase(),{close:o,error:l,leave:u,join:d}=Dl;if(r&&[o,l,u,d].indexOf(a)>=0&&r!==this._joinRef())return;let f=this._onMessage(a,n,r);if(n&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(a)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(h=>{var p,m,g;return((p=h.filter)===null||p===void 0?void 0:p.event)==="*"||((g=(m=h.filter)===null||m===void 0?void 0:m.event)===null||g===void 0?void 0:g.toLocaleLowerCase())===a}).map(h=>h.callback(f,r)):(s=this.bindings[a])===null||s===void 0||s.filter(h=>{var p,m,g,y,v,x;if(["broadcast","presence","postgres_changes"].includes(a))if("id"in h){const b=h.id,w=(p=h.filter)===null||p===void 0?void 0:p.event;return b&&((m=n.ids)===null||m===void 0?void 0:m.includes(b))&&(w==="*"||(w==null?void 0:w.toLocaleLowerCase())===((g=n.data)===null||g===void 0?void 0:g.type.toLocaleLowerCase()))}else{const b=(v=(y=h==null?void 0:h.filter)===null||y===void 0?void 0:y.event)===null||v===void 0?void 0:v.toLocaleLowerCase();return b==="*"||b===((x=n==null?void 0:n.event)===null||x===void 0?void 0:x.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===a}).map(h=>{if(typeof f=="object"&&"ids"in f){const p=f.data,{schema:m,table:g,commit_timestamp:y,type:v,errors:x}=p;f=Object.assign(Object.assign({},{schema:m,table:g,commit_timestamp:y,eventType:v,new:{},old:{},errors:x}),this._getPayloadRecords(p))}h.callback(f,r)})}_isClosed(){return this.state===ji.closed}_isJoined(){return this.state===ji.joined}_isJoining(){return this.state===ji.joining}_isLeaving(){return this.state===ji.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const i=t.toLocaleLowerCase(),s={type:i,filter:n,callback:r};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(i=>{var s;return!(((s=i.type)===null||s===void 0?void 0:s.toLocaleLowerCase())===r&&Ug.isEqual(i.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Dl.close,{},t)}_onError(t){this._on(Dl.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=ji.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Dz(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Dz(t.columns,t.old_record)),n}}const xP=()=>{},$C={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},G5e=[1e3,2e3,5e3,1e4],Y5e=1e4,X5e=`
addEventListener("message", (e) => {
if (e.data.event === "start") {
setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
}
});`;class J5e{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=K3,this.transport=null,this.heartbeatIntervalMs=$C.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=xP,this.ref=0,this.reconnectTimer=null,this.vsn=Uz,this.logger=xP,this.conn=null,this.sendBuffer=[],this.serializer=new H5e,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=i=>i?(...s)=>i(...s):(...s)=>fetch(...s),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${W3.websocket}`,this.httpEndpoint=Pse(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=M5e.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n}
To use Realtime in Node.js, you need to provide a WebSocket implementation:
Option 1: Use Node.js 22+ which has native WebSocket support
Option 2: Install and provide the "ws" package:
npm install ws
import ws from "ws"
const client = new RealtimeClient(url, {
...options,
transport: ws
})`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,n??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case lA.connecting:return Nf.Connecting;case lA.open:return Nf.Open;case lA.closing:return Nf.Closing;default:return Nf.Closed}}isConnected(){return this.connectionState()===Nf.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,n={config:{}}){const r=`realtime:${t}`,i=this.getChannels().find(s=>s.topic===r);if(i)return i;{const s=new Ug(`realtime:${t}`,n,this);return this.channels.push(s),s}}push(t){const{topic:n,event:r,payload:i,ref:s}=t,a=()=>{this.encode(t,o=>{var l;(l=this.conn)===null||l===void 0||l.send(o)})};this.log("push",`${n} ${r} (${s})`,i),this.isConnected()?a():this.sendBuffer.push(a)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(D5e,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},$C.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>{if(n.topic==="phoenix"&&n.event==="phx_reply"&&n.ref&&n.ref===this.pendingHeartbeatRef){const u=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error",u)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:r,event:i,payload:s,ref:a}=n,o=a?`(${a})`:"",l=s.status||"";this.log("receive",`${l} ${r} ${i} ${o}`.trim(),s),this.channels.filter(u=>u._isMember(r)).forEach(u=>u._trigger(i,s,a)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===lA.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===lA.open||this.conn.readyState===lA.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(n=>{this.log("error","error waiting for auth on connect",n),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t);try{this.heartbeatCallback("error")}catch(n){this.log("error","error in heartbeat callback",n)}}_triggerChanError(){this.channels.forEach(t=>t._trigger(Dl.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",i=new URLSearchParams(n);return`${t}${r}${i}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([X5e],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(i=>{const s={access_token:n,version:R5e};n&&i.updateJoinPayload(s),i.joinedOnce&&i._isJoined()&&i._push(Dl.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new jse(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},$C.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,i,s,a,o,l,u,d,A,f,h;switch(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.timeout)!==null&&r!==void 0?r:K3,this.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:$C.HEARTBEAT_INTERVAL,this.worker=(s=t==null?void 0:t.worker)!==null&&s!==void 0?s:!1,this.accessToken=(a=t==null?void 0:t.accessToken)!==null&&a!==void 0?a:null,this.heartbeatCallback=(o=t==null?void 0:t.heartbeatCallback)!==null&&o!==void 0?o:xP,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:Uz,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:p=>G5e[p-1]||Y5e,this.vsn){case U5e:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(p,m)=>m(JSON.stringify(p)),this.decode=(A=t==null?void 0:t.decode)!==null&&A!==void 0?A:(p,m)=>m(JSON.parse(p));break;case Nse:this.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:this.serializer.encode.bind(this.serializer),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var Bb=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function Z5e(e,t,n){const r=new URL(t,e);if(n)for(const[i,s]of Object.entries(n))s!==void 0&&r.searchParams.set(i,s);return r.toString()}async function eje(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function tje(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:s,headers:a}){const o=Z5e(e.baseUrl,r,i),l=await eje(e.auth),u=await t(o,{method:n,headers:{...s?{"Content-Type":"application/json"}:{},...l,...a},body:s?JSON.stringify(s):void 0}),d=await u.text(),A=(u.headers.get("content-type")||"").includes("application/json"),f=A&&d?JSON.parse(d):d;if(!u.ok){const h=A?f:void 0,p=h==null?void 0:h.error;throw new Bb((p==null?void 0:p.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:p==null?void 0:p.type,icebergCode:p==null?void 0:p.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function zC(e){return e.join("")}var nje=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:zC(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${zC(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${zC(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${zC(e.namespace)}`}),!0}catch(t){if(t instanceof Bb&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Bb&&n.status===409)return;throw n}}};function Rm(e){return e.join("")}var rje=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Rm(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Rm(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Rm(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Rm(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Rm(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Rm(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Bb&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Bb&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},ije=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=tje({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new nje(this.client,t),this.tableOps=new rje(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},KN=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}};function WN(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var VC=class extends KN{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Ise=class extends KN{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const sje=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),aje=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)},G3=e=>{if(Array.isArray(e))return e.map(n=>G3(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const i=n.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));t[i]=G3(r)}),t},oje=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function _b(e){"@babel/helpers - typeof";return _b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_b(e)}function lje(e,t){if(_b(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(_b(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cje(e){var t=lje(e,"string");return _b(t)=="symbol"?t:t+""}function uje(e,t,n){return(t=cje(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$z(Object(n),!0).forEach(function(r){uje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$z(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const zz=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},dje=async(e,t,n,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(n!=null&&n.noResolveJson)){const i=e,s=i.status||500;if(typeof i.json=="function")i.json().then(a=>{const o=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||s+"";t(new VC(zz(a),s,o,r))}).catch(()=>{if(r==="vectors"){const a=s+"";t(new VC(i.statusText||`HTTP ${s} error`,s,a,r))}else{const a=s+"";t(new VC(i.statusText||`HTTP ${s} error`,s,a,r))}});else{const a=s+"";t(new VC(i.statusText||`HTTP ${s} error`,s,a,r))}}else t(new Ise(zz(e),e,r))},Aje=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!r?Ht(Ht({},i),n):(aje(r)?(i.headers=Ht({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(r)):i.body=r,t!=null&&t.duplex&&(i.duplex=t.duplex),Ht(Ht({},i),n))};async function tx(e,t,n,r,i,s,a){return new Promise((o,l)=>{e(n,Aje(t,r,i,s)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(a==="vectors"){const d=u.headers.get("content-type");if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>o(u)).catch(u=>dje(u,l,r,a))})}function hje(e="storage"){return{get:async(t,n,r,i)=>tx(t,"GET",n,r,i,void 0,e),post:async(t,n,r,i,s)=>tx(t,"POST",n,i,s,r,e),put:async(t,n,r,i,s)=>tx(t,"PUT",n,i,s,r,e),head:async(t,n,r,i)=>tx(t,"HEAD",n,Ht(Ht({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,s)=>tx(t,"DELETE",n,i,s,r,e)}}const fje=hje("storage"),{get:kb,post:Sr,put:Y3,head:pje,remove:CD}=fje;var q0=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=sje(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(WN(n))return{data:null,error:n};throw n}}},mje=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(WN(t))return{data:null,error:t};throw t}}};let Ose;Ose=Symbol.toStringTag;var gje=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Ose]="BlobDownloadBuilder",this.promise=null}asStream(){return new mje(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(WN(t))return{data:null,error:t};throw t}}};const yje={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Vz={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var vje=class extends q0{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var i=this;return i.handleOperation(async()=>{let s;const a=Ht(Ht({},Vz),r);let o=Ht(Ht({},i.headers),e==="POST"&&{"x-upsert":String(a.upsert)});const l=a.metadata;typeof Blob<"u"&&n instanceof Blob?(s=new FormData,s.append("cacheControl",a.cacheControl),l&&s.append("metadata",i.encodeMetadata(l)),s.append("",n)):typeof FormData<"u"&&n instanceof FormData?(s=n,s.has("cacheControl")||s.append("cacheControl",a.cacheControl),l&&!s.has("metadata")&&s.append("metadata",i.encodeMetadata(l))):(s=n,o["cache-control"]=`max-age=${a.cacheControl}`,o["content-type"]=a.contentType,l&&(o["x-metadata"]=i.toBase64(i.encodeMetadata(l))),(typeof ReadableStream<"u"&&s instanceof ReadableStream||s&&typeof s=="object"&&"pipe"in s&&typeof s.pipe=="function")&&!a.duplex&&(a.duplex="half")),r!=null&&r.headers&&(o=Ht(Ht({},o),r.headers));const u=i._removeEmptyFolders(t),d=i._getFinalPath(u),A=await(e=="PUT"?Y3:Sr)(i.fetch,`${i.url}/object/${d}`,s,Ht({headers:o},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{path:u,id:A.Id,fullPath:A.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;const s=i._removeEmptyFolders(e),a=i._getFinalPath(s),o=new URL(i.url+`/object/upload/sign/${a}`);return o.searchParams.set("token",t),i.handleOperation(async()=>{let l;const u=Ht({upsert:Vz.upsert},r),d=Ht(Ht({},i.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",u.cacheControl)):(l=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{path:s,fullPath:(await Y3(i.fetch,o.toString(),l,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const i=Ht({},n.headers);t!=null&&t.upsert&&(i["x-upsert"]="true");const s=await Sr(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),a=new URL(n.url+s.url),o=a.searchParams.get("token");if(!o)throw new KN("No token returned by API");return{signedUrl:a.toString(),path:e,token:o}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await Sr(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Sr(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(e),s=await Sr(r.fetch,`${r.url}/object/sign/${i}`,Ht({expiresIn:t},n!=null&&n.transform?{transform:n.transform}:{}),{headers:r.headers});const a=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{signedUrl:encodeURI(`${r.url}${s.signedURL}${a}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const i=await Sr(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),s=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return i.map(a=>Ht(Ht({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${s}`):null}))})}download(e,t){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",r=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=r?`?${r}`:"",s=this._getFinalPath(e),a=()=>kb(this.fetch,`${this.url}/${n}/${s}${i}`,{headers:this.headers,noResolveJson:!0});return new gje(a,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>G3(await kb(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await pje(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(WN(r)&&r instanceof Ise){const i=r.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:r}}throw r}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],i=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";i!==""&&r.push(i);const s=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",a=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});a!==""&&r.push(a);let o=r.join("&");return o!==""&&(o=`?${o}`),{data:{publicUrl:encodeURI(`${this.url}/${s}/public/${n}${o}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await CD(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const i=Ht(Ht(Ht({},yje),t),{},{prefix:e||""});return await Sr(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=Ht({},e);return await Sr(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const xje="2.93.2",o2={"X-Client-Info":`storage-js/${xje}`};var wje=class extends q0{constructor(e,t={},n,r){const i=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const s=i.href.replace(/\/$/,""),a=Ht(Ht({},o2),t);super(s,a,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await kb(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await kb(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Sr(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Y3(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await CD(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},bje=class extends q0{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=Ht(Ht({},o2),t);super(r,i,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await kb(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await CD(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!oje(e))throw new KN("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new ije({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(i,s){const a=i[s];return typeof a!="function"?a:async(...o)=>{try{return{data:await a.apply(i,o),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},Cje=class extends q0{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=Ht(Ht({},o2),{},{"Content-Type":"application/json"},t);super(r,i,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Sr(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Sr(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},Sje=class extends q0{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=Ht(Ht({},o2),{},{"Content-Type":"application/json"},t);super(r,i,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},Bje=class extends q0{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=Ht(Ht({},o2),{},{"Content-Type":"application/json"},t);super(r,i,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Sr(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},_je=class extends Bje{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new kje(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},kje=class extends Cje{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,Ht(Ht({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,Ht(Ht({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new Eje(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Eje=class extends Sje{constructor(e,t,n,r,i){super(e,t,i),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,Ht(Ht({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,Ht(Ht({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,Ht(Ht({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,Ht(Ht({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,Ht(Ht({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},Nje=class extends wje{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new vje(this.url,this.headers,e,this.fetch)}get vectors(){return new _je(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new bje(this.url+"/iceberg",this.headers,this.fetch)}};const Fse="2.93.2",fg=30*1e3,X3=3,wP=X3*fg,jje="http://localhost:9999",Tje="supabase.auth.token",Pje={"X-Client-Info":`gotrue-js/${Fse}`},J3="X-Supabase-Api-Version",Mse={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Ije=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Oje=10*60*1e3;class Eb extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function Bt(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class Fje extends Eb{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function Mje(e){return Bt(e)&&e.name==="AuthApiError"}class jf extends Eb{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class bd extends Eb{constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class to extends bd{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function bP(e){return Bt(e)&&e.name==="AuthSessionMissingError"}class Um extends bd{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class KC extends bd{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class WC extends bd{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function Lje(e){return Bt(e)&&e.name==="AuthImplicitGrantRedirectError"}class Kz extends bd{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Rje extends bd{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Z3 extends bd{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function CP(e){return Bt(e)&&e.name==="AuthRetryableFetchError"}class Wz extends bd{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class eF extends bd{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const $_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),qz=`
\r=`.split(""),Uje=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<qz.length;t+=1)e[qz[t].charCodeAt(0)]=-2;for(let t=0;t<$_.length;t+=1)e[$_[t].charCodeAt(0)]=t;return e})();function Gz(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n($_[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n($_[r]),t.queuedBits-=6}}function Lse(e,t,n){const r=Uje[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Yz(e){const t=[],n=a=>{t.push(String.fromCodePoint(a))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},s=a=>{Hje(a,r,n)};for(let a=0;a<e.length;a+=1)Lse(e.charCodeAt(a),i,s);return t.join("")}function Dje(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Qje(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const i=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|i)+65536,n+=1}Dje(r,t)}}function Hje(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function iy(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)Lse(e.charCodeAt(i),n,r);return new Uint8Array(t)}function $je(e){const t=[];return Qje(e,n=>t.push(n)),new Uint8Array(t)}function Df(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};return e.forEach(i=>Gz(i,n,r)),Gz(null,n,r),t.join("")}function zje(e){return Math.round(Date.now()/1e3)+e}function Vje(){return Symbol("auth-callback")}const ls=()=>typeof window<"u"&&typeof document<"u",ff={tested:!1,writable:!1},Rse=()=>{if(!ls())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ff.tested)return ff.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ff.tested=!0,ff.writable=!0}catch{ff.tested=!0,ff.writable=!1}return ff.writable};function Kje(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,s)=>{t[s]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const Use=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Wje=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",pg=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},pf=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},as=async(e,t)=>{await e.removeItem(t)};class qN{constructor(){this.promise=new qN.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}qN.promiseConstructor=Promise;function qC(e){const t=e.split(".");if(t.length!==3)throw new eF("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!Ije.test(t[r]))throw new eF("JWT not in base64url format");return{header:JSON.parse(Yz(t[0])),payload:JSON.parse(Yz(t[1])),signature:iy(t[2]),raw:{header:t[0],payload:t[1]}}}async function qje(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Gje(e,t){return new Promise((r,i)=>{(async()=>{for(let s=0;s<1/0;s++)try{const a=await e(s);if(!t(s,null,a)){r(a);return}}catch(a){if(!t(s,a)){i(a);return}}})()})}function Yje(e){return("0"+e.toString(16)).substr(-2)}function Xje(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let s=0;s<56;s++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(t),Array.from(t,Yje).join("")}async function Jje(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(s=>String.fromCharCode(s)).join("")}async function Zje(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await Jje(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Dm(e,t,n=!1){const r=Xje();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await pg(e,`${t}-code-verifier`,i);const s=await Zje(r);return[s,r===s?"plain":"s256"]}const eTe=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function tTe(e){const t=e.headers.get(J3);if(!t||!t.match(eTe))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function nTe(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function rTe(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const iTe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Qm(e){if(!iTe.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function SP(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function sTe(e,t){return new Proxy(e,{get:(n,r,i)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const s=r.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="Symbol(util.inspect.custom)"||s==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,i)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,i)}})}function Xz(e){return JSON.parse(JSON.stringify(e))}const Cf=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),aTe=[502,503,504];async function Jz(e){var t;if(!Wje(e))throw new Z3(Cf(e),0);if(aTe.includes(e.status))throw new Z3(Cf(e),e.status);let n;try{n=await e.json()}catch(s){throw new jf(Cf(s),s)}let r;const i=tTe(e);if(i&&i.getTime()>=Mse["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new Wz(Cf(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new to}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((s,a)=>s&&typeof a=="string",!0))throw new Wz(Cf(n),e.status,n.weak_password.reasons);throw new Fje(Cf(n),e.status||500,r)}const oTe=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function Dt(e,t,n,r){var i;const s=Object.assign({},r==null?void 0:r.headers);s[J3]||(s[J3]=Mse["2024-01-01"].name),r!=null&&r.jwt&&(s.Authorization=`Bearer ${r.jwt}`);const a=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(a.redirect_to=r.redirectTo);const o=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",l=await lTe(e,t,n+o,{headers:s,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function lTe(e,t,n,r,i,s){const a=oTe(t,r,i,s);let o;try{o=await e(n,Object.assign({},a))}catch(l){throw console.error(l),new Z3(Cf(l),0)}if(o.ok||await Jz(o),r!=null&&r.noResolveJson)return o;try{return await o.json()}catch(l){await Jz(l)}}function Pl(e){var t;let n=null;dTe(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=zje(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function Zz(e){const t=Pl(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function mA(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function cTe(e){return{data:e,error:null}}function uTe(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s}=e,a=W0(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s},l=Object.assign({},a);return{data:{properties:o,user:l},error:null}}function eV(e){return e}function dTe(e){return e.access_token&&e.refresh_token&&e.expires_in}const BP=["global","local","others"];class ATe{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=Use(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,n=BP[0]){if(BP.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${BP.join(", ")}`);try{return await Dt(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Bt(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await Dt(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:mA})}catch(r){if(Bt(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=W0(t,["options"]),i=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(i.new_email=r==null?void 0:r.newEmail,delete i.newEmail),await Dt(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:uTe,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(Bt(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await Dt(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:mA})}catch(n){if(Bt(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,i,s,a,o,l;try{const u={nextPage:null,lastPage:0,total:0},d=await Dt(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(s=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:eV});if(d.error)throw d.error;const A=await d.json(),f=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,h=(l=(o=d.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(p=>{const m=parseInt(p.split(";")[0].split("=")[1].substring(0,1)),g=JSON.parse(p.split(";")[1].split("=")[1]);u[`${g}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},A),u),error:null}}catch(u){if(Bt(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Qm(t);try{return await Dt(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:mA})}catch(n){if(Bt(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){Qm(t);try{return await Dt(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:mA})}catch(r){if(Bt(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){Qm(t);try{return await Dt(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:mA})}catch(r){if(Bt(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){Qm(t.userId);try{const{data:n,error:r}=await Dt(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(Bt(n))return{data:null,error:n};throw n}}async _deleteFactor(t){Qm(t.userId),Qm(t.id);try{return{data:await Dt(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(Bt(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,i,s,a,o,l;try{const u={nextPage:null,lastPage:0,total:0},d=await Dt(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(s=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:eV});if(d.error)throw d.error;const A=await d.json(),f=(a=d.headers.get("x-total-count"))!==null&&a!==void 0?a:0,h=(l=(o=d.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(p=>{const m=parseInt(p.split(";")[0].split("=")[1].substring(0,1)),g=JSON.parse(p.split(";")[1].split("=")[1]);u[`${g}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},A),u),error:null}}catch(u){if(Bt(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await Dt(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Bt(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await Dt(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Bt(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await Dt(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Bt(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await Dt(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Bt(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await Dt(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Bt(n))return{data:null,error:n};throw n}}}function tV(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Hm={debug:!!(globalThis&&Rse()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Dse extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class hTe extends Dse{}async function fTe(e,t,n){Hm.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),Hm.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){Hm.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{Hm.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw Hm.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new hTe(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Hm.debug)try{const s=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null," "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}function pTe(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Qse(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function mTe(e){return parseInt(e,16)}function gTe(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function yTe(e){var t;const{chainId:n,domain:r,expirationTime:i,issuedAt:s=new Date,nonce:a,notBefore:o,requestId:l,resources:u,scheme:d,uri:A,version:f}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!A)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=Qse(e.address),p=d?`${d}://${r}`:r,m=e.statement?`${e.statement}
`:"",g=`${p} wants you to sign in with your Ethereum account:
${h}
${m}`;let y=`URI: ${A}
Version: ${f}
Chain ID: ${n}${a?`
Nonce: ${a}`:""}
Issued At: ${s.toISOString()}`;if(i&&(y+=`
Expiration Time: ${i.toISOString()}`),o&&(y+=`
Not Before: ${o.toISOString()}`),l&&(y+=`
Request ID: ${l}`),u){let v=`
Resources:`;for(const x of u){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);v+=`
- ${x}`}y+=v}return`${g}
${y}`}class yi extends Error{constructor({message:t,code:n,cause:r,name:i}){var s;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(s=i??(r instanceof Error?r.name:void 0))!==null&&s!==void 0?s:"Unknown Error",this.code=n}}class z_ extends yi{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function vTe({error:e,options:t}){var n,r,i;const{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new yi({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=s.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new yi({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=s.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new yi({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=s.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new yi({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new yi({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new yi({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return s.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new yi({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new yi({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const a=window.location.hostname;if(Hse(a)){if(s.rp.id!==a)return new yi({message:`The RP ID "${s.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new yi({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(s.user.id.byteLength<1||s.user.id.byteLength>64)return new yi({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new yi({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new yi({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function xTe({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new yi({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new yi({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(Hse(r)){if(n.rpId!==r)return new yi({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new yi({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new yi({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new yi({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class wTe{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const bTe=new wTe;function CTe(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,i=W0(e,["challenge","user","excludeCredentials"]),s=iy(t).buffer,a=Object.assign(Object.assign({},n),{id:iy(n.id).buffer}),o=Object.assign(Object.assign({},i),{challenge:s,user:a});if(r&&r.length>0){o.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const u=r[l];o.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:iy(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return o}function STe(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=W0(e,["challenge","allowCredentials"]),i=iy(t).buffer,s=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){s.allowCredentials=new Array(n.length);for(let a=0;a<n.length;a++){const o=n[a];s.allowCredentials[a]=Object.assign(Object.assign({},o),{id:iy(o.id).buffer,type:o.type||"public-key",transports:o.transports})}}return s}function BTe(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:Df(new Uint8Array(e.response.attestationObject)),clientDataJSON:Df(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function _Te(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Df(new Uint8Array(i.authenticatorData)),clientDataJSON:Df(new Uint8Array(i.clientDataJSON)),signature:Df(new Uint8Array(i.signature)),userHandle:i.userHandle?Df(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Hse(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function nV(){var e,t;return!!(ls()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function kTe(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new z_("Browser returned unexpected credential type",t)}:{data:null,error:new z_("Empty credential response",t)}}catch(t){return{data:null,error:vTe({error:t,options:e})}}}async function ETe(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new z_("Browser returned unexpected credential type",t)}:{data:null,error:new z_("Empty credential response",t)}}catch(t){return{data:null,error:xTe({error:t,options:e})}}}const NTe={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},jTe={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function V_(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),n=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),r={};for(const i of e)if(i)for(const s in i){const a=i[s];if(a!==void 0)if(Array.isArray(a))r[s]=a;else if(n(a))r[s]=a;else if(t(a)){const o=r[s];t(o)?r[s]=V_(o,a):r[s]=V_(a)}else r[s]=a}return r}function TTe(e,t){return V_(NTe,e,t||{})}function PTe(e,t){return V_(jTe,e,t||{})}class ITe{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:i},s){try{const{data:a,error:o}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!a)return{data:null,error:o};const l=i??bTe.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${r}`),u.displayName||(u.displayName=u.name)}switch(a.webauthn.type){case"create":{const u=TTe(a.webauthn.credential_options.publicKey,s==null?void 0:s.create),{data:d,error:A}=await kTe({publicKey:u,signal:l});return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:A}}case"request":{const u=PTe(a.webauthn.credential_options.publicKey,s==null?void 0:s.request),{data:d,error:A}=await ETe(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:l}));return d?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:A}}}}catch(a){return Bt(a)?{data:null,error:a}:{data:null,error:new jf("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},s){if(!n)return{data:null,error:new Eb("rpId is required for WebAuthn authentication")};try{if(!nV())return{data:null,error:new jf("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:i},{request:s});if(!a)return{data:null,error:o};const{webauthn:l}=a;return this._verify({factorId:t,challengeId:a.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(a){return Bt(a)?{data:null,error:a}:{data:null,error:new jf("Unexpected error in authenticate",a)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},s){if(!n)return{data:null,error:new Eb("rpId is required for WebAuthn registration")};try{if(!nV())return{data:null,error:new jf("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this._enroll({friendlyName:t});if(!a)return await this.client.mfa.listFactors().then(d=>{var A;return(A=d.data)===null||A===void 0?void 0:A.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:o};const{data:l,error:u}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:i},{create:s});return l?this._verify({factorId:a.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(a){return Bt(a)?{data:null,error:a}:{data:null,error:new jf("Unexpected error in register",a)}}}}pTe();const OTe={url:jje,storageKey:Tje,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Pje,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function rV(e,t,n){return await n()}const $m={};class Nb{get jwks(){var t,n;return(n=(t=$m[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){$m[this.storageKey]=Object.assign(Object.assign({},$m[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=$m[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){$m[this.storageKey]=Object.assign(Object.assign({},$m[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const s=Object.assign(Object.assign({},OTe),t);if(this.storageKey=s.storageKey,this.instanceID=(n=Nb.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Nb.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.instanceID>0&&ls()){const a=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=s.persistSession,this.autoRefreshToken=s.autoRefreshToken,this.admin=new ATe({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=Use(s.fetch),this.lock=s.lock||rV,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,this.throwOnError=s.throwOnError,this.lockAcquireTimeout=s.lockAcquireTimeout,s.lock?this.lock=s.lock:this.persistSession&&ls()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=fTe:this.lock=rV,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new ITe(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:Rse()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=tV(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=tV(this.memoryStorage)),ls()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(o){this._debug("#broadcastChannel","error",o)}})}this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Fse}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(ls()&&(n=Kje(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),ls()&&this.detectSessionInUrl&&r!=="none"){const{data:i,error:s}=await this._getSessionFromURL(n,r);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),Lje(s)){const l=(t=s.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:s}}return{error:s}}const{session:a,redirectType:o}=i;return this._debug("#_initialize()","detected session in URL",a,"redirect type",o),await this._saveSession(a),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return Bt(n)?this._returnResult({error:n}):this._returnResult({error:new jf("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{const s=await Dt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Pl}),{data:a,error:o}=s;if(o||!a)return this._returnResult({data:{user:null,session:null},error:o});const l=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(Bt(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signUp(t){var n,r,i;try{let s;if("email"in t){const{email:d,password:A,options:f}=t;let h=null,p=null;this.flowType==="pkce"&&([h,p]=await Dm(this.storage,this.storageKey)),s=await Dt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:A,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:p},xform:Pl})}else if("phone"in t){const{phone:d,password:A,options:f}=t;s=await Dt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:A,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(i=f==null?void 0:f.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Pl})}else throw new KC("You must provide either an email or phone number and a password");const{data:a,error:o}=s;if(o||!a)return await as(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:o});const l=a.session,u=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(await as(this.storage,`${this.storageKey}-code-verifier`),Bt(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithPassword(t){try{let n;if("email"in t){const{email:s,password:a,options:o}=t;n=await Dt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Zz})}else if("phone"in t){const{phone:s,password:a,options:o}=t;n=await Dt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Zz})}else throw new KC("You must provide either an email or phone number and a password");const{data:r,error:i}=n;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!r||!r.session||!r.user){const s=new Um;return this._returnResult({data:{user:null,session:null},error:s})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(Bt(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,i,s;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(s=t.options)===null||s===void 0?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,i,s,a,o,l,u,d,A,f;let h,p;if("message"in t)h=t.message,p=t.signature;else{const{chain:m,wallet:g,statement:y,options:v}=t;let x;if(ls())if(typeof g=="object")x=g;else{const j=window;if("ethereum"in j&&typeof j.ethereum=="object"&&"request"in j.ethereum&&typeof j.ethereum.request=="function")x=j.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof g!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=g}const b=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href),w=await x.request({method:"eth_requestAccounts"}).then(j=>j).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!w||w.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const B=Qse(w[0]);let k=(r=v==null?void 0:v.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!k){const j=await x.request({method:"eth_chainId"});k=mTe(j)}const N={domain:b.host,address:B,statement:y,uri:b.href,version:"1",chainId:k,nonce:(i=v==null?void 0:v.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(a=(s=v==null?void 0:v.signInWithEthereum)===null||s===void 0?void 0:s.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(o=v==null?void 0:v.signInWithEthereum)===null||o===void 0?void 0:o.expirationTime,notBefore:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=v==null?void 0:v.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=v==null?void 0:v.signInWithEthereum)===null||d===void 0?void 0:d.resources};h=yTe(N),p=await x.request({method:"personal_sign",params:[gTe(h),B]})}try{const{data:m,error:g}=await Dt(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:p},!((A=t.options)===null||A===void 0)&&A.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Pl});if(g)throw g;if(!m||!m.session||!m.user){const y=new Um;return this._returnResult({data:{user:null,session:null},error:y})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:g})}catch(m){if(Bt(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var n,r,i,s,a,o,l,u,d,A,f,h;let p,m;if("message"in t)p=t.message,m=t.signature;else{const{chain:g,wallet:y,statement:v,options:x}=t;let b;if(ls())if(typeof y=="object")b=y;else{const B=window;if("solana"in B&&typeof B.solana=="object"&&("signIn"in B.solana&&typeof B.solana.signIn=="function"||"signMessage"in B.solana&&typeof B.solana.signMessage=="function"))b=B.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=y}const w=new URL((n=x==null?void 0:x.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in b&&b.signIn){const B=await b.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:w.host,uri:w.href}),v?{statement:v}:null));let k;if(Array.isArray(B)&&B[0]&&typeof B[0]=="object")k=B[0];else if(B&&typeof B=="object"&&"signedMessage"in B&&"signature"in B)k=B;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)p=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),m=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in b)||typeof b.signMessage!="function"||!("publicKey"in b)||typeof b!="object"||!b.publicKey||!("toBase58"in b.publicKey)||typeof b.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");p=[`${w.host} wants you to sign in with your Solana account:`,b.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${w.href}`,`Issued At: ${(i=(r=x==null?void 0:x.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((s=x==null?void 0:x.signInWithSolana)===null||s===void 0)&&s.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((a=x==null?void 0:x.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((l=x==null?void 0:x.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((u=x==null?void 0:x.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((A=(d=x==null?void 0:x.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||A===void 0)&&A.length?["Resources",...x.signInWithSolana.resources.map(k=>`- ${k}`)]:[]].join(`
`);const B=await b.signMessage(new TextEncoder().encode(p),"utf8");if(!B||!(B instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=B}}try{const{data:g,error:y}=await Dt(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:p,signature:Df(m)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Pl});if(y)throw y;if(!g||!g.session||!g.user){const v=new Um;return this._returnResult({data:{user:null,session:null},error:v})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:y})}catch(g){if(Bt(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async _exchangeCodeForSession(t){const n=await pf(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new Rje;const{data:s,error:a}=await Dt(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Pl});if(await as(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!s||!s.session||!s.user){const o=new Um;return this._returnResult({data:{user:null,session:null,redirectType:null},error:o})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign(Object.assign({},s),{redirectType:i??null}),error:a})}catch(s){if(await as(this.storage,`${this.storageKey}-code-verifier`),Bt(s))return this._returnResult({data:{user:null,session:null,redirectType:null},error:s});throw s}}async signInWithIdToken(t){try{const{options:n,provider:r,token:i,access_token:s,nonce:a}=t,o=await Dt(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:s,nonce:a,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Pl}),{data:l,error:u}=o;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const d=new Um;return this._returnResult({data:{user:null,session:null},error:d})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(n){if(Bt(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,i,s,a;try{if("email"in t){const{email:o,options:l}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await Dm(this.storage,this.storageKey));const{error:A}=await Dt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:A})}if("phone"in t){const{phone:o,options:l}=t,{data:u,error:d}=await Dt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(a=l==null?void 0:l.channel)!==null&&a!==void 0?a:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new KC("You must provide either an email or phone number.")}catch(o){if(await as(this.storage,`${this.storageKey}-code-verifier`),Bt(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async verifyOtp(t){var n,r;try{let i,s;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,s=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:a,error:o}=await Dt(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:s}}),redirectTo:i,xform:Pl});if(o)throw o;if(!a)throw new Error("An error occurred on token verification.");const l=a.session,u=a.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(Bt(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(t){var n,r,i,s,a;try{let o=null,l=null;this.flowType==="pkce"&&([o,l]=await Dm(this.storage,this.storageKey));const u=await Dt(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:l}),headers:this.headers,xform:cTe});return!((s=u.data)===null||s===void 0)&&s.url&&ls()&&!(!((a=t.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(o){if(await as(this.storage,`${this.storageKey}-code-verifier`),Bt(o))return this._returnResult({data:null,error:o});throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new to;const{error:i}=await Dt(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(t){if(Bt(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:i,options:s}=t,{error:a}=await Dt(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},redirectTo:s==null?void 0:s.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}else if("phone"in t){const{phone:r,type:i,options:s}=t,{data:a,error:o}=await Dt(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:o})}throw new KC("You must provide either an email or phone number and a type")}catch(n){if(Bt(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await pf(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<wP:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const a=await pf(this.userStorage,this.storageKey+"-user");a!=null&&a.user?t.user=a.user:t.user=SP()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};t.user=sTe(t.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?this._returnResult({data:{session:null},error:s}):this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await Dt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:mA}):await this._useSession(async n=>{var r,i,s;const{data:a,error:o}=n;if(o)throw o;return!(!((r=a.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new to}:await Dt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(i=a.session)===null||i===void 0?void 0:i.access_token)!==null&&s!==void 0?s:void 0,xform:mA})})}catch(n){if(Bt(n))return bP(n)&&(await this._removeSession(),await as(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:i,error:s}=r;if(s)throw s;if(!i.session)throw new to;const a=i.session;let o=null,l=null;this.flowType==="pkce"&&t.email!=null&&([o,l]=await Dm(this.storage,this.storageKey));const{data:u,error:d}=await Dt(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:o,code_challenge_method:l}),jwt:a.access_token,xform:mA});if(d)throw d;return a.user=u.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(r){if(await as(this.storage,`${this.storageKey}-code-verifier`),Bt(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new to;const n=Date.now()/1e3;let r=n,i=!0,s=null;const{payload:a}=qC(t.access_token);if(a.exp&&(r=a.exp,i=r<=n),i){const{data:o,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!o)return{data:{user:null,session:null},error:null};s=o}else{const{data:o,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});s={access_token:t.access_token,refresh_token:t.refresh_token,user:o.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return this._returnResult({data:{user:s.user,session:s},error:null})}catch(n){if(Bt(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:a,error:o}=n;if(o)throw o;t=(r=a.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new to;const{data:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?this._returnResult({data:{user:null,session:null},error:s}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(Bt(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!ls())throw new WC("No browser detected.");if(t.error||t.error_description||t.error_code)throw new WC(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Kz("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new WC("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Kz("No code detected.");const{data:v,error:x}=await this._exchangeCodeForSession(t.code);if(x)throw x;const b=new URL(window.location.href);return b.searchParams.delete("code"),window.history.replaceState(window.history.state,"",b.toString()),{data:{session:v.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:i,access_token:s,refresh_token:a,expires_in:o,expires_at:l,token_type:u}=t;if(!s||!o||!a||!u)throw new WC("No session defined in URL");const d=Math.round(Date.now()/1e3),A=parseInt(o);let f=d+A;l&&(f=parseInt(l));const h=f-d;h*1e3<=fg&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${A}s`);const p=f-A;d-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,f,d):d-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",p,f,d);const{data:m,error:g}=await this._getUser(s);if(g)throw g;const y={provider_token:r,provider_refresh_token:i,access_token:s,expires_in:A,expires_at:f,refresh_token:a,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:y,redirectType:t.type},error:null})}catch(r){if(Bt(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await pf(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:i,error:s}=n;if(s&&!bP(s))return this._returnResult({error:s});const a=(r=i.session)===null||r===void 0?void 0:r.access_token;if(a){const{error:o}=await this.admin.signOut(a,t);if(o&&!(Mje(o)&&(o.status===404||o.status===401||o.status===403)||bP(o)))return this._returnResult({error:o})}return t!=="others"&&(await this._removeSession(),await as(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=Vje(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,i;try{const{data:{session:s},error:a}=n;if(a)throw a;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",t,"session",s)}catch(s){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",s),console.error(s)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await Dm(this.storage,this.storageKey,!0));try{return await Dt(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(s){if(await as(this.storage,`${this.storageKey}-code-verifier`),Bt(s))return this._returnResult({data:null,error:s});throw s}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(Bt(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:i}=await this._useSession(async s=>{var a,o,l,u,d;const{data:A,error:f}=s;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(o=t.options)===null||o===void 0?void 0:o.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await Dt(this.fetch,"GET",h,{headers:this.headers,jwt:(d=(u=A.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(i)throw i;return ls()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(Bt(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:i,data:{session:s}}=n;if(i)throw i;const{options:a,provider:o,token:l,access_token:u,nonce:d}=t,A=await Dt(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=s==null?void 0:s.access_token)!==null&&r!==void 0?r:void 0,body:{provider:o,id_token:l,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Pl}),{data:f,error:h}=A;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Um}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(i){if(await as(this.storage,`${this.storageKey}-code-verifier`),Bt(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:a}=n;if(a)throw a;return await Dt(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(Bt(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await Gje(async i=>(i>0&&await qje(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await Dt(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Pl})),(i,s)=>{const a=200*Math.pow(2,i);return s&&CP(s)&&Date.now()+a-r<fg})}catch(r){if(this._debug(n,"error",r),Bt(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),ls()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const i=await pf(this.storage,this.storageKey);if(i&&this.userStorage){let a=await pf(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:i.user},await pg(this.userStorage,this.storageKey+"-user",a)),i.user=(t=a==null?void 0:a.user)!==null&&t!==void 0?t:SP()}else if(i&&!i.user&&!i.user){const a=await pf(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(i.user=a.user,await as(this.storage,this.storageKey+"-user"),await pg(this.storage,this.storageKey,i)):i.user=SP()}if(this._debug(r,"session from storage",i),!this._isValidSession(i)){this._debug(r,"session is not valid"),i!==null&&await this._removeSession();return}const s=((n=i.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<wP;if(this._debug(r,`session has${s?"":" not"} expired with margin of ${wP}s`),s){if(this.autoRefreshToken&&i.refresh_token){const{error:a}=await this._callRefreshToken(i.refresh_token);a&&(console.error(a),CP(a)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",a),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:o}=await this._getUser(i.access_token);!o&&(a!=null&&a.user)?(i.user=a.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(r,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(r,"error",i),console.error(i);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new to;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new qN;const{data:s,error:a}=await this._refreshAccessToken(t);if(a)throw a;if(!s.session)throw new to;await this._saveSession(s.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",s.session);const o={data:s.session,error:null};return this.refreshingDeferred.resolve(o),o}catch(s){if(this._debug(i,"error",s),Bt(s)){const a={data:null,error:s};return CP(s)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(a),a}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(s),s}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,n,r=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const s=[],a=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(t,n)}catch(l){s.push(l)}});if(await Promise.all(a),s.length>0){for(let o=0;o<s.length;o+=1)console.error(s[o]);throw s[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await as(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await pg(this.userStorage,this.storageKey+"-user",{user:n.user});const i=Object.assign({},n);delete i.user;const s=Xz(i);await pg(this.storage,this.storageKey,s)}else{const i=Xz(n);await pg(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await as(this.storage,this.storageKey),await as(this.storage,this.storageKey+"-code-verifier"),await as(this.storage,this.storageKey+"-user"),this.userStorage&&await as(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&ls()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),fg);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-t)/fg);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${fg}ms, refresh threshold is ${X3} ticks`),i<=X3&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof Dse)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!ls()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[s,a]=await Dm(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(a)}`});i.push(o.toString())}if(r!=null&&r.queryParams){const s=new URLSearchParams(r.queryParams);i.push(s.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;return s?this._returnResult({data:null,error:s}):await Dt(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(Bt(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:a}=n;if(a)return this._returnResult({data:null,error:a});const o=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await Dt(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&l.type==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(Bt(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;if(s)return this._returnResult({data:null,error:s});const a=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?BTe(t.webauthn.credential_response):_Te(t.webauthn.credential_response)})}:{code:t.code}),{data:o,error:l}=await Dt(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),this._returnResult({data:o,error:l}))})}catch(n){if(Bt(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;if(s)return this._returnResult({data:null,error:s});const a=await Dt(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});if(a.error)return a;const{data:o}=a;if(o.type!=="webauthn")return{data:o,error:null};switch(o.webauthn.type){case"create":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:CTe(o.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:STe(o.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(Bt(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const i={all:[],phone:[],totp:[],webauthn:[]};for(const s of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])i.all.push(s),s.status==="verified"&&i[s.factor_type].push(s);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,i,s;if(t)try{const{payload:h}=qC(t);let p=null;h.aal&&(p=h.aal);let m=p;const{data:{user:g},error:y}=await this.getUser(t);if(y)return this._returnResult({data:null,error:y});((r=(n=g==null?void 0:g.factors)===null||n===void 0?void 0:n.filter(b=>b.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const x=h.amr||[];return{data:{currentLevel:p,nextLevel:m,currentAuthenticationMethods:x},error:null}}catch(h){if(Bt(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:a},error:o}=await this.getSession();if(o)return this._returnResult({data:null,error:o});if(!a)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=qC(a.access_token);let u=null;l.aal&&(u=l.aal);let d=u;((s=(i=a.user.factors)===null||i===void 0?void 0:i.filter(h=>h.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(d="aal2");const f=l.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?await Dt(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new to})})}catch(n){if(Bt(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:i},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new to});const a=await Dt(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&ls()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if(Bt(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:i},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new to});const a=await Dt(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&ls()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if(Bt(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await Dt(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new to})})}catch(t){if(Bt(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?(await Dt(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new to})})}catch(n){if(Bt(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(o=>o.kid===t);if(r)return r;const i=Date.now();if(r=this.jwks.keys.find(o=>o.kid===t),r&&this.jwks_cached_at+Oje>i)return r;const{data:s,error:a}=await Dt(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!s.keys||s.keys.length===0||(this.jwks=s,this.jwks_cached_at=i,r=s.keys.find(o=>o.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:h,error:p}=await this.getSession();if(p||!h.session)return this._returnResult({data:null,error:p});r=h.session.access_token}const{header:i,payload:s,signature:a,raw:{header:o,payload:l}}=qC(r);n!=null&&n.allowExpired||nTe(s.exp);const u=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:h}=await this.getUser(r);if(h)throw h;return{data:{claims:s,header:i,signature:a},error:null}}const d=rTe(i.alg),A=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,A,a,$je(`${o}.${l}`)))throw new eF("Invalid JWT signature");return{data:{claims:s,header:i,signature:a},error:null}}catch(r){if(Bt(r))return this._returnResult({data:null,error:r});throw r}}}Nb.nextInstanceID={};const FTe=Nb,MTe="2.93.2";let Mx="";typeof Deno<"u"?Mx="deno":typeof document<"u"?Mx="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Mx="react-native":Mx="node";const LTe={"X-Client-Info":`supabase-js-${Mx}/${MTe}`},RTe={headers:LTe},UTe={schema:"public"},DTe={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},QTe={};function jb(e){"@babel/helpers - typeof";return jb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jb(e)}function HTe(e,t){if(jb(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(jb(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $Te(e){var t=HTe(e,"string");return jb(t)=="symbol"?t:t+""}function zTe(e,t,n){return(t=$Te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iV(Object(n),!0).forEach(function(r){zTe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const VTe=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),KTe=()=>Headers,WTe=(e,t,n)=>{const r=VTe(n),i=KTe();return async(s,a)=>{var o;const l=(o=await t())!==null&&o!==void 0?o:e;let u=new i(a==null?void 0:a.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(s,Kr(Kr({},a),{},{headers:u}))}};function qTe(e){return e.endsWith("/")?e:e+"/"}function GTe(e,t){var n,r;const{db:i,auth:s,realtime:a,global:o}=e,{db:l,auth:u,realtime:d,global:A}=t,f={db:Kr(Kr({},l),i),auth:Kr(Kr({},u),s),realtime:Kr(Kr({},d),a),storage:{},global:Kr(Kr(Kr({},A),o),{},{headers:Kr(Kr({},(n=A==null?void 0:A.headers)!==null&&n!==void 0?n:{}),(r=o==null?void 0:o.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function YTe(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(qTe(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var XTe=class extends FTe{constructor(e){super(e)}},JTe=class{constructor(e,t,n){var r,i;this.supabaseUrl=e,this.supabaseKey=t;const s=YTe(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",s),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",s),this.storageUrl=new URL("storage/v1",s),this.functionsUrl=new URL("functions/v1",s);const a=`sb-${s.hostname.split(".")[0]}-auth-token`,o={db:UTe,realtime:QTe,auth:Kr(Kr({},DTe),{},{storageKey:a}),global:RTe},l=GTe(n??{},o);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(i=l.global.headers)!==null&&i!==void 0?i:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(d,A)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(A)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=WTe(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Kr({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new F5e(new URL("rest/v1",s).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),this.storage=new Nje(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new j5e(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:s,flowType:a,lock:o,debug:l,throwOnError:u},d,A){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new XTe({url:this.authUrl.href,headers:Kr(Kr({},f),d),storageKey:s,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:a,lock:o,debug:l,throwOnError:u,fetch:A,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new J5e(this.realtimeUrl.href,Kr(Kr({},e),{},{params:Kr(Kr({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const ZTe=(e,t,n)=>new JTe(e,t,n);function ePe(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}ePe()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const tPe="https://khmmwvmdbhaplcfcndjx.supabase.co",nPe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtobW13dm1kYmhhcGxjZmNuZGp4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzcwNTQ1MDcsImV4cCI6MjA5MjYzMDUwN30.c5aUVQ4shbnMOIIkDZRP7geMUb64HPKYg4jQFuBH52Q",Re=ZTe(tPe,nPe,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}});function $se(){return Lr({queryKey:["nav-categories"],queryFn:async()=>{const{data:e,error:t}=await Re.from("aeo_categories").select("id, name, slug, icon, display_order").eq("enabled",!0).is("parent_id",null).order("display_order");if(t)throw t;const n=new Set(["buyers","sellers","about"]);return e.filter(i=>!n.has(i.slug.toLowerCase().trim()))},staleTime:1e3*60*5})}const sV="/wordmark-compact-on-dark-transparent.svg",rPe=new Set(["buyers","sellers","about"]),_P=({label:e,items:t,align:n="center",widthClassName:r="min-w-[250px]",isActive:i,onNavigate:s})=>{const[a,o]=S.useState(!1),l=S.useRef(),u=S.useRef(null),d=n==="start"?"left-0":n==="end"?"right-0":"left-1/2 -translate-x-1/2",A=()=>{clearTimeout(l.current),o(!0)},f=()=>{l.current=setTimeout(()=>o(!1),150)};return c.jsxs("div",{ref:u,className:"relative",onMouseEnter:A,onMouseLeave:f,children:[c.jsxs("button",{className:"flex h-10 items-center gap-1.5 px-3 text-[11px] font-medium uppercase tracking-[0.2em] text-primary-foreground/75 transition-all duration-300 hover:bg-primary-foreground/[0.06] hover:text-primary-foreground",onClick:()=>o(h=>!h),children:[e,c.jsx(Gc,{size:11,className:`text-primary-foreground/40 transition-transform duration-200 ${a?"rotate-180":""}`})]}),c.jsx(ry,{children:a&&c.jsxs(ri.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.2,ease:[.22,1,.36,1]},className:`absolute top-full z-[70] ${d} ${r}`,children:[c.jsx("div",{className:"h-3"}),c.jsxs("div",{className:"overflow-hidden border border-primary-foreground/[0.08]",style:{background:"hsl(var(--primary) / 0.96)",backdropFilter:"blur(40px) saturate(1.4)",WebkitBackdropFilter:"blur(40px) saturate(1.4)",boxShadow:"0 8px 32px hsl(var(--primary) / 0.45), inset 0 1px 0 hsl(var(--primary-foreground) / 0.06)"},children:[c.jsx("div",{className:"h-px bg-gradient-to-r from-transparent via-gold/60 to-transparent"}),c.jsx("div",{className:"p-2",children:t.map(h=>c.jsx(Tt,{to:h.href,onClick:()=>{o(!1),s()},className:`flex min-h-[40px] items-center px-3.5 py-2.5 text-[11px] font-medium uppercase tracking-[0.18em] transition-colors duration-150 ${i(h.href)?"text-gold bg-primary-foreground/[0.04]":"text-primary-foreground/80 hover:bg-primary-foreground/[0.06] hover:text-primary-foreground"}`,children:h.name},h.href))})]})]})})]})},SD=()=>{const[e,t]=S.useState(!1),[n,r]=S.useState(null),[i,s]=S.useState(!1),a=S.useRef(null),o=ml(),{data:l}=$se(),u=l==null?void 0:l.find(x=>x.slug.toLowerCase()==="neighborhoods"),{data:d}=Lr({queryKey:["nav-neighborhood-pages",u==null?void 0:u.id],enabled:!!u,queryFn:async()=>{const{data:x,error:b}=await Re.from("aeo_pages").select("id, title, slug, h1, display_order").eq("category_id",u.id).eq("status","published").eq("is_parent",!0).order("display_order");if(b)throw b;return x},staleTime:1e3*60*5}),A=S.useMemo(()=>(l||[]).filter(x=>!rPe.has(x.slug.toLowerCase().trim())).filter(x=>x.slug.toLowerCase()!=="neighborhoods").map(x=>({name:x.name,href:`/${x.slug}`})),[l]),f=S.useMemo(()=>{if(!u)return null;const x=(d||[]).map(b=>({name:b.h1||b.title,href:`/neighborhoods/${b.slug}`}));return{name:"Neighborhoods",href:"/neighborhoods",children:x.length>0?x:void 0}},[u,d]),h=S.useMemo(()=>[{name:"Buyers",href:"/buyers"},{name:"Sellers",href:"/sellers"},...A],[A]),p=S.useMemo(()=>[...f?[{name:"Neighborhoods",href:"/neighborhoods"}]:[],{name:"Search Homes",href:"/idx"},{name:"Market Pulse",href:"/market-pulse/49506"}],[f]),m=[{name:"About Holden",href:"/about"},{name:"Testimonials",href:"/about/testimonials"},{name:"News",href:"/about/news"},{name:"Contact",href:"/contact"}],g=S.useMemo(()=>[{label:"Home",items:[{name:"Home",href:"/"}]},{label:"Buying & Selling",items:[{name:"Buyers",href:"/buyers"},{name:"Sellers",href:"/sellers"},...A]},{label:"Explore",items:[...f?[f]:[],{name:"Search Homes",href:"/idx"},{name:"Market Pulse",href:"/market-pulse/49506"}]},{label:"About",items:[{name:"About Holden",href:"/about"},{name:"Testimonials",href:"/about/testimonials"},{name:"News",href:"/about/news"},{name:"Contact",href:"/contact"}]}],[A,f]);S.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),S.useEffect(()=>{const x=()=>s(window.scrollY>40);return window.addEventListener("scroll",x,{passive:!0}),()=>window.removeEventListener("scroll",x)},[]),S.useEffect(()=>{t(!1),r(null)},[o.pathname]);const y=x=>o.pathname===x,v=x=>{r(b=>b===x?null:x)};return c.jsxs(c.Fragment,{children:[c.jsxs("header",{ref:a,className:"fixed top-0 left-0 right-0 z-50 transition-all duration-500",style:{background:i?"hsl(var(--primary) / 0.94)":"hsl(var(--primary) / 0.78)",backdropFilter:"blur(28px) saturate(1.3)",WebkitBackdropFilter:"blur(28px) saturate(1.3)",boxShadow:i?"0 8px 32px hsl(var(--primary) / 0.4)":"none",borderBottom:`1px solid hsl(var(--primary-foreground) / ${i?"0.08":"0.04"})`},children:[c.jsx("nav",{className:"w-full px-3 md:px-6",children:c.jsxs("div",{className:"flex items-center justify-between h-20",children:[c.jsx(Tt,{to:"/",className:"shrink-0 relative z-[60] group",children:c.jsx("img",{src:sV,alt:"HoldenGR — Grand Rapids Area Real Estate",className:"h-8 lg:h-10 w-auto max-w-[220px] lg:max-w-[280px] object-contain transition-all duration-500 group-hover:opacity-90"})}),c.jsxs("div",{className:"hidden lg:flex items-center gap-6 xl:gap-8",children:[c.jsx(_P,{label:"Buying & Selling",items:h,align:"start",widthClassName:"w-[280px]",isActive:y,onNavigate:()=>{}}),c.jsx(_P,{label:"Explore",items:p,align:"center",widthClassName:"w-[230px]",isActive:y,onNavigate:()=>{}}),c.jsx(_P,{label:"About",items:m,align:"end",widthClassName:"w-[240px]",isActive:y,onNavigate:()=>{}}),c.jsxs("a",{href:"sms:6164036393",className:"flex items-center gap-2 ml-2 px-4 py-2 border border-gold/60 text-gold hover:bg-gold hover:text-primary transition-all duration-300 group",children:[c.jsx(VO,{size:14,className:"group-hover:scale-110 transition-transform"}),c.jsx("span",{className:"text-[10px] uppercase tracking-[0.2em] font-medium",children:"Text Holden"})]}),c.jsx("button",{onClick:()=>t(!e),className:"relative z-[60] p-2 text-primary-foreground/80 hover:text-gold transition-colors duration-300","aria-label":"Toggle menu",children:e?c.jsx(Da,{size:24}):c.jsx(O8,{size:24})})]}),c.jsxs("div",{className:"flex lg:hidden items-center gap-3",children:[c.jsxs("a",{href:"sms:6164036393",className:"flex items-center gap-1.5 px-3 py-1.5 border border-gold/60 text-gold",children:[c.jsx(VO,{size:12}),c.jsx("span",{className:"text-[9px] uppercase tracking-[0.15em] font-medium",children:"Text Holden"})]}),c.jsx("button",{onClick:()=>t(!e),className:"relative z-[60] p-2 text-primary-foreground/80 hover:text-gold transition-colors duration-300","aria-label":"Toggle menu",children:e?c.jsx(Da,{size:24}):c.jsx(O8,{size:24})})]})]})}),c.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-gold/70 to-transparent"})]}),Ph.createPortal(c.jsx(ry,{children:e&&c.jsxs(ri.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5,ease:[.22,1,.36,1]},className:"fixed inset-0 z-[9999] flex flex-col",children:[c.jsxs(ri.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},className:"absolute inset-0",style:{background:"hsl(var(--primary) / 0.86)",backdropFilter:"blur(32px) saturate(1.5)",WebkitBackdropFilter:"blur(32px) saturate(1.5)"},children:[c.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-white/[0.04] via-transparent to-black/25"}),c.jsx("div",{className:"absolute inset-[1px] border border-white/[0.06] pointer-events-none"}),c.jsx("div",{className:"absolute top-0 left-0 right-0 h-32 bg-gradient-to-b from-gold/[0.04] to-transparent pointer-events-none"})]}),c.jsx("button",{onClick:()=>t(!1),className:"absolute top-6 right-6 md:top-8 md:right-12 lg:right-16 text-white/50 hover:text-white p-2 transition-colors duration-300 z-10",children:c.jsx(Da,{size:22})}),c.jsx("div",{className:"relative w-full h-20 md:h-24 flex items-center px-6 md:px-12 shrink-0",children:c.jsx(Tt,{to:"/",onClick:()=>t(!1),className:"flex items-center",children:c.jsx("img",{src:sV,alt:"HoldenGR",className:"h-12 md:h-14 w-auto"})})}),c.jsx("div",{className:"relative px-6 md:px-12",children:c.jsx("div",{className:"h-px bg-gradient-to-r from-gold/40 via-gold/20 to-transparent"})}),c.jsx("div",{className:"relative flex-1 overflow-y-auto min-h-0",children:c.jsxs("div",{className:"max-w-7xl mx-auto w-full px-6 md:px-12 py-6 md:py-10",children:[c.jsxs("div",{className:"hidden lg:flex gap-16",children:[c.jsx("nav",{className:"flex-1 flex flex-col gap-8",children:g.map((x,b)=>c.jsxs("div",{children:[c.jsx(ri.p,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.1+b*.06,duration:.4},className:"text-[9px] uppercase tracking-[0.35em] font-semibold text-gold/60 mb-4",children:x.label}),c.jsx("div",{className:"flex flex-col gap-0.5",children:x.items.map((w,B)=>c.jsx(ri.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.15+b*.06+B*.03,duration:.4,ease:[.22,1,.36,1]},children:w.children?c.jsxs("button",{onClick:()=>v(w.name),className:`group flex items-center gap-2 py-2.5 transition-colors duration-300 w-full text-left ${n===w.name?"text-gold":"text-white/70 hover:text-white"}`,children:[c.jsx("span",{className:"text-[13px] uppercase tracking-[0.25em] font-medium",children:w.name}),c.jsx(Ju,{size:14,className:`transition-transform duration-300 text-gold/50 ${n===w.name?"rotate-90":""}`})]}):c.jsx(Tt,{to:w.href,onClick:()=>t(!1),className:`group flex items-center py-2.5 transition-colors duration-300 ${y(w.href)?"text-gold":"text-white/70 hover:text-white"}`,children:c.jsx("span",{className:"text-[13px] uppercase tracking-[0.25em] font-medium",children:w.name})})},w.name+w.href))}),b<g.length-1&&c.jsx("div",{className:"mt-5 h-px bg-gradient-to-r from-white/[0.06] via-white/[0.03] to-transparent"})]},x.label))}),c.jsx(ry,{mode:"wait",children:n&&c.jsxs(ri.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.3,ease:[.22,1,.36,1]},className:"w-72 pt-8",children:[c.jsx("p",{className:"text-[9px] uppercase tracking-[0.35em] font-semibold text-gold/50 mb-4",children:n}),c.jsx("div",{className:"flex flex-col gap-0.5",children:g.flatMap(x=>x.items).filter(x=>x.name===n&&x.children).map(x=>c.jsxs("div",{children:[c.jsx(Tt,{to:x.href,onClick:()=>t(!1),className:`flex items-center py-2 transition-colors duration-300 ${y(x.href)?"text-gold":"text-white/50 hover:text-white/80"}`,children:c.jsxs("span",{className:"text-[11px] uppercase tracking-[0.2em] font-medium",children:["View All ",x.name]})}),c.jsx("div",{className:"h-px bg-white/[0.04] my-2"}),x.children.map((b,w)=>c.jsx(ri.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:w*.03,duration:.3},children:c.jsx(Tt,{to:b.href,onClick:()=>t(!1),className:`flex items-center py-2 transition-colors duration-300 ${y(b.href)?"text-gold":"text-white/60 hover:text-white"}`,children:c.jsx("span",{className:"text-[12px] uppercase tracking-[0.15em] font-medium",children:b.name})})},b.href))]},x.href))})]},n)})]}),c.jsx("nav",{className:"lg:hidden flex flex-col gap-6",children:g.map((x,b)=>c.jsxs("div",{children:[c.jsx(ri.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1+b*.06,duration:.4},className:"text-[9px] uppercase tracking-[0.35em] font-semibold text-gold/60 mb-3",children:x.label}),c.jsx("div",{className:"flex flex-col",children:x.items.map((w,B)=>c.jsx(ri.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.12+b*.06+B*.03,duration:.4,ease:[.22,1,.36,1]},children:w.children?c.jsxs(c.Fragment,{children:[c.jsxs("button",{onClick:()=>v(w.name),className:`group flex items-center gap-2 py-2 transition-colors duration-300 w-full text-left ${n===w.name?"text-gold":"text-white/70 hover:text-white"}`,children:[c.jsx("span",{className:"text-[11px] uppercase tracking-[0.25em] font-medium",children:w.name}),c.jsx(Ju,{size:13,className:`transition-transform duration-300 text-gold/50 ${n===w.name?"rotate-90":""}`})]}),c.jsx(ry,{children:n===w.name&&c.jsxs(ri.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25},className:"overflow-hidden pl-4 border-l border-gold/20",children:[c.jsx(Tt,{to:w.href,onClick:()=>t(!1),className:"flex items-center py-1.5 text-white/40 hover:text-white/70 transition-colors",children:c.jsx("span",{className:"text-[10px] uppercase tracking-[0.2em] font-medium",children:"View All"})}),w.children.map(k=>c.jsx(Tt,{to:k.href,onClick:()=>t(!1),className:`flex items-center py-1.5 transition-colors duration-300 ${y(k.href)?"text-gold":"text-white/55 hover:text-white"}`,children:c.jsx("span",{className:"text-[10px] uppercase tracking-[0.15em] font-medium",children:k.name})},k.href))]})})]}):c.jsx(Tt,{to:w.href,onClick:()=>t(!1),className:`group flex items-center py-2 transition-colors duration-300 ${y(w.href)?"text-gold":"text-white/70 hover:text-white"}`,children:c.jsx("span",{className:"text-[11px] uppercase tracking-[0.25em] font-medium",children:w.name})})},w.name+w.href))}),b<g.length-1&&c.jsx("div",{className:"mt-4 h-px bg-gradient-to-r from-white/[0.06] via-white/[0.03] to-transparent"})]},x.label))})]})}),c.jsx(ri.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.6,duration:.5},className:"relative shrink-0 border-t border-white/[0.08]",children:c.jsx("div",{className:"max-w-7xl mx-auto w-full px-6 md:px-12 py-5",children:c.jsxs("div",{className:"flex flex-row items-center gap-8 md:gap-12",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-[9px] uppercase tracking-[0.3em] font-medium text-white/25 mb-1",children:"Phone"}),c.jsx("a",{href:"tel:6164036393",className:"text-white/50 hover:text-white text-sm font-light tracking-wide transition-colors",children:"(616) 403-6393"})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-[9px] uppercase tracking-[0.3em] font-medium text-white/25 mb-1",children:"Email"}),c.jsx("a",{href:"mailto:holden@holdengr.com",className:"text-white/50 hover:text-white text-sm font-light tracking-wide transition-colors",children:"holden@holdengr.com"})]})]})})})]})}),document.body)]})},zse="/assets/agent-portrait-DcetkHNl.jpg",iPe="/assets/eho-realtor-logo-NaFA1neB.jpg";function sPe(){return Lr({queryKey:["site-config"],queryFn:async()=>{const{data:e,error:t}=await Re.from("site_config").select("*").order("key");if(t)throw t;return e}})}function _o(){const e=sPe(),t=(e.data||[]).reduce((n,r)=>(n[r.key]=r.value||"",n),{});return{...e,configMap:t}}function Vse(){const e=Ji();return bs({mutationFn:async t=>{const{error:n}=await Re.from("site_config").upsert(t,{onConflict:"key"});if(n)throw n},onSuccess:()=>e.invalidateQueries({queryKey:["site-config"]})})}const aPe=()=>c.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"w-[22px] h-[22px]",children:c.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-2.88 2.5 2.89 2.89 0 0 1-2.89-2.89 2.89 2.89 0 0 1 2.89-2.89c.28 0 .54.04.79.1V9.01a6.27 6.27 0 0 0-.79-.05 6.34 6.34 0 0 0-6.34 6.34 6.34 6.34 0 0 0 6.34 6.34 6.34 6.34 0 0 0 6.34-6.34V8.73a8.19 8.19 0 0 0 4.76 1.52V6.81a4.83 4.83 0 0 1-1-.12z"})}),oPe=()=>c.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"w-[22px] h-[22px]",children:c.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),lPe=()=>c.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"w-[22px] h-[22px]",children:c.jsx("path",{d:"M12 1.5C6.202 1.5 1.5 6.202 1.5 12S6.202 22.5 12 22.5 22.5 17.798 22.5 12 17.798 1.5 12 1.5zm5.836 11.1l-5.54 5.232a.45.45 0 0 1-.592 0L6.164 12.6a.45.45 0 0 1 .296-.792h3.24V7.5a.45.45 0 0 1 .45-.45h3.7a.45.45 0 0 1 .45.45v4.308h3.24a.45.45 0 0 1 .296.792z"})}),cPe=()=>c.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"w-[22px] h-[22px]",children:c.jsx("path",{d:"M12 2L3 9v12a1 1 0 001 1h5a1 1 0 001-1v-5a2 2 0 014 0v5a1 1 0 001 1h5a1 1 0 001-1V9l-9-7z"})}),uPe=[{key:"about_website",label:"Website",icon:c.jsx(t2,{className:"w-[22px] h-[22px]"}),hoverColor:"#D4AF37"},{key:"about_google_business",label:"Google",icon:c.jsx(Ab,{className:"w-[22px] h-[22px]"}),hoverColor:"#4285F4"},{key:"about_facebook",label:"Facebook",icon:c.jsx(ibe,{className:"w-[22px] h-[22px]"}),hoverColor:"#1877F2"},{key:"about_instagram",label:"Instagram",icon:c.jsx(zO,{className:"w-[22px] h-[22px]"}),hoverColor:"#E1306C",hoverStyle:{background:"linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}},{key:"about_linkedin",label:"LinkedIn",icon:c.jsx(mbe,{className:"w-[22px] h-[22px]"}),hoverColor:"#0A66C2"},{key:"about_youtube",label:"YouTube",icon:c.jsx(Nne,{className:"w-[22px] h-[22px]"}),hoverColor:"#FF0000"},{key:"about_x",label:"X",icon:c.jsx(oPe,{}),hoverColor:"#FFFFFF"},{key:"about_tiktok",label:"TikTok",icon:c.jsx(aPe,{}),hoverColor:"#00F2EA"},{key:"about_zillow",label:"Zillow",icon:c.jsx(lPe,{}),hoverColor:"#006AFF"},{key:"about_realtor",label:"Realtor",icon:c.jsx(cPe,{}),hoverColor:"#D92228"}],dPe=()=>{const{configMap:e,isLoading:t}=_o(),[n,r]=S.useState(null);if(t)return null;const i=uPe.filter(s=>e[s.key]);return i.length===0?null:c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"h-px bg-gradient-to-r from-transparent via-accent/50 to-transparent"}),c.jsx("div",{className:"py-8 md:py-10",children:c.jsxs("div",{className:"flex flex-col items-center gap-6",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:"w-10 h-px bg-accent/30"}),c.jsx("span",{className:"text-[10px] tracking-[0.3em] uppercase text-primary-foreground/35 font-medium",children:"Find Me On"}),c.jsx("div",{className:"w-10 h-px bg-accent/30"})]}),c.jsx("div",{className:"flex items-center gap-3 md:gap-5 flex-wrap justify-center",children:i.map(s=>{const a=n===s.key;return c.jsxs("a",{href:e[s.key],target:"_blank",rel:"noopener noreferrer",className:"group flex flex-col items-center gap-2 transition-all duration-300","aria-label":s.label,onMouseEnter:()=>r(s.key),onMouseLeave:()=>r(null),children:[c.jsx("span",{className:"flex items-center justify-center w-12 h-12 rounded-full transition-all duration-300",style:{color:a?s.hoverColor:"hsl(var(--primary-foreground) / 0.45)",backgroundColor:a?`${s.hoverColor}15`:"transparent",transform:a?"translateY(-3px) scale(1.1)":"translateY(0) scale(1)",...a&&s.hoverStyle?s.hoverStyle:{}},children:s.icon}),c.jsx("span",{className:"text-[9px] tracking-[0.2em] uppercase font-medium transition-all duration-300",style:{color:a?s.hoverColor:"hsl(var(--primary-foreground) / 0.25)",opacity:a?1:.7},children:s.label})]},s.key)})})]})}),c.jsx("div",{className:"h-px bg-gradient-to-r from-transparent via-accent/50 to-transparent"})]})},APe="/wordmark-on-dark-transparent.svg",hPe=[{name:"Search Homes",href:"/idx"},{name:"Market Pulse",href:"/market-pulse/49506"},{name:"Buyers",href:"/buyers"},{name:"Sellers",href:"/sellers"},{name:"About",href:"/about"},{name:"Contact",href:"/contact"}],fPe=new Set(["buyers","sellers","about"]),Kse=()=>{const{data:e}=$se(),t=(e||[]).filter(r=>!fPe.has(r.slug.toLowerCase().trim())).map(r=>({name:r.name,href:`/${r.slug}`})),n=[...hPe,...t];return c.jsxs("footer",{className:"bg-primary text-primary-foreground",children:[c.jsx(dPe,{}),c.jsx("div",{className:"h-px bg-gradient-to-r from-transparent via-accent/20 to-transparent"}),c.jsx("div",{className:"py-12 md:py-16",children:c.jsxs("div",{className:"container-page",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-12 gap-8 md:gap-6",children:[c.jsxs("div",{className:"md:col-span-4",children:[c.jsxs("div",{className:"flex items-center gap-4 mb-5",children:[c.jsx("img",{src:zse,alt:"Holden Richardson",className:"w-14 h-14 rounded-full object-cover object-top border-2 border-accent/30 shrink-0"}),c.jsx("img",{src:APe,alt:"@HoldenGR",className:"h-8 w-auto"})]}),c.jsx("p",{className:"text-primary-foreground/45 text-[13px] leading-[1.7] max-w-sm",children:"Holden Richardson of 616 Realty LLC specializes in residential properties across the Grand Rapids area's most sought-after communities."})]}),c.jsxs("div",{className:"md:col-span-2",children:[c.jsx("h4",{className:"text-[10px] uppercase tracking-[0.25em] text-accent/50 mb-4 font-medium",children:"Quick Links"}),c.jsx("ul",{className:"space-y-2",children:n.map(r=>c.jsx("li",{children:c.jsx(Tt,{to:r.href,className:"text-[13px] text-primary-foreground/45 hover:text-accent transition-colors duration-300",children:r.name})},r.href))})]}),c.jsxs("div",{className:"md:col-span-3",children:[c.jsx("h4",{className:"text-[10px] uppercase tracking-[0.25em] text-accent/50 mb-4 font-medium",children:"Contact"}),c.jsxs("ul",{className:"space-y-1.5 text-[13px] text-primary-foreground/45",children:[c.jsx("li",{children:c.jsx("a",{href:"tel:+16164036393",className:"hover:text-accent transition-colors",children:"(616) 403-6393"})}),c.jsx("li",{children:c.jsx("a",{href:"mailto:holden@holdengr.com",className:"hover:text-accent transition-colors",children:"holden@holdengr.com"})}),c.jsx("li",{className:"text-primary-foreground/30 text-[11px] pt-1",children:"License #6501392389"})]}),c.jsx("h4",{className:"text-[10px] uppercase tracking-[0.25em] text-accent/50 mt-6 mb-3 font-medium",children:"Brokerage"}),c.jsxs("ul",{className:"space-y-1 text-[13px] text-primary-foreground/45",children:[c.jsx("li",{className:"font-medium text-primary-foreground/55",children:"616 Realty LLC"}),c.jsx("li",{children:"1171 Plainfield Ave NE"}),c.jsx("li",{children:"Grand Rapids, MI 49503"}),c.jsx("li",{children:"(616) 272-3707"})]})]}),c.jsxs("div",{className:"md:col-span-3",children:[c.jsx("div",{className:"bg-primary-foreground/10 rounded p-2 w-fit mb-4",children:c.jsx("img",{src:iPe,alt:"Equal Housing Opportunity & Realtor",className:"h-10 w-auto"})}),c.jsx("p",{className:"text-[11px] text-primary-foreground/30 leading-relaxed mb-4",children:"We are committed to the letter and spirit of U.S. policy for equal housing opportunity. We support an affirmative marketing program with no barriers to housing because of race, color, religion, sex, handicap, familial status, or national origin."}),c.jsx("p",{className:"text-[11px] text-primary-foreground/30 leading-relaxed",children:"Information provided is for general purposes only. Listing data is sourced from third parties and may not reflect real-time availability or pricing. Always verify details independently."})]})]}),c.jsxs("div",{className:"border-t border-primary-foreground/[0.06] mt-10 pt-6 flex flex-col md:flex-row justify-between items-center gap-3",children:[c.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-2 md:gap-3",children:[c.jsxs("p",{className:"text-[11px] text-primary-foreground/25",children:["© ",new Date().getFullYear()," Holden Richardson | 616 Realty LLC. All rights reserved."]}),c.jsx("span",{className:"hidden md:inline text-primary-foreground/15",children:"•"}),c.jsx("a",{href:"https://realsavvy.com",target:"_blank",rel:"noopener noreferrer",className:"text-[11px] text-primary-foreground/25 hover:text-accent transition-colors",children:"Site built by RealSavvy"})]}),c.jsxs("div",{className:"flex gap-5",children:[c.jsx(Tt,{to:"/privacy-policy",className:"text-[11px] text-primary-foreground/25 hover:text-accent transition-colors",children:"Privacy Policy"}),c.jsx(Tt,{to:"/terms-of-service",className:"text-[11px] text-primary-foreground/25 hover:text-accent transition-colors",children:"Terms of Service"}),c.jsx(Tt,{to:"/accessibility",className:"text-[11px] text-primary-foreground/25 hover:text-accent transition-colors",children:"Accessibility"})]})]})]})})]})},pPe=()=>{const{configMap:e}=_o(),[t,n]=S.useState(!1),r=e.booking_url,i=e.agent_phone,s=i?`sms:${i.replace(/[^+\d]/g,"")}`:null;return!r&&!s?null:c.jsxs("div",{className:"fixed right-0 bottom-24 z-50 flex flex-col gap-3",onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onClick:()=>n(a=>!a),children:[r&&c.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center bg-foreground text-background border-l border-y border-gold/40 shadow-xl rounded-none overflow-hidden transition-all duration-300 hover:bg-foreground/90",children:[c.jsx("div",{className:"flex items-center justify-center w-12 h-12 shrink-0",children:c.jsx(nc,{className:"w-5 h-5"})}),c.jsx(ry,{children:t&&c.jsx(ri.span,{initial:{width:0,opacity:0},animate:{width:"auto",opacity:1},exit:{width:0,opacity:0},transition:{duration:.3,ease:[.25,.1,.25,1]},className:"whitespace-nowrap text-sm font-semibold tracking-wide pr-5 overflow-hidden",children:"Book Virtual Meeting With Holden"})})]}),s&&c.jsxs("a",{href:s,className:"flex items-center bg-foreground text-background border-l border-y border-gold/40 shadow-xl rounded-none overflow-hidden transition-all duration-300 hover:bg-foreground/90",children:[c.jsx("div",{className:"flex items-center justify-center w-12 h-12 shrink-0",children:c.jsx(Ap,{className:"w-5 h-5"})}),c.jsx(ry,{children:t&&c.jsx(ri.span,{initial:{width:0,opacity:0},animate:{width:"auto",opacity:1},exit:{width:0,opacity:0},transition:{duration:.3,ease:[.25,.1,.25,1],delay:.05},className:"whitespace-nowrap text-sm font-semibold tracking-wide pr-5 overflow-hidden",children:"Text Holden — Instant Answers"})})]})]})},En=({children:e})=>c.jsxs("div",{className:"min-h-screen flex flex-col",children:[c.jsx(SD,{}),c.jsx("main",{className:"flex-1 pt-20",children:e}),c.jsx(Kse,{}),c.jsx(pPe,{})]}),mPe={49503:{city:"Grand Rapids",area:"Heritage Hill / Downtown / Eastown edge",county:"Kent",state:"MI"},49504:{city:"Grand Rapids",area:"West Side / John Ball Park",county:"Kent",state:"MI"},49505:{city:"Grand Rapids",area:"Creston / Northeast",county:"Kent",state:"MI"},49506:{city:"East Grand Rapids",area:"EGR / Eastown / Ottawa Hills",county:"Kent",state:"MI"},49507:{city:"Grand Rapids",area:"Garfield Park / Alger Heights",county:"Kent",state:"MI"},49508:{city:"Grand Rapids",area:"South / Kentwood border",county:"Kent",state:"MI"},49509:{city:"Wyoming",area:"Wyoming",county:"Kent",state:"MI"},49512:{city:"Kentwood",area:"Kentwood / SE",county:"Kent",state:"MI"},49519:{city:"Wyoming",area:"Wyoming SW",county:"Kent",state:"MI"},49525:{city:"Grand Rapids",area:"Northview / North Park",county:"Kent",state:"MI"},49544:{city:"Grand Rapids",area:"Walker / NW",county:"Kent",state:"MI"},49546:{city:"Grand Rapids",area:"Cascade / Forest Hills",county:"Kent",state:"MI"},49548:{city:"Wyoming",area:"Wyoming SE",county:"Kent",state:"MI"},49301:{city:"Ada",area:"Ada / Forest Hills",county:"Kent",state:"MI"},49302:{city:"Alto",area:"Alto",county:"Kent",state:"MI"},49306:{city:"Belmont",area:"Belmont / Rockford edge",county:"Kent",state:"MI"},49315:{city:"Byron Center",area:"Byron Center",county:"Kent",state:"MI"},49316:{city:"Caledonia",area:"Caledonia",county:"Kent",state:"MI"},49321:{city:"Comstock Park",area:"Comstock Park",county:"Kent",state:"MI"},49326:{city:"Cedar Springs",area:"Cedar Springs",county:"Kent",state:"MI"},49331:{city:"Lowell",area:"Lowell",county:"Kent",state:"MI"},49341:{city:"Rockford",area:"Rockford",county:"Kent",state:"MI"},49345:{city:"Sparta",area:"Sparta",county:"Kent",state:"MI"},49351:{city:"Rockford",area:"Rockford",county:"Kent",state:"MI"},49355:{city:"Grand Rapids",area:"Amway HQ area",county:"Kent",state:"MI"},49401:{city:"Allendale",area:"Allendale / GVSU",county:"Ottawa",state:"MI"},49417:{city:"Grand Haven",area:"Grand Haven",county:"Ottawa",state:"MI"},49418:{city:"Allendale Charter Twp",area:"Hudsonville / Allendale",county:"Ottawa",state:"MI"},49423:{city:"Holland",area:"Holland South",county:"Ottawa/Allegan",state:"MI"},49424:{city:"Holland",area:"Holland North",county:"Ottawa",state:"MI"},49426:{city:"Hudsonville",area:"Hudsonville / Jamestown",county:"Ottawa",state:"MI"},49428:{city:"Jenison",area:"Jenison / Georgetown Twp",county:"Ottawa",state:"MI"},49431:{city:"Ludington",area:"Ludington",county:"Mason",state:"MI"},49435:{city:"Marne",area:"Marne",county:"Ottawa",state:"MI"},49441:{city:"Muskegon",area:"Muskegon South",county:"Muskegon",state:"MI"},49442:{city:"Muskegon",area:"Muskegon East",county:"Muskegon",state:"MI"},49445:{city:"North Muskegon",area:"North Muskegon",county:"Muskegon",state:"MI"},49456:{city:"Spring Lake",area:"Spring Lake / Ferrysburg",county:"Ottawa",state:"MI"},49460:{city:"West Olive",area:"West Olive",county:"Ottawa",state:"MI"},49464:{city:"Zeeland",area:"Zeeland",county:"Ottawa",state:"MI"},49010:{city:"Allegan",area:"Allegan",county:"Allegan",state:"MI"},49348:{city:"Shelbyville",area:"Shelbyville / Wayland edge",county:"Allegan",state:"MI"},49323:{city:"Dorr",area:"Dorr",county:"Allegan",state:"MI"},49328:{city:"Hopkins",area:"Hopkins",county:"Allegan",state:"MI"},49344:{city:"Plainwell",area:"Plainwell / Otsego",county:"Allegan",state:"MI"}};function gPe(e){return mPe[e.trim()]??null}function Wse(e){return/^\d{5}$/.test(e.trim())}function qse({compact:e=!1}){const[t,n]=S.useState(""),[r,i]=S.useState("seller"),[s,a]=S.useState(""),o=wd(),l=u=>{if(u.preventDefault(),!Wse(t)){a("Enter a valid 5-digit ZIP");return}a(""),o(`/market-pulse/${t}?lens=${r}`)};return c.jsxs("form",{onSubmit:l,className:`bg-background/95 backdrop-blur-xl border border-border ${e?"p-4":"p-5 md:p-6"} text-foreground shadow-2xl`,children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx($O,{size:14,className:"text-primary"}),c.jsx("span",{className:"text-[10px] uppercase tracking-[0.3em] font-semibold text-primary",children:"Market Pulse"})]}),c.jsx("div",{className:"text-sm text-foreground/80 mb-4",children:"Your ZIP. My take. Real numbers — instant."}),c.jsxs("div",{className:"flex border border-border mb-3",children:[c.jsx("button",{type:"button",onClick:()=>i("seller"),className:`flex-1 px-3 py-2 text-[10px] uppercase tracking-[0.2em] font-medium transition-colors ${r==="seller"?"bg-foreground text-background":"text-foreground/70 hover:bg-muted"}`,children:"I'm a Seller"}),c.jsx("button",{type:"button",onClick:()=>i("buyer"),className:`flex-1 px-3 py-2 text-[10px] uppercase tracking-[0.2em] font-medium transition-colors ${r==="buyer"?"bg-foreground text-background":"text-foreground/70 hover:bg-muted"}`,children:"I'm a Buyer"})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{type:"text",inputMode:"numeric",pattern:"\\d{5}",maxLength:5,value:t,onChange:u=>n(u.target.value.replace(/\D/g,"")),placeholder:"49506",className:"flex-1 bg-background border border-border px-3 py-2.5 text-base tabular-nums focus:outline-none focus:ring-1 focus:ring-primary","aria-label":"ZIP code"}),c.jsxs("button",{type:"submit",className:"inline-flex items-center gap-2 px-4 py-2.5 bg-primary text-primary-foreground text-[10px] uppercase tracking-[0.2em] font-medium hover:bg-primary/90 transition-colors",children:["Get Report ",c.jsx(sc,{size:14})]})]}),s&&c.jsx("p",{className:"text-[11px] text-destructive mt-2",children:s}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-3",children:"Free · No login · Instant report with calculator + AI chat"})]})}const yPe=()=>{const[e,t]=S.useState(!1);return c.jsxs("section",{className:"relative w-full overflow-hidden bg-secondary",children:[c.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-secondary via-background to-secondary"}),c.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,hsl(var(--gold)/0.08),transparent_60%)]"}),c.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_bottom_left,hsl(var(--foreground)/0.04),transparent_55%)]"}),c.jsx("div",{className:"relative z-10 mx-auto max-w-[1400px] px-6 md:px-10 lg:px-14 py-16 md:py-20 lg:py-24",children:c.jsxs("div",{className:"grid lg:grid-cols-12 gap-8 lg:gap-12 items-center",children:[c.jsxs("div",{className:"lg:col-span-7",children:[c.jsxs(ri.div,{initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:.7,ease:[.5,0,0,1]},children:[c.jsx("div",{className:"text-[10px] md:text-[11px] uppercase tracking-[0.35em] text-accent font-medium mb-5",children:"Grand Rapids Realtor®"}),c.jsx("h1",{className:"text-4xl md:text-5xl lg:text-6xl xl:text-[5rem] font-bold text-foreground leading-[1.05] mb-6 tracking-tight",children:"Holden Richardson"}),c.jsx("p",{className:"text-base md:text-lg text-muted-foreground font-light max-w-xl mb-8 leading-relaxed",children:"Buyer & seller guides · dynamic home search · personal market reports for every Grand Rapids ZIP."})]}),c.jsx(ri.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.7,delay:.15,ease:[.5,0,0,1]},className:"max-w-md",children:c.jsx(qse,{})}),c.jsxs(ri.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3,ease:[.5,0,0,1]},className:"flex flex-wrap gap-3 mt-6",children:[c.jsxs(Tt,{to:"/idx",className:"inline-flex items-center justify-center gap-2 px-5 py-3 border border-foreground/25 text-foreground text-[10px] uppercase tracking-[0.25em] font-medium hover:bg-foreground hover:text-background transition-colors",children:[c.jsx(fU,{size:14})," Search Homes"]}),c.jsxs(Tt,{to:"/home-valuation",className:"inline-flex items-center justify-center gap-2 px-5 py-3 border border-foreground/25 text-foreground text-[10px] uppercase tracking-[0.25em] font-medium hover:bg-foreground hover:text-background transition-colors",children:[c.jsx(Abe,{size:14})," Home Valuation"]})]})]}),c.jsx("div",{className:"lg:col-span-5",children:c.jsxs(ri.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.9,ease:[.5,0,0,1]},className:"relative",children:[c.jsx("div",{className:"absolute -top-2 -right-2 w-16 h-16 border-t-2 border-r-2 border-accent/60 z-10 pointer-events-none"}),c.jsx("div",{className:"absolute -bottom-2 -left-2 w-16 h-16 border-b-2 border-l-2 border-accent/60 z-10 pointer-events-none"}),c.jsxs("div",{className:"relative aspect-[4/5] lg:aspect-[3/4] w-full overflow-hidden bg-primary border border-border shadow-2xl",children:[c.jsx("video",{autoPlay:!0,muted:!0,loop:!0,playsInline:!0,preload:"auto",onCanPlay:()=>t(!0),className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-1000 ${e?"opacity-100":"opacity-0"}`,children:c.jsx("source",{src:"/videos/hero-video.mp4",type:"video/mp4"})}),c.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-primary/40 via-transparent to-transparent pointer-events-none"})]}),c.jsxs("div",{className:"mt-3 flex items-center justify-between text-[10px] uppercase tracking-[0.25em] text-muted-foreground",children:[c.jsx("span",{children:"Grand Rapids · Michigan"}),c.jsx("span",{className:"text-accent",children:"— On the ground"})]})]})})]})}),c.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-accent/50 to-transparent"})]})},vPe={up:{y:50,x:0},down:{y:-50,x:0},left:{x:60,y:0},right:{x:-60,y:0}},xPe=(e,t)=>{const n=vPe[t];switch(e){case"slide":return{hidden:{opacity:0,...n,scale:.97},visible:{opacity:1,x:0,y:0,scale:1}};case"scale":return{hidden:{opacity:0,scale:.88},visible:{opacity:1,scale:1}};case"blur":return{hidden:{opacity:0,filter:"blur(10px)",y:30},visible:{opacity:1,filter:"blur(0px)",y:0}};case"lift":return{hidden:{opacity:0,y:60,rotateX:8},visible:{opacity:1,y:0,rotateX:0}};case"fade":default:return{hidden:{opacity:0,...n},visible:{opacity:1,x:0,y:0}}}},_e=({children:e,className:t="",delay:n=0,direction:r="up",variant:i="fade"})=>{const s=S.useRef(null),a=B5e(s,{once:!0,margin:"-80px"}),o=xPe(i,r);return c.jsx(ri.div,{ref:s,initial:"hidden",animate:a?"visible":"hidden",variants:o,transition:{duration:.8,delay:n,ease:[.25,.1,.25,1]},className:t,children:e})},Gse=[{quote:"Holden is a go getter and very responsive. He found us our home in a competitive market. Very knowledgeable and helped us negotiate a home that fit our needs and wants. I recommend Holden to anyone that is selling or wanting to buy a home because of his knowledge and determination to get the job done!",author:"Elvis Hadzalic",role:"Home Buyer"},{quote:"My partner and I were advised by one of our old neighbors to go to 616 Realty when we were ready to purchase a home, and I am so glad that we listened. Holden, Jayda and Beth were all so helpful during the entire process and were always there when we had questions. I am happy to say we have purchased our home and we couldn't have done that without their help!",author:"Idaris Cruz",role:"Home Buyer"},{quote:"Working with Holden was incredibly seamless and efficient. Wonderful advice and feedback to help me reach my ultimate goal! Would easily recommend to anyone who is anxious going into the housing market.",author:"Aleatha Ostrander",role:"Home Buyer"},{quote:"Holden was a pleasure working with on this transaction, his communication was prompt and professional, and they handled every detail with expertise and integrity. A true team player who kept the process smooth from start to finish — I look forward to working together again.",author:"Tristan Seeley",role:"Transaction Partner"},{quote:"This is the first transaction that I have worked with Holden on and I really appreciate his commitment to communication throughout the process. He was very open to what his clients goals were as buyers and allowed me to do the same for the sellers. Together we were able to work through some weather related issues to get to the closing table with minimal fuss. This is what real estate is all about. No ego. No flex. Just being good stewards for our clients.",author:"Julie Reisner",role:"Collaborating Agent"},{quote:"Holden is so helpful and knowledgeable. He really knows how to get stuff done!",author:"Katie T.",role:"Client"}],IB=3,GC=Math.ceil(Gse.length/IB),wPe=()=>{const[e,t]=S.useState(0),n=Gse.slice(e*IB,e*IB+IB);return c.jsx("section",{className:"section-padding bg-secondary",children:c.jsxs("div",{className:"container-page",children:[c.jsxs("div",{className:"flex flex-col md:flex-row md:items-end md:justify-between mb-12 md:mb-16",children:[c.jsxs("div",{children:[c.jsx(_e,{children:c.jsx("p",{className:"text-caption mb-4 text-xl font-semibold text-accent",children:"Client Stories"})}),c.jsx(_e,{delay:.1,children:c.jsx("h2",{className:"heading-section text-5xl",children:"What Clients Say"})})]}),GC>1&&c.jsxs("div",{className:"flex gap-2 mt-6 md:mt-0",children:[c.jsx("button",{onClick:()=>t(r=>r-1),disabled:e===0,className:"w-10 h-10 flex items-center justify-center border border-border hover:border-accent hover:text-accent transition-colors disabled:opacity-25 disabled:cursor-not-allowed","aria-label":"Previous reviews",children:c.jsx(yne,{size:20})}),c.jsx("button",{onClick:()=>t(r=>r+1),disabled:e>=GC-1,className:"w-10 h-10 flex items-center justify-center border border-border hover:border-accent hover:text-accent transition-colors disabled:opacity-25 disabled:cursor-not-allowed","aria-label":"Next reviews",children:c.jsx(Ju,{size:20})})]})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:n.map((r,i)=>c.jsx(_e,{delay:i*.1,children:c.jsxs("div",{className:"bg-background p-8 md:p-10 h-full flex flex-col",children:[c.jsx("div",{className:"flex gap-1 mb-6",children:[...Array(5)].map((s,a)=>c.jsx(WO,{size:16,className:"fill-gold text-gold"},a))}),c.jsxs("blockquote",{className:"text-lg font-serif text-foreground mb-8 flex-1",children:['"',r.quote,'"']}),c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-foreground",children:r.author}),c.jsx("p",{className:"text-sm text-muted-foreground",children:r.role})]})]})},r.author))}),c.jsxs("div",{className:"flex flex-col items-center gap-6 mt-10",children:[GC>1&&c.jsx("div",{className:"flex justify-center gap-2",children:Array.from({length:GC}).map((r,i)=>c.jsx("button",{onClick:()=>t(i),className:`w-2 h-2 rounded-full transition-colors ${i===e?"bg-accent":"bg-border"}`,"aria-label":`Go to page ${i+1}`},i))}),c.jsx(_e,{delay:.3,children:c.jsxs("a",{href:"https://www.google.com/maps?cid=17099657301143231027",target:"_blank",rel:"noopener noreferrer",className:"btn-outline-primary inline-flex items-center gap-2",children:["See All Reviews on Google ",c.jsx(rl,{className:"w-4 h-4"})]})})]})]})})};function jt({className:e,...t}){return c.jsx("div",{className:pt("animate-pulse rounded-md bg-muted",e),...t})}const bPe=async()=>{const{data:e,error:t}=await Re.functions.invoke("instagram-feed",{body:{limit:12}});if(t)throw t;return e.media||[]},CPe=()=>{const{data:e,isLoading:t,error:n}=Lr({queryKey:["instagram-feed"],queryFn:bPe,staleTime:6e5,retry:0,enabled:!0});return n?(console.error("Instagram feed error:",n),null):c.jsx("section",{className:"section-padding bg-secondary",children:c.jsxs("div",{className:"container-page",children:[c.jsxs("div",{className:"flex flex-col md:flex-row md:items-end md:justify-between mb-12",children:[c.jsxs("div",{children:[c.jsx(_e,{children:c.jsx("p",{className:"text-caption text-muted-foreground mb-4",children:"Follow Along"})}),c.jsx(_e,{delay:.1,children:c.jsx("h2",{className:"heading-section",children:"On Instagram"})})]}),c.jsx(_e,{delay:.2,children:c.jsxs("a",{href:"https://instagram.com/holdengr.re",target:"_blank",rel:"noopener noreferrer",className:"mt-6 md:mt-0 inline-flex items-center gap-2 text-caption text-foreground hover:text-gold transition-colors",children:[c.jsx(zO,{size:18}),"@holdengr.re"]})})]}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:t?Array.from({length:12}).map((r,i)=>c.jsx(jt,{className:"aspect-square w-full"},i)):e==null?void 0:e.map((r,i)=>{var s;return c.jsx(_e,{delay:i*.05,children:c.jsxs("a",{href:r.permalink,target:"_blank",rel:"noopener noreferrer",className:"block aspect-square overflow-hidden group relative",children:[r.media_type==="VIDEO"&&c.jsx("div",{className:"absolute top-3 right-3 z-10 bg-background/80 backdrop-blur-sm rounded-full p-2",children:c.jsx(KO,{size:16,className:"text-foreground fill-foreground"})}),r.media_type==="VIDEO"?c.jsx("video",{src:r.media_url,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105",muted:!0,playsInline:!0}):c.jsx("img",{src:r.media_url,alt:((s=r.caption)==null?void 0:s.slice(0,100))||"Instagram post",className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105",loading:"lazy"}),c.jsx("div",{className:"absolute inset-0 bg-foreground/0 group-hover:bg-foreground/20 transition-colors duration-300 flex items-center justify-center",children:c.jsx(zO,{size:28,className:"text-background opacity-0 group-hover:opacity-100 transition-opacity duration-300"})})]})},r.id)})})]})})},SPe="https://khmmwvmdbhaplcfcndjx.supabase.co",GN=`${SPe}/functions/v1/blog-api`;async function YN(){const{data:{session:e}}=await Re.auth.getSession(),t={"Content-Type":"application/json"};return e!=null&&e.access_token&&(t.Authorization=`Bearer ${e.access_token}`),t}function Yse(e){return Lr({queryKey:["blog-posts","published",e],queryFn:async()=>{let t=Re.from("blog_posts").select("*").eq("published",!0).order("published_at",{ascending:!1});e&&(t=t.limit(e));const{data:n,error:r}=await t;if(r)throw r;return n}})}function BPe(e){return Lr({queryKey:["blog-post",e],queryFn:async()=>{const{data:t,error:n}=await Re.from("blog_posts").select("*").eq("slug",e).eq("published",!0).maybeSingle();if(n)throw n;return t},enabled:!!e})}function _Pe(){return Lr({queryKey:["blog-posts","all"],queryFn:async()=>{const e=await YN(),t=await fetch(GN,{headers:e});if(!t.ok)throw new Error("Failed to fetch posts");return t.json()}})}function kPe(){const e=Ji();return bs({mutationFn:async t=>{const n=await YN(),r=await fetch(GN,{method:"POST",headers:n,body:JSON.stringify(t)});if(!r.ok){const i=await r.json();throw new Error(i.error||"Failed to create post")}return r.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["blog-posts"]})}})}function EPe(){const e=Ji();return bs({mutationFn:async({slug:t,data:n})=>{const r=await YN(),i=await fetch(`${GN}/${t}`,{method:"PUT",headers:r,body:JSON.stringify(n)});if(!i.ok){const s=await i.json();throw new Error(s.error||"Failed to update post")}return i.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["blog-posts"]}),e.invalidateQueries({queryKey:["blog-post"]})}})}function NPe(){const e=Ji();return bs({mutationFn:async t=>{const n=await YN(),r=await fetch(`${GN}/${t}`,{method:"DELETE",headers:n});if(!r.ok){const i=await r.json();throw new Error(i.error||"Failed to delete post")}return r.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["blog-posts"]})}})}const jPe=()=>{const{data:e,isLoading:t}=Yse(3);return t?c.jsx("section",{className:"section-padding bg-secondary",children:c.jsxs("div",{className:"container-page",children:[c.jsxs("div",{className:"text-center mb-12",children:[c.jsx(jt,{className:"h-4 w-32 mx-auto mb-4"}),c.jsx(jt,{className:"h-12 w-64 mx-auto"})]}),c.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:[...Array(3)].map((n,r)=>c.jsxs("div",{className:"bg-card border border-border",children:[c.jsx(jt,{className:"aspect-[16/10] w-full"}),c.jsxs("div",{className:"p-6 space-y-3",children:[c.jsx(jt,{className:"h-4 w-24"}),c.jsx(jt,{className:"h-6 w-3/4"}),c.jsx(jt,{className:"h-16 w-full"})]})]},r))})]})}):!e||e.length===0?null:c.jsx("section",{className:"section-padding bg-secondary",children:c.jsxs("div",{className:"container-page",children:[c.jsx(_e,{children:c.jsxs("div",{className:"text-center mb-12 md:mb-16",children:[c.jsx("p",{className:"text-caption text-muted-foreground mb-4",children:"Latest Insights"}),c.jsx("h2",{className:"heading-section",children:"From the Blog"})]})}),c.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:e.map((n,r)=>{const i=n.published_at?new Date(n.published_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"";return c.jsx(_e,{delay:r*.1,children:c.jsx(Tt,{to:`/blog/${n.slug}`,className:"group block h-full",children:c.jsxs("article",{className:"bg-card border border-border h-full flex flex-col transition-all duration-500 hover:shadow-lg",children:[n.featured_image&&c.jsx("div",{className:"aspect-[16/10] overflow-hidden",children:c.jsx("img",{src:n.featured_image,alt:n.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),c.jsxs("div",{className:"p-6 flex flex-col flex-1",children:[i&&c.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mb-3",children:[c.jsx(nc,{className:"w-3 h-3"}),i]}),c.jsx("h3",{className:"heading-card text-lg mb-3 group-hover:text-accent transition-colors line-clamp-2",children:n.title}),n.excerpt&&c.jsx("p",{className:"text-sm text-muted-foreground line-clamp-3 flex-1",children:n.excerpt}),c.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:c.jsxs("span",{className:"inline-flex items-center gap-2 text-xs uppercase tracking-wider font-medium text-foreground group-hover:text-accent transition-colors",children:["Read More",c.jsx(sc,{className:"w-3 h-3 transition-transform group-hover:translate-x-1"})]})})]})]})})},n.id)})}),c.jsx(_e,{children:c.jsx("div",{className:"text-center mt-12",children:c.jsx(Tt,{to:"/blog",className:"btn-outline-primary",children:"View All Posts"})})})]})})},TPe=["EfQb_jBmqmA","tiZKi3zaFLQ","HMci7juGyhQ"],PPe=()=>c.jsx("section",{className:"py-16 md:py-24 bg-secondary",children:c.jsxs("div",{className:"container-page",children:[c.jsx(_e,{variant:"blur",children:c.jsx("p",{className:"text-caption mb-4 text-center text-accent text-xl font-semibold",children:"Video"})}),c.jsx(_e,{delay:.1,children:c.jsx("h2",{className:"heading-section text-center mb-4 text-5xl",children:"Holden's Youtube Content"})}),c.jsx(_e,{delay:.15,children:c.jsx("p",{className:"text-body text-muted-foreground text-center max-w-2xl mx-auto mb-10",children:"Quick, straight-to-the-point videos covering real estate tips, market updates, home-buying advice, and everything you need to know about making your next move in Grand Rapids."})}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6 max-w-5xl mx-auto",children:TPe.map((e,t)=>c.jsx(_e,{delay:.15+t*.1,variant:"scale",children:c.jsx("div",{className:"aspect-[9/16] w-full overflow-hidden rounded-md",children:c.jsx("iframe",{src:`https://www.youtube.com/embed/${e}`,title:`YouTube Short ${t+1}`,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"w-full h-full border-0",loading:"lazy"})})},e))}),c.jsx(_e,{delay:.5,children:c.jsx("div",{className:"text-center mt-10",children:c.jsxs("a",{href:"https://www.youtube.com/@HoldenGR.Michigan/shorts",target:"_blank",rel:"noopener noreferrer",className:"btn-outline-primary inline-flex items-center gap-2",children:["See More on YouTube ",c.jsx(rl,{className:"w-4 h-4"})]})})})]})}),IPe="/assets/agent-portrait-DcetkHNl.jpg";var XN="Collapsible",[OPe,Xse]=zs(XN),[FPe,BD]=OPe(XN),Jse=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:s,onOpenChange:a,...o}=e,[l,u]=wo({prop:r,defaultProp:i??!1,onChange:a,caller:XN});return c.jsx(FPe,{scope:n,disabled:s,contentId:il(),open:l,onOpenToggle:S.useCallback(()=>u(d=>!d),[u]),children:c.jsx(_t.div,{"data-state":ND(l),"data-disabled":s?"":void 0,...o,ref:t})})});Jse.displayName=XN;var Zse="CollapsibleTrigger",_D=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=BD(Zse,n);return c.jsx(_t.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":ND(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:at(e.onClick,i.onOpenToggle)})});_D.displayName=Zse;var kD="CollapsibleContent",ED=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=BD(kD,e.__scopeCollapsible);return c.jsx(ga,{present:n||i.open,children:({present:s})=>c.jsx(MPe,{...r,ref:t,present:s})})});ED.displayName=kD;var MPe=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...s}=e,a=BD(kD,n),[o,l]=S.useState(r),u=S.useRef(null),d=tn(t,u),A=S.useRef(0),f=A.current,h=S.useRef(0),p=h.current,m=a.open||o,g=S.useRef(m),y=S.useRef(void 0);return S.useEffect(()=>{const v=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(v)},[]),Ri(()=>{const v=u.current;if(v){y.current=y.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const x=v.getBoundingClientRect();A.current=x.height,h.current=x.width,g.current||(v.style.transitionDuration=y.current.transitionDuration,v.style.animationName=y.current.animationName),l(r)}},[a.open,r]),c.jsx(_t.div,{"data-state":ND(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...s,ref:d,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style},children:m&&i})});function ND(e){return e?"open":"closed"}var eae=Jse,LPe=_D,RPe=ED,UPe=S.createContext(void 0);function l2(e){const t=S.useContext(UPe);return e||t||"ltr"}var uc="Accordion",DPe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[jD,QPe,HPe]=EN(uc),[JN,skt]=zs(uc,[HPe,Xse]),TD=Xse(),tae=re.forwardRef((e,t)=>{const{type:n,...r}=e,i=r,s=r;return c.jsx(jD.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?c.jsx(KPe,{...s,ref:t}):c.jsx(VPe,{...i,ref:t})})});tae.displayName=uc;var[nae,$Pe]=JN(uc),[rae,zPe]=JN(uc,{collapsible:!1}),VPe=re.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:s=!1,...a}=e,[o,l]=wo({prop:n,defaultProp:r??"",onChange:i,caller:uc});return c.jsx(nae,{scope:e.__scopeAccordion,value:re.useMemo(()=>o?[o]:[],[o]),onItemOpen:l,onItemClose:re.useCallback(()=>s&&l(""),[s,l]),children:c.jsx(rae,{scope:e.__scopeAccordion,collapsible:s,children:c.jsx(iae,{...a,ref:t})})})}),KPe=re.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=e,[a,o]=wo({prop:n,defaultProp:r??[],onChange:i,caller:uc}),l=re.useCallback(d=>o((A=[])=>[...A,d]),[o]),u=re.useCallback(d=>o((A=[])=>A.filter(f=>f!==d)),[o]);return c.jsx(nae,{scope:e.__scopeAccordion,value:a,onItemOpen:l,onItemClose:u,children:c.jsx(rae,{scope:e.__scopeAccordion,collapsible:!0,children:c.jsx(iae,{...s,ref:t})})})}),[WPe,ZN]=JN(uc),iae=re.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:s="vertical",...a}=e,o=re.useRef(null),l=tn(o,t),u=QPe(n),A=l2(i)==="ltr",f=at(e.onKeyDown,h=>{var N;if(!DPe.includes(h.key))return;const p=h.target,m=u().filter(j=>{var L;return!((L=j.ref.current)!=null&&L.disabled)}),g=m.findIndex(j=>j.ref.current===p),y=m.length;if(g===-1)return;h.preventDefault();let v=g;const x=0,b=y-1,w=()=>{v=g+1,v>b&&(v=x)},B=()=>{v=g-1,v<x&&(v=b)};switch(h.key){case"Home":v=x;break;case"End":v=b;break;case"ArrowRight":s==="horizontal"&&(A?w():B());break;case"ArrowDown":s==="vertical"&&w();break;case"ArrowLeft":s==="horizontal"&&(A?B():w());break;case"ArrowUp":s==="vertical"&&B();break}const k=v%y;(N=m[k].ref.current)==null||N.focus()});return c.jsx(WPe,{scope:n,disabled:r,direction:i,orientation:s,children:c.jsx(jD.Slot,{scope:n,children:c.jsx(_t.div,{...a,"data-orientation":s,ref:l,onKeyDown:r?void 0:f})})})}),K_="AccordionItem",[qPe,PD]=JN(K_),sae=re.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...i}=e,s=ZN(K_,n),a=$Pe(K_,n),o=TD(n),l=il(),u=r&&a.value.includes(r)||!1,d=s.disabled||e.disabled;return c.jsx(qPe,{scope:n,open:u,disabled:d,triggerId:l,children:c.jsx(eae,{"data-orientation":s.orientation,"data-state":dae(u),...o,...i,ref:t,disabled:d,open:u,onOpenChange:A=>{A?a.onItemOpen(r):a.onItemClose(r)}})})});sae.displayName=K_;var aae="AccordionHeader",oae=re.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=ZN(uc,n),s=PD(aae,n);return c.jsx(_t.h3,{"data-orientation":i.orientation,"data-state":dae(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});oae.displayName=aae;var tF="AccordionTrigger",lae=re.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=ZN(uc,n),s=PD(tF,n),a=zPe(tF,n),o=TD(n);return c.jsx(jD.ItemSlot,{scope:n,children:c.jsx(LPe,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":i.orientation,id:s.triggerId,...o,...r,ref:t})})});lae.displayName=tF;var cae="AccordionContent",uae=re.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=ZN(uc,n),s=PD(cae,n),a=TD(n);return c.jsx(RPe,{role:"region","aria-labelledby":s.triggerId,"data-orientation":i.orientation,...a,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});uae.displayName=cae;function dae(e){return e?"open":"closed"}var GPe=tae,YPe=sae,XPe=oae,Aae=lae,hae=uae;const Mp=GPe,xh=S.forwardRef(({className:e,...t},n)=>c.jsx(YPe,{ref:n,className:pt("border-b",e),...t}));xh.displayName="AccordionItem";const wh=S.forwardRef(({className:e,children:t,...n},r)=>c.jsx(XPe,{className:"flex",children:c.jsxs(Aae,{ref:r,className:pt("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,c.jsx(Gc,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));wh.displayName=Aae.displayName;const bh=S.forwardRef(({className:e,children:t,...n},r)=>c.jsx(hae,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:c.jsx("div",{className:pt("pb-4 pt-0",e),children:t})}));bh.displayName=hae.displayName;const aV=[{question:"Who is Holden Richardson?",answer:"Holden Richardson is a licensed Realtor® with 616 Realty LLC, serving the Grand Rapids area. With over 11 years in the business and more than 150 homes sold, Holden is known for his honest, direct approach and deep knowledge of the local market."},{question:"What areas does Holden serve?",answer:"Holden primarily serves the greater Grand Rapids area, including East Grand Rapids, Ada, Cascade, Forest Hills, Rockford, Kentwood, Wyoming, and the surrounding West Michigan communities."},{question:"Does Holden work with both buyers and sellers?",answer:"Yes. Whether you're buying your first home, upgrading to a larger space, downsizing, or selling a property, Holden provides full-service representation tailored to your situation and goals."},{question:"What makes Holden different from other real estate agents?",answer:"Holden takes an education-first approach. He focuses on giving clients the information and market knowledge they need to make confident decisions — without pressure or sales tactics. His deep local expertise means he can often identify the right fit for a client even before they fully see it themselves."},{question:"How can I get a free home valuation?",answer:"You can get a complimentary, AI-powered home valuation through Holden's Homebot portal. Just enter your address on the Home Valuation page, and you'll receive an instant estimate plus ongoing monthly updates on your home's value, equity, and local market trends."},{question:"Does Holden offer virtual consultations?",answer:"Absolutely. You can book a virtual meeting directly through Holden's website. He also offers phone consultations, email support, and in-person meetings — whichever works best for you."},{question:"What should I expect when working with Holden?",answer:"Expect straightforward communication, market insights backed by real data, and a hands-on approach from start to close. Holden keeps his clients informed at every step and is known for being highly responsive and easy to reach."},{question:"How do I get started?",answer:"The easiest way to get started is to reach out through the Contact page, book a virtual meeting, or give Holden a call at (616) 403-6393. There's no pressure — even if you're just exploring your options, Holden is happy to help."}],JPe=()=>c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Holden Richardson | Grand Rapids Real Estate Agent"}),c.jsx("meta",{name:"description",content:"Holden Richardson — Grand Rapids area real estate agent. Buy or sell homes in Grand Rapids, East Grand Rapids, Ada, and beyond."}),c.jsx("link",{rel:"canonical",href:"https://www.holdengr.com/"}),c.jsx("meta",{property:"og:title",content:"Holden Richardson | Grand Rapids Real Estate Agent"}),c.jsx("meta",{property:"og:description",content:"Grand Rapids area real estate — buy or sell homes with Holden Richardson."}),c.jsx("meta",{property:"og:url",content:"https://www.holdengr.com/"}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:"Holden Richardson | Grand Rapids Real Estate Agent"}),c.jsx("meta",{name:"twitter:description",content:"Grand Rapids area real estate — buy or sell homes with Holden Richardson."}),c.jsx("meta",{name:"twitter:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"FAQPage","@id":"https://www.holdengr.com/#faq",mainEntityOfPage:{"@type":"WebPage","@id":"https://www.holdengr.com/"},about:{"@id":"https://www.holdengr.com/#agent"},mainEntity:aV.map(e=>({"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer}}))})})]}),c.jsxs("div",{children:[c.jsx("div",{className:"-mt-20",children:c.jsx(yPe,{})}),c.jsx("section",{className:"section-padding bg-background",children:c.jsx("div",{className:"container-page",children:c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_auto] gap-8 lg:gap-12 items-center",children:[c.jsxs("div",{className:"text-left lg:max-w-xl",children:[c.jsx(_e,{variant:"blur",children:c.jsx("p",{className:"text-caption mb-6 text-xl text-accent text-left font-semibold",children:"GRAND RAPIDS AREA REAL ESTATE"})}),c.jsx(_e,{delay:.1,children:c.jsx("h2",{className:"heading-section mb-8 text-5xl",children:"Helping You Make Your Next Move in Grand Rapids"})}),c.jsx(_e,{delay:.2,children:c.jsx("p",{className:"text-body text-muted-foreground mb-4",children:"Grand Rapids is a city of neighborhoods — each with its own character, charm, and sense of community. Whether you've outgrown your first home and are ready for more space, or you're looking to simplify and find the perfect fit for your next chapter, Holden Richardson is here to help you navigate the move with confidence."})}),c.jsx(_e,{delay:.25,children:c.jsx("p",{className:"text-body text-muted-foreground mb-10",children:"With deep knowledge of communities across the greater Grand Rapids area — from established city neighborhoods to growing suburbs — Holden understands that the right home isn't just about square footage. It's about finding the neighborhood, the lifestyle, and the future that fits you. That personal, hands-on approach is what sets him apart."})}),c.jsx(_e,{delay:.3,children:c.jsx(Tt,{to:"/about",className:"btn-outline-primary",children:"Learn More About Holden"})})]}),c.jsx(_e,{delay:.2,variant:"blur",children:c.jsx("div",{className:"hidden lg:block",children:c.jsx("img",{alt:"Grand Rapids cityscape",className:"w-80 h-80 xl:w-96 xl:h-96 rounded-full shadow-lg border-4 border-accent/20 object-cover",loading:"lazy",src:"/lovable-uploads/8cc794d4-fc62-47ec-a9e1-a66c0728adf0.png"})})})]})})}),c.jsx(PPe,{}),c.jsxs("div",{className:"flex items-center justify-center py-2 bg-background",children:[c.jsx("div",{className:"h-px bg-border flex-1 max-w-16"}),c.jsx("div",{className:"w-2 h-2 rotate-45 border border-accent/50 mx-4"}),c.jsx("div",{className:"h-px bg-border flex-1 max-w-16"})]}),c.jsx("section",{className:"py-16 md:py-24 bg-background",children:c.jsxs("div",{className:"container-page max-w-4xl mx-auto",children:[c.jsx(_e,{children:c.jsxs("div",{className:"text-center mb-10",children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3 text-xl font-semibold",children:"Common Questions"}),c.jsx("h2",{className:"font-serif text-2xl text-foreground md:text-5xl font-semibold",children:"What You Need to Know"})]})}),c.jsx(_e,{delay:.1,children:c.jsx(Mp,{type:"single",collapsible:!0,className:"space-y-4 max-w-4xl mx-auto",children:aV.map((e,t)=>c.jsxs(xh,{value:`faq-${t}`,className:"border border-border/60 px-6 md:px-8 transition-all duration-300 bg-background shadow-md shadow-foreground/[0.06] hover:shadow-lg hover:shadow-foreground/[0.08]",children:[c.jsx(wh,{className:"text-left text-sm md:text-base font-medium hover:no-underline py-4 text-foreground/85 hover:text-foreground",children:e.question}),c.jsx(bh,{className:"text-sm text-muted-foreground leading-relaxed pb-5 px-1",children:e.answer})]},t))})})]})}),c.jsx(wPe,{}),c.jsx("section",{className:"section-padding bg-background",children:c.jsx("div",{className:"container-page",children:c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-center",children:[c.jsx(_e,{direction:"left",variant:"slide",children:c.jsx("div",{className:"relative",children:c.jsx("img",{src:IPe,alt:"Holden Richardson",className:"w-full aspect-[3/4] object-cover",loading:"lazy"})})}),c.jsxs("div",{children:[c.jsx(_e,{children:c.jsx("p",{className:"text-caption mb-4 text-xl font-semibold text-accent",children:"Meet Holden Richardson"})}),c.jsx(_e,{delay:.1,children:c.jsx("h2",{className:"heading-section mb-6 text-5xl",children:"Local Roots. Personal Approach. Real Results."})}),c.jsx(_e,{delay:.2,children:c.jsx("p",{className:"text-body text-muted-foreground mb-6",children:"Holden Richardson isn't just a Realtor® — he's someone who genuinely knows Grand Rapids. Born and raised in the area, he brings a firsthand understanding of what makes each community unique, from the energy of downtown to the quiet streets of the surrounding suburbs. That local perspective means he doesn't just help you find a house — he helps you find your neighborhood."})}),c.jsx(_e,{delay:.3,children:c.jsx("p",{className:"text-body text-muted-foreground mb-8",children:"Licensed with 616 Realty LLC, Holden is known for his responsiveness, straightforward communication, and a hands-on approach that keeps clients informed and confident at every step. Whether you're a first-time buyer stepping up, a growing family looking for more space, or ready to downsize into something that fits your next chapter — Holden makes the process feel simple, personal, and stress-free."})}),c.jsx(_e,{delay:.4,children:c.jsx(Tt,{to:"/about",className:"btn-outline-primary",children:"Read Full Bio"})})]})]})})}),c.jsx(jPe,{}),c.jsx(CPe,{}),c.jsx("section",{className:"py-24 md:py-32 bg-foreground text-background",children:c.jsxs("div",{className:"container-page text-center",children:[c.jsx(_e,{variant:"lift",children:c.jsx("p",{className:"text-caption text-background/60 mb-4",children:"Ready to Find Your Dream Home?"})}),c.jsx(_e,{delay:.1,children:c.jsx("h2",{className:"heading-section text-background mb-8 text-5xl",children:"Let's Start the Conversation"})}),c.jsx(_e,{delay:.2,children:c.jsx("p",{className:"text-body text-background/70 max-w-2xl mx-auto mb-10",children:"Whether you're buying, selling, or simply exploring the market, Holden is here to guide you every step of the way."})}),c.jsx(_e,{delay:.3,children:c.jsx(Tt,{to:"/contact",className:"btn-outline-inverse",children:"Contact Holden"})})]})})]})]}),ZPe=({image:e,title:t,location:n,price:r,status:i="For Sale",beds:s,baths:a,sqft:o,index:l=0,listingId:u,photos:d,description:A})=>{const f=u?`/properties/${u}`:"/properties",h={image:e,title:t,location:n,price:r,status:i,beds:s,baths:a,sqft:o,photos:d,description:A};return c.jsx(ri.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.8,delay:l*.1,ease:[.5,0,0,1]},children:c.jsxs(Tt,{to:f,state:h,className:"property-card block",children:[c.jsxs("div",{className:"relative overflow-hidden aspect-[4/3]",children:[c.jsx(ri.img,{src:e,alt:t,className:"w-full h-full object-cover",whileHover:{scale:1.05},transition:{duration:.6,ease:[.5,0,0,1]}}),c.jsx("div",{className:"property-card-overlay"}),c.jsx("div",{className:"absolute top-4 left-4",children:c.jsx("span",{className:"text-caption px-3 py-1.5 bg-background/90 text-foreground text-xs",children:i})})]}),c.jsxs("div",{className:"pt-5",children:[c.jsx("p",{className:"text-gold text-lg md:text-xl font-serif mb-1",children:r}),c.jsx("h3",{className:"heading-card text-foreground mb-1",children:t}),c.jsx("p",{className:"text-muted-foreground text-sm",children:n}),(s>0||a>0||o)&&c.jsxs("div",{className:"flex gap-4 mt-3 text-sm text-muted-foreground",children:[s>0&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(mne,{className:"w-4 h-4"}),s," Beds"]}),a>0&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(pne,{className:"w-4 h-4"}),a," Baths"]}),o&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(Bne,{className:"w-4 h-4"}),o," Sq Ft"]})]})]})]})})};var kP="rovingFocusGroup.onEntryFocus",eIe={bubbles:!1,cancelable:!0},c2="RovingFocusGroup",[nF,fae,tIe]=EN(c2),[nIe,pae]=zs(c2,[tIe]),[rIe,iIe]=nIe(c2),mae=S.forwardRef((e,t)=>c.jsx(nF.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(nF.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(sIe,{...e,ref:t})})}));mae.displayName=c2;var sIe=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...A}=e,f=S.useRef(null),h=tn(t,f),p=l2(s),[m,g]=wo({prop:a,defaultProp:o??null,onChange:l,caller:c2}),[y,v]=S.useState(!1),x=Fi(u),b=fae(n),w=S.useRef(!1),[B,k]=S.useState(0);return S.useEffect(()=>{const N=f.current;if(N)return N.addEventListener(kP,x),()=>N.removeEventListener(kP,x)},[x]),c.jsx(rIe,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:m,onItemFocus:S.useCallback(N=>g(N),[g]),onItemShiftTab:S.useCallback(()=>v(!0),[]),onFocusableItemAdd:S.useCallback(()=>k(N=>N+1),[]),onFocusableItemRemove:S.useCallback(()=>k(N=>N-1),[]),children:c.jsx(_t.div,{tabIndex:y||B===0?-1:0,"data-orientation":r,...A,ref:h,style:{outline:"none",...e.style},onMouseDown:at(e.onMouseDown,()=>{w.current=!0}),onFocus:at(e.onFocus,N=>{const j=!w.current;if(N.target===N.currentTarget&&j&&!y){const L=new CustomEvent(kP,eIe);if(N.currentTarget.dispatchEvent(L),!L.defaultPrevented){const T=b().filter(H=>H.focusable),E=T.find(H=>H.active),F=T.find(H=>H.id===m),D=[E,F,...T].filter(Boolean).map(H=>H.ref.current);vae(D,d)}}w.current=!1}),onBlur:at(e.onBlur,()=>v(!1))})})}),gae="RovingFocusGroupItem",yae=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:a,...o}=e,l=il(),u=s||l,d=iIe(gae,n),A=d.currentTabStopId===u,f=fae(n),{onFocusableItemAdd:h,onFocusableItemRemove:p,currentTabStopId:m}=d;return S.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),c.jsx(nF.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:c.jsx(_t.span,{tabIndex:A?0:-1,"data-orientation":d.orientation,...o,ref:t,onMouseDown:at(e.onMouseDown,g=>{r?d.onItemFocus(u):g.preventDefault()}),onFocus:at(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:at(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=lIe(g,d.orientation,d.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=f().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const b=x.indexOf(g.currentTarget);x=d.loop?cIe(x,b+1):x.slice(b+1)}setTimeout(()=>vae(x))}}),children:typeof a=="function"?a({isCurrentTabStop:A,hasTabStop:m!=null}):a})})});yae.displayName=gae;var aIe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function oIe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function lIe(e,t,n){const r=oIe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return aIe[r]}function vae(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function cIe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uIe=mae,dIe=yae,e5="Tabs",[AIe,akt]=zs(e5,[pae]),xae=pae(),[hIe,ID]=AIe(e5),wae=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:o,activationMode:l="automatic",...u}=e,d=l2(o),[A,f]=wo({prop:r,onChange:i,defaultProp:s??"",caller:e5});return c.jsx(hIe,{scope:n,baseId:il(),value:A,onValueChange:f,orientation:a,dir:d,activationMode:l,children:c.jsx(_t.div,{dir:d,"data-orientation":a,...u,ref:t})})});wae.displayName=e5;var bae="TabsList",Cae=S.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,s=ID(bae,n),a=xae(n);return c.jsx(uIe,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:r,children:c.jsx(_t.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});Cae.displayName=bae;var Sae="TabsTrigger",Bae=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=e,a=ID(Sae,n),o=xae(n),l=Eae(a.baseId,r),u=Nae(a.baseId,r),d=r===a.value;return c.jsx(dIe,{asChild:!0,...o,focusable:!i,active:d,children:c.jsx(_t.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...s,ref:t,onMouseDown:at(e.onMouseDown,A=>{!i&&A.button===0&&A.ctrlKey===!1?a.onValueChange(r):A.preventDefault()}),onKeyDown:at(e.onKeyDown,A=>{[" ","Enter"].includes(A.key)&&a.onValueChange(r)}),onFocus:at(e.onFocus,()=>{const A=a.activationMode!=="manual";!d&&!i&&A&&a.onValueChange(r)})})})});Bae.displayName=Sae;var _ae="TabsContent",kae=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...a}=e,o=ID(_ae,n),l=Eae(o.baseId,r),u=Nae(o.baseId,r),d=r===o.value,A=S.useRef(d);return S.useEffect(()=>{const f=requestAnimationFrame(()=>A.current=!1);return()=>cancelAnimationFrame(f)},[]),c.jsx(ga,{present:i||d,children:({present:f})=>c.jsx(_t.div,{"data-state":d?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:A.current?"0s":void 0},children:f&&s})})});kae.displayName=_ae;function Eae(e,t){return`${e}-trigger-${t}`}function Nae(e,t){return`${e}-content-${t}`}var fIe=wae,jae=Cae,Tae=Bae,Pae=kae;const u2=fIe,G0=S.forwardRef(({className:e,...t},n)=>c.jsx(jae,{ref:n,className:pt("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));G0.displayName=jae.displayName;const ii=S.forwardRef(({className:e,...t},n)=>c.jsx(Tae,{ref:n,className:pt("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));ii.displayName=Tae.displayName;const si=S.forwardRef(({className:e,...t},n)=>c.jsx(Pae,{ref:n,className:pt("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));si.displayName=Pae.displayName;const pIe="https://api.realsavvy.com/api/v3/listings/search",mIe="https://api.realsavvy.com/api/v3/suggestions",OD="eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiIwMTdkZTg1ZTVkNmYyN2U1ZWVlNDQ0MTkyYmQ2OWFlOWE1YWQ1NmZkMzk5ZWViYjhmZTk5ZWQ5NzE1YmY0NzBiIiwiYXVkIjoiZ2lkOi8vcmVhbC1zYXZ2eS9TaXRlLzE3NjEiLCJzdWIiOiJnaWQ6Ly9yZWFsLXNhdnZ5L1NpdGUvMTc2MSIsInNjb3BlcyI6WyJhZG1pbiJdfQ.o3UL0ih_XwYtfFKjMO1rkNX84RcRVpL11s-WY6zlH0bZAfxgofDa933-GmRS0JezLJyGPrER9PYRmKtgukPl4VYEW0xDaDdVGmHtvavX2iNiAlXQscNMieJtvXT0TszFgDDqk0tsCsx0v9JIdUrBVyPYa6Zneu3rdg_Gvu4ocRy-UsXntMtW9WBs_CPZcKoSxMWOZZjxj1vGWB9VceRg62puKNN_EsxWK26JDBqwPqM8HMRac6yaECH9nvjtgmMasmybtXVeIDVbjuXx3fOfbeDFrCix1rbSGgs1H5-U8hN7AHvJijxqrHgNoofPPz5PSp2MsB-4fV7iuFE4dFZEbQ",gIe=async e=>{const t=await fetch(`${mIe}?ids[]=${e}`,{method:"GET",headers:{Authorization:`Bearer ${OD}`,"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`Failed to fetch suggestion data: ${t.status}`),null)},yIe=e=>{if(!(e!=null&&e.data)||e.data.length===0)return null;const t=e.data[0],n=t.attributes||{};return[{resource_type:t.type||"areas",resource_id:t.id,resource_label:n.name||n.label||"",resource_sub_type:n.sub_type||"place",type:"geo_shape",value:{suggestion_id:t.id,geometry:n.geometry,bounding_box:n.bounding_box}}]},vIe=async e=>{const t=await fetch(pIe,{method:"POST",headers:{Authorization:`Bearer ${OD}`,"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`API error: ${t.status}`);return t.json()},xIe=async(e,t)=>{if(t){const n=await gIe(t),r=yIe(n);r&&(e={...e,filter:{...e.filter,suggestion:{value:r}}})}return vIe(e)},wIe=(e,t=1,n=12,r)=>{const i={filter:e,market_id:null,page:{number:t,size:n},sort:"+price_in_dollars"};return Lr({queryKey:["listings",JSON.stringify(e),t,n,r],queryFn:()=>xIe(i,r),staleTime:5*60*1e3})},bIe=async e=>{const t=await fetch(`https://api.realsavvy.com/api/v3/listings/${e}`,{method:"GET",headers:{Authorization:`Bearer ${OD}`,"Content-Type":"application/json"}});if(!t.ok)throw new Error(`API error: ${t.status}`);return t.json()},CIe=e=>Lr({queryKey:["listing",e],queryFn:()=>bIe(e),enabled:!!e,staleTime:5*60*1e3}),Iae=e=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e),W_=e=>new Intl.NumberFormat("en-US").format(e),oV=({filter:e,suggestionId:t})=>{var s;const{data:n,isLoading:r,error:i}=wIe(e,1,12,t);return r?c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 md:gap-10",children:Array.from({length:6}).map((a,o)=>c.jsxs("div",{className:"space-y-4",children:[c.jsx(jt,{className:"aspect-[4/3] w-full"}),c.jsx(jt,{className:"h-6 w-3/4"}),c.jsx(jt,{className:"h-4 w-1/2"})]},o))}):i?c.jsx("div",{className:"text-center py-12",children:c.jsx("p",{className:"text-muted-foreground",children:"Failed to load properties. Please try again later."})}):(s=n==null?void 0:n.data)!=null&&s.length?c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 md:gap-10",children:n.data.map((a,o)=>{const l=a.attributes,u=l.square_feet?W_(l.square_feet):l.lot_square_feet?W_(parseFloat(l.lot_square_feet)):void 0;return c.jsx(ZPe,{listingId:a.id,image:l.photo_urls[0]||"/placeholder.svg",title:l.title,location:l.subtitle,price:Iae(l.price_in_dollars),status:l.listing_status,beds:l.bedrooms,baths:l.bathrooms,sqft:u,index:o,photos:l.photo_urls,description:l.description||void 0},a.id)})}):c.jsx("div",{className:"text-center py-12",children:c.jsx("p",{className:"text-muted-foreground",children:"No properties found."})})},SIe=()=>c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Properties | Grand Rapids Homes for Sale | Holden Richardson"}),c.jsx("meta",{name:"description",content:"Browse exclusive Grand Rapids area properties — homes for sale in East Grand Rapids, Ada, Cascade, and beyond with Holden Richardson."}),c.jsx("link",{rel:"canonical",href:"https://www.holdengr.com/properties"}),c.jsx("meta",{property:"og:title",content:"Properties | Grand Rapids Homes for Sale"}),c.jsx("meta",{property:"og:description",content:"Browse Grand Rapids area properties with Holden Richardson."}),c.jsx("meta",{property:"og:url",content:"https://www.holdengr.com/properties"}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:"Properties | Grand Rapids Homes for Sale"}),c.jsx("meta",{name:"twitter:description",content:"Browse Grand Rapids area properties with Holden Richardson."}),c.jsx("meta",{name:"twitter:image",content:"https://www.holdengr.com/og-image.jpg"})]}),c.jsx("section",{className:"-mt-20 pt-32 md:pt-40 pb-20 md:pb-28 bg-secondary",children:c.jsxs("div",{className:"container-page",children:[c.jsx(_e,{children:c.jsx("p",{className:"text-caption text-muted-foreground mb-4",children:"Exclusive Portfolio"})}),c.jsx(_e,{delay:.1,children:c.jsx("h1",{className:"heading-display max-w-4xl",children:"Properties"})}),c.jsx(_e,{delay:.2,children:c.jsx("p",{className:"text-body text-muted-foreground max-w-2xl mt-6",children:"Explore our curated collection of the finest properties in the Grand Rapids area's most desirable neighborhoods."})})]})}),c.jsx("section",{className:"section-padding bg-background",children:c.jsx("div",{className:"container-page",children:c.jsxs(u2,{defaultValue:"active",className:"w-full",children:[c.jsx(_e,{children:c.jsxs(G0,{className:"bg-transparent h-auto p-0 border-b border-border rounded-none w-full justify-start gap-8 mb-12 md:mb-16",children:[c.jsx(ii,{value:"active",className:"text-caption text-muted-foreground data-[state=active]:text-foreground data-[state=active]:border-b-2 data-[state=active]:border-foreground bg-transparent rounded-none pb-4 px-0 data-[state=active]:shadow-none",children:"Current"}),c.jsx(ii,{value:"sold",className:"text-caption text-muted-foreground data-[state=active]:text-foreground data-[state=active]:border-b-2 data-[state=active]:border-foreground bg-transparent rounded-none pb-4 px-0 data-[state=active]:shadow-none",children:"Past Transactions"})]})}),c.jsx(si,{value:"active",className:"mt-0",children:c.jsx(oV,{filter:{listing_status:{value:["Active"]},agent_profile:{"michigan-regional-information-center-llc":{key:["grich2990"],relationships:["listing"]}}}})}),c.jsx(si,{value:"sold",className:"mt-0",children:c.jsx(oV,{filter:{listing_status:{value:["Sold"]},agent_profile:{"michigan-regional-information-center-llc":{key:["grich2990"],relationships:["listing"]}}}})})]})})}),c.jsx("section",{className:"py-20 md:py-28 bg-secondary",children:c.jsxs("div",{className:"container-page text-center",children:[c.jsx(_e,{children:c.jsx("h2",{className:"heading-section mb-6",children:"Looking for Something Specific?"})}),c.jsx(_e,{delay:.1,children:c.jsx("p",{className:"text-body text-muted-foreground max-w-2xl mx-auto mb-8",children:"Many of our finest properties are sold privately. Contact Holden to discuss your specific requirements and gain access to exclusive off-market listings."})}),c.jsx(_e,{delay:.2,children:c.jsx("a",{href:"/contact",className:"btn-outline-primary",children:"Contact Holden"})})]})})]}),FD=TN("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Be=S.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const a=r?ewe:"button";return c.jsx(a,{className:pt(FD({variant:t,size:n,className:e})),ref:s,...i})});Be.displayName="Button";const BIe=()=>{var d,A;const{id:e}=tm(),n=ml().state,{data:r,isLoading:i,error:s}=CIe(e);if(i)return c.jsxs(En,{children:[c.jsx("section",{className:"pt-8 pb-4 bg-background",children:c.jsx("div",{className:"container-page",children:c.jsx(jt,{className:"h-6 w-32"})})}),c.jsx("section",{className:"pb-8 bg-background",children:c.jsx("div",{className:"container-page",children:c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsx(jt,{className:"aspect-[4/3]"}),c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsx(jt,{className:"aspect-[4/3]"}),c.jsx(jt,{className:"aspect-[4/3]"}),c.jsx(jt,{className:"aspect-[4/3]"}),c.jsx(jt,{className:"aspect-[4/3]"})]})]})})}),c.jsx("section",{className:"py-12 bg-background",children:c.jsx("div",{className:"container-page",children:c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-12",children:[c.jsxs("div",{className:"lg:col-span-2 space-y-4",children:[c.jsx(jt,{className:"h-8 w-24"}),c.jsx(jt,{className:"h-10 w-3/4"}),c.jsx(jt,{className:"h-6 w-1/2"}),c.jsx(jt,{className:"h-12 w-48"}),c.jsx(jt,{className:"h-40 w-full"})]}),c.jsx("div",{children:c.jsx(jt,{className:"h-64 w-full"})})]})})})]});const a=(d=r==null?void 0:r.data)==null?void 0:d.attributes,o=a?{id:r.data.id,title:a.title,subtitle:a.subtitle,price:Iae(a.price_in_dollars),status:a.listing_status,bedrooms:a.bedrooms,bathrooms:a.bathrooms,squareFeet:a.square_feet?W_(a.square_feet):null,lotSize:a.lot_acre?`${a.lot_acre} acres`:a.lot_square_feet?`${W_(Number(a.lot_square_feet))} sq ft`:null,yearBuilt:a.year_built,propertyType:a.type?a.type.charAt(0).toUpperCase()+a.type.slice(1):"Residential",mlsNumber:a.mls_number,description:a.description,images:a.photo_urls||[],agent:{name:a.listing_agent||"Holden Richardson",phone:a.office_phone||"(616) 403-6393",broker:a.listing_broker||"616 Realty LLC"},realstaqSections:((A=a.realstaq_details)==null?void 0:A.sections)||[],fromState:!1}:n?{id:e||"",title:n.title,subtitle:n.location,price:n.price,status:n.status,bedrooms:n.beds||0,bathrooms:n.baths||0,squareFeet:n.sqft||null,lotSize:null,yearBuilt:null,propertyType:"Residential",mlsNumber:null,description:n.description||null,images:n.photos||(n.image?[n.image]:[]),agent:{name:"Holden Richardson",phone:"(616) 403-6393",broker:"616 Realty LLC"},realstaqSections:[],fromState:!0}:null;if(!o)return c.jsx(En,{children:c.jsx("section",{className:"py-20 bg-background",children:c.jsxs("div",{className:"container-page text-center",children:[c.jsx("h1",{className:"heading-section mb-4",children:"Listing Not Found"}),c.jsx("p",{className:"text-muted-foreground mb-8",children:"The property you're looking for could not be found."}),c.jsx(Tt,{to:"/properties",children:c.jsx(Be,{className:"btn-outline-primary",children:"Back to Properties"})})]})})});const l=`${o.title} | Holden Richardson — Grand Rapids Real Estate`,u=o.description?o.description.slice(0,160):`${o.title} — ${o.price}, ${o.bedrooms} bed, ${o.bathrooms} bath in Grand Rapids area.`;return c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:l}),c.jsx("meta",{name:"description",content:u}),c.jsx("link",{rel:"canonical",href:`https://www.holdengr.com/properties/${e}`}),c.jsx("meta",{property:"og:title",content:l}),c.jsx("meta",{property:"og:description",content:u}),c.jsx("meta",{property:"og:url",content:`https://www.holdengr.com/properties/${e}`}),o.images[0]&&c.jsx("meta",{property:"og:image",content:o.images[0]}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:l}),c.jsx("meta",{name:"twitter:description",content:u}),o.images[0]&&c.jsx("meta",{name:"twitter:image",content:o.images[0]})]}),c.jsx("section",{className:"pt-8 pb-4 bg-background",children:c.jsx("div",{className:"container-page",children:c.jsxs(Tt,{to:"/properties",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[c.jsx(Z1,{className:"w-4 h-4"}),c.jsx("span",{className:"text-sm",children:"Back to Properties"})]})})}),c.jsx("section",{className:"pb-8 bg-background",children:c.jsx("div",{className:"container-page",children:c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:o.images[0]&&c.jsx("img",{src:o.images[0],alt:o.title,className:"w-full h-full object-cover"})}),c.jsx("div",{className:"grid grid-cols-2 gap-4",children:o.images.slice(1,5).map((f,h)=>c.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:c.jsx("img",{src:f,alt:`${o.title} - ${h+2}`,className:"w-full h-full object-cover"})},h))})]})})}),c.jsx("section",{className:"py-12 md:py-16 bg-background",children:c.jsx("div",{className:"container-page",children:c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-12",children:[c.jsxs("div",{className:"lg:col-span-2",children:[c.jsx(_e,{children:c.jsxs("div",{className:"flex items-start justify-between mb-6",children:[c.jsxs("div",{children:[c.jsx("span",{className:"inline-block text-caption px-3 py-1.5 bg-secondary text-foreground text-xs mb-4",children:o.status}),c.jsx("h1",{className:"heading-section mb-2",children:o.title}),c.jsxs("p",{className:"text-muted-foreground flex items-center gap-2",children:[c.jsx(Ab,{className:"w-4 h-4"}),o.subtitle]})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Be,{variant:"outline",size:"icon",children:c.jsx(kbe,{className:"w-4 h-4"})}),c.jsx(Be,{variant:"outline",size:"icon",children:c.jsx(wne,{className:"w-4 h-4"})})]})]})}),c.jsx(_e,{delay:.1,children:c.jsx("p",{className:"text-gold text-3xl md:text-4xl font-serif mb-8",children:o.price})}),c.jsx(_e,{delay:.2,children:c.jsxs("div",{className:"flex flex-wrap gap-6 py-6 border-y border-border mb-8",children:[o.bedrooms>0&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(mne,{className:"w-5 h-5 text-muted-foreground"}),c.jsx("span",{className:"text-foreground font-medium",children:o.bedrooms}),c.jsx("span",{className:"text-muted-foreground",children:"Beds"})]}),o.bathrooms>0&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(pne,{className:"w-5 h-5 text-muted-foreground"}),c.jsx("span",{className:"text-foreground font-medium",children:o.bathrooms}),c.jsx("span",{className:"text-muted-foreground",children:"Baths"})]}),o.squareFeet&&c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Bne,{className:"w-5 h-5 text-muted-foreground"}),c.jsx("span",{className:"text-foreground font-medium",children:o.squareFeet}),c.jsx("span",{className:"text-muted-foreground",children:"Sq Ft"})]})]})}),o.description&&c.jsx(_e,{delay:.3,children:c.jsxs("div",{className:"mb-10",children:[c.jsx("h2",{className:"heading-card mb-4",children:"Description"}),c.jsx("p",{className:"text-muted-foreground whitespace-pre-line leading-relaxed",children:o.description})]})}),o.fromState&&c.jsx(_e,{delay:.3,children:c.jsx("div",{className:"p-4 bg-secondary rounded-sm mb-10",children:c.jsx("p",{className:"text-muted-foreground text-sm",children:"This listing has been sold. Limited details are available from the original search results."})})}),o.realstaqSections.map((f,h)=>c.jsx(_e,{delay:.4+h*.1,children:c.jsxs("div",{className:"mb-10",children:[c.jsx("h2",{className:"heading-card mb-4",children:f.title}),c.jsx("div",{className:`grid gap-4 ${f.style==="third"?"grid-cols-2 md:grid-cols-3":"grid-cols-1 md:grid-cols-2"}`,children:f.fields.map((p,m)=>c.jsxs("div",{className:"p-4 bg-secondary rounded-sm",children:[c.jsx("p",{className:"text-caption text-muted-foreground mb-1",children:p.label}),c.jsx("p",{className:"text-foreground font-medium",children:p.value!==null&&p.value!==void 0?String(p.value):"N/A"})]},`${f.title}-${m}`))})]})},f.title))]}),c.jsx("div",{className:"lg:col-span-1",children:c.jsx(_e,{delay:.2,children:c.jsxs("div",{className:"sticky top-24 p-6 bg-secondary rounded-sm",children:[c.jsx("h3",{className:"heading-card mb-4",children:"Contact Agent"}),c.jsxs("div",{className:"mb-6",children:[c.jsx("p",{className:"text-foreground font-medium",children:o.agent.name}),c.jsx("p",{className:"text-muted-foreground text-sm",children:o.agent.broker}),c.jsx("p",{className:"text-muted-foreground text-sm",children:o.agent.phone})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx(Be,{className:"w-full btn-outline-primary",children:"Schedule a Showing"}),c.jsx(Be,{variant:"outline",className:"w-full",children:"Request More Info"})]})]})})})]})})})]})},_Ie="/assets/holden-about-BFemenAp.jpg",Y0=e=>Lr({queryKey:["site-media",e],queryFn:async()=>{let t=Re.from("site_media").select("*").order("created_at",{ascending:!1});e&&(t=t.eq("media_type",e));const{data:n,error:r}=await t;if(r)throw r;return n||[]}}),kIe=()=>{const e=Ji();return bs({mutationFn:async({file:t,tags:n,mediaType:r,altText:i})=>{const s=t.name.split(".").pop(),a=`${r}/${Date.now()}-${Math.random().toString(36).slice(2)}.${s}`,{error:o}=await Re.storage.from("site-media").upload(a,t);if(o)throw o;const{error:l}=await Re.from("site_media").insert({file_path:a,file_name:t.name,tags:n,media_type:r,alt_text:i||null,file_size:t.size});if(l)throw l},onSuccess:()=>e.invalidateQueries({queryKey:["site-media"]})})},EIe=()=>{const e=Ji();return bs({mutationFn:async({id:t,...n})=>{const{error:r}=await Re.from("site_media").update(n).eq("id",t);if(r)throw r},onSuccess:()=>e.invalidateQueries({queryKey:["site-media"]})})},NIe=()=>{const e=Ji();return bs({mutationFn:async({id:t,filePath:n})=>{await Re.storage.from("site-media").remove([n]);const{error:r}=await Re.from("site_media").delete().eq("id",t);if(r)throw r},onSuccess:()=>e.invalidateQueries({queryKey:["site-media"]})})},lc=e=>{if(e.startsWith("http"))return e;const{data:t}=Re.storage.from("site-media").getPublicUrl(e);return t.publicUrl},jIe="https://res.cloudinary.com/dofjjlc6d/image/upload/v1769540628/user-uploads/2160/wrbvjojilgzlvn1u2hnw.jpg",TIe=[{value:"$50M+",label:"Real Estate Sold"},{value:"150+",label:"Homes Sold"},{value:"11+",label:"Years in the Business"}],PIe=()=>{const{data:e}=Lr({queryKey:["about-pages"],queryFn:async()=>{const{data:t}=await Re.from("aeo_categories").select("id").eq("slug","about").maybeSingle();if(!t)return[];const{data:n,error:r}=await Re.from("aeo_pages").select("id, title, slug, h1, subheadline, intro_text, display_order").eq("category_id",t.id).eq("status","published").eq("is_parent",!0).order("display_order");if(r)throw r;return n||[]}});return c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"About Holden Richardson | Grand Rapids Realtor"}),c.jsx("meta",{name:"description",content:"Meet Holden Richardson — a dedicated Grand Rapids area real estate agent. Deep local expertise, client-first approach."}),c.jsx("link",{rel:"canonical",href:"https://www.holdengr.com/about"}),c.jsx("meta",{property:"og:title",content:"About Holden Richardson | Grand Rapids Realtor"}),c.jsx("meta",{property:"og:description",content:"Meet Holden Richardson — a dedicated Grand Rapids area real estate agent."}),c.jsx("meta",{property:"og:url",content:"https://www.holdengr.com/about"}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"profile"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:"About Holden Richardson | Grand Rapids Realtor"}),c.jsx("meta",{name:"twitter:description",content:"Meet Holden Richardson — a dedicated Grand Rapids area real estate agent."}),c.jsx("meta",{name:"twitter:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"AboutPage",url:"https://www.holdengr.com/about",name:"About Holden Richardson",description:"About page for Grand Rapids Realtor Holden Richardson.",isPartOf:{"@id":"https://www.holdengr.com/#website"},mainEntity:{"@id":"https://www.holdengr.com/#agent"},about:{"@id":"https://www.holdengr.com/#agent"}})}),c.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://www.holdengr.com/"},{"@type":"ListItem",position:2,name:"About",item:"https://www.holdengr.com/about"}]})})]}),c.jsxs("section",{className:"relative -mt-20 pt-32 md:pt-40 pb-20 md:pb-28 overflow-hidden",children:[c.jsxs("div",{className:"absolute inset-0",children:[c.jsx("img",{src:lc("stock_photo/1772747249479-34tk12ax6yg.jpeg"),alt:"Grand Rapids area real estate",className:"w-full h-full object-cover"}),c.jsx("div",{className:"absolute inset-0 bg-black/40"})]}),c.jsxs("div",{className:"container-page relative z-10",children:[c.jsx(_e,{children:c.jsx("p",{className:"text-caption text-white/60 mb-4",children:"About"})}),c.jsxs(_e,{delay:.1,children:[c.jsx("h1",{className:"heading-display max-w-4xl text-white",children:"Holden Richardson"}),c.jsx("div",{className:"w-16 h-[2px] bg-accent mt-6 mb-6"})]}),c.jsx(_e,{delay:.2,children:c.jsx("p",{className:"text-body text-white/80 max-w-2xl",children:"Setting the standard for real estate in the Grand Rapids area."})})]})]}),c.jsx("section",{className:"section-padding bg-background",children:c.jsx("div",{className:"container-page",children:c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-20 items-start",children:[c.jsx(_e,{direction:"left",variant:"slide",children:c.jsx("div",{className:"relative sticky top-32",children:c.jsx("img",{src:_Ie,alt:"Holden Richardson",className:"w-full aspect-[3/4] object-cover",loading:"lazy"})})}),c.jsxs("div",{children:[c.jsx(_e,{children:c.jsx("h2",{className:"heading-section mb-8",children:"A Reputation Built on Results"})}),c.jsxs("div",{className:"space-y-6 text-body text-muted-foreground",children:[c.jsx(_e,{delay:.1,children:c.jsx("p",{children:"Holden Richardson is a Grand Rapids area Realtor® with 616 Realty LLC who believes real estate doesn't have to be complicated. His approach is straightforward — give people the information they need, cut through the noise, and let them make confident decisions without the pressure."})}),c.jsx(_e,{delay:.2,children:c.jsx("p",{children:"That philosophy shows up in everything he does. From short-form videos breaking down market updates and buyer tips to comprehensive guides on his website, Holden is focused on making real estate knowledge accessible — not gatekept. He'd rather educate a client who isn't ready to buy for another two years than push someone into a deal that doesn't make sense."})}),c.jsx(_e,{delay:.3,children:c.jsx("p",{children:"Holden's deep familiarity with the Grand Rapids market — from East Grand Rapids and Ada to Cascade and the surrounding communities — means his clients get hyper-local insight backed by real data, not generic advice. He stays plugged into pricing trends, neighborhood shifts, and inventory changes so his clients don't have to."})}),c.jsx(_e,{delay:.4,children:c.jsx("p",{children:"Whether you're buying your first home, selling a property, or just trying to understand what your home is worth, Holden's goal is simple: be the most useful resource you have in Grand Rapids real estate."})})]}),c.jsx(_e,{delay:.5,children:c.jsx("div",{className:"mt-10",children:c.jsx(Tt,{to:"/contact",className:"btn-outline-primary",children:"Get in Touch"})})})]})]})})}),c.jsx("section",{className:"section-padding bg-secondary",children:c.jsxs("div",{className:"container-page",children:[c.jsx(_e,{children:c.jsx("p",{className:"text-caption text-muted-foreground mb-4",children:"Track Record"})}),c.jsx(_e,{delay:.1,children:c.jsx("h2",{className:"heading-section mb-12 md:mb-16",children:"By the Numbers"})}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 md:gap-12",children:TIe.map((t,n)=>c.jsx(_e,{delay:n*.1,children:c.jsxs("div",{className:"text-center md:text-left",children:[c.jsx("span",{className:"text-gold font-serif text-5xl md:text-6xl font-light",children:t.value}),c.jsx("p",{className:"text-muted-foreground mt-3 text-sm uppercase tracking-widest",children:t.label})]})},t.label))})]})}),e&&e.length>0&&c.jsx("section",{className:"section-padding bg-background",children:c.jsxs("div",{className:"container-page",children:[c.jsx(_e,{children:c.jsx("p",{className:"text-caption text-muted-foreground mb-4",children:"Learn More"})}),c.jsx(_e,{delay:.1,children:c.jsx("h2",{className:"heading-section mb-12 md:mb-16",children:"Common Questions"})}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:e.map((t,n)=>c.jsx(_e,{delay:n*.1,children:c.jsxs(Tt,{to:`/about/${t.slug}`,className:"group block p-8 border border-border hover:border-accent bg-secondary/30 hover:bg-secondary/60 transition-all duration-300",children:[c.jsx("h3",{className:"font-serif text-xl md:text-2xl mb-3 group-hover:text-accent transition-colors leading-snug",children:t.h1||t.title}),t.subheadline&&c.jsx("p",{className:"text-sm text-muted-foreground mb-4 line-clamp-2",children:t.subheadline}),t.intro_text&&c.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-4",children:t.intro_text}),c.jsxs("span",{className:"inline-flex items-center gap-1.5 text-caption text-foreground group-hover:text-accent transition-colors",children:["Read More ",c.jsx(sc,{size:14})]})]})},t.id))})]})}),c.jsxs("section",{className:"relative",children:[c.jsxs("div",{className:"absolute inset-0",children:[c.jsx("img",{src:jIe,alt:"Grand Rapids area property",className:"w-full h-full object-cover"}),c.jsx("div",{className:"absolute inset-0 bg-black/70"})]}),c.jsx("div",{className:"relative section-padding",children:c.jsx("div",{className:"container-page",children:c.jsxs("div",{className:"max-w-3xl",children:[c.jsx(_e,{variant:"blur",children:c.jsx("p",{className:"text-caption text-gold mb-4",children:"Philosophy"})}),c.jsx(_e,{delay:.1,children:c.jsx("h2",{className:"heading-section text-background mb-8",children:`"I'd rather be honest about what I see than tell you what you want to hear. That's how the right deal actually happens."`})}),c.jsx(_e,{delay:.2,children:c.jsx("p",{className:"text-lg text-background/80",children:"Most people know what they want — but sometimes they haven't found the words for it yet. My job is to listen closely enough to understand what you're really looking for, even when it's a feeling more than a checklist. That deep understanding, paired with honest, direct advice, is what turns a house hunt into finding home."})})]})})})]})]})},IIe="/assets/testimonials-hero-D_OW3dCz.jpg",t5=[{quote:"Holden is a go getter and very responsive. He found us our home in a competitive market. Very knowledgeable and helped us negotiate a home that fit our needs and wants. I recommend Holden to anyone that is selling or wanting to buy a home because of his knowledge and determination to get the job done!",author:"Elvis Hadzalic",role:"Home Buyer",date:"2025",rating:5,source:"google"},{quote:"My partner and I were advised by one of our old neighbors to go to 616 Realty when we were ready to purchase a home, and I am so glad that we listened. Holden, Jayda and Beth were all so helpful during the entire process and were always there when we had questions. I am happy to say we have purchased our home and we couldn't have done that without their help!",author:"Idaris Cruz",role:"Home Buyer",date:"2025",rating:5,source:"google"},{quote:"Working with Holden was incredibly seamless and efficient. Wonderful advice and feedback to help me reach my ultimate goal! Would easily recommend to anyone who is anxious going into the housing market.",author:"Aleatha Ostrander",role:"Home Buyer",date:"2025",rating:5,source:"google"},{quote:"Holden was a pleasure working with on this transaction, his communication was prompt and professional, and they handled every detail with expertise and integrity. A true team player who kept the process smooth from start to finish — I look forward to working together again.",author:"Tristan Seeley",role:"Transaction Partner",date:"2025",rating:5,source:"google"},{quote:"This is the first transaction that I have worked with Holden on and I really appreciate his commitment to communication throughout the process. He was very open to what his clients goals were as buyers and allowed me to do the same for the sellers. Together we were able to work through some weather related issues to get to the closing table with minimal fuss. This is what real estate is all about. No ego. No flex. Just being good stewards for our clients. Thanks for working with me on this sale! I look forward to a few more!",author:"Julie Reisner",role:"Collaborating Agent",date:"2025",rating:5,source:"google"},{quote:"Holden is so helpful and knowledgeable. He really knows how to get stuff done!",author:"Katie T.",role:"Client",date:"2025",rating:5,source:"google"},{quote:"I've used Holden as my listing and buying agent 3 times and each experience has been amazing! He is a responsive and effective communicator and will go to the mat for you!",author:"Lisa Menezes",role:"Repeat Client",date:"2025",rating:5,source:"google"},{quote:"Working with HoldenGR was a really positive experience. From start to finish, everything was handled with professionalism, transparency, and attention to detail. Questions were answered quickly, the process was explained clearly, and nothing felt rushed or overlooked. It's easy to see how much pride is taken in the work and the level of service provided. Highly recommend!",author:"Brittany Richardson",role:"Client",date:"2025",rating:5,source:"google"},{quote:"Holden is a very capable to work through issues and solve problems. You need someone that can help you when surprises and challenges take place in the process. Most people don't have the experience to work through those so that everyone is aligned to get the deal done. I think that is a unique skill set he has to close deals.",author:"Russ Richardson",role:"Client",date:"2025",rating:5,source:"google"},{quote:"Very knowledgeable about the housing market and works hard for his clients.",author:"Marian Richardson",role:"Client",date:"2025",rating:5,source:"google"},{quote:"Holden made my first home buying experience seamless and easy!!",author:"Daphne Shears",role:"First-Time Home Buyer",date:"2025",rating:5,source:"google"},{quote:"The best!",author:"Tyler Hayek",role:"Client",date:"2025",rating:5,source:"google"},{quote:"We recently bought our dream home, and we couldn't have done it without Holden. From day one, he was incredibly patient, understanding, and committed to helping us find the right place — not just any place. What we appreciated the most was that he was never pushy. He let us take our time, answered every question honestly, and always looked out for our best interest rather than trying to rush a decision. Holden really listened to what we wanted and refined the search based on our needs, our priorities, and even the things we didn't say out loud. Throughout the process, he guided us with knowledge, confidence, and absolute professionalism. When things got stressful, he stayed calm and steady, making sure we felt supported at every step. If you're looking for a realtor who is trustworthy, thoughtful, and genuinely invested in helping you find the right home, Holden is the person you want by your side.",author:"Anu & Sam",role:"Home Buyer",date:"November 2025",rating:5,source:"zillow",location:"Grandville, MI"},{quote:"Holden helped us buy our retirement home. He went above and beyond to help us examine different possibilities and then to guide us from offer to closing on the house we chose. We couldn't be more pleased with his responsiveness and his knowledge of the market and the process. We would turn to him again in a heartbeat and wish him every continued success as a real estate professional.",author:"lwhall449",role:"Home Buyer",date:"June 2022",rating:5,source:"zillow",location:"San Marcos, TX"},{quote:"Sweet, smart and great. Recommended highly. Helped me through an entire deal that was incredibly stressful. Educated me on homes, gave advise, even gave me a ride home after closing lol, great guy.",author:"pennysleith",role:"Home Buyer",date:"October 2019",rating:5,source:"zillow",location:"Plainwell, MI"},{quote:"Holden did an outstanding job helping secure the perfect home for me. He put a great deal of effort into searching places that I might like. The end result was that I found a home that is perfect for me.",author:"Robert Teszlewicz",role:"Home Buyer",date:"June 2019",rating:5,source:"zillow",location:"MI"},{quote:"Holden was by far the most helpful realtor I could have asked for. I was able to call and text anytime of the day and always had a very quick response. He jumped on every home I wanted to view and was very knowledgable of the entire process. He even set me up with an amazing mortgage company. I will absolutely recommend him to my family, friends and all others!",author:"kmatthews6693",role:"Home Buyer",date:"April 2019",rating:5,source:"zillow",location:"Bellevue, MI"},{quote:"Holden is a very friendly, knowledgeable real estate agent. I would definitely refer him to anyone looking for a home. He helped us buy a new house and at the same time sell our existing home. Thanks",author:"Rita Lopez",role:"Buyer & Seller",date:"February 2019",rating:4,source:"zillow",location:"Holland, MI"},{quote:"Holden is very professional and I wouldn't hesitate to work with him again or refer him to others. I spoke to a few realtors prior to listing my condo and I went with Holden because he was organized and provided me everything I needed to know the first meeting. He made me feel comfortable with the process of selling my first home. Within a few days, I had a stylist and a photographer at my house. Just over a week after meeting Holden, my house was listed and sold. Do not overlook him due to him being younger and limited years of experience. He knows what he is doing and he will work hard to get you the sale.",author:"vlwalli88",role:"Home Seller",date:"July 2018",rating:5,source:"zillow",location:"Grand Rapids, MI"},{quote:"Holden is great. He worked with us to find the right home for us. He was easy to communicate with and always available. Very helpful in working through the process from beginning to end. We would recommend Holden to anyone looking for a new home.",author:"zuser20160707063703253",role:"Home Buyer",date:"June 2018",rating:5,source:"zillow",location:"Kent City, MI"},{quote:"Holden was very quick to respond. I actually just liked his status on facebook, so I could find him later when I was interested in starting to look for a house. He contacted me and gave me some references for a mortgage broker. He apparently works closely with the loan officers because he was told before I was officially told that I was approved. It's nice that everyone is working as a team to help my wife, myself, and our new born baby our first home.",author:"Eric Wheeler",role:"Home Buyer",date:"November 2017",rating:5,source:"zillow",location:"Caledonia, MI"},{quote:"Holden was extremely helpful and listened to our needs. He put us first and kept us updated through the offer process and was very prompt on his responses. Would recommend him to everyone I know.",author:"John Pasquinelli",role:"Home Buyer",date:"November 2017",rating:5,source:"zillow",location:"Holland, MI"},{quote:"Goes above and beyond to find the right fit. Willing to work around anyones schedule night or day. Very professional and invested in each client. Would highly recommend to anyone looking to both buy or sell.",author:"Dylan Bouchie",role:"Home Buyer",date:"August 2017",rating:5,source:"zillow",location:"NE"},{quote:"When deciding to buy a home my husband and I had a certain vision and were very particular in our wants and needs. Holden Richardson was able to work with us and assist us in finding our dream home. Buying a house while living in a different part of the state has its challenges but Holden made the process very easy and enjoyable. There were challenges but he was always available to help and did so in a professional manner.",author:"user7690907",role:"Home Buyer",date:"December 2016",rating:5,source:"zillow",location:"Holland, MI"},{quote:"Holden was very professional, personable, and punctual while helping us search for, and secure our home. Being first time homebuyers, we weren't sure how to navigate the real estate world, but Holden diligently explained every step of the way (sometimes multiple times when necessary). He made us feel comfortable and confident in our decisions and made sure we were aware of our options. Holden made sure we saw every house on our lists. He was diligent in answering all of our questions, regardless of the time of day or night and consulted other professionals when necessary. He helped us secure a home that fit everything we were looking for and more. We will be referring our friends and family to Holden for their real estate needs.",author:"Breanna Bellingar",role:"First-Time Home Buyer",date:"October 2016",rating:5,source:"zillow"}],q_=t5.length,OIe=t5.reduce((e,t)=>e+t.rating,0)/q_,Oae=+OIe.toFixed(2),FIe={january:"01",february:"02",march:"03",april:"04",may:"05",june:"06",july:"07",august:"08",september:"09",october:"10",november:"11",december:"12"};function MIe(e){const t=e.trim();if(/^\d{4}$/.test(t))return t;const n=t.match(/^([A-Za-z]+)\s+(\d{4})$/);if(n){const r=FIe[n[1].toLowerCase()];return r?`${n[2]}-${r}`:t}return t}const LIe={"@context":"https://schema.org","@type":"RealEstateAgent","@id":"https://www.holdengr.com/#agent",name:"Holden Richardson",url:"https://www.holdengr.com",telephone:"+1-616-403-6393",email:"holden@holdengr.com",address:{"@type":"PostalAddress",streetAddress:"1171 Plainfield Ave NE",addressLocality:"Grand Rapids",addressRegion:"MI",postalCode:"49503",addressCountry:"US"},sameAs:["https://www.instagram.com/holdengr.re","https://www.facebook.com/holden.m.richardson","https://www.google.com/maps?cid=17099657301143231027","https://www.linkedin.com/in/holdenrichardson","https://www.youtube.com/@holdengr.michigan","https://x.com/realholdengr","https://www.tiktok.com/@realholdengr.re","https://www.zillow.com/profile/Holden%20Richardson","https://www.realtor.com/realestateagents/59939fae1bb6a60010b0b9c6"],aggregateRating:{"@type":"AggregateRating",ratingValue:Oae,bestRating:5,worstRating:1,reviewCount:q_},review:t5.map(e=>({"@type":"Review",itemReviewed:{"@id":"https://www.holdengr.com/#agent"},author:{"@type":"Person",name:e.author},datePublished:MIe(e.date),reviewBody:e.quote,reviewRating:{"@type":"Rating",ratingValue:e.rating,bestRating:5,worstRating:1},...e.source&&{publisher:{"@type":"Organization",name:e.source==="google"?"Google":"Zillow"}}}))},RIe=()=>c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Client Testimonials | Holden Richardson | Grand Rapids Realtor"}),c.jsx("meta",{name:"description",content:`Read real reviews from Holden Richardson's clients across Google and Zillow. ${q_} reviews from buyers, sellers, and industry partners in the Grand Rapids area.`}),c.jsx("link",{rel:"canonical",href:"https://www.holdengr.com/about/testimonials"}),c.jsx("meta",{property:"og:title",content:"Client Testimonials | Holden Richardson"}),c.jsx("meta",{property:"og:description",content:"Real reviews from real clients — see why Grand Rapids homeowners trust Holden Richardson."}),c.jsx("meta",{property:"og:url",content:"https://www.holdengr.com/about/testimonials"}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:"Client Testimonials | Holden Richardson"}),c.jsx("meta",{name:"twitter:description",content:"Real reviews from real clients — see why Grand Rapids homeowners trust Holden Richardson."}),c.jsx("meta",{name:"twitter:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("script",{type:"application/ld+json",children:JSON.stringify(LIe)})]}),c.jsxs("section",{className:"relative -mt-20 pt-32 md:pt-40 pb-20 md:pb-28 overflow-hidden",children:[c.jsxs("div",{className:"absolute inset-0",children:[c.jsx("img",{src:IIe,alt:"Elegant living space",className:"w-full h-full object-cover"}),c.jsx("div",{className:"absolute inset-0 bg-black/50"})]}),c.jsxs("div",{className:"container-page relative z-10",children:[c.jsx(_e,{children:c.jsx("p",{className:"text-caption text-white/60 mb-4",children:"About"})}),c.jsxs(_e,{delay:.1,children:[c.jsx("h1",{className:"heading-display max-w-4xl text-white",children:"Client Testimonials"}),c.jsx("div",{className:"w-16 h-[2px] bg-accent mt-6 mb-6"})]}),c.jsx(_e,{delay:.2,children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"flex gap-0.5",children:[...Array(5)].map((e,t)=>c.jsx(WO,{size:20,className:"fill-gold text-gold"},t))}),c.jsxs("span",{className:"text-white/80 text-lg font-light",children:[Oae," average · ",q_," reviews"]})]})})]})]}),c.jsx("section",{className:"section-padding bg-background",children:c.jsxs("div",{className:"container-page",children:[c.jsx(_e,{children:c.jsxs("div",{className:"flex flex-wrap gap-4 mb-12",children:[c.jsxs("a",{href:"https://www.google.com/maps?cid=17099657301143231027",target:"_blank",rel:"noopener noreferrer",className:"btn-outline-primary inline-flex items-center gap-2 text-sm",children:["Google Reviews ",c.jsx(rl,{className:"w-3.5 h-3.5"})]}),c.jsxs("a",{href:"https://www.zillow.com/profile/Holden%20Richardson",target:"_blank",rel:"noopener noreferrer",className:"btn-outline-primary inline-flex items-center gap-2 text-sm",children:["Zillow Reviews ",c.jsx(rl,{className:"w-3.5 h-3.5"})]})]})}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:t5.map((e,t)=>c.jsx(_e,{delay:t%3*.1,children:c.jsxs("div",{className:"bg-secondary p-8 h-full flex flex-col border border-border",children:[c.jsx("div",{className:"flex gap-0.5 mb-4",children:[...Array(5)].map((n,r)=>c.jsx(WO,{size:14,className:r<e.rating?"fill-gold text-gold":"text-border"},r))}),c.jsxs("blockquote",{className:"text-sm font-serif text-foreground mb-6 flex-1 leading-relaxed",children:['"',e.quote,'"']}),c.jsxs("div",{className:"border-t border-border pt-4 mt-auto",children:[c.jsx("p",{className:"font-medium text-foreground text-sm",children:e.author}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.role,e.location?` · ${e.location}`:""," · ",e.date]}),c.jsx("span",{className:`inline-block mt-2 text-[10px] uppercase tracking-widest font-medium ${e.source==="google"?"text-accent":"text-muted-foreground"}`,children:e.source==="google"?"Google":"Zillow"})]})]})},e.author))})]})}),c.jsx("section",{className:"section-padding bg-primary text-center",children:c.jsxs("div",{className:"container-page",children:[c.jsx(_e,{children:c.jsx("h2",{className:"heading-section text-white mb-6",children:"Ready to Write Your Own Story?"})}),c.jsx(_e,{delay:.1,children:c.jsx("p",{className:"text-white/70 max-w-xl mx-auto mb-8",children:"Whether you're buying, selling, or just exploring — Holden is here to help you make a confident move."})}),c.jsx(_e,{delay:.2,children:c.jsx("a",{href:"/contact",className:"inline-block px-8 py-4 bg-accent text-accent-foreground font-medium text-sm uppercase tracking-widest hover:bg-accent/90 transition-colors duration-300",children:"Get in Touch"})})]})})]}),Ct=S.forwardRef(({className:e,type:t,...n},r)=>c.jsx("input",{type:t,className:pt("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Ct.displayName="Input";const ql=S.forwardRef(({className:e,...t},n)=>c.jsx("textarea",{className:pt("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:n,...t}));ql.displayName="Textarea";const UIe="https://crm.realsavvy.com/api/form_submissions",DIe="eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiIwMTdkZTg1ZTVkNmYyN2U1ZWVlNDQ0MTkyYmQ2OWFlOWE1YWQ1NmZkMzk5ZWViYjhmZTk5ZWQ5NzE1YmY0NzBiIiwiYXVkIjoiZ2lkOi8vcmVhbC1zYXZ2eS9TaXRlLzE3NjEiLCJzdWIiOiJnaWQ6Ly9yZWFsLXNhdnZ5L1NpdGUvMTc2MSIsInNjb3BlcyI6WyJhZG1pbiJdfQ.o3UL0ih_XwYtfFKjMO1rkNX84RcRVpL11s-WY6zlH0bZAfxgofDa933-GmRS0JezLJyGPrER9PYRmKtgukPl4VYEW0xDaDdVGmHtvavX2iNiAlXQscNMieJtvXT0TszFgDDqk0tsCsx0v9JIdUrBVyPYa6Zneu3rdg_Gvu4ocRy-UsXntMtW9WBs_CPZcKoSxMWOZZjxj1vGWB9VceRg62puKNN_EsxWK26JDBqwPqM8HMRac6yaECH9nvjtgmMasmybtXVeIDVbjuXx3fOfbeDFrCix1rbSGgs1H5-U8hN7AHvJijxqrHgNoofPPz5PSp2MsB-4fV7iuFE4dFZEbQ",QIe="3qgHnU6N5RTJVQ";async function HIe(e){var s;const t=crypto.randomUUID(),n=new FormData;n.append("cyclum_vid",QIe),n.append("cyclum_submission_id",t),n.append("form_name",e.formName||"contact-form-with-image"),n.append("first_name",e.firstName.trim()),n.append("last_name",e.lastName.trim()),n.append("email",e.email.trim()),e.phone&&n.append("phone",e.phone.trim()),e.message&&n.append("message",e.message.trim());const r=(s=e.tags)!=null&&s.length?e.tags:["website-lead"];for(const a of r)n.append("tag[]",a);const i=await fetch(UIe,{method:"POST",headers:{Authorization:`Bearer ${DIe}`},body:n});if(!i.ok)throw new Error(`RealSavvy submission failed (${i.status})`)}const $Ie="/assets/holden-brittany-BNfOpbGb.jpg",zIe=()=>{const{toast:e}=Ih(),{configMap:t}=_o(),[n,r]=S.useState(!1),[i,s]=S.useState({firstName:"",lastName:"",email:"",phone:"",message:"",interest:"buying"}),a=t.agent_phone,o=t.booking_url,l=async A=>{A.preventDefault(),r(!0);try{await HIe({firstName:i.firstName,lastName:i.lastName,email:i.email,phone:i.phone,message:i.message||i.interest,tags:["contact-us-form"],formName:"contact-form-with-image"}),e({title:"Message Sent",description:"Thank you for reaching out. Holden will be in touch shortly."}),s({firstName:"",lastName:"",email:"",phone:"",message:"",interest:"buying"})}catch(f){console.error("Form submission error:",f),e({title:"Error",description:"There was a problem sending your message. Please try again.",variant:"destructive"})}finally{r(!1)}},u=A=>{s({...i,[A.target.name]:A.target.value})},d=a?`sms:${a.replace(/[^+\d]/g,"")}`:null;return c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Contact Holden Richardson | Grand Rapids Real Estate"}),c.jsx("meta",{name:"description",content:"Get in touch with Holden Richardson for buying, selling, or real estate consultation in the Grand Rapids area."}),c.jsx("link",{rel:"canonical",href:"https://www.holdengr.com/contact"}),c.jsx("meta",{property:"og:title",content:"Contact Holden Richardson | Grand Rapids Real Estate"}),c.jsx("meta",{property:"og:description",content:"Get in touch with Holden Richardson for buying, selling, or real estate consultation in Grand Rapids."}),c.jsx("meta",{property:"og:url",content:"https://www.holdengr.com/contact"}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:"Contact Holden Richardson | Grand Rapids Real Estate"}),c.jsx("meta",{name:"twitter:description",content:"Get in touch with Holden Richardson for real estate in Grand Rapids."}),c.jsx("meta",{name:"twitter:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"ContactPage",url:"https://www.holdengr.com/contact",name:"Contact Holden Richardson",description:"Contact form, phone, text, and virtual meeting options for Grand Rapids Realtor Holden Richardson.",isPartOf:{"@id":"https://www.holdengr.com/#website"},mainEntity:{"@type":"RealEstateAgent","@id":"https://www.holdengr.com/#agent",name:"Holden Richardson",url:"https://www.holdengr.com",contactPoint:[{"@type":"ContactPoint",contactType:"sales",telephone:"+1-616-403-6393",email:"holden@holdengr.com",areaServed:"US-MI",availableLanguage:["English"]},{"@type":"ContactPoint",contactType:"customer support",email:"holden@holdengr.com",areaServed:"US-MI",availableLanguage:["English"]}]}})}),c.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://www.holdengr.com/"},{"@type":"ListItem",position:2,name:"Contact",item:"https://www.holdengr.com/contact"}]})})]}),c.jsx("section",{className:"bg-secondary pt-28 md:pt-32 pb-10 md:pb-14",children:c.jsxs("div",{className:"container-page",children:[c.jsx(_e,{children:c.jsxs("div",{className:"mb-8 md:mb-10",children:[c.jsx("p",{className:"text-caption text-muted-foreground mb-2",children:"Get in Touch"}),c.jsx("h1",{className:"font-serif text-2xl md:text-3xl font-light text-foreground",children:"Let's Start the Conversation"})]})}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-10 lg:gap-16 items-stretch",children:[c.jsx("div",{className:"flex items-center justify-center order-2 lg:order-1",children:c.jsx(_e,{variant:"scale",children:c.jsx("img",{src:$Ie,alt:"Holden and Brittany Richardson",className:"w-full h-auto object-cover"})})}),c.jsx(_e,{delay:.1,className:"order-1 lg:order-2",children:c.jsxs("form",{onSubmit:l,className:"space-y-5 border border-border/60 p-6 md:p-8 bg-background shadow-sm",children:[c.jsx("h3",{className:"font-serif text-xl font-light mb-2",children:"Send a Message"}),c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"firstName",className:"text-caption text-muted-foreground mb-1.5 block",children:"First Name *"}),c.jsx(Ct,{id:"firstName",name:"firstName",value:i.firstName,onChange:u,required:!0,className:"bg-secondary border-0 h-11 rounded-none focus:ring-1 focus:ring-accent"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"lastName",className:"text-caption text-muted-foreground mb-1.5 block",children:"Last Name *"}),c.jsx(Ct,{id:"lastName",name:"lastName",value:i.lastName,onChange:u,required:!0,className:"bg-secondary border-0 h-11 rounded-none focus:ring-1 focus:ring-accent"})]})]}),c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"email",className:"text-caption text-muted-foreground mb-1.5 block",children:"Email *"}),c.jsx(Ct,{id:"email",name:"email",type:"email",value:i.email,onChange:u,required:!0,className:"bg-secondary border-0 h-11 rounded-none focus:ring-1 focus:ring-accent"})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"phone",className:"text-caption text-muted-foreground mb-1.5 block",children:"Phone"}),c.jsx(Ct,{id:"phone",name:"phone",type:"tel",value:i.phone,onChange:u,className:"bg-secondary border-0 h-11 rounded-none focus:ring-1 focus:ring-accent"})]})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"interest",className:"text-caption text-muted-foreground mb-1.5 block",children:"I'm Interested In"}),c.jsxs("select",{id:"interest",name:"interest",value:i.interest,onChange:u,className:"w-full bg-secondary border-0 h-11 px-4 text-foreground focus:ring-1 focus:ring-accent appearance-none cursor-pointer",children:[c.jsx("option",{value:"buying",children:"Buying a Property"}),c.jsx("option",{value:"selling",children:"Selling a Property"}),c.jsx("option",{value:"both",children:"Both Buying and Selling"}),c.jsx("option",{value:"consultation",children:"General Consultation"})]})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"message",className:"text-caption text-muted-foreground mb-1.5 block",children:"Message"}),c.jsx(ql,{id:"message",name:"message",value:i.message,onChange:u,rows:4,className:"bg-secondary border-0 rounded-none focus:ring-1 focus:ring-accent resize-none",placeholder:"Tell me about your real estate goals..."})]}),c.jsx("button",{type:"submit",className:"btn-outline-primary w-full disabled:opacity-50",disabled:n,children:n?"Sending...":"Send Message"})]})})]})]})}),c.jsx("section",{className:"py-10 md:py-14 bg-background",children:c.jsx("div",{className:"container-page",children:c.jsx(_e,{children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 max-w-3xl mx-auto",children:[a&&c.jsx("a",{href:`tel:${a}`,children:c.jsxs(Be,{size:"lg",className:"w-full bg-foreground text-background hover:bg-foreground/90 rounded-none font-semibold h-14 text-base",children:[c.jsx(Ap,{className:"w-5 h-5 mr-2"}),"Call"]})}),d&&c.jsx("a",{href:d,children:c.jsxs(Be,{size:"lg",className:"w-full bg-foreground text-background hover:bg-foreground/90 rounded-none font-semibold h-14 text-base",children:[c.jsx(dp,{className:"w-5 h-5 mr-2"}),"Text"]})}),o&&c.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:c.jsxs(Be,{size:"lg",className:"w-full bg-foreground text-background hover:bg-foreground/90 rounded-none font-semibold h-14 text-base",children:[c.jsx(nc,{className:"w-5 h-5 mr-2"}),"Book Virtual Meeting"]})})]})})})})]})},VIe=[{icon:_ne,title:"Real-Time Home Value",description:"Receive a personalized, data-driven estimate of your home's current market value — updated monthly so you always know where you stand."},{icon:Vwe,title:"Monthly Market Updates",description:"Get a detailed digest delivered straight to your inbox with local market trends, comparable sales, and how your home's value is changing over time."},{icon:Cbe,title:"Equity & Financial Insights",description:"See how much equity you've built, explore cash-out refinance scenarios, and understand your home's role in your overall financial picture."},{icon:gne,title:"Neighborhood Intelligence",description:"Track what's selling in your neighborhood, average days on market, and pricing trends — the same data agents use to advise their clients."}],KIe=()=>(S.useEffect(()=>{const e=window;e.__hb_namespace="Homebot",e.Homebot=e.Homebot||function(){(e.Homebot.q=e.Homebot.q||[]).push(arguments)};const t=document.createElement("script");return t.async=!0,t.src="https://embed.homebotapp.com/lgw/v1/widget.js",document.head.appendChild(t),t.onload=()=>{e.Homebot("#homebot_homeowner","52a1cb8f2e41fb10e76903941d59cb3e4cb15eb38090f697")},()=>{t.parentNode&&t.parentNode.removeChild(t)}},[]),c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Home Valuation | What's Your Home Worth? | Holden Richardson"}),c.jsx("meta",{name:"description",content:"Get a free, AI-powered home valuation plus monthly updates on your home's value, equity, and Grand Rapids market trends."}),c.jsx("link",{rel:"canonical",href:"https://www.holdengr.com/home-valuation"}),c.jsx("meta",{property:"og:title",content:"Home Valuation | What's Your Home Worth?"}),c.jsx("meta",{property:"og:description",content:"Get a free home valuation plus monthly market updates from Holden Richardson."}),c.jsx("meta",{property:"og:url",content:"https://www.holdengr.com/home-valuation"}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:"Home Valuation | What's Your Home Worth?"}),c.jsx("meta",{name:"twitter:description",content:"Get a free home valuation plus monthly market updates from Holden Richardson."}),c.jsx("meta",{name:"twitter:image",content:"https://www.holdengr.com/og-image.jpg"})]}),c.jsxs("section",{className:"relative -mt-20 pt-32 md:pt-40 pb-14 md:pb-20 bg-secondary overflow-hidden",children:[c.jsxs("div",{className:"absolute inset-0",children:[c.jsx("img",{src:lc("stock_photo/1772747048679-xrqvfil905k.jpeg"),alt:"Grand Rapids home exterior",className:"w-full h-full object-cover"}),c.jsx("div",{className:"absolute inset-0 bg-black/40"})]}),c.jsxs("div",{className:"container-page text-center relative z-10",children:[c.jsx(_e,{children:c.jsx("p",{className:"text-caption text-white/70 mb-3",children:"Powered by Homebot"})}),c.jsx(_e,{delay:.1,children:c.jsx("h1",{className:"heading-section max-w-4xl mx-auto text-white",children:"What's Your Home Worth?"})}),c.jsx(_e,{delay:.2,children:c.jsx("p",{className:"text-body text-white/80 max-w-2xl mx-auto mt-4",children:"Enter your address below for a complimentary home valuation — plus ongoing monthly updates on your home's value, equity, and local market trends."})})]})]}),c.jsx("section",{className:"py-12 md:py-16 bg-background",children:c.jsx("div",{className:"container-page max-w-3xl",children:c.jsx("div",{id:"homebot_homeowner",className:"w-full min-h-[200px]"})})}),c.jsx("section",{className:"py-12 md:py-16 bg-secondary",children:c.jsxs("div",{className:"container-page",children:[c.jsx(_e,{children:c.jsxs("div",{className:"text-center mb-10",children:[c.jsx("p",{className:"text-caption text-muted-foreground mb-4",children:"Why Homebot?"}),c.jsx("h2",{className:"heading-section max-w-3xl mx-auto",children:"Your Home's Financial Dashboard — Free, Forever"}),c.jsx("p",{className:"text-body text-muted-foreground max-w-2xl mx-auto mt-6",children:"When you sign up through my Homebot portal, you don't just get a one-time estimate. You get a powerful, ongoing tool that keeps you informed and in control of your biggest investment."})]})}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8",children:VIe.map((e,t)=>c.jsx(_e,{delay:t*.1,children:c.jsxs(ri.div,{className:"flex gap-5",whileHover:{x:4},transition:{duration:.3},children:[c.jsx("div",{className:"w-12 h-12 bg-accent/10 flex items-center justify-center shrink-0",children:c.jsx(e.icon,{size:22,className:"text-accent"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:e.title}),c.jsx("p",{className:"text-body text-muted-foreground text-sm leading-relaxed",children:e.description})]})]})},e.title))})]})})]}));var Fae={exports:{}};/*! pym.js - v1.3.2 - 2018-02-13 */(function(e){(function(t){e.exports?e.exports=t():window.pym=t.call(this)})(function(){var t="xPYMx",n={},r=function(f){var h=document.createEvent("Event");h.initEvent("pym:"+f,!0,!0),document.dispatchEvent(h)},i=function(f){var h=new RegExp("[\\?&]"+f.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]")+"=([^&#]*)"),p=h.exec(location.search);return p===null?"":decodeURIComponent(p[1].replace(/\+/g," "))},s=function(f,h){if(!(h.xdomain!=="*"&&!f.origin.match(new RegExp(h.xdomain+"$")))&&typeof f.data=="string")return!0},a=function(f){var h=/^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/gi;if(f.match(h))return!0},o=function(f,h,p){var m=["pym",f,h,p];return m.join(t)},l=function(f){var h=["pym",f,"(\\S+)","(.*)"];return new RegExp("^"+h.join(t)+"$")},u=Date.now||function(){return new Date().getTime()},d=function(f,h,p){var m,g,y,v=null,x=0;p||(p={});var b=function(){x=p.leading===!1?0:u(),v=null,y=f.apply(m,g),v||(m=g=null)};return function(){var w=u();!x&&p.leading===!1&&(x=w);var B=h-(w-x);return m=this,g=arguments,B<=0||B>h?(v&&(clearTimeout(v),v=null),x=w,y=f.apply(m,g),v||(m=g=null)):!v&&p.trailing!==!1&&(v=setTimeout(b,B)),y}},A=function(){for(var f=n.autoInitInstances.length,h=f-1;h>=0;h--){var p=n.autoInitInstances[h];p.el.getElementsByTagName("iframe").length&&p.el.getElementsByTagName("iframe")[0].contentWindow||n.autoInitInstances.splice(h,1)}};return n.autoInitInstances=[],n.autoInit=function(f){var h=document.querySelectorAll("[data-pym-src]:not([data-pym-auto-initialized])"),p=h.length;A();for(var m=0;m<p;++m){var g=h[m];g.setAttribute("data-pym-auto-initialized",""),g.id===""&&(g.id="pym-"+m+"-"+Math.random().toString(36).substr(2,5));var y=g.getAttribute("data-pym-src"),v={xdomain:"string",title:"string",name:"string",id:"string",sandbox:"string",allowfullscreen:"boolean",parenturlparam:"string",parenturlvalue:"string",optionalparams:"boolean",trackscroll:"boolean",scrollwait:"number"},x={};for(var b in v)if(g.getAttribute("data-pym-"+b)!==null)switch(v[b]){case"boolean":x[b]=g.getAttribute("data-pym-"+b)!=="false";break;case"string":x[b]=g.getAttribute("data-pym-"+b);break;case"number":var w=Number(g.getAttribute("data-pym-"+b));isNaN(w)||(x[b]=w);break;default:console.err("unrecognized attribute type")}var B=new n.Parent(g.id,y,x);n.autoInitInstances.push(B)}return f||r("pym-initialized"),n.autoInitInstances},n.Parent=function(f,h,p){this.id=f,this.url=h,this.el=document.getElementById(f),this.iframe=null,this.settings={xdomain:"*",optionalparams:!0,parenturlparam:"parentUrl",parenturlvalue:window.location.href,trackscroll:!1,scrollwait:100},this.messageRegex=l(this.id),this.messageHandlers={},p=p||{},this._constructIframe=function(){var g=this.el.offsetWidth.toString();this.iframe=document.createElement("iframe");var y="",v=this.url.indexOf("#");for(v>-1&&(y=this.url.substring(v,this.url.length),this.url=this.url.substring(0,v)),this.url.indexOf("?")<0?this.url+="?":this.url+="&",this.iframe.src=this.url+"initialWidth="+g+"&childId="+this.id,this.settings.optionalparams&&(this.iframe.src+="&parentTitle="+encodeURIComponent(document.title),this.iframe.src+="&"+this.settings.parenturlparam+"="+encodeURIComponent(this.settings.parenturlvalue)),this.iframe.src+=y,this.iframe.setAttribute("width","100%"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("marginheight","0"),this.iframe.setAttribute("frameborder","0"),this.settings.title&&this.iframe.setAttribute("title",this.settings.title),this.settings.allowfullscreen!==void 0&&this.settings.allowfullscreen!==!1&&this.iframe.setAttribute("allowfullscreen",""),this.settings.sandbox!==void 0&&typeof this.settings.sandbox=="string"&&this.iframe.setAttribute("sandbox",this.settings.sandbox),this.settings.id&&(document.getElementById(this.settings.id)||this.iframe.setAttribute("id",this.settings.id)),this.settings.name&&this.iframe.setAttribute("name",this.settings.name);this.el.firstChild;)this.el.removeChild(this.el.firstChild);this.el.appendChild(this.iframe),window.addEventListener("resize",this._onResize),this.settings.trackscroll&&window.addEventListener("scroll",this._throttleOnScroll)},this._onResize=(function(){this.sendWidth(),this.settings.trackscroll&&this.sendViewportAndIFramePosition()}).bind(this),this._onScroll=(function(){this.sendViewportAndIFramePosition()}).bind(this),this._fire=function(g,y){if(g in this.messageHandlers)for(var v=0;v<this.messageHandlers[g].length;v++)this.messageHandlers[g][v].call(this,y)},this.remove=function(){window.removeEventListener("message",this._processMessage),window.removeEventListener("resize",this._onResize),this.el.removeChild(this.iframe),A()},this._processMessage=(function(g){if(s(g,this.settings)&&typeof g.data=="string"){var y=g.data.match(this.messageRegex);if(!y||y.length!==3)return!1;var v=y[1],x=y[2];this._fire(v,x)}}).bind(this),this._onHeightMessage=function(g){var y=parseInt(g);this.iframe.setAttribute("height",y+"px")},this._onNavigateToMessage=function(g){a(g)&&(document.location.href=g)},this._onScrollToChildPosMessage=function(g){var y=document.getElementById(this.id).getBoundingClientRect().top+window.pageYOffset,v=y+parseInt(g);window.scrollTo(0,v)},this.onMessage=function(g,y){g in this.messageHandlers||(this.messageHandlers[g]=[]),this.messageHandlers[g].push(y)},this.sendMessage=function(g,y){this.el.getElementsByTagName("iframe").length&&(this.el.getElementsByTagName("iframe")[0].contentWindow?this.el.getElementsByTagName("iframe")[0].contentWindow.postMessage(o(this.id,g,y),"*"):this.remove())},this.sendWidth=function(){var g=this.el.offsetWidth.toString();this.sendMessage("width",g)},this.sendViewportAndIFramePosition=function(){var g=this.iframe.getBoundingClientRect(),y=window.innerWidth||document.documentElement.clientWidth,v=window.innerHeight||document.documentElement.clientHeight,x=y+" "+v;x+=" "+g.top+" "+g.left,x+=" "+g.bottom+" "+g.right,this.sendMessage("viewport-iframe-position",x)};for(var m in p)this.settings[m]=p[m];return this._throttleOnScroll=d(this._onScroll.bind(this),this.settings.scrollwait),this.onMessage("height",this._onHeightMessage),this.onMessage("navigateTo",this._onNavigateToMessage),this.onMessage("scrollToChildPos",this._onScrollToChildPosMessage),this.onMessage("parentPositionInfo",this.sendViewportAndIFramePosition),window.addEventListener("message",this._processMessage,!1),this._constructIframe(),this},n.Child=function(f){this.parentWidth=null,this.id=null,this.parentTitle=null,this.parentUrl=null,this.settings={renderCallback:null,xdomain:"*",polling:0,parenturlparam:"parentUrl"},this.timerId=null,this.messageRegex=null,this.messageHandlers={},f=f||{},this.onMessage=function(g,y){g in this.messageHandlers||(this.messageHandlers[g]=[]),this.messageHandlers[g].push(y)},this._fire=function(g,y){if(g in this.messageHandlers)for(var v=0;v<this.messageHandlers[g].length;v++)this.messageHandlers[g][v].call(this,y)},this._processMessage=(function(g){if(s(g,this.settings)&&typeof g.data=="string"){var y=g.data.match(this.messageRegex);if(!(!y||y.length!==3)){var v=y[1],x=y[2];this._fire(v,x)}}}).bind(this),this._onWidthMessage=function(g){var y=parseInt(g);y!==this.parentWidth&&(this.parentWidth=y,this.settings.renderCallback&&this.settings.renderCallback(y),this.sendHeight())},this.sendMessage=function(g,y){window.parent.postMessage(o(this.id,g,y),"*")},this.sendHeight=(function(){var g=document.getElementsByTagName("body")[0].offsetHeight.toString();return this.sendMessage("height",g),g}).bind(this),this.getParentPositionInfo=function(){this.sendMessage("parentPositionInfo")},this.scrollParentTo=function(g){this.sendMessage("navigateTo","#"+g)},this.navigateParentTo=function(g){this.sendMessage("navigateTo",g)},this.scrollParentToChildEl=function(g){var y=document.getElementById(g).getBoundingClientRect().top+window.pageYOffset;this.scrollParentToChildPos(y)},this.scrollParentToChildPos=function(g){this.sendMessage("scrollToChildPos",g.toString())};var h=function(g){var y=document.getElementsByTagName("html")[0],v,x=y.className;try{window.self!==window.top?v="embedded":v="not-embedded"}catch{v="embedded"}x.indexOf(v)<0&&(y.className=x?x+" "+v:v,g&&g(v),r("marked-embedded"))};this.remove=function(){window.removeEventListener("message",this._processMessage),this.timerId&&clearInterval(this.timerId)};for(var p in f)this.settings[p]=f[p];this.id=i("childId")||f.id,this.messageRegex=new RegExp("^pym"+t+this.id+t+"(\\S+)"+t+"(.*)$");var m=parseInt(i("initialWidth"));return this.parentUrl=i(this.settings.parenturlparam),this.parentTitle=i("parentTitle"),this.onMessage("width",this._onWidthMessage),window.addEventListener("message",this._processMessage,!1),this.settings.renderCallback&&this.settings.renderCallback(m),this.sendHeight(),this.settings.polling&&(this.timerId=window.setInterval(this.sendHeight,this.settings.polling)),h(f.onMarkedEmbeddedStatus),this},typeof document<"u"&&n.autoInit(!0),n})})(Fae);var WIe=Fae.exports;const qIe=Bn(WIe),Lx={iframeDomain:"https://holdenrichardson-realsavvy.realsavvy.co",idxRedirectPath:"/idx",idxPrefix:"/app",siteId:null,clientId:"eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiIwMTdkZTg1ZTVkNmYyN2U1ZWVlNDQ0MTkyYmQ2OWFlOWE1YWQ1NmZkMzk5ZWViYjhmZTk5ZWQ5NzE1YmY0NzBiIiwiYXVkIjoiZ2lkOi8vcmVhbC1zYXZ2eS9TaXRlLzE3NjEiLCJzdWIiOiJnaWQ6Ly9yZWFsLXNhdnZ5L1NpdGUvMTc2MSIsInNjb3BlcyI6WyJhZG1pbiJdfQ.o3UL0ih_XwYtfFKjMO1rkNX84RcRVpL11s-WY6zlH0bZAfxgofDa933-GmRS0JezLJyGPrER9PYRmKtgukPl4VYEW0xDaDdVGmHtvavX2iNiAlXQscNMieJtvXT0TszFgDDqk0tsCsx0v9JIdUrBVyPYa6Zneu3rdg_Gvu4ocRy-UsXntMtW9WBs_CPZcKoSxMWOZZjxj1vGWB9VceRg62puKNN_EsxWK26JDBqwPqM8HMRac6yaECH9nvjtgmMasmybtXVeIDVbjuXx3fOfbeDFrCix1rbSGgs1H5-U8hN7AHvJijxqrHgNoofPPz5PSp2MsB-4fV7iuFE4dFZEbQ",style:{mainFont:"Inter"}},lV={idxPath:"/",marketId:"2319",map:!0,query:{},suggestions:[],height:"100vh",idxRedirect:!0},Mae=(e,t)=>{const n=[];for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=t?`${t}[${r}]`:r,s=e[r];s!=null&&n.push(s!==null&&typeof s=="object"?Mae(s,i):`${encodeURIComponent(i)}=${encodeURIComponent(s)}`)}return n.join("&")},GIe=(e={})=>{const{path:t="/",marketId:n=lV.marketId,map:r=lV.map,query:i={},cycagt:s=null,vid:a=null,magicLink:o=null,magicAuth:l=null}=e;let u=n;const d=localStorage.getItem("_market_v3");if(d)try{u=JSON.parse(d).id}catch{}const A={market_id:u,map:r,...i};A.client_id=Lx.clientId,A.font=Lx.style.mainFont,s&&(A._cycagt=s),a&&(A._vid=a),o&&(A.magic_link=o),l&&(A.magic_auth=l.replace(/ /g,"+")),typeof window<"u"&&window.matchMedia("(max-width: 768px)").matches&&(A.map=!1);let f=Lx.iframeDomain;/^https?:\/\//i.test(f)||(f=`https://${f}`),f=f.replace(/\/+$/,"");const h=Mae(A);return`${f}${Lx.idxPrefix}${t}${h?`?${h}`:""}`},YIe=e=>{const t=n=>{var s;if(!n.origin.includes("realsavvy"))return;const r=n.data;if(!r||!r.postal)return;const i=r.packingSlip;if(i){if(i.type==="federation.ping"){(s=n.source)==null||s.postMessage({postal:!0,packingSlip:{type:"federation.pong"}},{targetOrigin:n.origin});return}if(i.type==="federation.message"){const a=i.envelope;if(!a)return;if(a.channel==="idx"&&a.topic==="router.didTransition"){const o=a.data;if(!o||!o.currentURL)return;const l=o.currentURL.split("?"),u=l[0],d=new URLSearchParams(l[1]||"");e&&d.set("_cycagt",e);const A=d.toString(),f=A===""?u:`${u}?${A}`;window.history.replaceState(o,document.title,`${Lx.idxRedirectPath}${f}`)}}}};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},XIe=(e,t)=>{const n=e.startsWith("?")?e.slice(1):e;for(const r of n.split("&")){if(!r)continue;const[i,...s]=r.split("=");if(decodeURIComponent(i)===t)return s.join("=")}return null},Nr=()=>{const e=S.useRef(null),t=ml();return S.useEffect(()=>{const n=new URLSearchParams(t.search),r=n.get("_cycagt"),i=n.get("_vid"),s=n.get("magic_link"),a=XIe(t.search,"magic_auth")??n.get("magic_auth");r&&localStorage.setItem("cycagt",r),i&&localStorage.setItem("_vid",i);const o=localStorage.getItem("cycagt"),l=localStorage.getItem("_vid"),u=YIe(o),d=t.pathname.startsWith("/idx")?t.pathname.replace(/^\/idx/,"")||"/":t.pathname,A=GIe({path:d,cycagt:o,vid:l,magicLink:s,magicAuth:a});e.current=new qIe.Parent("idx-frame",A,{});const f=()=>{var g;const h=document.querySelector("header"),p=(h==null?void 0:h.offsetHeight)||80,m=window.innerHeight-p;(g=e.current)!=null&&g.iframe&&(e.current.iframe.setAttribute("height",`${m}px`),e.current.iframe.style.height=`${m}px`)};return f(),window.addEventListener("resize",f),()=>{u(),window.removeEventListener("resize",f)}},[t.pathname,t.search]),c.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Home Search | Grand Rapids Homes | Holden Richardson"}),c.jsx("meta",{name:"description",content:"Search homes for sale in Grand Rapids, East Grand Rapids, Ada, and West Michigan with Holden Richardson."}),c.jsx("link",{rel:"canonical",href:"https://www.holdengr.com/idx"}),c.jsx("meta",{property:"og:title",content:"Home Search | Grand Rapids Homes for Sale"}),c.jsx("meta",{property:"og:description",content:"Search homes for sale in Grand Rapids and West Michigan with Holden Richardson."}),c.jsx("meta",{property:"og:url",content:"https://www.holdengr.com/idx"}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"website"})]}),c.jsx(SD,{}),c.jsxs("main",{className:"flex-1 pt-[80px]",children:[c.jsx("div",{id:"idx-frame",className:"w-full [&>iframe]:w-full [&>iframe]:border-0"}),c.jsxs("div",{className:"text-center py-3 text-xs text-muted-foreground",children:["Powered by"," ",c.jsx("a",{href:"https://www.realsavvy.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"RealSavvy"})]})]})]})};var JIe="Label",Lae=S.forwardRef((e,t)=>c.jsx(_t.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Lae.displayName=JIe;var Rae=Lae;const ZIe=TN("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),bn=S.forwardRef(({className:e,...t},n)=>c.jsx(Rae,{ref:n,className:pt(ZIe(),e),...t}));bn.displayName=Rae.displayName;const mr=S.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:pt("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));mr.displayName="Card";const Ta=S.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:pt("flex flex-col space-y-1.5 p-6",e),...t}));Ta.displayName="CardHeader";const Pa=S.forwardRef(({className:e,...t},n)=>c.jsx("h3",{ref:n,className:pt("text-2xl font-semibold leading-none tracking-tight",e),...t}));Pa.displayName="CardTitle";const sy=S.forwardRef(({className:e,...t},n)=>c.jsx("p",{ref:n,className:pt("text-sm text-muted-foreground",e),...t}));sy.displayName="CardDescription";const gr=S.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:pt("p-6 pt-0",e),...t}));gr.displayName="CardContent";const e4e=S.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:pt("flex items-center p-6 pt-0",e),...t}));e4e.displayName="CardFooter";function n5(){const[e,t]=S.useState(null),[n,r]=S.useState(null),[i,s]=S.useState(!0),[a,o]=S.useState(!1);return S.useEffect(()=>{const A=async h=>{const{data:p}=await Re.from("user_roles").select("role").eq("user_id",h).eq("role","admin").maybeSingle();o(!!p)},{data:{subscription:f}}=Re.auth.onAuthStateChange((h,p)=>{r(p),t((p==null?void 0:p.user)??null),p!=null&&p.user?setTimeout(()=>A(p.user.id).then(()=>s(!1)),0):(o(!1),s(!1))});return Re.auth.getSession().then(({data:{session:h}})=>{r(h),t((h==null?void 0:h.user)??null),h!=null&&h.user?A(h.user.id).then(()=>s(!1)):s(!1)}),()=>f.unsubscribe()},[]),{user:e,session:n,isLoading:i,isAdmin:a,signIn:async(A,f)=>{const{error:h}=await Re.auth.signInWithPassword({email:A,password:f});return{error:h}},signUp:async(A,f)=>{const{error:h}=await Re.auth.signUp({email:A,password:f,options:{emailRedirectTo:window.location.origin}});return{error:h}},signOut:async()=>{await Re.auth.signOut(),t(null),r(null),o(!1)}}}const t4e=()=>{const e=wd(),{toast:t}=Ih(),{user:n,isLoading:r,isAdmin:i,signIn:s,signUp:a}=n5(),[o,l]=S.useState("signin"),[u,d]=S.useState(""),[A,f]=S.useState(""),[h,p]=S.useState(""),[m,g]=S.useState(""),[y,v]=S.useState(""),[x,b]=S.useState(""),[w,B]=S.useState(!1),[k,N]=S.useState(!1);S.useEffect(()=>{!r&&n&&i&&e("/admin/blog")},[n,r,i,e]);const j=async E=>{E.preventDefault(),B(!0);const{error:F}=await s(u,A);t(F?{variant:"destructive",title:"Login failed",description:F.message}:{title:"Welcome back!",description:"You have successfully logged in."}),B(!1)},L=async E=>{if(E.preventDefault(),m!==y){t({variant:"destructive",title:"Passwords don't match",description:"Please make sure your passwords match."});return}if(m.length<6){t({variant:"destructive",title:"Password too short",description:"Password must be at least 6 characters."});return}B(!0);const{error:F}=await a(h,m);t(F?{variant:"destructive",title:"Registration failed",description:F.message}:{title:"Registration successful!",description:"Please check your email to verify your account."}),B(!1)},T=async E=>{E.preventDefault(),B(!0);const{error:F}=await Re.auth.resetPasswordForEmail(x,{redirectTo:`${window.location.origin}/reset-password`});F?t({variant:"destructive",title:"Failed to send reset link",description:F.message}):(N(!0),t({title:"Check your email",description:"A password reset link has been sent to your email."})),B(!1)};return r?c.jsx(En,{children:c.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:c.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Loading..."})})}):c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Sign In | Holden Richardson | 616 Realty"}),c.jsx("meta",{name:"description",content:"Sign in to access your account."}),c.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),c.jsx("div",{className:"section-padding",children:c.jsx("div",{className:"container-page max-w-md",children:c.jsxs(mr,{className:"border-border",children:[c.jsxs(Ta,{className:"text-center",children:[c.jsx(Pa,{className:"heading-card",children:"Welcome"}),c.jsx(sy,{children:o==="forgot"?"Reset your password":"Sign in to access the admin dashboard"})]}),c.jsx(gr,{children:o==="forgot"?c.jsx("div",{className:"space-y-4",children:k?c.jsxs("div",{className:"text-center space-y-4",children:[c.jsx("p",{className:"text-muted-foreground",children:"Check your email for a password reset link."}),c.jsx(Be,{variant:"outline",className:"w-full",onClick:()=>{l("signin"),N(!1)},children:"Back to Sign In"})]}):c.jsxs("form",{onSubmit:T,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"forgot-email",children:"Email"}),c.jsx(Ct,{id:"forgot-email",type:"email",placeholder:"you@example.com",value:x,onChange:E=>b(E.target.value),required:!0})]}),c.jsx(Be,{type:"submit",className:"w-full",disabled:w,children:w?"Sending…":"Send Reset Link"}),c.jsx(Be,{type:"button",variant:"ghost",className:"w-full",onClick:()=>l("signin"),children:"Back to Sign In"})]})}):c.jsxs(u2,{value:o,onValueChange:E=>l(E),className:"w-full",children:[c.jsxs(G0,{className:"grid w-full grid-cols-2",children:[c.jsx(ii,{value:"signin",children:"Sign In"}),c.jsx(ii,{value:"signup",children:"Sign Up"})]}),c.jsx(si,{value:"signin",className:"mt-6",children:c.jsxs("form",{onSubmit:j,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"login-email",children:"Email"}),c.jsx(Ct,{id:"login-email",type:"email",placeholder:"you@example.com",value:u,onChange:E=>d(E.target.value),required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"login-password",children:"Password"}),c.jsx(Ct,{id:"login-password",type:"password",placeholder:"••••••••",value:A,onChange:E=>f(E.target.value),required:!0})]}),c.jsx(Be,{type:"submit",className:"w-full",disabled:w,children:w?"Signing in…":"Sign In"}),c.jsx(Be,{type:"button",variant:"link",className:"w-full text-sm",onClick:()=>l("forgot"),children:"Forgot password?"})]})}),c.jsx(si,{value:"signup",className:"mt-6",children:c.jsxs("form",{onSubmit:L,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"register-email",children:"Email"}),c.jsx(Ct,{id:"register-email",type:"email",placeholder:"you@example.com",value:h,onChange:E=>p(E.target.value),required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"register-password",children:"Password"}),c.jsx(Ct,{id:"register-password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"confirm-password",children:"Confirm Password"}),c.jsx(Ct,{id:"confirm-password",type:"password",placeholder:"••••••••",value:y,onChange:E=>v(E.target.value),required:!0})]}),c.jsx(Be,{type:"submit",className:"w-full",disabled:w,children:w?"Creating account…":"Create Account"})]})})]})})]})})})]})},n4e=({post:e})=>{const t=e.published_at?new Date(e.published_at).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):"";return c.jsx(_e,{children:c.jsx(Tt,{to:`/blog/${e.slug}`,className:"group block",children:c.jsxs("article",{className:"border border-border bg-card overflow-hidden transition-all duration-500 hover:shadow-lg",children:[e.featured_image&&c.jsx("div",{className:"aspect-[16/9] overflow-hidden",children:c.jsx("img",{src:e.featured_image,alt:e.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"})}),c.jsxs("div",{className:"p-6 md:p-8",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-xs uppercase tracking-wider text-muted-foreground mb-4",children:[e.category&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(mU,{className:"w-3 h-3"}),e.category]}),t&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(nc,{className:"w-3 h-3"}),t]}),e.author&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(gU,{className:"w-3 h-3"}),e.author]})]}),c.jsx("h2",{className:"heading-card mb-3 group-hover:text-accent transition-colors",children:e.title}),e.excerpt&&c.jsx("p",{className:"text-body text-muted-foreground line-clamp-3",children:e.excerpt}),c.jsx("div",{className:"mt-6",children:c.jsx("span",{className:"text-caption text-foreground group-hover:text-accent transition-colors",children:"Read More →"})})]})]})})})},r4e=()=>c.jsxs("div",{className:"border border-border bg-card overflow-hidden",children:[c.jsx(jt,{className:"aspect-[16/9] w-full"}),c.jsxs("div",{className:"p-6 md:p-8 space-y-4",children:[c.jsxs("div",{className:"flex gap-4",children:[c.jsx(jt,{className:"h-4 w-20"}),c.jsx(jt,{className:"h-4 w-24"})]}),c.jsx(jt,{className:"h-8 w-3/4"}),c.jsx(jt,{className:"h-16 w-full"}),c.jsx(jt,{className:"h-4 w-24"})]})]}),i4e=()=>{const{data:e,isLoading:t,error:n}=Yse();return c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Blog | Grand Rapids Real Estate Insights | Holden Richardson"}),c.jsx("meta",{name:"description",content:"Read the latest insights, market trends, and real estate tips from Holden Richardson — Grand Rapids Realtor."}),c.jsx("link",{rel:"canonical",href:"https://www.holdengr.com/blog"}),c.jsx("meta",{property:"og:title",content:"Blog | Grand Rapids Real Estate Insights"}),c.jsx("meta",{property:"og:description",content:"Real estate insights, market trends, and tips from Holden Richardson."}),c.jsx("meta",{property:"og:url",content:"https://www.holdengr.com/blog"}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:"Blog | Grand Rapids Real Estate Insights"}),c.jsx("meta",{name:"twitter:description",content:"Real estate insights, market trends, and tips from Holden Richardson."}),c.jsx("meta",{name:"twitter:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://www.holdengr.com/"},{"@type":"ListItem",position:2,name:"Blog",item:"https://www.holdengr.com/blog"}]})}),e&&e.length>0&&c.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"CollectionPage","@id":"https://www.holdengr.com/blog",url:"https://www.holdengr.com/blog",name:"Blog | Grand Rapids Real Estate Insights",description:"Insights, market trends, and real estate tips from Holden Richardson.",isPartOf:{"@id":"https://www.holdengr.com/#website"},about:{"@id":"https://www.holdengr.com/#agent"},mainEntity:{"@type":"ItemList",numberOfItems:e.length,itemListElement:e.map((r,i)=>({"@type":"ListItem",position:i+1,url:`https://www.holdengr.com/blog/${r.slug}`,name:r.title}))}})})]}),c.jsx("section",{className:"bg-secondary -mt-20 pt-32 md:pt-40 pb-20 md:pb-32",children:c.jsx("div",{className:"container-page text-center",children:c.jsxs(_e,{children:[c.jsx("p",{className:"text-caption text-muted-foreground mb-4",children:"Insights & Updates"}),c.jsx("h1",{className:"heading-display mb-6",children:"The Blog"}),c.jsx("p",{className:"text-body text-muted-foreground max-w-2xl mx-auto",children:"Stay informed with the latest real estate trends, market insights, and expert advice from our team."})]})})}),c.jsx("section",{className:"section-padding bg-background",children:c.jsxs("div",{className:"container-page",children:[n&&c.jsx("div",{className:"text-center py-12",children:c.jsx("p",{className:"text-destructive",children:"Failed to load posts. Please try again later."})}),t&&c.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[...Array(6)].map((r,i)=>c.jsx(r4e,{},i))}),!t&&e&&e.length===0&&c.jsx("div",{className:"text-center py-12",children:c.jsx("p",{className:"text-muted-foreground",children:"No posts published yet. Check back soon!"})}),!t&&e&&e.length>0&&c.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:e.map(r=>c.jsx(n4e,{post:r},r.id))})]})})]})},s4e=()=>{const{slug:e}=tm(),{data:t,isLoading:n,error:r}=BPe(e||"");if(n)return c.jsx(En,{children:c.jsx("div",{className:"section-padding",children:c.jsxs("div",{className:"container-page max-w-4xl",children:[c.jsx(jt,{className:"h-8 w-32 mb-8"}),c.jsx(jt,{className:"h-12 w-3/4 mb-4"}),c.jsxs("div",{className:"flex gap-4 mb-8",children:[c.jsx(jt,{className:"h-4 w-24"}),c.jsx(jt,{className:"h-4 w-24"})]}),c.jsx(jt,{className:"aspect-[16/9] w-full mb-8"}),c.jsxs("div",{className:"space-y-4",children:[c.jsx(jt,{className:"h-4 w-full"}),c.jsx(jt,{className:"h-4 w-full"}),c.jsx(jt,{className:"h-4 w-3/4"})]})]})})});if(r||!t)return c.jsxs(En,{children:[c.jsx(Mr,{children:c.jsx("title",{children:"Post Not Found | Holden Richardson"})}),c.jsx("div",{className:"section-padding",children:c.jsxs("div",{className:"container-page text-center",children:[c.jsx("h1",{className:"heading-section mb-4",children:"Post Not Found"}),c.jsx("p",{className:"text-body text-muted-foreground mb-8",children:"The blog post you're looking for doesn't exist or has been removed."}),c.jsx(Tt,{to:"/blog",className:"btn-outline-primary",children:"Back to Blog"})]})})]});const i=t.published_at?new Date(t.published_at).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):"";return c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsxs("title",{children:[t.meta_title||t.title," | Holden Richardson"]}),c.jsx("meta",{name:"description",content:t.meta_description||t.excerpt||""}),c.jsx("link",{rel:"canonical",href:`https://www.holdengr.com/blog/${e}`}),c.jsx("meta",{property:"og:image",content:t.featured_image||"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:title",content:t.meta_title||t.title}),c.jsx("meta",{property:"og:description",content:t.meta_description||t.excerpt||""}),c.jsx("meta",{property:"og:url",content:`https://www.holdengr.com/blog/${e}`}),c.jsx("meta",{property:"og:type",content:"article"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:t.meta_title||t.title}),c.jsx("meta",{name:"twitter:description",content:t.meta_description||t.excerpt||""}),c.jsx("meta",{name:"twitter:image",content:t.featured_image||"https://www.holdengr.com/og-image.jpg"}),c.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BlogPosting",headline:t.title,...t.featured_image&&{image:[t.featured_image]},author:{"@type":"Person",name:t.author||"Holden Richardson",url:"https://www.holdengr.com/about"},publisher:{"@id":"https://www.holdengr.com/#agent"},datePublished:t.published_at,dateModified:t.updated_at||t.published_at,description:t.excerpt||t.meta_description||"",url:`https://www.holdengr.com/blog/${e}`,mainEntityOfPage:{"@type":"WebPage","@id":`https://www.holdengr.com/blog/${e}`},isPartOf:{"@id":"https://www.holdengr.com/#website"},inLanguage:"en-US"})})]}),c.jsx("article",{className:"section-padding",children:c.jsxs("div",{className:"container-page max-w-4xl",children:[c.jsx(_e,{children:c.jsxs(Tt,{to:"/blog",className:"inline-flex items-center gap-2 text-caption text-muted-foreground hover:text-foreground transition-colors mb-8",children:[c.jsx(Z1,{className:"w-4 h-4"}),"Back to Blog"]})}),c.jsx(_e,{children:c.jsxs("header",{className:"mb-8",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-xs uppercase tracking-wider text-muted-foreground mb-4",children:[t.category&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(mU,{className:"w-3 h-3"}),t.category]}),i&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(nc,{className:"w-3 h-3"}),i]}),t.author&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(gU,{className:"w-3 h-3"}),t.author]})]}),c.jsx("h1",{className:"heading-section",children:t.title})]})}),t.featured_image&&c.jsx(_e,{children:c.jsx("div",{className:"aspect-[16/9] overflow-hidden mb-8",children:c.jsx("img",{src:t.featured_image,alt:t.title,className:"w-full h-full object-cover",loading:"lazy"})})}),c.jsx(_e,{children:c.jsx("div",{className:`prose prose-lg max-w-none
prose-headings:font-serif prose-headings:font-medium
prose-p:text-body prose-p:text-muted-foreground
prose-a:text-accent prose-a:no-underline hover:prose-a:underline
prose-strong:text-foreground
prose-blockquote:border-l-accent prose-blockquote:text-muted-foreground
prose-ul:text-muted-foreground prose-ol:text-muted-foreground`,dangerouslySetInnerHTML:{__html:t.content}})}),t.tags&&t.tags.length>0&&c.jsx(_e,{children:c.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:c.jsx("div",{className:"flex flex-wrap gap-2",children:t.tags.map(s=>c.jsx("span",{className:"px-3 py-1 text-xs uppercase tracking-wider bg-secondary text-muted-foreground",children:s},s))})})})]})})]})};var EP="focusScope.autoFocusOnMount",NP="focusScope.autoFocusOnUnmount",cV={bubbles:!1,cancelable:!0},a4e="FocusScope",r5=S.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[o,l]=S.useState(null),u=Fi(i),d=Fi(s),A=S.useRef(null),f=tn(t,m=>l(m)),h=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(r){let m=function(x){if(h.paused||!o)return;const b=x.target;o.contains(b)?A.current=b:nA(A.current,{select:!0})},g=function(x){if(h.paused||!o)return;const b=x.relatedTarget;b!==null&&(o.contains(b)||nA(A.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&nA(o)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const v=new MutationObserver(y);return o&&v.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),v.disconnect()}}},[r,o,h.paused]),S.useEffect(()=>{if(o){dV.add(h);const m=document.activeElement;if(!o.contains(m)){const y=new CustomEvent(EP,cV);o.addEventListener(EP,u),o.dispatchEvent(y),y.defaultPrevented||(o4e(A4e(Uae(o)),{select:!0}),document.activeElement===m&&nA(o))}return()=>{o.removeEventListener(EP,u),setTimeout(()=>{const y=new CustomEvent(NP,cV);o.addEventListener(NP,d),o.dispatchEvent(y),y.defaultPrevented||nA(m??document.body,{select:!0}),o.removeEventListener(NP,d),dV.remove(h)},0)}}},[o,u,d,h]);const p=S.useCallback(m=>{if(!n&&!r||h.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const v=m.currentTarget,[x,b]=l4e(v);x&&b?!m.shiftKey&&y===b?(m.preventDefault(),n&&nA(x,{select:!0})):m.shiftKey&&y===x&&(m.preventDefault(),n&&nA(b,{select:!0})):y===v&&m.preventDefault()}},[n,r,h.paused]);return c.jsx(_t.div,{tabIndex:-1,...a,ref:f,onKeyDown:p})});r5.displayName=a4e;function o4e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(nA(r,{select:t}),document.activeElement!==n)return}function l4e(e){const t=Uae(e),n=uV(t,e),r=uV(t.reverse(),e);return[n,r]}function Uae(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uV(e,t){for(const n of e)if(!c4e(n,{upTo:t}))return n}function c4e(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 u4e(e){return e instanceof HTMLInputElement&&"select"in e}function nA(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&u4e(e)&&t&&e.select()}}var dV=d4e();function d4e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=AV(e,t),e.unshift(t)},remove(t){var n;e=AV(e,t),(n=e[0])==null||n.resume()}}}function AV(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function A4e(e){return e.filter(t=>t.tagName!=="A")}var jP=0;function MD(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hV()),document.body.insertAdjacentElement("beforeend",e[1]??hV()),jP++,()=>{jP===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jP--}},[])}function hV(){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 OB="right-scroll-bar-position",FB="width-before-scroll-bar",h4e="with-scroll-bars-hidden",f4e="--removed-body-scroll-bar-size";function TP(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function p4e(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var m4e=typeof window<"u"?S.useLayoutEffect:S.useEffect,fV=new WeakMap;function g4e(e,t){var n=p4e(null,function(r){return e.forEach(function(i){return TP(i,r)})});return m4e(function(){var r=fV.get(n);if(r){var i=new Set(r),s=new Set(e),a=n.current;i.forEach(function(o){s.has(o)||TP(o,null)}),s.forEach(function(o){i.has(o)||TP(o,a)})}fV.set(n,e)},[e]),n}function y4e(e){return e}function v4e(e,t){t===void 0&&(t=y4e);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(o){return o!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(o){return s(o)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var o=n;n=[],o.forEach(s),a=n}var l=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return i}function x4e(e){e===void 0&&(e={});var t=v4e(null);return t.options=Rc({async:!0,ssr:!1},e),t}var Dae=function(e){var t=e.sideCar,n=W0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return S.createElement(r,Rc({},n))};Dae.isSideCarExport=!0;function w4e(e,t){return e.useMedium(t),Dae}var Qae=x4e(),PP=function(){},i5=S.forwardRef(function(e,t){var n=S.useRef(null),r=S.useState({onScrollCapture:PP,onWheelCapture:PP,onTouchMoveCapture:PP}),i=r[0],s=r[1],a=e.forwardProps,o=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,A=e.shards,f=e.sideCar,h=e.noRelative,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,x=e.gapMode,b=W0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,B=g4e([n,t]),k=Rc(Rc({},b),i);return S.createElement(S.Fragment,null,d&&S.createElement(w,{sideCar:Qae,removeScrollBar:u,shards:A,noRelative:h,noIsolation:p,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:x}),a?S.cloneElement(S.Children.only(o),Rc(Rc({},k),{ref:B})):S.createElement(v,Rc({},k,{className:l,ref:B}),o))});i5.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};i5.classNames={fullWidth:FB,zeroRight:OB};var b4e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function C4e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=b4e();return t&&e.setAttribute("nonce",t),e}function S4e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function B4e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _4e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=C4e())&&(S4e(t,n),B4e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},k4e=function(){var e=_4e();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Hae=function(){var e=k4e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},E4e={left:0,top:0,right:0,gap:0},IP=function(e){return parseInt(e||"",10)||0},N4e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[IP(n),IP(r),IP(i)]},j4e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return E4e;var t=N4e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},T4e=Hae(),ay="data-scroll-locked",P4e=function(e,t,n,r){var i=e.left,s=e.top,a=e.right,o=e.gap;return n===void 0&&(n="margin"),`
.`.concat(h4e,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(o,"px ").concat(r,`;
}
body[`).concat(ay,`] {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(s,`px;
padding-right: `).concat(a,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(o,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(OB,` {
right: `).concat(o,"px ").concat(r,`;
}
.`).concat(FB,` {
margin-right: `).concat(o,"px ").concat(r,`;
}
.`).concat(OB," .").concat(OB,` {
right: 0 `).concat(r,`;
}
.`).concat(FB," .").concat(FB,` {
margin-right: 0 `).concat(r,`;
}
body[`).concat(ay,`] {
`).concat(f4e,": ").concat(o,`px;
}
`)},pV=function(){var e=parseInt(document.body.getAttribute(ay)||"0",10);return isFinite(e)?e:0},I4e=function(){S.useEffect(function(){return document.body.setAttribute(ay,(pV()+1).toString()),function(){var e=pV()-1;e<=0?document.body.removeAttribute(ay):document.body.setAttribute(ay,e.toString())}},[])},O4e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;I4e();var s=S.useMemo(function(){return j4e(i)},[i]);return S.createElement(T4e,{styles:P4e(s,!t,i,n?"":"!important")})},rF=!1;if(typeof window<"u")try{var YC=Object.defineProperty({},"passive",{get:function(){return rF=!0,!0}});window.addEventListener("test",YC,YC),window.removeEventListener("test",YC,YC)}catch{rF=!1}var zm=rF?{passive:!1}:!1,F4e=function(e){return e.tagName==="TEXTAREA"},$ae=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!F4e(e)&&n[t]==="visible")},M4e=function(e){return $ae(e,"overflowY")},L4e=function(e){return $ae(e,"overflowX")},mV=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=zae(e,r);if(i){var s=Vae(e,r),a=s[1],o=s[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},R4e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},U4e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zae=function(e,t){return e==="v"?M4e(t):L4e(t)},Vae=function(e,t){return e==="v"?R4e(t):U4e(t)},D4e=function(e,t){return e==="h"&&t==="rtl"?-1:1},Q4e=function(e,t,n,r,i){var s=D4e(e,window.getComputedStyle(t).direction),a=s*r,o=n.target,l=t.contains(o),u=!1,d=a>0,A=0,f=0;do{if(!o)break;var h=Vae(e,o),p=h[0],m=h[1],g=h[2],y=m-g-s*p;(p||y)&&zae(e,o)&&(A+=y,f+=p);var v=o.parentNode;o=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(d&&(Math.abs(A)<1||!i)||!d&&(Math.abs(f)<1||!i))&&(u=!0),u},XC=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gV=function(e){return[e.deltaX,e.deltaY]},yV=function(e){return e&&"current"in e?e.current:e},H4e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},$4e=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},z4e=0,Vm=[];function V4e(e){var t=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),i=S.useState(z4e++)[0],s=S.useState(Hae)[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=k5e([e.lockRef.current],(e.shards||[]).map(yV),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=S.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var y=XC(m),v=n.current,x="deltaX"in m?m.deltaX:v[0]-y[0],b="deltaY"in m?m.deltaY:v[1]-y[1],w,B=m.target,k=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in m&&k==="h"&&B.type==="range")return!1;var N=mV(k,B);if(!N)return!0;if(N?w=k:(w=k==="v"?"h":"v",N=mV(k,B)),!N)return!1;if(!r.current&&"changedTouches"in m&&(x||b)&&(r.current=w),!w)return!0;var j=r.current||w;return Q4e(j,g,m,j==="h"?x:b,!0)},[]),l=S.useCallback(function(m){var g=m;if(!(!Vm.length||Vm[Vm.length-1]!==s)){var y="deltaY"in g?gV(g):XC(g),v=t.current.filter(function(w){return w.name===g.type&&(w.target===g.target||g.target===w.shadowParent)&&H4e(w.delta,y)})[0];if(v&&v.should){g.cancelable&&g.preventDefault();return}if(!v){var x=(a.current.shards||[]).map(yV).filter(Boolean).filter(function(w){return w.contains(g.target)}),b=x.length>0?o(g,x[0]):!a.current.noIsolation;b&&g.cancelable&&g.preventDefault()}}},[]),u=S.useCallback(function(m,g,y,v){var x={name:m,delta:g,target:y,should:v,shadowParent:K4e(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(b){return b!==x})},1)},[]),d=S.useCallback(function(m){n.current=XC(m),r.current=void 0},[]),A=S.useCallback(function(m){u(m.type,gV(m),m.target,o(m,e.lockRef.current))},[]),f=S.useCallback(function(m){u(m.type,XC(m),m.target,o(m,e.lockRef.current))},[]);S.useEffect(function(){return Vm.push(s),e.setCallbacks({onScrollCapture:A,onWheelCapture:A,onTouchMoveCapture:f}),document.addEventListener("wheel",l,zm),document.addEventListener("touchmove",l,zm),document.addEventListener("touchstart",d,zm),function(){Vm=Vm.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,zm),document.removeEventListener("touchmove",l,zm),document.removeEventListener("touchstart",d,zm)}},[]);var h=e.removeScrollBar,p=e.inert;return S.createElement(S.Fragment,null,p?S.createElement(s,{styles:$4e(i)}):null,h?S.createElement(O4e,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function K4e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const W4e=w4e(Qae,V4e);var s5=S.forwardRef(function(e,t){return S.createElement(i5,Rc({},e,{ref:t,sideCar:W4e}))});s5.classNames=i5.classNames;var q4e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Km=new WeakMap,JC=new WeakMap,ZC={},OP=0,Kae=function(e){return e&&(e.host||Kae(e.parentNode))},G4e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Kae(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Y4e=function(e,t,n,r){var i=G4e(t,Array.isArray(e)?e:[e]);ZC[n]||(ZC[n]=new WeakMap);var s=ZC[n],a=[],o=new Set,l=new Set(i),u=function(A){!A||o.has(A)||(o.add(A),u(A.parentNode))};i.forEach(u);var d=function(A){!A||l.has(A)||Array.prototype.forEach.call(A.children,function(f){if(o.has(f))d(f);else try{var h=f.getAttribute(r),p=h!==null&&h!=="false",m=(Km.get(f)||0)+1,g=(s.get(f)||0)+1;Km.set(f,m),s.set(f,g),a.push(f),m===1&&p&&JC.set(f,!0),g===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return d(t),o.clear(),OP++,function(){a.forEach(function(A){var f=Km.get(A)-1,h=s.get(A)-1;Km.set(A,f),s.set(A,h),f||(JC.has(A)||A.removeAttribute(r),JC.delete(A)),h||A.removeAttribute(n)}),OP--,OP||(Km=new WeakMap,Km=new WeakMap,JC=new WeakMap,ZC={})}},LD=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=q4e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Y4e(r,i,n,"aria-hidden")):function(){return null}},a5="Dialog",[Wae,qae]=zs(a5),[X4e,dc]=Wae(a5),Gae=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,o=S.useRef(null),l=S.useRef(null),[u,d]=wo({prop:r,defaultProp:i??!1,onChange:s,caller:a5});return c.jsx(X4e,{scope:t,triggerRef:o,contentRef:l,contentId:il(),titleId:il(),descriptionId:il(),open:u,onOpenChange:d,onOpenToggle:S.useCallback(()=>d(A=>!A),[d]),modal:a,children:n})};Gae.displayName=a5;var Yae="DialogTrigger",Xae=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=dc(Yae,n),s=tn(t,i.triggerRef);return c.jsx(_t.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":DD(i.open),...r,ref:s,onClick:at(e.onClick,i.onOpenToggle)})});Xae.displayName=Yae;var RD="DialogPortal",[J4e,Jae]=Wae(RD,{forceMount:void 0}),Zae=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=dc(RD,t);return c.jsx(J4e,{scope:t,forceMount:n,children:S.Children.map(r,a=>c.jsx(ga,{present:n||s.open,children:c.jsx(X1,{asChild:!0,container:i,children:a})}))})};Zae.displayName=RD;var G_="DialogOverlay",eoe=S.forwardRef((e,t)=>{const n=Jae(G_,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=dc(G_,e.__scopeDialog);return s.modal?c.jsx(ga,{present:r||s.open,children:c.jsx(eOe,{...i,ref:t})}):null});eoe.displayName=G_;var Z4e=jp("DialogOverlay.RemoveScroll"),eOe=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=dc(G_,n);return c.jsx(s5,{as:Z4e,allowPinchZoom:!0,shards:[i.contentRef],children:c.jsx(_t.div,{"data-state":DD(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Lp="DialogContent",toe=S.forwardRef((e,t)=>{const n=Jae(Lp,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=dc(Lp,e.__scopeDialog);return c.jsx(ga,{present:r||s.open,children:s.modal?c.jsx(tOe,{...i,ref:t}):c.jsx(nOe,{...i,ref:t})})});toe.displayName=Lp;var tOe=S.forwardRef((e,t)=>{const n=dc(Lp,e.__scopeDialog),r=S.useRef(null),i=tn(t,n.contentRef,r);return S.useEffect(()=>{const s=r.current;if(s)return LD(s)},[]),c.jsx(noe,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:at(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:at(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&s.preventDefault()}),onFocusOutside:at(e.onFocusOutside,s=>s.preventDefault())})}),nOe=S.forwardRef((e,t)=>{const n=dc(Lp,e.__scopeDialog),r=S.useRef(!1),i=S.useRef(!1);return c.jsx(noe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,o;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),noe=S.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,o=dc(Lp,n),l=S.useRef(null),u=tn(t,l);return MD(),c.jsxs(c.Fragment,{children:[c.jsx(r5,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:c.jsx(F0,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":DD(o.open),...a,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(iOe,{titleId:o.titleId}),c.jsx(aOe,{contentRef:l,descriptionId:o.descriptionId})]})]})}),UD="DialogTitle",roe=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=dc(UD,n);return c.jsx(_t.h2,{id:i.titleId,...r,ref:t})});roe.displayName=UD;var ioe="DialogDescription",soe=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=dc(ioe,n);return c.jsx(_t.p,{id:i.descriptionId,...r,ref:t})});soe.displayName=ioe;var aoe="DialogClose",ooe=S.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=dc(aoe,n);return c.jsx(_t.button,{type:"button",...r,ref:t,onClick:at(e.onClick,()=>i.onOpenChange(!1))})});ooe.displayName=aoe;function DD(e){return e?"open":"closed"}var loe="DialogTitleWarning",[rOe,coe]=Jxe(loe,{contentName:Lp,titleName:UD,docsSlug:"dialog"}),iOe=({titleId:e})=>{const t=coe(loe),n=`\`${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 S.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},sOe="DialogDescriptionWarning",aOe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${coe(sOe).contentName}}.`;return S.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},uoe=Gae,oOe=Xae,doe=Zae,QD=eoe,HD=toe,$D=roe,zD=soe,VD=ooe;const $c=uoe,lOe=doe,Aoe=S.forwardRef(({className:e,...t},n)=>c.jsx(QD,{ref:n,className:pt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Aoe.displayName=QD.displayName;const Gl=S.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(lOe,{children:[c.jsx(Aoe,{}),c.jsxs(HD,{ref:r,className:pt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,c.jsxs(VD,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[c.jsx(Da,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Gl.displayName=HD.displayName;const Yl=({className:e,...t})=>c.jsx("div",{className:pt("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Yl.displayName="DialogHeader";const Xl=S.forwardRef(({className:e,...t},n)=>c.jsx($D,{ref:n,className:pt("text-lg font-semibold leading-none tracking-tight",e),...t}));Xl.displayName=$D.displayName;const cOe=S.forwardRef(({className:e,...t},n)=>c.jsx(zD,{ref:n,className:pt("text-sm text-muted-foreground",e),...t}));cOe.displayName=zD.displayName;const KD=S.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:"relative w-full overflow-auto",children:c.jsx("table",{ref:n,className:pt("w-full caption-bottom text-sm",e),...t})}));KD.displayName="Table";const WD=S.forwardRef(({className:e,...t},n)=>c.jsx("thead",{ref:n,className:pt("[&_tr]:border-b",e),...t}));WD.displayName="TableHeader";const qD=S.forwardRef(({className:e,...t},n)=>c.jsx("tbody",{ref:n,className:pt("[&_tr:last-child]:border-0",e),...t}));qD.displayName="TableBody";const uOe=S.forwardRef(({className:e,...t},n)=>c.jsx("tfoot",{ref:n,className:pt("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));uOe.displayName="TableFooter";const oy=S.forwardRef(({className:e,...t},n)=>c.jsx("tr",{ref:n,className:pt("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));oy.displayName="TableRow";const _a=S.forwardRef(({className:e,...t},n)=>c.jsx("th",{ref:n,className:pt("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));_a.displayName="TableHead";const ia=S.forwardRef(({className:e,...t},n)=>c.jsx("td",{ref:n,className:pt("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));ia.displayName="TableCell";const dOe=S.forwardRef(({className:e,...t},n)=>c.jsx("caption",{ref:n,className:pt("mt-4 text-sm text-muted-foreground",e),...t}));dOe.displayName="TableCaption";function GD(e){const t=S.useRef({value:e,previous:e});return S.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var o5="Switch",[AOe,okt]=zs(o5),[hOe,fOe]=AOe(o5),hoe=S.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:s,required:a,disabled:o,value:l="on",onCheckedChange:u,form:d,...A}=e,[f,h]=S.useState(null),p=tn(t,x=>h(x)),m=S.useRef(!1),g=f?d||!!f.closest("form"):!0,[y,v]=wo({prop:i,defaultProp:s??!1,onChange:u,caller:o5});return c.jsxs(hOe,{scope:n,checked:y,disabled:o,children:[c.jsx(_t.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":goe(y),"data-disabled":o?"":void 0,disabled:o,value:l,...A,ref:p,onClick:at(e.onClick,x=>{v(b=>!b),g&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),g&&c.jsx(moe,{control:f,bubbles:!m.current,name:r,value:l,checked:y,required:a,disabled:o,form:d,style:{transform:"translateX(-100%)"}})]})});hoe.displayName=o5;var foe="SwitchThumb",poe=S.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=fOe(foe,n);return c.jsx(_t.span,{"data-state":goe(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});poe.displayName=foe;var pOe="SwitchBubbleInput",moe=S.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},s)=>{const a=S.useRef(null),o=tn(a,s),l=GD(n),u=_U(t);return S.useEffect(()=>{const d=a.current;if(!d)return;const A=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(A,"checked").set;if(l!==n&&h){const p=new Event("click",{bubbles:r});h.call(d,n),d.dispatchEvent(p)}},[l,n,r]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});moe.displayName=pOe;function goe(e){return e?"checked":"unchecked"}var yoe=hoe,mOe=poe;const rc=S.forwardRef(({className:e,...t},n)=>c.jsx(yoe,{className:pt("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:c.jsx(mOe,{className:pt("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));rc.displayName=yoe.displayName;var voe={exports:{}},xoe={};/**
* @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 Gy=S;function gOe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yOe=typeof Object.is=="function"?Object.is:gOe,vOe=Gy.useState,xOe=Gy.useEffect,wOe=Gy.useLayoutEffect,bOe=Gy.useDebugValue;function COe(e,t){var n=t(),r=vOe({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return wOe(function(){i.value=n,i.getSnapshot=t,FP(i)&&s({inst:i})},[e,n,t]),xOe(function(){return FP(i)&&s({inst:i}),e(function(){FP(i)&&s({inst:i})})},[e]),bOe(n),n}function FP(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yOe(e,n)}catch{return!0}}function SOe(e,t){return t()}var BOe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?SOe:COe;xoe.useSyncExternalStore=Gy.useSyncExternalStore!==void 0?Gy.useSyncExternalStore:BOe;voe.exports=xoe;var YD=voe.exports;function ds(e){this.content=e}ds.prototype={constructor:ds,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),s=r.content.slice();return i==-1?s.push(n||e,t):(s[i+1]=t,n&&(s[i]=n)),new ds(s)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new ds(n)},addToStart:function(e,t){return new ds([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new ds(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),s=r.find(e);return i.splice(s==-1?i.length:s,0,t,n),new ds(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=ds.from(e),e.size?new ds(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=ds.from(e),e.size?new ds(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=ds.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};ds.from=function(e){if(e instanceof ds)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ds(t)};function woe(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),s=t.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let a=0;i.text[a]==s.text[a];a++)n++;return n}if(i.content.size||s.content.size){let a=woe(i.content,s.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function boe(e,t,n,r){for(let i=e.childCount,s=t.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let a=e.child(--i),o=t.child(--s),l=a.nodeSize;if(a==o){n-=l,r-=l;continue}if(!a.sameMarkup(o))return{a:n,b:r};if(a.isText&&a.text!=o.text){let u=0,d=Math.min(a.text.length,o.text.length);for(;u<d&&a.text[a.text.length-u-1]==o.text[o.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(a.content.size||o.content.size){let u=boe(a.content,o.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class De{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,s){for(let a=0,o=0;o<n;a++){let l=this.content[a],u=o+l.nodeSize;if(u>t&&r(l,i+o,s||null,a)!==!1&&l.content.size){let d=o+1;l.nodesBetween(Math.max(0,t-d),Math.min(l.content.size,n-d),r,i+d)}o=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let s="",a=!0;return this.nodesBetween(t,n,(o,l)=>{let u=o.isText?o.text.slice(Math.max(t,l)-l,n-l):o.isLeaf?i?typeof i=="function"?i(o):i:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&u||o.isTextblock)&&r&&(a?a=!1:s+=r),s+=u},0),s}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<t.content.length;s++)i.push(t.content[s]);return new De(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let s=0,a=0;a<n;s++){let o=this.content[s],l=a+o.nodeSize;l>t&&((a<t||l>n)&&(o.isText?o=o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o=o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=l}return new De(r,i)}cutByIndex(t,n){return t==n?De.empty:t==0&&n==this.content.length?this:new De(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new De(i,s)}addToStart(t){return new De([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new De(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return woe(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return boe(this,t,n,r)}findIndex(t){if(t==0)return eS(0,t);if(t==this.size)return eS(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=t)return s==t?eS(n+1,s):eS(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return De.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new De(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return De.empty;let n,r=0;for(let i=0;i<t.length;i++){let s=t[i];r+=s.nodeSize,i&&s.isText&&t[i-1].sameMarkup(s)?(n||(n=t.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new De(n||t,r)}static from(t){if(!t)return De.empty;if(t instanceof De)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new De([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}De.empty=new De([],0);const MP={index:0,offset:0};function eS(e,t){return MP.index=e,MP.offset=t,MP}function Y_(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Y_(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Y_(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let Yn=class iF{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let s=t[i];if(this.eq(s))return t;if(this.type.excludes(s.type))n||(n=t.slice(0,i));else{if(s.type.excludes(this.type))return t;!r&&s.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Y_(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return iF.none;if(t instanceof iF)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};Yn.none=[];class X_ extends Error{}class rt{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Soe(this.content,t+this.openStart,n);return r&&new rt(r,this.openStart,this.openEnd)}removeBetween(t,n){return new rt(Coe(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return rt.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new rt(De.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let s=t.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=t.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new rt(t,r,i)}}rt.empty=new rt(De.empty,0,0);function Coe(e,t,n){let{index:r,offset:i}=e.findIndex(t),s=e.maybeChild(r),{index:a,offset:o}=e.findIndex(n);if(i==t||s.isText){if(o!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,s.copy(Coe(s.content,t-i-1,n-i-1)))}function Soe(e,t,n,r){let{index:i,offset:s}=e.findIndex(t),a=e.maybeChild(i);if(s==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let o=Soe(a.content,t-s-1,n,a);return o&&e.replaceChild(i,a.copy(o))}function _Oe(e,t,n){if(n.openStart>e.depth)throw new X_("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new X_("Inconsistent open depths");return Boe(e,t,n,0)}function Boe(e,t,n,r){let i=e.index(r),s=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let a=Boe(e,t,n,r+1);return s.copy(s.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,o=a.content;return pp(a,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}else{let{start:a,end:o}=kOe(n,e);return pp(s,koe(e,a,o,t,r))}else return pp(s,J_(e,t,r))}function _oe(e,t){if(!t.type.compatibleContent(e.type))throw new X_("Cannot join "+t.type.name+" onto "+e.type.name)}function sF(e,t,n){let r=e.node(n);return _oe(r,t.node(n)),r}function fp(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function gw(e,t,n,r){let i=(t||e).node(n),s=0,a=t?t.index(n):i.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&(fp(e.nodeAfter,r),s++));for(let o=s;o<a;o++)fp(i.child(o),r);t&&t.depth==n&&t.textOffset&&fp(t.nodeBefore,r)}function pp(e,t){return e.type.checkContent(t),e.copy(t)}function koe(e,t,n,r,i){let s=e.depth>i&&sF(e,t,i+1),a=r.depth>i&&sF(n,r,i+1),o=[];return gw(null,e,i,o),s&&a&&t.index(i)==n.index(i)?(_oe(s,a),fp(pp(s,koe(e,t,n,r,i+1)),o)):(s&&fp(pp(s,J_(e,t,i+1)),o),gw(t,n,i,o),a&&fp(pp(a,J_(n,r,i+1)),o)),gw(r,null,i,o),new De(o)}function J_(e,t,n){let r=[];if(gw(null,e,n,r),e.depth>n){let i=sF(e,t,n+1);fp(pp(i,J_(e,t,n+1)),r)}return gw(t,null,n,r),new De(r)}function kOe(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let s=n-1;s>=0;s--)i=t.node(s).copy(De.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class Tb{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<t;s++)i+=r.child(s).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Yn.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let o=r;r=i,i=o}let s=r.marks;for(var a=0;a<s.length;a++)s[a].type.spec.inclusive===!1&&(!i||!s[a].isInSet(i.marks))&&(s=s[a--].removeFromSet(s));return s}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Z_(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let a=t;;){let{index:o,offset:l}=a.content.findIndex(s),u=s-l;if(r.push(a,o,i+l),!u||(a=a.child(o),a.isText))break;s=u-1,i+=l+1}return new Tb(n,r,s)}static resolveCached(t,n){let r=vV.get(t);if(r)for(let s=0;s<r.elts.length;s++){let a=r.elts[s];if(a.pos==n)return a}else vV.set(t,r=new EOe);let i=r.elts[r.i]=Tb.resolve(t,n);return r.i=(r.i+1)%NOe,i}}class EOe{constructor(){this.elts=[],this.i=0}}const NOe=12,vV=new WeakMap;class Z_{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const jOe=Object.create(null);let th=class aF{constructor(t,n,r,i=Yn.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||De.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Y_(this.attrs,n||t.defaultAttrs||jOe)&&Yn.sameSet(this.marks,r||Yn.none)}copy(t=null){return t==this.content?this:new aF(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new aF(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return rt.empty;let i=this.resolve(t),s=this.resolve(n),a=r?0:i.sharedDepth(n),o=i.start(a),u=i.node(a).content.cut(i.pos-o,s.pos-o);return new rt(u,i.depth-a,s.depth-a)}replace(t,n,r){return _Oe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return Tb.resolveCached(this,t)}resolveNoCache(t){return Tb.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),Eoe(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=De.empty,i=0,s=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,i,s),o=a&&a.matchFragment(this.content,n);if(!o||!o.validEnd)return!1;for(let l=i;l<s;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(t).matchType(r),a=s&&s.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=Yn.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!Yn.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=De.fromJSON(t,n.content),s=t.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};th.prototype.text=void 0;class ek extends th{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Eoe(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new ek(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new ek(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function Eoe(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Rp{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new TOe(t,n);if(r.next==null)return Rp.empty;let i=Noe(r);r.next&&r.err("Unexpected trailing text");let s=ROe(LOe(i));return UOe(s,r),s}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(t.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function s(a,o){let l=a.matchFragment(t,r);if(l&&(!n||l.validEnd))return De.from(o.map(u=>u.createAndFill()));for(let u=0;u<a.next.length;u++){let{type:d,next:A}=a.next[u];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(A)==-1){i.push(A);let f=s(A,o.concat(d));if(f)return f}}return null}return s(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(t)){let a=[];for(let o=i;o.type;o=o.via)a.push(o.type);return a.reverse()}for(let a=0;a<s.next.length;a++){let{type:o,next:l}=s.next[a];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in n)&&(!i.type||l.validEnd)&&(r.push({match:o.contentMatch,type:o,via:i}),n[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)s+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return s}).join(`
`)}}Rp.empty=new Rp(!0);class TOe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function Noe(e){let t=[];do t.push(POe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function POe(e){let t=[];do t.push(IOe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function IOe(e){let t=MOe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=OOe(e,t);else break;return t}function xV(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function OOe(e,t){let n=xV(e),r=n;return e.eat(",")&&(e.next!="}"?r=xV(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function FOe(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let s in n){let a=n[s];a.isInGroup(t)&&i.push(a)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function MOe(e){if(e.eat("(")){let t=Noe(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=FOe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function LOe(e){let t=[[]];return i(s(e,0),n()),t;function n(){return t.push([])-1}function r(a,o,l){let u={term:l,to:o};return t[a].push(u),u}function i(a,o){a.forEach(l=>l.to=o)}function s(a,o){if(a.type=="choice")return a.exprs.reduce((l,u)=>l.concat(s(u,o)),[]);if(a.type=="seq")for(let l=0;;l++){let u=s(a.exprs[l],o);if(l==a.exprs.length-1)return u;i(u,o=n())}else if(a.type=="star"){let l=n();return r(o,l),i(s(a.expr,l),l),[r(l)]}else if(a.type=="plus"){let l=n();return i(s(a.expr,o),l),i(s(a.expr,l),l),[r(l)]}else{if(a.type=="opt")return[r(o)].concat(s(a.expr,o));if(a.type=="range"){let l=o;for(let u=0;u<a.min;u++){let d=n();i(s(a.expr,l),d),l=d}if(a.max==-1)i(s(a.expr,l),l);else for(let u=a.min;u<a.max;u++){let d=n();r(l,d),i(s(a.expr,l),d),l=d}return[r(l)]}else{if(a.type=="name")return[r(o,void 0,a.value)];throw new Error("Unknown expr type")}}}}function joe(e,t){return t-e}function wV(e,t){let n=[];return r(t),n.sort(joe);function r(i){let s=e[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let a=0;a<s.length;a++){let{term:o,to:l}=s[a];!o&&n.indexOf(l)==-1&&r(l)}}}function ROe(e){let t=Object.create(null);return n(wV(e,0));function n(r){let i=[];r.forEach(a=>{e[a].forEach(({term:o,to:l})=>{if(!o)return;let u;for(let d=0;d<i.length;d++)i[d][0]==o&&(u=i[d][1]);wV(e,l).forEach(d=>{u||i.push([o,u=[]]),u.indexOf(d)==-1&&u.push(d)})})});let s=t[r.join(",")]=new Rp(r.indexOf(e.length-1)>-1);for(let a=0;a<i.length;a++){let o=i[a][1].sort(joe);s.next.push({type:i[a][0],next:t[o.join(",")]||n(o)})}return s}}function UOe(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],s=!i.validEnd,a=[];for(let o=0;o<i.next.length;o++){let{type:l,next:u}=i.next[o];a.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),r.indexOf(u)==-1&&r.push(u)}s&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Toe(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Poe(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let s=e[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Ioe(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let s=e[i];s.validate&&s.validate(t[i])}}function Ooe(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new QOe(e,r,t[r]);return n}let bV=class Foe{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Ooe(t,r.attrs),this.defaultAttrs=Toe(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Rp.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:Poe(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new th(this,this.computeAttrs(t),De.from(n),Yn.setFrom(r))}createChecked(t=null,n,r){return n=De.from(n),this.checkContent(n),new th(this,this.computeAttrs(t),n,Yn.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=De.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(De.empty,!0);return s?new th(this,t,n.append(s),Yn.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){Ioe(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:Yn.none:t}static compile(t,n){let r=Object.create(null);t.forEach((s,a)=>r[s]=new Foe(s,n,a));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function DOe(e,t,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${s}`)}}class QOe{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?DOe(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class l5{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=Ooe(t,i.attrs),this.excluded=null;let s=Toe(this.attrs);this.instance=s?new Yn(this,s):null}create(t=null){return!t&&this.instance?this.instance:new Yn(this,Poe(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((s,a)=>r[s]=new l5(s,i++,n,a)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){Ioe(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}let Moe=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=ds.from(t.nodes),n.marks=ds.from(t.marks||{}),this.nodes=bV.compile(this.spec.nodes,this),this.marks=l5.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],a=s.spec.content||"",o=s.spec.marks;if(s.contentMatch=r[a]||(r[a]=Rp.parse(a,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=o=="_"?null:o?CV(this,o.split(" ")):o==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],a=s.spec.excludes;s.excluded=a==null?[s]:a==""?[]:CV(this,a.split(" "))}this.nodeFromJSON=i=>th.fromJSON(this,i),this.markFromJSON=i=>Yn.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof bV){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new ek(r,r.defaultAttrs,t,Yn.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function CV(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],s=e.marks[i],a=s;if(s)n.push(s);else for(let o in e.marks){let l=e.marks[o];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function HOe(e){return e.tag!=null}function $Oe(e){return e.style!=null}class nh{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(HOe(i))this.tags.push(i);else if($Oe(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=t.nodes[i.node];return s.contentMatch.matchType(s)})}parse(t,n={}){let r=new BV(this,n,!1);return r.addAll(t,Yn.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new BV(this,n,!0);return r.addAll(t,Yn.none,n.from,n.to),rt.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(KOe(t,s.tag)&&(s.namespace===void 0||t.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let a=s.getAttrs(t);if(a===!1)continue;s.attrs=a||void 0}return s}}}matchStyle(t,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let a=this.styles[s],o=a.style;if(!(o.indexOf(t)!=0||a.context&&!r.matchesContext(a.context)||o.length>t.length&&(o.charCodeAt(t.length)!=61||o.slice(t.length+1)!=n))){if(a.getAttrs){let l=a.getAttrs(n);if(l===!1)continue;a.attrs=l||void 0}return a}}}static schemaRules(t){let n=[];function r(i){let s=i.priority==null?50:i.priority,a=0;for(;a<n.length;a++){let o=n[a];if((o.priority==null?50:o.priority)<s)break}n.splice(a,0,i)}for(let i in t.marks){let s=t.marks[i].spec.parseDOM;s&&s.forEach(a=>{r(a=_V(a)),a.mark||a.ignore||a.clearMark||(a.mark=i)})}for(let i in t.nodes){let s=t.nodes[i].spec.parseDOM;s&&s.forEach(a=>{r(a=_V(a)),a.node||a.ignore||a.mark||(a.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new nh(t,nh.schemaRules(t)))}}const Loe={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},zOe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Roe={ol:!0,ul:!0},Pb=1,oF=2,yw=4;function SV(e,t,n){return t!=null?(t?Pb:0)|(t==="full"?oF:0):e&&e.whitespace=="pre"?Pb|oF:n&~yw}class tS{constructor(t,n,r,i,s,a){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=Yn.none,this.match=s||(a&yw?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(De.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Pb)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=De.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(De.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!Loe.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class BV{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,a=SV(null,n.preserveWhitespace,0)|(r?yw:0);i?s=new tS(i.type,i.attrs,Yn.none,!0,n.topMatch||i.type.contentMatch,a):r?s=new tS(null,null,Yn.none,!0,null,a):s=new tS(t.schema.topNodeType,null,Yn.none,!0,null,a),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top,s=i.options&oF?"full":this.localPreserveWS||(i.options&Pb)>0,{schema:a}=this.parser;if(s==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,`
`);else if(a.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(a.linebreakReplacement.create())){let o=r.split(/\r?\n|\r/);for(let l=0;l<o.length;l++)l&&this.insertNode(a.linebreakReplacement.create(),n,!0),o[l]&&this.insertNode(a.text(o[l]),n,!/\S/.test(o[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],l=t.previousSibling;(!o||l&&l.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(a.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,s=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let a=t.nodeName.toLowerCase(),o;Roe.hasOwnProperty(a)&&this.parser.normalizeLists&&VOe(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(o=this.parser.matchTag(t,this,r));e:if(l?l.ignore:zOe.hasOwnProperty(a))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let u,d=this.needsBlock;if(Loe.hasOwnProperty(a))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),u=!0,s.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let A=l&&l.skip?n:this.readStyles(t,n);A&&this.addAll(t,A),u&&this.sync(s),this.needsBlock=d}else{let u=this.readStyles(t,n);u&&this.addElementByRule(t,l,u,l.consuming===!1?o:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let s=this.parser.matchedStyles[i],a=r.getPropertyValue(s);if(a)for(let o=void 0;;){let l=this.parser.matchStyle(s,a,this,o);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)o=l;else break}}return n}addElementByRule(t,n,r,i){let s,a;if(n.node)if(a=this.parser.schema.nodes[n.node],a.isLeaf)this.insertNode(a.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(a,n.attrs||null,r,n.preserveWhitespace);l&&(s=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}s&&this.sync(o)&&this.open--}addAll(t,n,r,i){let s=r||0;for(let a=r?t.childNodes[r]:t.firstChild,o=i==null?null:t.childNodes[i];a!=o;a=a.nextSibling,++s)this.findAtPoint(t,s),this.addDOM(a,n);this.findAtPoint(t,s)}findPlace(t,n,r){let i,s;for(let a=this.open,o=0;a>=0;a--){let l=this.nodes[a],u=l.findWrapping(t);if(u&&(!i||i.length>u.length+o)&&(i=u,s=l,!u.length))break;if(l.solid){if(r)break;o+=2}}if(!i)return null;this.sync(s);for(let a=0;a<i.length;a++)n=this.enterInner(i[a],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let i=this.findPlace(t,n,r);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(t.type));let a=Yn.none;for(let o of i.concat(t.marks))(s.type?s.type.allowsMarkType(o.type):kV(o.type,t.type))&&(a=o.addToSet(a));return s.content.push(t.mark(a)),!0}return!1}enter(t,n,r,i){let s=this.findPlace(t.create(n),r,!1);return s&&(s=this.enterInner(t,n,r,!0,i)),s}enterInner(t,n,r,i=!1,s){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(t);let o=SV(t,s,a.options);a.options&yw&&a.content.length==0&&(o|=yw);let l=Yn.none;return r=r.filter(u=>(a.type?a.type.allowsMarkType(u.type):kV(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new tS(t,n,l,i,null,o)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Pb)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),a=(o,l)=>{for(;o>=0;o--){let u=n[o];if(u==""){if(o==n.length-1||o==0)continue;for(;l>=s;l--)if(a(o-1,l))return!0;return!1}else{let d=l>0||l==0&&i?this.nodes[l].type:r&&l>=s?r.node(l-s).type:null;if(!d||d.name!=u&&!d.isInGroup(u))return!1;l--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function VOe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&Roe.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function KOe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function _V(e){let t={};for(let n in e)t[n]=e[n];return t}function kV(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let s=[],a=o=>{s.push(o);for(let l=0;l<o.edgeCount;l++){let{type:u,next:d}=o.edge(l);if(u==t||s.indexOf(d)<0&&a(d))return!0}};if(a(i.contentMatch))return!0}}class nm{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=LP(n).createDocumentFragment());let i=r,s=[];return t.forEach(a=>{if(s.length||a.marks.length){let o=0,l=0;for(;o<s.length&&l<a.marks.length;){let u=a.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(s[o][0])||u.type.spec.spanning===!1)break;o++,l++}for(;o<s.length;)i=s.pop()[1];for(;l<a.marks.length;){let u=a.marks[l++],d=this.serializeMark(u,a.isInline,n);d&&(s.push([u,i]),i.appendChild(d.dom),i=d.contentDOM||d.dom)}}i.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=MB(LP(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let s=this.serializeMark(t.marks[i],t.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&MB(LP(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return MB(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new nm(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=EV(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return EV(t.marks)}}function EV(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function LP(e){return e.document||window.document}const NV=new WeakMap;function WOe(e){let t=NV.get(e);return t===void 0&&NV.set(e,t=qOe(e)),t}function qOe(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(e),t}function MB(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=WOe(r))&&s.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=i.indexOf(" ");a>0&&(n=i.slice(0,a),i=i.slice(a+1));let o,l=n?e.createElementNS(n,i):e.createElement(i),u=t[1],d=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){d=2;for(let A in u)if(u[A]!=null){let f=A.indexOf(" ");f>0?l.setAttributeNS(A.slice(0,f),A.slice(f+1),u[A]):A=="style"&&l.style?l.style.cssText=u[A]:l.setAttribute(A,u[A])}}for(let A=d;A<t.length;A++){let f=t[A];if(f===0){if(A<t.length-1||A>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:p}=MB(e,f,n,r);if(l.appendChild(h),p){if(o)throw new RangeError("Multiple content holes");o=p}}}return{dom:l,contentDOM:o}}const Uoe=65535,Doe=Math.pow(2,16);function GOe(e,t){return e+t*Doe}function jV(e){return e&Uoe}function YOe(e){return(e-(e&Uoe))/Doe}const Qoe=1,Hoe=2,LB=4,$oe=8;class lF{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&$oe)>0}get deletedBefore(){return(this.delInfo&(Qoe|LB))>0}get deletedAfter(){return(this.delInfo&(Hoe|LB))>0}get deletedAcross(){return(this.delInfo&LB)>0}}class uo{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&uo.empty)return uo.empty}recover(t){let n=0,r=jV(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+YOe(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,s=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?i:0);if(l>t)break;let u=this.ranges[o+s],d=this.ranges[o+a],A=l+u;if(t<=A){let f=u?t==l?-1:t==A?1:n:n,h=l+i+(f<0?0:d);if(r)return h;let p=t==(n<0?l:A)?null:GOe(o/3,t-l),m=t==l?Hoe:t==A?Qoe:LB;return(n<0?t!=l:t!=A)&&(m|=$oe),new lF(h,m,p)}i+=d-u}return r?t+i:new lF(t+i,0,null)}touches(t,n){let r=0,i=jV(n),s=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let l=this.ranges[o]-(this.inverted?r:0);if(l>t)break;let u=this.ranges[o+s],d=l+u;if(t<=d&&o==i*3)return!0;r+=this.ranges[o+a]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let a=this.ranges[i],o=a-(this.inverted?s:0),l=a+(this.inverted?0:s),u=this.ranges[i+n],d=this.ranges[i+r];t(o,o+u,l,l+d),s+=d-u}}invert(){return new uo(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?uo.empty:new uo(t<0?[0,-t,0]:[0,0,t])}}uo.empty=new uo([]);class Ib{constructor(t,n,r=0,i=t?t.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new Ib(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let i=t.getMirror(n);this.appendMap(t._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Ib;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let s=this.from;s<this.to;s++){let a=this._maps[s],o=a.mapResult(t,n);if(o.recover!=null){let l=this.getMirror(s);if(l!=null&&l>s&&l<this.to){s=l,t=this._maps[l].recover(o.recover);continue}}i|=o.delInfo,t=o.pos}return r?t:new lF(t,i,null)}}const RP=Object.create(null);let Vs=class{getMap(){return uo.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=RP[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in RP)throw new RangeError("Duplicate use of step JSON ID "+t);return RP[t]=n,n.prototype.jsonID=t,n}};class bi{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new bi(t,null)}static fail(t){return new bi(null,t)}static fromReplace(t,n,r,i){try{return bi.ok(t.replace(n,r,i))}catch(s){if(s instanceof X_)return bi.fail(s.message);throw s}}}function XD(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let s=e.child(i);s.content.size&&(s=s.copy(XD(s.content,t,s))),s.isInline&&(s=t(s,n,i)),r.push(s)}return De.fromArray(r)}class MA extends Vs{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new rt(XD(n.content,(a,o)=>!a.isAtom||!o.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),i),n.openStart,n.openEnd);return bi.fromReplace(t,this.from,this.to,s)}invert(){return new Jl(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new MA(n.pos,r.pos,this.mark)}merge(t){return t instanceof MA&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new MA(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new MA(n.from,n.to,t.markFromJSON(n.mark))}}Vs.jsonID("addMark",MA);class Jl extends Vs{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new rt(XD(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return bi.fromReplace(t,this.from,this.to,r)}invert(){return new MA(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Jl(n.pos,r.pos,this.mark)}merge(t){return t instanceof Jl&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Jl(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Jl(n.from,n.to,t.markFromJSON(n.mark))}}Vs.jsonID("removeMark",Jl);class LA extends Vs{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return bi.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return bi.fromReplace(t,this.pos,this.pos+1,new rt(De.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new LA(this.pos,n.marks[i]);return new LA(this.pos,this.mark)}}return new Up(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new LA(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new LA(n.pos,t.markFromJSON(n.mark))}}Vs.jsonID("addNodeMark",LA);class Up extends Vs{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return bi.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return bi.fromReplace(t,this.pos,this.pos+1,new rt(De.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new LA(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Up(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Up(n.pos,t.markFromJSON(n.mark))}}Vs.jsonID("removeNodeMark",Up);class qi extends Vs{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&cF(t,this.from,this.to)?bi.fail("Structure replace would overwrite content"):bi.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new uo([this.from,this.to-this.from,this.slice.size])}invert(t){return new qi(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new qi(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(t){if(!(t instanceof qi)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?rt.empty:new rt(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new qi(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?rt.empty:new rt(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new qi(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new qi(n.from,n.to,rt.fromJSON(t,n.slice),!!n.structure)}}Vs.jsonID("replace",qi);class Yi extends Vs{constructor(t,n,r,i,s,a,o=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=a,this.structure=o}apply(t){if(this.structure&&(cF(t,this.from,this.gapFrom)||cF(t,this.gapTo,this.to)))return bi.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return bi.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?bi.fromReplace(t,this.from,this.to,r):bi.fail("Content does not fit in gap")}getMap(){return new uo([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Yi(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new Yi(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Yi(n.from,n.to,n.gapFrom,n.gapTo,rt.fromJSON(t,n.slice),n.insert,!!n.structure)}}Vs.jsonID("replaceAround",Yi);function cF(e,t,n){let r=e.resolve(t),i=n-t,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let a=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function XOe(e,t,n,r){let i=[],s=[],a,o;e.doc.nodesBetween(t,n,(l,u,d)=>{if(!l.isInline)return;let A=l.marks;if(!r.isInSet(A)&&d.type.allowsMarkType(r.type)){let f=Math.max(u,t),h=Math.min(u+l.nodeSize,n),p=r.addToSet(A);for(let m=0;m<A.length;m++)A[m].isInSet(p)||(a&&a.to==f&&a.mark.eq(A[m])?a.to=h:i.push(a=new Jl(f,h,A[m])));o&&o.to==f?o.to=h:s.push(o=new MA(f,h,r))}}),i.forEach(l=>e.step(l)),s.forEach(l=>e.step(l))}function JOe(e,t,n,r){let i=[],s=0;e.doc.nodesBetween(t,n,(a,o)=>{if(!a.isInline)return;s++;let l=null;if(r instanceof l5){let u=a.marks,d;for(;d=r.isInSet(u);)(l||(l=[])).push(d),u=d.removeFromSet(u)}else r?r.isInSet(a.marks)&&(l=[r]):l=a.marks;if(l&&l.length){let u=Math.min(o+a.nodeSize,n);for(let d=0;d<l.length;d++){let A=l[d],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==s-1&&A.eq(i[h].style)&&(f=p)}f?(f.to=u,f.step=s):i.push({style:A,from:Math.max(o,t),to:u,step:s})}}}),i.forEach(a=>e.step(new Jl(a.from,a.to,a.style)))}function JD(e,t,n,r=n.contentMatch,i=!0){let s=e.doc.nodeAt(t),a=[],o=t+1;for(let l=0;l<s.childCount;l++){let u=s.child(l),d=o+u.nodeSize,A=r.matchType(u.type);if(!A)a.push(new qi(o,d,rt.empty));else{r=A;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new Jl(o,d,u.marks[f]));if(i&&u.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(u.text);)p||(p=new rt(De.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),a.push(new qi(o+f.index,o+f.index+f[0].length,p))}}o=d}if(!r.validEnd){let l=r.fillBefore(De.empty,!0);e.replace(o,o,new rt(l,0,0))}for(let l=a.length-1;l>=0;l--)e.step(a[l])}function ZOe(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function X0(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth,i=0,s=0;;--r){let a=e.$from.node(r),o=e.$from.index(r)+i,l=e.$to.indexAfter(r)-s;if(r<e.depth&&a.canReplace(o,l,n))return r;if(r==0||a.type.spec.isolating||!ZOe(a,o,l))break;o&&(i=1),l<a.childCount&&(s=1)}return null}function e3e(e,t,n){let{$from:r,$to:i,depth:s}=t,a=r.before(s+1),o=i.after(s+1),l=a,u=o,d=De.empty,A=0;for(let p=s,m=!1;p>n;p--)m||r.index(p)>0?(m=!0,d=De.from(r.node(p).copy(d)),A++):l--;let f=De.empty,h=0;for(let p=s,m=!1;p>n;p--)m||i.after(p+1)<i.end(p)?(m=!0,f=De.from(i.node(p).copy(f)),h++):u++;e.step(new Yi(l,u,a,o,new rt(d.append(f),A,h),d.size-A,!0))}function ZD(e,t,n=null,r=e){let i=t3e(e,t),s=i&&n3e(r,t);return s?i.map(TV).concat({type:t,attrs:n}).concat(s.map(TV)):null}function TV(e){return{type:e,attrs:null}}function t3e(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.contentMatchAt(r).findWrapping(t);if(!s)return null;let a=s.length?s[0]:t;return n.canReplaceWith(r,i,a)?s:null}function n3e(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.child(r),a=t.contentMatch.findWrapping(s.type);if(!a)return null;let l=(a.length?a[a.length-1]:t).contentMatch;for(let u=r;l&&u<i;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:a}function r3e(e,t,n){let r=De.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let o=n[a].type.contentMatch.matchFragment(r);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=De.from(n[a].type.create(n[a].attrs,r))}let i=t.start,s=t.end;e.step(new Yi(i,s,i,s,new rt(r,0,0),n.length,!0))}function i3e(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,n,(a,o)=>{let l=typeof i=="function"?i(a):i;if(a.isTextblock&&!a.hasMarkup(r,l)&&s3e(e.doc,e.mapping.slice(s).map(o),r)){let u=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?u=!1:!h&&p&&(u=!0)}u===!1&&Voe(e,a,o,s),JD(e,e.mapping.slice(s).map(o,1),r,void 0,u===null);let d=e.mapping.slice(s),A=d.map(o,1),f=d.map(o+a.nodeSize,1);return e.step(new Yi(A,f,A+1,f-1,new rt(De.from(r.create(l,null,a.marks)),0,0),1,!0)),u===!0&&zoe(e,a,o,s),!1}})}function zoe(e,t,n,r){t.forEach((i,s)=>{if(i.isText){let a,o=/\r?\n|\r/g;for(;a=o.exec(i.text);){let l=e.mapping.slice(r).map(n+1+s+a.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function Voe(e,t,n,r){t.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let a=e.mapping.slice(r).map(n+1+s);e.replaceWith(a,a+1,t.type.schema.text(`
`))}})}function s3e(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function a3e(e,t,n,r,i){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(r,null,i||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Yi(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new rt(De.from(a),0,0),1,!0))}function ly(e,t,n=1,r){let i=e.resolve(t),s=i.depth-n,a=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,d=n-2;u>s;u--,d--){let A=i.node(u),f=i.index(u);if(A.type.spec.isolating)return!1;let h=A.content.cutByIndex(f,A.childCount),p=r&&r[d+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[d]||A;if(!A.canReplace(f+1,A.childCount)||!m.type.validContent(h))return!1}let o=i.indexAfter(s),l=r&&r[0];return i.node(s).canReplaceWith(o,o,l?l.type:i.node(s+1).type)}function o3e(e,t,n=1,r){let i=e.doc.resolve(t),s=De.empty,a=De.empty;for(let o=i.depth,l=i.depth-n,u=n-1;o>l;o--,u--){s=De.from(i.node(o).copy(s));let d=r&&r[u];a=De.from(d?d.type.create(d.attrs,a):i.node(o).copy(a))}e.step(new qi(t,t,new rt(s.append(a),n,n),!0))}function Mh(e,t){let n=e.resolve(t),r=n.index();return Koe(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function l3e(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let s=t.child(i),a=s.type==r?e.type.schema.nodes.text:s.type;if(n=n.matchType(a),!n||!e.type.allowsMarks(s.marks))return!1}return n.validEnd}function Koe(e,t){return!!(e&&t&&!e.isLeaf&&l3e(e,t))}function c5(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let s,a,o=r.index(i);if(i==r.depth?(s=r.nodeBefore,a=r.nodeAfter):n>0?(s=r.node(i+1),o++,a=r.node(i).maybeChild(o)):(s=r.node(i).maybeChild(o-1),a=r.node(i+1)),s&&!s.isTextblock&&Koe(s,a)&&r.node(i).canReplace(o,o+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function c3e(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,s=e.doc.resolve(t-n),a=s.node().type;if(i&&a.inlineContent){let d=a.whitespace=="pre",A=!!a.contentMatch.matchType(i);d&&!A?r=!1:!d&&A&&(r=!0)}let o=e.steps.length;if(r===!1){let d=e.doc.resolve(t+n);Voe(e,d.node(),d.before(),o)}a.inlineContent&&JD(e,t+n-1,a,s.node().contentMatchAt(s.index()),r==null);let l=e.mapping.slice(o),u=l.map(t-n);if(e.step(new qi(u,l.map(t+n,-1),rt.empty,!0)),r===!0){let d=e.doc.resolve(u);zoe(e,d.node(),d.before(),e.steps.length)}return e}function u3e(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,n))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,n))return r.after(i+1);if(s<r.node(i).childCount)return null}return null}function Woe(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let s=0;s<n.openStart;s++)i=i.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let a=r.depth;a>=0;a--){let o=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,l=r.index(a)+(o>0?1:0),u=r.node(a),d=!1;if(s==1)d=u.canReplace(l,l,i);else{let A=u.contentMatchAt(l).findWrapping(i.firstChild.type);d=A&&u.canReplaceWith(l,l,A[0])}if(d)return o==0?r.pos:o<0?r.before(a+1):r.after(a+1)}return null}function u5(e,t,n=t,r=rt.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),s=e.resolve(n);return qoe(i,s,r)?new qi(t,n,r):new d3e(i,s,r).fit()}function qoe(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class d3e{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=De.empty;for(let i=0;i<=t.depth;i++){let s=t.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=De.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let s=this.placed,a=r.depth,o=i.depth;for(;a&&o&&s.childCount==1;)s=s.firstChild.content,a--,o--;let l=new rt(s,a,o);return t>-1?new Yi(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new qi(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let s=n.firstChild;if(n.childCount>1&&(i=0),s.type.spec.isolating&&i<=r){t=r;break}n=s.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=UP(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let a=i.firstChild;for(let o=this.depth;o>=0;o--){let{type:l,match:u}=this.frontier[o],d,A=null;if(n==1&&(a?u.matchType(a.type)||(A=u.fillBefore(De.from(a),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:o,parent:s,inject:A};if(n==2&&a&&(d=u.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:o,parent:s,wrap:d};if(s&&u.matchType(s.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=UP(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new rt(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=UP(t,n);if(i.childCount<=1&&n>0){let s=t.size-n<=n+i.size;this.unplaced=new rt(Rx(t,n-1,1),n-1,s?n-1:r)}else this.unplaced=new rt(Rx(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let m=0;m<s.length;m++)this.openFrontierNode(s[m]);let a=this.unplaced,o=r?r.content:a.content,l=a.openStart-t,u=0,d=[],{match:A,type:f}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)d.push(i.child(m));A=A.matchFragment(i)}let h=o.size+t-(a.content.size-a.openEnd);for(;u<o.childCount;){let m=o.child(u),g=A.matchType(m.type);if(!g)break;u++,(u>1||l==0||m.content.size)&&(A=g,d.push(Goe(m.mark(f.allowedMarks(m.marks)),u==1?l:0,u==o.childCount?h:-1)))}let p=u==o.childCount;p||(h=-1),this.placed=Ux(this.placed,n,De.from(d)),this.frontier[n].match=A,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=o;m<h;m++){let y=g.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),g=y.content}this.unplaced=p?t==0?rt.empty:new rt(Rx(a.content,t-1,1),t-1,h<0?a.openEnd:t-1):new rt(Rx(a.content,t,u),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!DP(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],s=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),a=DP(t,n,i,r,s);if(a){for(let o=n-1;o>=0;o--){let{match:l,type:u}=this.frontier[o],d=DP(t,o,u,l,!0);if(!d||d.childCount)continue e}return{depth:n,fit:a,move:s?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Ux(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,s)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Ux(this.placed,this.depth,De.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(De.empty,!0);n.childCount&&(this.placed=Ux(this.placed,this.frontier.length,n))}}function Rx(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Rx(e.firstChild.content,t-1,n)))}function Ux(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Ux(e.lastChild.content,t-1,n)))}function UP(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Goe(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Goe(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(De.empty,!0)))),e.copy(r)}function DP(e,t,n,r,i){let s=e.node(t),a=i?e.indexAfter(t):e.index(t);if(a==s.childCount&&!n.compatibleContent(s.type))return null;let o=r.fillBefore(s.content,!0,a);return o&&!A3e(n,s.content,a)?o:null}function A3e(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function h3e(e){return e.spec.defining||e.spec.definingForContent}function f3e(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),s=e.doc.resolve(n);if(qoe(i,s,r))return e.step(new qi(t,n,r));let a=Xoe(i,s);a[a.length-1]==0&&a.pop();let o=-(i.depth+1);a.unshift(o);for(let f=i.depth,h=i.pos-1;f>0;f--,h--){let p=i.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;a.indexOf(f)>-1?o=f:i.before(f)==h&&a.splice(1,0,-f)}let l=a.indexOf(o),u=[],d=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(u.push(p),h==r.openStart)break;f=p.content}for(let f=d-1;f>=0;f--){let h=u[f],p=h3e(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(o)-1)))d=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+d+1)%(r.openStart+1),p=u[h];if(p)for(let m=0;m<a.length;m++){let g=a[(m+l)%a.length],y=!0;g<0&&(y=!1,g=-g);let v=i.node(g-1),x=i.index(g-1);if(v.canReplaceWith(x,x,p.type,p.marks))return e.replace(i.before(g),y?s.after(g):n,new rt(Yoe(r.content,0,r.openStart,h),h,r.openEnd))}}let A=e.steps.length;for(let f=a.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>A));f--){let h=a[f];h<0||(t=i.before(h),n=s.after(h))}}function Yoe(e,t,n,r,i){if(t<n){let s=e.firstChild;e=e.replaceChild(0,s.copy(Yoe(s.content,t+1,n,r,s)))}if(t>r){let s=i.contentMatchAt(0),a=s.fillBefore(e).append(e);e=a.append(s.matchFragment(a).fillBefore(De.empty,!0))}return e}function p3e(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=u3e(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new rt(De.from(r),0,0))}function m3e(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),s=Xoe(r,i);for(let a=0;a<s.length;a++){let o=s[a],l=a==s.length-1;if(l&&o==0||r.node(o).type.contentMatch.validEnd)return e.delete(r.start(o),i.end(o));if(o>0&&(l||r.node(o-1).canReplace(r.index(o-1),i.indexAfter(o-1))))return e.delete(r.before(o),i.after(o))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}function Xoe(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let s=e.start(i);if(s<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(s==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==s-1)&&n.push(i)}return n}class cy extends Vs{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return bi.fail("No node at attribute step's position");let r=Object.create(null);for(let s in n.attrs)r[s]=n.attrs[s];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return bi.fromReplace(t,this.pos,this.pos+1,new rt(De.from(i),0,n.isLeaf?0:1))}getMap(){return uo.empty}invert(t){return new cy(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new cy(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new cy(n.pos,n.attr,n.value)}}Vs.jsonID("attr",cy);class Ob extends Vs{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return bi.ok(r)}getMap(){return uo.empty}invert(t){return new Ob(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ob(n.attr,n.value)}}Vs.jsonID("docAttr",Ob);let Yy=class extends Error{};Yy=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Yy.prototype=Object.create(Error.prototype);Yy.prototype.constructor=Yy;Yy.prototype.name="TransformError";class Joe{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Ib}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Yy(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let t=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(t=i.map(t,1),n=i.map(n,-1)),i.forEach((s,a,o,l)=>{t=Math.min(t,o),n=Math.max(n,l)})}return t==1e9?null:{from:t,to:n}}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=rt.empty){let i=u5(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new rt(De.from(r),0,0))}delete(t,n){return this.replace(t,n,rt.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return f3e(this,t,n,r),this}replaceRangeWith(t,n,r){return p3e(this,t,n,r),this}deleteRange(t,n){return m3e(this,t,n),this}lift(t,n){return e3e(this,t,n),this}join(t,n=1){return c3e(this,t,n),this}wrap(t,n){return r3e(this,t,n),this}setBlockType(t,n=t,r,i=null){return i3e(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return a3e(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new cy(t,n,r)),this}setDocAttribute(t,n){return this.step(new Ob(t,n)),this}addNodeMark(t,n){return this.step(new LA(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof Yn)n.isInSet(r.marks)&&this.step(new Up(t,n));else{let i=r.marks,s,a=[];for(;s=n.isInSet(i);)a.push(new Up(t,s)),i=s.removeFromSet(i);for(let o=a.length-1;o>=0;o--)this.step(a[o])}return this}split(t,n=1,r){return o3e(this,t,n,r),this}addMark(t,n,r){return XOe(this,t,n,r),this}removeMark(t,n,r){return JOe(this,t,n,r),this}clearIncompatible(t,n,r){return JD(this,t,n,r),this}}const QP=Object.create(null);class cn{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new g3e(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=rt.empty){let r=n.content.lastChild,i=null;for(let o=0;o<n.openEnd;o++)i=r,r=r.lastChild;let s=t.steps.length,a=this.ranges;for(let o=0;o<a.length;o++){let{$from:l,$to:u}=a[o],d=t.mapping.slice(s);t.replaceRange(d.map(l.pos),d.map(u.pos),o?rt.empty:n),o==0&&OV(t,s,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:a,$to:o}=i[s],l=t.mapping.slice(r),u=l.map(a.pos),d=l.map(o.pos);s?t.deleteRange(u,d):(t.replaceRangeWith(u,d,n),OV(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new Yt(t):mg(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let s=t.depth-1;s>=0;s--){let a=n<0?mg(t.node(0),t.node(s),t.before(s+1),t.index(s),n,r):mg(t.node(0),t.node(s),t.after(s+1),t.index(s)+1,n,r);if(a)return a}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new al(t.node(0))}static atStart(t){return mg(t,t,0,0,1)||new al(t)}static atEnd(t){return mg(t,t,t.content.size,t.childCount,-1)||new al(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=QP[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in QP)throw new RangeError("Duplicate use of selection JSON ID "+t);return QP[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Yt.between(this.$anchor,this.$head).getBookmark()}}cn.prototype.visible=!0;class g3e{constructor(t,n){this.$from=t,this.$to=n}}let PV=!1;function IV(e){!PV&&!e.parent.inlineContent&&(PV=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Yt extends cn{constructor(t,n=t){IV(t),IV(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return cn.near(r);let i=t.resolve(n.map(this.anchor));return new Yt(i.parent.inlineContent?i:r,r)}replace(t,n=rt.empty){if(super.replace(t,n),n==rt.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Yt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new d5(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Yt(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let s=cn.findFrom(n,r,!0)||cn.findFrom(n,-r,!0);if(s)n=s.$head;else return cn.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(cn.findFrom(t,-r,!0)||cn.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new Yt(t,n)}}cn.jsonID("text",Yt);class d5{constructor(t,n){this.anchor=t,this.head=n}map(t){return new d5(t.map(this.anchor),t.map(this.head))}resolve(t){return Yt.between(t.resolve(this.anchor),t.resolve(this.head))}}class Ot extends cn{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),s=t.resolve(i);return r?cn.near(s):new Ot(s)}content(){return new rt(De.from(this.node),0,0)}eq(t){return t instanceof Ot&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new e6(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ot(t.resolve(n.anchor))}static create(t,n){return new Ot(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}Ot.prototype.visible=!1;cn.jsonID("node",Ot);class e6{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new d5(r,r):new e6(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&Ot.isSelectable(r)?new Ot(n):cn.near(n)}}class al extends cn{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=rt.empty){if(n==rt.empty){t.delete(0,t.doc.content.size);let r=cn.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new al(t)}map(t){return new al(t)}eq(t){return t instanceof al}getBookmark(){return y3e}}cn.jsonID("all",al);const y3e={map(){return this},resolve(e){return new al(e)}};function mg(e,t,n,r,i,s=!1){if(t.inlineContent)return Yt.create(e,n);for(let a=r-(i>0?0:1);i>0?a<t.childCount:a>=0;a+=i){let o=t.child(a);if(o.isAtom){if(!s&&Ot.isSelectable(o))return Ot.create(e,n-(i<0?o.nodeSize:0))}else{let l=mg(e,o,n+i,i<0?o.childCount:0,i,s);if(l)return l}n+=o.nodeSize*i}return null}function OV(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof qi||i instanceof Yi))return;let s=e.mapping.maps[r],a;s.forEach((o,l,u,d)=>{a==null&&(a=d)}),e.setSelection(cn.near(e.doc.resolve(a),n))}const FV=1,nS=2,MV=4;class v3e extends Joe{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|FV)&~nS,this.storedMarks=null,this}get selectionSet(){return(this.updated&FV)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=nS,this}ensureMarks(t){return Yn.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&nS)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~nS,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Yn.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let i=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),!t)return this.deleteRange(n,r);let s=this.storedMarks;if(!s){let a=this.doc.resolve(n);s=r==n?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(t,s)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(cn.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=MV,this}get scrolledIntoView(){return(this.updated&MV)>0}}function LV(e,t){return!t||!e?e:e.bind(t)}class Dx{constructor(t,n,r){this.name=t,this.init=LV(n.init,r),this.apply=LV(n.apply,r)}}const x3e=[new Dx("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Dx("selection",{init(e,t){return e.selection||cn.atStart(t.doc)},apply(e){return e.selection}}),new Dx("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Dx("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class HP{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x3e.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Dx(r.key,r.spec.state,r))})}}class Dg{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),i=null;for(;;){let s=!1;for(let a=0;a<this.config.plugins.length;a++){let o=this.config.plugins[a];if(o.spec.appendTransaction){let l=i?i[a].n:0,u=i?i[a].state:this,d=l<n.length&&o.spec.appendTransaction.call(o,l?n.slice(l):n,u,r);if(d&&r.filterTransaction(d,a)){if(d.setMeta("appendedTransaction",t),!i){i=[];for(let A=0;A<this.config.plugins.length;A++)i.push(A<a?{state:r,n:n.length}:{state:this,n:0})}n.push(d),r=r.applyInner(d),s=!0}i&&(i[a]={state:r,n:n.length})}}if(!s)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Dg(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let s=r[i];n[s.name]=s.apply(t,this[s.name],this,n)}return n}get tr(){return new v3e(this)}static create(t){let n=new HP(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new Dg(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(t,r);return r}reconfigure(t){let n=new HP(this.schema,t.plugins),r=n.fields,i=new Dg(n);for(let s=0;s<r.length;s++){let a=r[s].name;i[a]=this.hasOwnProperty(a)?this[a]:r[s].init(t,i)}return i}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],s=i.spec.state;s&&s.toJSON&&(n[r]=s.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new HP(t.schema,t.plugins),s=new Dg(i);return i.fields.forEach(a=>{if(a.name=="doc")s.doc=th.fromJSON(t.schema,n.doc);else if(a.name=="selection")s.selection=cn.fromJSON(s.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let o in r){let l=r[o],u=l.spec.state;if(l.key==a.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,o)){s[a.name]=u.fromJSON.call(l,t,n[o],s);return}}s[a.name]=a.init(t,s)}}),s}}function Zoe(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=Zoe(i,t,{})),n[r]=i}return n}class Rr{constructor(t){this.spec=t,this.props={},t.props&&Zoe(t.props,this,this.props),this.key=t.key?t.key.key:ele("plugin")}getState(t){return t[this.key]}}const $P=Object.create(null);function ele(e){return e in $P?e+"$"+ ++$P[e]:($P[e]=0,e+"$")}class Ui{constructor(t="key"){this.key=ele(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const w3e=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function tle(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const b3e=(e,t,n)=>{let r=tle(e,n);if(!r)return!1;let i=t6(r);if(!i){let a=r.blockRange(),o=a&&X0(a);return o==null?!1:(t&&t(e.tr.lift(a,o).scrollIntoView()),!0)}let s=i.nodeBefore;if(sle(e,i,t,-1))return!0;if(r.parent.content.size==0&&(Xy(s,"end")||Ot.isSelectable(s)))for(let a=r.depth;;a--){let o=u5(e.doc,r.before(a),r.after(a),rt.empty);if(o&&o.slice.size<o.to-o.from){if(t){let l=e.tr.step(o);l.setSelection(Xy(s,"end")?cn.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):Ot.create(l.doc,i.pos-s.nodeSize)),t(l.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return s.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},C3e=(e,t,n)=>{let r=tle(e,n);if(!r)return!1;let i=t6(r);return i?nle(e,i,t):!1},S3e=(e,t,n)=>{let r=rle(e,n);if(!r)return!1;let i=n6(r);return i?nle(e,i,t):!1};function nle(e,t,n){let r=t.nodeBefore,i=r,s=t.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let d=i.lastChild;if(!d)return!1;i=d}let a=t.nodeAfter,o=a,l=t.pos+1;for(;!o.isTextblock;l++){if(o.type.spec.isolating)return!1;let d=o.firstChild;if(!d)return!1;o=d}let u=u5(e.doc,s,l,rt.empty);if(!u||u.from!=s||u instanceof qi&&u.slice.size>=l-s)return!1;if(n){let d=e.tr.step(u);d.setSelection(Yt.create(d.doc,s)),n(d.scrollIntoView())}return!0}function Xy(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const B3e=(e,t,n)=>{let{$head:r,empty:i}=e.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;s=t6(r)}let a=s&&s.nodeBefore;return!a||!Ot.isSelectable(a)?!1:(t&&t(e.tr.setSelection(Ot.create(e.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)};function t6(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function rle(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const _3e=(e,t,n)=>{let r=rle(e,n);if(!r)return!1;let i=n6(r);if(!i)return!1;let s=i.nodeAfter;if(sle(e,i,t,1))return!0;if(r.parent.content.size==0&&(Xy(s,"start")||Ot.isSelectable(s))){let a=u5(e.doc,r.before(),r.after(),rt.empty);if(a&&a.slice.size<a.to-a.from){if(t){let o=e.tr.step(a);o.setSelection(Xy(s,"start")?cn.findFrom(o.doc.resolve(o.mapping.map(i.pos)),1):Ot.create(o.doc,o.mapping.map(i.pos))),t(o.scrollIntoView())}return!0}}return s.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+s.nodeSize).scrollIntoView()),!0):!1},k3e=(e,t,n)=>{let{$head:r,empty:i}=e.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;s=n6(r)}let a=s&&s.nodeAfter;return!a||!Ot.isSelectable(a)?!1:(t&&t(e.tr.setSelection(Ot.create(e.doc,s.pos)).scrollIntoView()),!0)};function n6(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const E3e=(e,t)=>{let n=e.selection,r=n instanceof Ot,i;if(r){if(n.node.isTextblock||!Mh(e.doc,n.from))return!1;i=n.from}else if(i=c5(e.doc,n.from,-1),i==null)return!1;if(t){let s=e.tr.join(i);r&&s.setSelection(Ot.create(s.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(s.scrollIntoView())}return!0},N3e=(e,t)=>{let n=e.selection,r;if(n instanceof Ot){if(n.node.isTextblock||!Mh(e.doc,n.to))return!1;r=n.to}else if(r=c5(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},j3e=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),s=i&&X0(i);return s==null?!1:(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},T3e=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
`).scrollIntoView()),!0)};function ile(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const P3e=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),s=n.indexAfter(-1),a=ile(i.contentMatchAt(s));if(!a||!i.canReplaceWith(s,s,a))return!1;if(t){let o=n.after(),l=e.tr.replaceWith(o,o,a.createAndFill());l.setSelection(cn.near(l.doc.resolve(o),1)),t(l.scrollIntoView())}return!0},I3e=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof al||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=ile(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let a=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,o=e.tr.insert(a,s.createAndFill());o.setSelection(Yt.create(o.doc,a+1)),t(o.scrollIntoView())}return!0},O3e=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let s=n.before();if(ly(e.doc,s))return t&&t(e.tr.split(s).scrollIntoView()),!0}let r=n.blockRange(),i=r&&X0(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},F3e=(e,t)=>{let{$from:n,to:r}=e.selection,i,s=n.sharedDepth(r);return s==0?!1:(i=n.before(s),t&&t(e.tr.setSelection(Ot.create(e.doc,i))),!0)};function M3e(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,s=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(s,s+1)||!(i.isTextblock||Mh(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function sle(e,t,n,r){let i=t.nodeBefore,s=t.nodeAfter,a,o,l=i.type.spec.isolating||s.type.spec.isolating;if(!l&&M3e(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(a=(o=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&o.matchType(a[0]||s.type).validEnd){if(n){let h=t.pos+s.nodeSize,p=De.empty;for(let y=a.length-1;y>=0;y--)p=De.from(a[y].create(null,p));p=De.from(i.copy(p));let m=e.tr.step(new Yi(t.pos-1,h,t.pos,h,new rt(p,1,0),a.length,!0)),g=m.doc.resolve(h+2*a.length);g.nodeAfter&&g.nodeAfter.type==i.type&&Mh(m.doc,g.pos)&&m.join(g.pos),n(m.scrollIntoView())}return!0}let d=s.type.spec.isolating||r>0&&l?null:cn.findFrom(t,1),A=d&&d.$from.blockRange(d.$to),f=A&&X0(A);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(A,f).scrollIntoView()),!0;if(u&&Xy(s,"start",!0)&&Xy(i,"end")){let h=i,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=s,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(n){let y=De.empty;for(let x=p.length-1;x>=0;x--)y=De.from(p[x].copy(y));let v=e.tr.step(new Yi(t.pos-p.length,t.pos+s.nodeSize,t.pos+g,t.pos+s.nodeSize-g,new rt(y,p.length,0),0,!0));n(v.scrollIntoView())}return!0}}return!1}function ale(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(n&&n(t.tr.setSelection(Yt.create(t.doc,e<0?i.start(s):i.end(s)))),!0):!1}}const L3e=ale(-1),R3e=ale(1);function U3e(e,t=null){return function(n,r){let{$from:i,$to:s}=n.selection,a=i.blockRange(s),o=a&&ZD(a,e,t);return o?(r&&r(n.tr.wrap(a,o).scrollIntoView()),!0):!1}}function RV(e,t=null){return function(n,r){let i=!1;for(let s=0;s<n.selection.ranges.length&&!i;s++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[s];n.doc.nodesBetween(a,o,(l,u)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let d=n.doc.resolve(u),A=d.index();i=d.parent.canReplaceWith(A,A+1,e)}})}if(!i)return!1;if(r){let s=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:o},$to:{pos:l}}=n.selection.ranges[a];s.setBlockType(o,l,e,t)}r(s.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function D3e(e,t=null){return function(n,r){let{$from:i,$to:s}=n.selection,a=i.blockRange(s);if(!a)return!1;let o=r?n.tr:null;return Q3e(o,a,e,t)?(r&&r(o.scrollIntoView()),!0):!1}}function Q3e(e,t,n,r=null){let i=!1,s=t,a=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=a.resolve(t.start-2);s=new Z_(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new Z_(t.$from,a.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let o=ZD(s,n,r,t);return o?(e&&H3e(e,t,o,i,n),!0):!1}function H3e(e,t,n,r,i){let s=De.empty;for(let d=n.length-1;d>=0;d--)s=De.from(n[d].type.create(n[d].attrs,s));e.step(new Yi(t.start-(r?2:0),t.end,t.start,t.end,new rt(s,0,0),n.length,!0));let a=0;for(let d=0;d<n.length;d++)n[d].type==i&&(a=d+1);let o=n.length-a,l=t.start+n.length-(r?2:0),u=t.parent;for(let d=t.startIndex,A=t.endIndex,f=!0;d<A;d++,f=!1)!f&&ly(e.doc,l,o)&&(e.split(l,o),l+=2*o),l+=u.child(d).nodeSize;return e}function $3e(e){return function(t,n){let{$from:r,$to:i}=t.selection,s=r.blockRange(i,a=>a.childCount>0&&a.firstChild.type==e);return s?n?r.node(s.depth-1).type==e?z3e(t,n,e,s):V3e(t,n,s):!0:!1}}function z3e(e,t,n,r){let i=e.tr,s=r.end,a=r.$to.end(r.depth);s<a&&(i.step(new Yi(s-1,a,s,a,new rt(De.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Z_(i.doc.resolve(r.$from.pos),i.doc.resolve(a),r.depth));const o=X0(r);if(o==null)return!1;i.lift(r,o);let l=i.doc.resolve(i.mapping.map(s,-1)-1);return Mh(i.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&i.join(l.pos),t(i.scrollIntoView()),!0}function V3e(e,t,n){let r=e.tr,i=n.parent;for(let h=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)h-=i.child(p).nodeSize,r.delete(h-1,h+1);let s=r.doc.resolve(n.start),a=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let o=n.startIndex==0,l=n.endIndex==i.childCount,u=s.node(-1),d=s.index(-1);if(!u.canReplace(d+(o?0:1),d+1,a.content.append(l?De.empty:De.from(i))))return!1;let A=s.pos,f=A+a.nodeSize;return r.step(new Yi(A-(o?1:0),f+(l?1:0),A+1,f-1,new rt((o?De.empty:De.from(i.copy(De.empty))).append(l?De.empty:De.from(i.copy(De.empty))),o?0:1,l?0:1),o?0:1)),t(r.scrollIntoView()),!0}function K3e(e){return function(t,n){let{$from:r,$to:i}=t.selection,s=r.blockRange(i,u=>u.childCount>0&&u.firstChild.type==e);if(!s)return!1;let a=s.startIndex;if(a==0)return!1;let o=s.parent,l=o.child(a-1);if(l.type!=e)return!1;if(n){let u=l.lastChild&&l.lastChild.type==o.type,d=De.from(u?e.create():null),A=new rt(De.from(e.create(null,De.from(o.type.create(null,d)))),u?3:1,0),f=s.start,h=s.end;n(t.tr.step(new Yi(f-(u?3:1),h,f,h,A,1,!0)).scrollIntoView())}return!0}}const ps=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Jy=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let uF=null;const Uu=function(e,t,n){let r=uF||(uF=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},W3e=function(){uF=null},Dp=function(e,t,n,r){return n&&(UV(e,t,n,r,-1)||UV(e,t,n,r,1))},q3e=/^(img|br|input|textarea|hr)$/i;function UV(e,t,n,r,i){for(var s;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Go(e))){let a=e.parentNode;if(!a||a.nodeType!=1||d2(e)||q3e.test(e.nodeName)||e.contentEditable=="false")return!1;t=ps(e)+(i<0?0:1),e=a}else if(e.nodeType==1){let a=e.childNodes[t+(i<0?-1:0)];if(a.nodeType==1&&a.contentEditable=="false")if(!((s=a.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)t+=i;else return!1;else e=a,t=i<0?Go(e):0}else return!1}}function Go(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function G3e(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Go(e)}else if(e.parentNode&&!d2(e))t=ps(e),e=e.parentNode;else return null}}function Y3e(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!d2(e))t=ps(e)+1,e=e.parentNode;else return null}}function X3e(e,t,n){for(let r=t==0,i=t==Go(e);r||i;){if(e==n)return!0;let s=ps(e);if(e=e.parentNode,!e)return!1;r=r&&s==0,i=i&&s==Go(e)}}function d2(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const A5=function(e){return e.focusNode&&Dp(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Tf(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function J3e(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Z3e(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(Go(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(Go(r.startContainer),r.startOffset)}}}const su=typeof navigator<"u"?navigator:null,DV=typeof document<"u"?document:null,Lh=su&&su.userAgent||"",dF=/Edge\/(\d+)/.exec(Lh),ole=/MSIE \d/.exec(Lh),AF=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Lh),Qa=!!(ole||AF||dF),rh=ole?document.documentMode:AF?+AF[1]:dF?+dF[1]:0,ol=!Qa&&/gecko\/(\d+)/i.test(Lh);ol&&+(/Firefox\/(\d+)/.exec(Lh)||[0,0])[1];const hF=!Qa&&/Chrome\/(\d+)/.exec(Lh),gs=!!hF,lle=hF?+hF[1]:0,$s=!Qa&&!!su&&/Apple Computer/.test(su.vendor),Zy=$s&&(/Mobile\/\w+/.test(Lh)||!!su&&su.maxTouchPoints>2),$o=Zy||(su?/Mac/.test(su.platform):!1),cle=su?/Win/.test(su.platform):!1,Wu=/Android \d/.test(Lh),A2=!!DV&&"webkitFontSmoothing"in DV.documentElement.style,eFe=A2?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function tFe(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function ku(e,t){return typeof e=="number"?e:e[t]}function nFe(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function QV(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let a=n||e.dom;a;){if(a.nodeType!=1){a=Jy(a);continue}let o=a,l=o==s.body,u=l?tFe(s):nFe(o),d=0,A=0;if(t.top<u.top+ku(r,"top")?A=-(u.top-t.top+ku(i,"top")):t.bottom>u.bottom-ku(r,"bottom")&&(A=t.bottom-t.top>u.bottom-u.top?t.top+ku(i,"top")-u.top:t.bottom-u.bottom+ku(i,"bottom")),t.left<u.left+ku(r,"left")?d=-(u.left-t.left+ku(i,"left")):t.right>u.right-ku(r,"right")&&(d=t.right-u.right+ku(i,"right")),d||A)if(l)s.defaultView.scrollBy(d,A);else{let h=o.scrollLeft,p=o.scrollTop;A&&(o.scrollTop+=A),d&&(o.scrollLeft+=d);let m=o.scrollLeft-h,g=o.scrollTop-p;t={left:t.left-m,top:t.top-g,right:t.right-m,bottom:t.bottom-g}}let f=l?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(f))break;a=f=="absolute"?a.offsetParent:Jy(a)}}function rFe(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let s=(t.left+t.right)/2,a=n+1;a<Math.min(innerHeight,t.bottom);a+=5){let o=e.root.elementFromPoint(s,a);if(!o||o==e.dom||!e.dom.contains(o))continue;let l=o.getBoundingClientRect();if(l.top>=n-20){r=o,i=l.top;break}}return{refDOM:r,refTop:i,stack:ule(e.dom)}}function ule(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Jy(r));return t}function iFe({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;dle(n,r==0?0:r-t)}function dle(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:s}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=s&&(r.scrollLeft=s)}}let Wm=null;function sFe(e){if(e.setActive)return e.setActive();if(Wm)return e.focus(Wm);let t=ule(e);e.focus(Wm==null?{get preventScroll(){return Wm={preventScroll:!0},!0}}:void 0),Wm||(Wm=!1,dle(t,0))}function Ale(e,t){let n,r=2e8,i,s=0,a=t.top,o=t.top,l,u;for(let d=e.firstChild,A=0;d;d=d.nextSibling,A++){let f;if(d.nodeType==1)f=d.getClientRects();else if(d.nodeType==3)f=Uu(d).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=a&&p.bottom>=o){a=Math.max(p.bottom,a),o=Math.min(p.top,o);let m=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(m<r){n=d,r=m,i=m&&n.nodeType==3?{left:p.right<t.left?p.right:p.left,top:t.top}:t,d.nodeType==1&&m&&(s=A+(t.left>=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!l&&p.left<=t.left&&p.right>=t.left&&(l=d,u={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(s=A+1)}}return!n&&l&&(n=l,i=u,r=0),n&&n.nodeType==3?aFe(n,i):!n||r&&n.nodeType==1?{node:e,offset:s}:Ale(n,i)}function aFe(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let s=0;s<n;s++){r.setEnd(e,s+1),r.setStart(e,s);let a=rA(r,1);if(a.top!=a.bottom&&r6(t,a)){i={node:e,offset:s+(t.left>=(a.left+a.right)/2?1:0)};break}}return r.detach(),i||{node:e,offset:0}}function r6(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function oFe(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function lFe(e,t,n){let{node:r,offset:i}=Ale(t,n),s=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();s=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return e.docView.posFromDOM(r,i,s)}function cFe(e,t,n,r){let i=-1;for(let s=t,a=!1;s!=e.dom;){let o=e.docView.nearestDesc(s,!0),l;if(!o)return null;if(o.dom.nodeType==1&&(o.node.isBlock&&o.parent||!o.contentDOM)&&((l=o.dom.getBoundingClientRect()).width||l.height)&&(o.node.isBlock&&o.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(o.dom.nodeName)&&(!a&&l.left>r.left||l.top>r.top?i=o.posBefore:(!a&&l.right<r.left||l.bottom<r.top)&&(i=o.posAfter),a=!0),!o.contentDOM&&i<0&&!o.node.isText))return(o.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?o.posBefore:o.posAfter;s=o.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function hle(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),s=i;;){let a=e.childNodes[s];if(a.nodeType==1){let o=a.getClientRects();for(let l=0;l<o.length;l++){let u=o[l];if(r6(t,u))return hle(a,t,u)}}if((s=(s+1)%r)==i)break}return e}function uFe(e,t){let n=e.dom.ownerDocument,r,i=0,s=Z3e(n,t.left,t.top);s&&({node:r,offset:i}=s);let a=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),o;if(!a||!e.dom.contains(a.nodeType!=1?a.parentNode:a)){let u=e.dom.getBoundingClientRect();if(!r6(t,u)||(a=hle(e.dom,t,u),!a))return null}if($s)for(let u=a;r&&u;u=Jy(u))u.draggable&&(r=void 0);if(a=oFe(a,t),r){if(ol&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let d=r.childNodes[i],A;d.nodeName=="IMG"&&(A=d.getBoundingClientRect()).right<=t.left&&A.bottom>t.top&&i++}let u;A2&&i&&r.nodeType==1&&(u=r.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?o=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(o=cFe(e,r,i,t))}o==null&&(o=lFe(e,a,t));let l=e.docView.nearestDesc(a,!0);return{pos:o,inside:l?l.posAtStart-l.border:-1}}function HV(e){return e.top<e.bottom||e.left<e.right}function rA(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(HV(r))return r}return Array.prototype.find.call(n,HV)||e.getBoundingClientRect()}const dFe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function fle(e,t,n){let{node:r,offset:i,atom:s}=e.docView.domFromPos(t,n<0?-1:1),a=A2||ol;if(r.nodeType==3)if(a&&(dFe.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let l=rA(Uu(r,i,i),n);if(ol&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let u=rA(Uu(r,i-1,i-1),-1);if(u.top==l.top){let d=rA(Uu(r,i,i+1),-1);if(d.top!=l.top)return nx(d,d.left<u.left)}}return l}else{let l=i,u=i,d=n<0?1:-1;return n<0&&!i?(u++,d=-1):n>=0&&i==r.nodeValue.length?(l--,d=1):n<0?l--:u++,nx(rA(Uu(r,l,u),d),d<0)}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(s==null&&i&&(n<0||i==Go(r))){let l=r.childNodes[i-1];if(l.nodeType==1)return zP(l.getBoundingClientRect(),!1)}if(s==null&&i<Go(r)){let l=r.childNodes[i];if(l.nodeType==1)return zP(l.getBoundingClientRect(),!0)}return zP(r.getBoundingClientRect(),n>=0)}if(s==null&&i&&(n<0||i==Go(r))){let l=r.childNodes[i-1],u=l.nodeType==3?Uu(l,Go(l)-(a?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return nx(rA(u,1),!1)}if(s==null&&i<Go(r)){let l=r.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?Uu(l,0,a?0:1):l.nodeType==1?l:null:null;if(u)return nx(rA(u,-1),!0)}return nx(rA(r.nodeType==3?Uu(r):r,-n),n>=0)}function nx(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function zP(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function ple(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function AFe(e,t,n){let r=t.selection,i=n=="up"?r.$from:r.$to;return ple(e,t,()=>{let{node:s}=e.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let o=e.docView.nearestDesc(s,!0);if(!o)break;if(o.node.isBlock){s=o.contentDOM||o.dom;break}s=o.dom.parentNode}let a=fle(e,i.pos,1);for(let o=s.firstChild;o;o=o.nextSibling){let l;if(o.nodeType==1)l=o.getClientRects();else if(o.nodeType==3)l=Uu(o,0,o.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let d=l[u];if(d.bottom>d.top+1&&(n=="up"?a.top-d.top>(d.bottom-a.top)*2:d.bottom-a.bottom>(a.bottom-d.top)*2))return!1}}return!0})}const hFe=/[\u0590-\u08ac]/;function fFe(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,a=i==r.parent.content.size,o=e.domSelection();return o?!hFe.test(r.parent.textContent)||!o.modify?n=="left"||n=="backward"?s:a:ple(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:d,anchorOffset:A}=e.domSelectionRange(),f=o.caretBidiLevel;o.modify("move",n,"character");let h=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:p,focusOffset:m}=e.domSelectionRange(),g=p&&!h.contains(p.nodeType==1?p:p.parentNode)||l==p&&u==m;try{o.collapse(d,A),l&&(l!=d||u!=A)&&o.extend&&o.extend(l,u)}catch{}return f!=null&&(o.caretBidiLevel=f),g}):r.pos==r.start()||r.pos==r.end()}let $V=null,zV=null,VV=!1;function pFe(e,t,n){return $V==t&&zV==n?VV:($V=t,zV=n,VV=n=="up"||n=="down"?AFe(e,t,n):fFe(e,t,n))}const ll=0,KV=1,Qf=2,au=3;class h2{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=ll,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==t)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let s,a;if(t==this.contentDOM)s=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;s=t.previousSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(a)+a.size:this.posAtStart}else{let s,a;if(t==this.contentDOM)s=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;s=t.nextSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(a):this.posAtEnd}let i;if(t==this.dom&&this.contentDOM)i=n>ps(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&n==t.childNodes.length)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let s=this.getDesc(i),a;if(s&&(!n||s.node))if(r&&(a=s.nodeDOM)&&!(a.nodeType==1?a.contains(t.nodeType==1?t:t.parentNode):a==t))r=!1;else return s}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],s=r+i.size;if(r==t&&s!=r){for(;!i.border&&i.children.length;)for(let a=0;a<i.children.length;a++){let o=i.children[a];if(o.size){i=o;break}}return i}if(t<s)return i.descAt(t-r-i.border);r=s}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,i=0;for(let s=0;r<this.children.length;r++){let a=this.children[r],o=s+a.size;if(o>t||a instanceof gle){i=t-s;break}s=o}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof mle&&s.side>=0;r--);if(n<=0){let s,a=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,a=!1);return s&&n&&a&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?ps(s.dom)+1:0}}else{let s,a=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,a=!1);return s&&a&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?ps(s.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,s=-1;for(let a=r,o=0;;o++){let l=this.children[o],u=a+l.size;if(i==-1&&t<=u){let d=a+l.border;if(t>=d&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,d);t=a;for(let A=o;A>0;A--){let f=this.children[A-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=ps(f.dom)+1;break}t-=f.size}i==-1&&(i=0)}if(i>-1&&(u>n||o==this.children.length-1)){n=u;for(let d=o+1;d<this.children.length;d++){let A=this.children[d];if(A.size&&A.dom.parentNode==this.contentDOM&&!A.emptyChildAt(-1)){s=ps(A.dom);break}n+=A.size}s==-1&&(s=this.contentDOM.childNodes.length);break}a=u}return{node:this.contentDOM,from:t,to:n,fromOffset:i,toOffset:s}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,i=!1){let s=Math.min(t,n),a=Math.max(t,n);for(let h=0,p=0;h<this.children.length;h++){let m=this.children[h],g=p+m.size;if(s>p&&a<g)return m.setSelection(t-p-m.border,n-p-m.border,r,i);p=g}let o=this.domFromPos(t,t?-1:1),l=n==t?o:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),d=r.domSelectionRange(),A=!1;if((ol||$s)&&t==n){let{node:h,offset:p}=o;if(h.nodeType==3){if(A=!!(p&&h.nodeValue[p-1]==`
`),A&&p==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(o=l={node:g.parentNode,offset:ps(g)+1});break}let y=m.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let m=h.childNodes[p-1];A=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(ol&&d.focusNode&&d.focusNode!=l.node&&d.focusNode.nodeType==1){let h=d.focusNode.childNodes[d.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||A&&$s)&&Dp(o.node,o.offset,d.anchorNode,d.anchorOffset)&&Dp(l.node,l.offset,d.focusNode,d.focusOffset))return;let f=!1;if((u.extend||t==n)&&!(A&&ol)){u.collapse(o.node,o.offset);try{t!=n&&u.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(t>n){let p=o;o=l,l=p}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(o.node,o.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let s=this.children[i],a=r+s.size;if(r==a?t<=a&&n>=r:t<a&&n>r){let o=r+s.border,l=a-s.border;if(t>=o&&n<=l){this.dirty=t==r||n==a?Qf:KV,t==o&&n==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=au:s.markDirty(t-o,n-o);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Qf:au}r=a}this.dirty=Qf}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Qf:KV;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}}class mle extends h2{constructor(t,n,r,i){let s,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(a.nodeType!=1){let o=document.createElement("span");o.appendChild(a),a=o}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(t,[],a,null),this.widget=n,this.widget=n,s=this}matchesWidget(t){return this.dirty==ll&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class mFe extends h2{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Qp extends h2{constructor(t,n,r,i,s){super(t,[],r,i),this.mark=n,this.spec=s}static create(t,n,r,i){let s=i.nodeViews[n.type.name],a=s&&s(n,i,r);return(!a||!a.dom)&&(a=nm.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Qp(t,n,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&au||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=au&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=ll){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=ll}}slice(t,n,r){let i=Qp.create(this.parent,this.mark,!0,r),s=this.children,a=this.size;n<a&&(s=pF(s,n,a,r)),t>0&&(s=pF(s,0,t,r));for(let o=0;o<s.length;o++)s[o].parent=i;return i.children=s,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class ih extends h2{constructor(t,n,r,i,s,a,o,l,u){super(t,[],s,a),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=o}static create(t,n,r,i,s,a){let o=s.nodeViews[n.type.name],l,u=o&&o(n,s,()=>{if(!l)return a;if(l.parent)return l.parent.posBeforeChild(l)},r,i),d=u&&u.dom,A=u&&u.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:A}=nm.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!A&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let f=d;return d=xle(d,r,n),u?l=new gFe(t,n,r,i,d,A||null,f,u,s,a+1):n.isText?new h5(t,n,r,i,d,f,s):new ih(t,n,r,i,d,A||null,f,s,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>De.empty)}return t}matchesNode(t,n,r){return this.dirty==ll&&t.eq(this.node)&&tk(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,s=t.composing?this.localCompositionInfo(t,n):null,a=s&&s.pos>-1?s:null,o=s&&s.pos<0,l=new vFe(this,a&&a.node,t);bFe(this.node,this.innerDeco,(u,d,A)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,t,d):u.type.side>=0&&!A&&l.syncToMarks(d==this.node.childCount?Yn.none:this.node.child(d).marks,r,t,d),l.placeWidget(u,t,i)},(u,d,A,f)=>{l.syncToMarks(u.marks,r,t,f);let h;l.findNodeMatch(u,d,A,f)||o&&t.state.selection.from>i&&t.state.selection.to<i+u.nodeSize&&(h=l.findIndexWithChild(s.node))>-1&&l.updateNodeAt(u,d,A,h,t)||l.updateNextNode(u,d,A,t,f,i)||l.addNode(u,d,A,t,i),i+=u.nodeSize}),l.syncToMarks([],r,t,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Qf)&&(a&&this.protectLocalComposition(t,a),yle(this.contentDOM,this.children,t),Zy&&CFe(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof Yt)||r<n||i>n+this.node.content.size)return null;let s=t.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,o=SFe(this.node.content,a,r-n,i-n);return o<0?null:{node:s,pos:o,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let a=new mFe(this,s,n,i);t.input.compositionNodes.push(a),this.children=pF(this.children,r,r+i.length,t,a)}update(t,n,r,i){return this.dirty==au||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=ll}updateOuterDeco(t){if(tk(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=vle(this.dom,this.nodeDOM,fF(this.outerDeco,this.node,n),fF(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function WV(e,t,n,r,i){xle(r,t,e);let s=new ih(void 0,e,t,n,r,r,r,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class h5 extends ih{constructor(t,n,r,i,s,a,o){super(t,n,r,i,s,null,a,o,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,i){return this.dirty==au||this.dirty!=ll&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=ll||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=ll,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),s=document.createTextNode(i.text);return new h5(this.parent,i,this.outerDeco,this.innerDeco,s,s,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=au)}get domAtom(){return!1}isText(t){return this.node.text==t}}class gle extends h2{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==ll&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class gFe extends ih{constructor(t,n,r,i,s,a,o,l,u,d){super(t,n,r,i,s,a,o,u,d),this.spec=l}update(t,n,r,i){if(this.dirty==au)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let s=this.spec.update(t,n,r);return s&&this.updateInner(t,n,r,i),s}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function yle(e,t,n){let r=e.firstChild,i=!1;for(let s=0;s<t.length;s++){let a=t[s],o=a.dom;if(o.parentNode==e){for(;o!=r;)r=qV(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(o,r);if(a instanceof Qp){let l=r?r.previousSibling:e.lastChild;yle(a.contentDOM,a.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=qV(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const vw=function(e){e&&(this.nodeName=e)};vw.prototype=Object.create(null);const Hf=[new vw];function fF(e,t,n){if(e.length==0)return Hf;let r=n?Hf[0]:new vw,i=[r];for(let s=0;s<e.length;s++){let a=e[s].type.attrs;if(a){a.nodeName&&i.push(r=new vw(a.nodeName));for(let o in a){let l=a[o];l!=null&&(n&&i.length==1&&i.push(r=new vw(t.isInline?"span":"div")),o=="class"?r.class=(r.class?r.class+" ":"")+l:o=="style"?r.style=(r.style?r.style+";":"")+l:o!="nodeName"&&(r[o]=l))}}}return i}function vle(e,t,n,r){if(n==Hf&&r==Hf)return t;let i=t;for(let s=0;s<r.length;s++){let a=r[s],o=n[s];if(s){let l;o&&o.nodeName==a.nodeName&&i!=e&&(l=i.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||(l=document.createElement(a.nodeName),l.pmIsDeco=!0,l.appendChild(i),o=Hf[0]),i=l}yFe(i,o||Hf[0],a)}return i}function yFe(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<r.length;s++)i.indexOf(r[s])==-1&&e.classList.remove(r[s]);for(let s=0;s<i.length;s++)r.indexOf(i[s])==-1&&e.classList.add(i[s]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(t.style);)e.style.removeProperty(i[1])}n.style&&(e.style.cssText+=n.style)}}function xle(e,t,n){return vle(e,e,Hf,fF(t,n,e.nodeType!=1))}function tk(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function qV(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class vFe{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=xFe(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r,i){let s=0,a=this.stack.length>>1,o=Math.min(a,t.length);for(;s<o&&(s==a-1?this.top:this.stack[s+1<<1]).matchesMark(t[s])&&t[s].type.spec.spanning!==!1;)s++;for(;s<a;)this.destroyRest(),this.top.dirty=ll,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<t.length;){this.stack.push(this.top,this.index+1);let l=-1,u=this.top.children.length;i<this.preMatch.index&&(u=Math.min(this.index+3,u));for(let d=this.index;d<u;d++){let A=this.top.children[d];if(A.matchesMark(t[a])&&!this.isLocked(A.dom)){l=d;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let d=Qp.create(this.top,t[a],n,r);this.top.children.splice(this.index,0,d),this.top=d,this.changed=!0}this.index=0,a++}}findNodeMatch(t,n,r,i){let s=-1,a;if(i>=this.preMatch.index&&(a=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&a.matchesNode(t,n,r))s=this.top.children.indexOf(a,this.index);else for(let o=this.index,l=Math.min(this.top.children.length,o+5);o<l;o++){let u=this.top.children[o];if(u.matchesNode(t,n,r)&&!this.preMatch.matched.has(u)){s=o;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(t,n,r,i,s){let a=this.top.children[i];return a.dirty==au&&a.dom==a.contentDOM&&(a.dirty=Qf),a.update(t,n,r,s)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}t=n}}updateNextNode(t,n,r,i,s,a){for(let o=this.index;o<this.top.children.length;o++){let l=this.top.children[o];if(l instanceof ih){let u=this.preMatch.matched.get(l);if(u!=null&&u!=s)return!1;let d=l.dom,A,f=this.isLocked(d)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=au&&tk(n,l.outerDeco));if(!f&&l.update(t,n,r,i))return this.destroyBetween(this.index,o),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!f&&(A=this.recreateWrapper(l,t,n,r,i,a)))return this.destroyBetween(this.index,o),this.top.children[this.index]=A,A.contentDOM&&(A.dirty=Qf,A.updateChildren(i,a+1),A.dirty=ll),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,i,s,a){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!tk(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let o=ih.create(this.top,n,r,i,s,a);if(o.contentDOM){o.children=t.children,t.children=[];for(let l of o.children)l.parent=o}return t.destroy(),o}addNode(t,n,r,i,s){let a=ih.create(this.top,t,n,r,i,s);a.contentDOM&&a.updateChildren(i,s+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(t,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(t)&&(t==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let s=new mle(this.top,t,n,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Qp;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof h5)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&(($s||gs)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new gle(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function xFe(e,t){let n=t,r=n.children.length,i=e.childCount,s=new Map,a=[];e:for(;i>0;){let o;for(;;)if(r){let u=n.children[r-1];if(u instanceof Qp)n=u,r=u.children.length;else{o=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=o.node;if(l){if(l!=e.child(i-1))break;--i,s.set(o,i),a.push(o)}}return{index:i,matched:s,matches:a.reverse()}}function wFe(e,t){return e.type.side-t.type.side}function bFe(e,t,n,r){let i=t.locals(e),s=0;if(i.length==0){for(let u=0;u<e.childCount;u++){let d=e.child(u);r(d,i,t.forChild(s,d),u),s+=d.nodeSize}return}let a=0,o=[],l=null;for(let u=0;;){let d,A;for(;a<i.length&&i[a].to==s;){let g=i[a++];g.widget&&(d?(A||(A=[d])).push(g):d=g)}if(d)if(A){A.sort(wFe);for(let g=0;g<A.length;g++)n(A[g],u,!!l)}else n(d,u,!!l);let f,h;if(l)h=-1,f=l,l=null;else if(u<e.childCount)h=u,f=e.child(u++);else break;for(let g=0;g<o.length;g++)o[g].to<=s&&o.splice(g--,1);for(;a<i.length&&i[a].from<=s&&i[a].to>s;)o.push(i[a++]);let p=s+f.nodeSize;if(f.isText){let g=p;a<i.length&&i[a].from<g&&(g=i[a].from);for(let y=0;y<o.length;y++)o[y].to<g&&(g=o[y].to);g<p&&(l=f.cut(g-s),f=f.cut(0,g-s),p=g,h=-1)}else for(;a<i.length&&i[a].to<p;)a++;let m=f.isInline&&!f.isLeaf?o.filter(g=>!g.inline):o.slice();r(f,m,t.forChild(s,f),h),s=p}}function CFe(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function SFe(e,t,n,r){for(let i=0,s=0;i<e.childCount&&s<=r;){let a=e.child(i++),o=s;if(s+=a.nodeSize,!a.isText)continue;let l=a.text;for(;i<e.childCount;){let u=e.child(i++);if(s+=u.nodeSize,!u.isText)break;l+=u.text}if(s>=n){if(s>=r&&l.slice(r-t.length-o,r-o)==t)return r-t.length;let u=o<r?l.lastIndexOf(t,r-o-1):-1;if(u>=0&&u+t.length+o>=n)return o+u;if(n==r&&l.length>=r+t.length-o&&l.slice(r-o,r-o+t.length)==t)return r}}return-1}function pF(e,t,n,r,i){let s=[];for(let a=0,o=0;a<e.length;a++){let l=e[a],u=o,d=o+=l.size;u>=n||d<=t?s.push(l):(u<t&&s.push(l.slice(0,t-u,r)),i&&(s.push(i),i=void 0),d>n&&s.push(l.slice(n-u,l.size,r)))}return s}function i6(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),s=i&&i.size==0,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let o=r.resolve(a),l,u;if(A5(n)){for(l=a;i&&!i.node;)i=i.parent;let A=i.node;if(i&&A.isAtom&&Ot.isSelectable(A)&&i.parent&&!(A.isInline&&X3e(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;u=new Ot(a==f?o:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let A=a,f=a;for(let h=0;h<n.rangeCount;h++){let p=n.getRangeAt(h);A=Math.min(A,e.docView.posFromDOM(p.startContainer,p.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(p.endContainer,p.endOffset,-1))}if(A<0)return null;[l,a]=f==e.state.selection.anchor?[f,A]:[A,f],o=r.resolve(a)}else l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let d=r.resolve(l);if(!u){let A=t=="pointer"||e.state.selection.head<o.pos&&!s?1:-1;u=s6(e,d,o,A)}return u}function wle(e){return e.editable?e.hasFocus():Cle(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Zu(e,t=!1){let n=e.state.selection;if(ble(e,n),!!wle(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&gs){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Dp(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)_Fe(e);else{let{anchor:r,head:i}=n,s,a;GV&&!(n instanceof Yt)&&(n.$from.parent.inlineContent||(s=YV(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=YV(e,n.to))),e.docView.setSelection(r,i,e,t),GV&&(s&&XV(s),a&&XV(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&BFe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const GV=$s||gs&&lle<63;function YV(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,s=r?n.childNodes[r-1]:null;if($s&&i&&i.contentEditable=="false")return VP(i);if((!i||i.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(i)return VP(i);if(s)return VP(s)}}function VP(e){return e.contentEditable="true",$s&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function XV(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function BFe(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!wle(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function _Fe(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,ps(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&Qa&&rh<=11&&(n.disabled=!0,n.disabled=!1)}function ble(e,t){if(t instanceof Ot){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(JV(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else JV(e)}function JV(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function s6(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||Yt.between(t,n,r)}function ZV(e){return e.editable&&!e.hasFocus()?!1:Cle(e)}function Cle(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function kFe(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Dp(t.node,t.offset,n.anchorNode,n.anchorOffset)}function mF(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),s=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return s&&cn.findFrom(s,t)}function cA(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function e9(e,t,n){let r=e.state.selection;if(r instanceof Yt)if(n.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let a=e.state.doc.resolve(i.pos+s.nodeSize*(t<0?-1:1));return cA(e,new Yt(r.$anchor,a))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=mF(e.state,t);return i&&i instanceof Ot?cA(e,i):!1}else if(!($o&&n.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,a;if(!s||s.isText)return!1;let o=t<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(a=e.docView.descAt(o))&&!a.contentDOM?Ot.isSelectable(s)?cA(e,new Ot(t<0?e.state.doc.resolve(i.pos-s.nodeSize):i)):A2?cA(e,new Yt(e.state.doc.resolve(t<0?o:o+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Ot&&r.node.isInline)return cA(e,new Yt(t>0?r.$to:r.$from));{let i=mF(e.state,t);return i?cA(e,i):!1}}}function nk(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function xw(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function qm(e,t){return t<0?EFe(e):NFe(e)}function EFe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,s,a=!1;for(ol&&n.nodeType==1&&r<nk(n)&&xw(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let o=n.childNodes[r-1];if(xw(o,-1))i=n,s=--r;else if(o.nodeType==3)n=o,r=n.nodeValue.length;else break}}else{if(Sle(n))break;{let o=n.previousSibling;for(;o&&xw(o,-1);)i=n.parentNode,s=ps(o),o=o.previousSibling;if(o)n=o,r=nk(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?gF(e,n,r):i&&gF(e,i,s)}function NFe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=nk(n),s,a;for(;;)if(r<i){if(n.nodeType!=1)break;let o=n.childNodes[r];if(xw(o,1))s=n,a=++r;else break}else{if(Sle(n))break;{let o=n.nextSibling;for(;o&&xw(o,1);)s=o.parentNode,a=ps(o)+1,o=o.nextSibling;if(o)n=o,r=0,i=nk(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}s&&gF(e,s,a)}function Sle(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function jFe(e,t){for(;e&&t==e.childNodes.length&&!d2(e);)t=ps(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function TFe(e,t){for(;e&&!t&&!d2(e);)t=ps(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function gF(e,t,n){if(t.nodeType!=3){let s,a;(a=jFe(t,n))?(t=a,n=0):(s=TFe(t,n))&&(t=s,n=s.nodeValue.length)}let r=e.domSelection();if(!r)return;if(A5(r)){let s=document.createRange();s.setEnd(t,n),s.setStart(t,n),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&Zu(e)},50)}function t9(e,t){let n=e.state.doc.resolve(t);if(!(gs||cle)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let s=e.coordsAtPos(t-1),a=(s.top+s.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(s.left-i.left)>1)return s.left<i.left?"ltr":"rtl"}if(t<n.end()){let s=e.coordsAtPos(t+1),a=(s.top+s.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(s.left-i.left)>1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function n9(e,t,n){let r=e.state.selection;if(r instanceof Yt&&!r.empty||n.indexOf("s")>-1||$o&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let a=mF(e.state,t);if(a&&a instanceof Ot)return cA(e,a)}if(!i.parent.inlineContent){let a=t<0?i:s,o=r instanceof al?cn.near(a,t):cn.findFrom(a,t);return o?cA(e,o):!1}return!1}function r9(e,t){if(!(e.state.selection instanceof Yt))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let a=e.state.tr;return t<0?a.delete(n.pos-s.nodeSize,n.pos):a.delete(n.pos,n.pos+s.nodeSize),e.dispatch(a),!0}return!1}function i9(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function PFe(e){if(!$s||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;i9(e,r,"true"),setTimeout(()=>i9(e,r,"false"),20)}return!1}function IFe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function OFe(e,t){let n=t.keyCode,r=IFe(t);if(n==8||$o&&n==72&&r=="c")return r9(e,-1)||qm(e,-1);if(n==46&&!t.shiftKey||$o&&n==68&&r=="c")return r9(e,1)||qm(e,1);if(n==13||n==27)return!0;if(n==37||$o&&n==66&&r=="c"){let i=n==37?t9(e,e.state.selection.from)=="ltr"?-1:1:-1;return e9(e,i,r)||qm(e,i)}else if(n==39||$o&&n==70&&r=="c"){let i=n==39?t9(e,e.state.selection.from)=="ltr"?1:-1:1;return e9(e,i,r)||qm(e,i)}else{if(n==38||$o&&n==80&&r=="c")return n9(e,-1,r)||qm(e,-1);if(n==40||$o&&n==78&&r=="c")return PFe(e)||n9(e,1,r)||qm(e,1);if(r==($o?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function a6(e,t){e.someProp("transformCopied",h=>{t=h(t,e)});let n=[],{content:r,openStart:i,openEnd:s}=t;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let h=r.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let a=e.someProp("clipboardSerializer")||nm.fromSchema(e.state.schema),o=jle(),l=o.createElement("div");l.appendChild(a.serializeFragment(r,{document:o}));let u=l.firstChild,d,A=0;for(;u&&u.nodeType==1&&(d=Nle[u.nodeName.toLowerCase()]);){for(let h=d.length-1;h>=0;h--){let p=o.createElement(d[h]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),A++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${s}${A?` -${A}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",h=>h(t,e))||t.content.textBetween(0,t.content.size,`
`);return{dom:l,text:f,slice:t}}function Ble(e,t,n,r,i){let s=i.parent.type.spec.code,a,o;if(!n&&!t)return null;let l=!!t&&(r||s||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,s||r,e)}),s)return o=new rt(De.from(e.state.schema.text(t.replace(/\r\n?/g,`
`))),0,0),e.someProp("transformPasted",f=>{o=f(o,e,!0)}),o;let A=e.someProp("clipboardTextParser",f=>f(t,i,r,e));if(A)o=A;else{let f=i.marks(),{schema:h}=e.state,p=nm.fromSchema(h);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=a.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else e.someProp("transformPastedHTML",A=>{n=A(n,e)}),a=RFe(n),A2&&UFe(a);let u=a&&a.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let A=+d[3];A>0;A--){let f=a.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;a=f}if(o||(o=(e.someProp("clipboardParser")||e.someProp("domParser")||nh.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(l||d),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!FFe.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)o=DFe(s9(o,+d[1],+d[2]),d[4]);else if(o=rt.maxOpen(MFe(o.content,i),!0),o.openStart||o.openEnd){let A=0,f=0;for(let h=o.content.firstChild;A<o.openStart&&!h.type.spec.isolating;A++,h=h.firstChild);for(let h=o.content.lastChild;f<o.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);o=s9(o,A,f)}return e.someProp("transformPasted",A=>{o=A(o,e,l)}),o}const FFe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function MFe(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),s,a=[];if(e.forEach(o=>{if(!a)return;let l=i.findWrapping(o.type),u;if(!l)return a=null;if(u=a.length&&s.length&&kle(l,s,o,a[a.length-1],0))a[a.length-1]=u;else{a.length&&(a[a.length-1]=Ele(a[a.length-1],s.length));let d=_le(o,l);a.push(d),i=i.matchType(d.type),s=l}}),a)return De.from(a)}return e}function _le(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,De.from(e));return e}function kle(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let s=kle(e,t,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(De.from(_le(n,e,i+1))))}}function Ele(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,Ele(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(De.empty,!0);return e.copy(n.append(r))}function yF(e,t,n,r,i,s){let a=t<0?e.firstChild:e.lastChild,o=a.content;return e.childCount>1&&(s=0),i<r-1&&(o=yF(o,t,n,r,i+1,s)),i>=n&&(o=t<0?a.contentMatchAt(0).fillBefore(o,s<=i).append(o):o.append(a.contentMatchAt(a.childCount).fillBefore(De.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(o))}function s9(e,t,n){return t<e.openStart&&(e=new rt(yF(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new rt(yF(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const Nle={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let a9=null;function jle(){return a9||(a9=document.implementation.createHTMLDocument("title"))}let KP=null;function LFe(e){let t=window.trustedTypes;return t?(KP||(KP=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),KP.createHTML(e)):e}function RFe(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=jle().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&Nle[r[1].toLowerCase()])&&(e=i.map(s=>"<"+s+">").join("")+e+i.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=LFe(e),i)for(let s=0;s<i.length;s++)n=n.querySelector(i[s])||n;return n}function UFe(e){let t=e.querySelectorAll(gs?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function DFe(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:s,openEnd:a}=e;for(let o=r.length-2;o>=0;o-=2){let l=n.nodes[r[o]];if(!l||l.hasRequiredAttrs())break;i=De.from(l.create(r[o+1],i)),s++,a++}return new rt(i,s,a)}const ha={},fa={},QFe={touchstart:!0,touchmove:!0};class HFe{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function $Fe(e){for(let t in ha){let n=ha[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{VFe(e,r)&&!o6(e,r)&&(e.editable||!(r.type in fa))&&n(e,r)},QFe[t]?{passive:!0}:void 0)}$s&&e.dom.addEventListener("input",()=>null),vF(e)}function RA(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function zFe(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function vF(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>o6(e,r))})}function o6(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function VFe(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function KFe(e,t){!o6(e,t)&&ha[t.type]&&(e.editable||!(t.type in fa))&&ha[t.type](e,t)}fa.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Ple(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Wu&&gs&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Zy&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,Tf(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||OFe(e,n)?n.preventDefault():RA(e,"key")};fa.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};fa.keypress=(e,t)=>{let n=t;if(Ple(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||$o&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Yt)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode),s=()=>e.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",a=>a(e,r.$from.pos,r.$to.pos,i,s))&&e.dispatch(s()),n.preventDefault()}};function f5(e){return{left:e.clientX,top:e.clientY}}function WFe(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function l6(e,t,n,r,i){if(r==-1)return!1;let s=e.state.doc.resolve(r);for(let a=s.depth+1;a>0;a--)if(e.someProp(t,o=>a>s.depth?o(e,n,s.nodeAfter,s.before(a),i,!0):o(e,n,s.node(a),s.before(a),i,!1)))return!0;return!1}function uy(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function qFe(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Ot.isSelectable(r)?(uy(e,new Ot(n)),!0):!1}function GFe(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof Ot&&(r=n.node);let s=e.state.doc.resolve(t);for(let a=s.depth+1;a>0;a--){let o=a>s.depth?s.nodeAfter:s.node(a);if(Ot.isSelectable(o)){r&&n.$from.depth>0&&a>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?i=s.before(n.$from.depth):i=s.before(a);break}}return i!=null?(uy(e,Ot.create(e.state.doc,i)),!0):!1}function YFe(e,t,n,r,i){return l6(e,"handleClickOn",t,n,r)||e.someProp("handleClick",s=>s(e,t,r))||(i?GFe(e,n):qFe(e,n))}function XFe(e,t,n,r){return l6(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function JFe(e,t,n,r){return l6(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||ZFe(e,n,r)}function ZFe(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(uy(e,Yt.create(r,0,r.content.size)),!0):!1;let i=r.resolve(t);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s),o=i.before(s);if(a.inlineContent)uy(e,Yt.create(r,o+1,o+1+a.content.size));else if(Ot.isSelectable(a))uy(e,Ot.create(r,o));else continue;return!0}}function c6(e){return rk(e)}const Tle=$o?"metaKey":"ctrlKey";ha.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=c6(e),i=Date.now(),s="singleClick";i-e.input.lastClick.time<500&&WFe(n,e.input.lastClick)&&!n[Tle]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?s="doubleClick":e.input.lastClick.type=="doubleClick"&&(s="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:s,button:n.button};let a=e.posAtCoords(f5(n));a&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new eMe(e,a,n,!!r)):(s=="doubleClick"?XFe:JFe)(e,a.pos,a.inside,n)?n.preventDefault():RA(e,"pointer"))};class eMe{constructor(t,n,r,i){this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[Tle],this.allowDefault=r.shiftKey;let s,a;if(n.inside>-1)s=t.state.doc.nodeAt(n.inside),a=n.inside;else{let d=t.state.doc.resolve(n.pos);s=d.parent,a=d.depth?d.before():0}const o=i?null:r.target,l=o?t.docView.nearestDesc(o,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=t.state;(r.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof Ot&&u.from<=a&&u.to>a)&&(this.mightDrag={node:s,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ol&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),RA(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Zu(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(f5(t))),this.updateAllowDefault(t),this.allowDefault||!n?RA(this.view,"pointer"):YFe(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||$s&&this.mightDrag&&!this.mightDrag.node.isAtom||gs&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(uy(this.view,cn.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):RA(this.view,"pointer")}move(t){this.updateAllowDefault(t),RA(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}ha.touchstart=e=>{e.input.lastTouch=Date.now(),c6(e),RA(e,"pointer")};ha.touchmove=e=>{e.input.lastTouch=Date.now(),RA(e,"pointer")};ha.contextmenu=e=>c6(e);function Ple(e,t){return e.composing?!0:$s&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const tMe=Wu?5e3:-1;fa.compositionstart=fa.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Yt&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||gs&&cle&&nMe(e)))e.markCursor=e.state.storedMarks||n.marks(),rk(e,!0),e.markCursor=null;else if(rk(e,!t.selection.empty),ol&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let a=s<0?i.lastChild:i.childNodes[s-1];if(!a)break;if(a.nodeType==3){let o=e.domSelection();o&&o.collapse(a,a.nodeValue.length);break}else i=a,s=-1}}e.input.composing=!0}Ile(e,tMe)};function nMe(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}fa.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,Ile(e,20))};function Ile(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>rk(e),t))}function Ole(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=iMe());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function rMe(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=G3e(t.focusNode,t.focusOffset),r=Y3e(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,s=e.domObserver.lastChangedTextNode;if(n==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let a=n.pmViewDesc;if(!(!a||!a.isText(n.nodeValue)))return r}}return n||r}function iMe(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function rk(e,t=!1){if(!(Wu&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Ole(e),t||e.docView&&e.docView.dirty){let n=i6(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function sMe(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const Fb=Qa&&rh<15||Zy&&eFe<604;ha.copy=fa.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let s=Fb?null:n.clipboardData,a=r.content(),{dom:o,text:l}=a6(e,a);s?(n.preventDefault(),s.clearData(),s.setData("text/html",o.innerHTML),s.setData("text/plain",l)):sMe(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function aMe(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function oMe(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Mb(e,r.value,null,i,t):Mb(e,r.textContent,r.innerHTML,i,t)},50)}function Mb(e,t,n,r,i){let s=Ble(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,s||rt.empty)))return!0;if(!s)return!1;let a=aMe(s),o=a?e.state.tr.replaceSelectionWith(a,r):e.state.tr.replaceSelection(s);return e.dispatch(o.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Fle(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}fa.paste=(e,t)=>{let n=t;if(e.composing&&!Wu)return;let r=Fb?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Mb(e,Fle(r),r.getData("text/html"),i,n)?n.preventDefault():oMe(e,n)};class Mle{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const lMe=$o?"altKey":"ctrlKey";function Lle(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[lMe]}ha.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,s=i.empty?null:e.posAtCoords(f5(n)),a;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof Ot?i.to-1:i.to))){if(r&&r.mightDrag)a=Ot.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let A=e.docView.nearestDesc(n.target,!0);A&&A.node.type.spec.draggable&&A!=e.docView&&(a=Ot.create(e.state.doc,A.posBefore))}}let o=(a||e.state.selection).content(),{dom:l,text:u,slice:d}=a6(e,o);(!n.dataTransfer.files.length||!gs||lle>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Fb?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Fb||n.dataTransfer.setData("text/plain",u),e.dragging=new Mle(d,Lle(e,n),a)};ha.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};fa.dragover=fa.dragenter=(e,t)=>t.preventDefault();fa.drop=(e,t)=>{try{cMe(e,t,e.dragging)}finally{e.dragging=null}};function cMe(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(f5(t));if(!r)return;let i=e.state.doc.resolve(r.pos),s=n&&n.slice;s?e.someProp("transformPasted",h=>{s=h(s,e,!1)}):s=Ble(e,Fle(t.dataTransfer),Fb?null:t.dataTransfer.getData("text/html"),!1,i);let a=!!(n&&Lle(e,t));if(e.someProp("handleDrop",h=>h(e,t,s||rt.empty,a))){t.preventDefault();return}if(!s)return;t.preventDefault();let o=s?Woe(e.state.doc,i.pos,s):i.pos;o==null&&(o=i.pos);let l=e.state.tr;if(a){let{node:h}=n;h?h.replace(l):l.deleteSelection()}let u=l.mapping.map(o),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,A=l.doc;if(d?l.replaceRangeWith(u,u,s.content.firstChild):l.replaceRange(u,u,s),l.doc.eq(A))return;let f=l.doc.resolve(u);if(d&&Ot.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))l.setSelection(new Ot(f));else{let h=l.mapping.map(o);l.mapping.maps[l.mapping.maps.length-1].forEach((p,m,g,y)=>h=y),l.setSelection(s6(e,f,l.doc.resolve(h)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}ha.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Zu(e)},20))};ha.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};ha.beforeinput=(e,t)=>{if(gs&&Wu&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",s=>s(e,Tf(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in fa)ha[e]=fa[e];function Lb(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class ik{constructor(t,n){this.toDOM=t,this.spec=n||mp,this.side=this.spec.side||0}map(t,n,r,i){let{pos:s,deleted:a}=t.mapResult(n.from+i,this.side<0?-1:1);return a?null:new oa(s-r,s-r,this)}valid(){return!0}eq(t){return this==t||t instanceof ik&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Lb(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class sh{constructor(t,n){this.attrs=t,this.spec=n||mp}map(t,n,r,i){let s=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,a=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=a?null:new oa(s,a,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof sh&&Lb(this.attrs,t.attrs)&&Lb(this.spec,t.spec)}static is(t){return t.type instanceof sh}destroy(){}}class u6{constructor(t,n){this.attrs=t,this.spec=n||mp}map(t,n,r,i){let s=t.mapResult(n.from+i,1);if(s.deleted)return null;let a=t.mapResult(n.to+i,-1);return a.deleted||a.pos<=s.pos?null:new oa(s.pos-r,a.pos-r,this)}valid(t,n){let{index:r,offset:i}=t.content.findIndex(n.from),s;return i==n.from&&!(s=t.child(r)).isText&&i+s.nodeSize==n.to}eq(t){return this==t||t instanceof u6&&Lb(this.attrs,t.attrs)&&Lb(this.spec,t.spec)}destroy(){}}class oa{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new oa(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new oa(t,t,new ik(n,r))}static inline(t,n,r,i){return new oa(t,n,new sh(r,i))}static node(t,n,r,i){return new oa(t,n,new u6(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof sh}get widget(){return this.type instanceof ik}}const gg=[],mp={};class Pr{constructor(t,n){this.local=t.length?t:gg,this.children=n.length?n:gg}static create(t,n){return n.length?sk(n,t,0,mp):Fs}find(t,n,r){let i=[];return this.findInner(t??0,n??1e9,i,0,r),i}findInner(t,n,r,i,s){for(let a=0;a<this.local.length;a++){let o=this.local[a];o.from<=n&&o.to>=t&&(!s||s(o.spec))&&r.push(o.copy(o.from+i,o.to+i))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<n&&this.children[a+1]>t){let o=this.children[a]+1;this.children[a+2].findInner(t-o,n-o,r,i+o,s)}}map(t,n,r){return this==Fs||t.maps.length==0?this:this.mapInner(t,n,0,0,r||mp)}mapInner(t,n,r,i,s){let a;for(let o=0;o<this.local.length;o++){let l=this.local[o].map(t,r,i);l&&l.type.valid(n,l)?(a||(a=[])).push(l):s.onRemove&&s.onRemove(this.local[o].spec)}return this.children.length?uMe(this.children,a||[],t,n,r,i,s):a?new Pr(a.sort(gp),gg):Fs}add(t,n){return n.length?this==Fs?Pr.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,s=0;t.forEach((o,l)=>{let u=l+r,d;if(d=Ule(n,o,u)){for(i||(i=this.children.slice());s<i.length&&i[s]<l;)s+=3;i[s]==l?i[s+2]=i[s+2].addInner(o,d,u+1):i.splice(s,0,l,l+o.nodeSize,sk(d,o,u+1,mp)),s+=3}});let a=Rle(s?Dle(n):n,-r);for(let o=0;o<a.length;o++)a[o].type.valid(t,a[o])||a.splice(o--,1);return new Pr(a.length?this.local.concat(a).sort(gp):this.local,i||this.children)}remove(t){return t.length==0||this==Fs?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let s=0;s<r.length;s+=3){let a,o=r[s]+n,l=r[s+1]+n;for(let d=0,A;d<t.length;d++)(A=t[d])&&A.from>o&&A.to<l&&(t[d]=null,(a||(a=[])).push(A));if(!a)continue;r==this.children&&(r=this.children.slice());let u=r[s+2].removeInner(a,o+1);u!=Fs?r[s+2]=u:(r.splice(s,3),s-=3)}if(i.length){for(let s=0,a;s<t.length;s++)if(a=t[s])for(let o=0;o<i.length;o++)i[o].eq(a,n)&&(i==this.local&&(i=this.local.slice()),i.splice(o--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Pr(i,r):Fs}forChild(t,n){if(this==Fs)return this;if(n.isLeaf)return Pr.empty;let r,i;for(let o=0;o<this.children.length;o+=3)if(this.children[o]>=t){this.children[o]==t&&(r=this.children[o+2]);break}let s=t+1,a=s+n.content.size;for(let o=0;o<this.local.length;o++){let l=this.local[o];if(l.from<a&&l.to>s&&l.type instanceof sh){let u=Math.max(s,l.from)-s,d=Math.min(a,l.to)-s;u<d&&(i||(i=[])).push(l.copy(u,d))}}if(i){let o=new Pr(i.sort(gp),gg);return r?new gA([o,r]):o}return r||Fs}eq(t){if(this==t)return!0;if(!(t instanceof Pr)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return d6(this.localsInner(t))}localsInner(t){if(this==Fs)return gg;if(t.inlineContent||!this.local.some(sh.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof sh||n.push(this.local[r]);return n}forEachSet(t){t(this)}}Pr.empty=new Pr([],[]);Pr.removeOverlap=d6;const Fs=Pr.empty;class gA{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,mp));return gA.from(r)}forChild(t,n){if(n.isLeaf)return Pr.empty;let r=[];for(let i=0;i<this.members.length;i++){let s=this.members[i].forChild(t,n);s!=Fs&&(s instanceof gA?r=r.concat(s.members):r.push(s))}return gA.from(r)}eq(t){if(!(t instanceof gA)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let i=0;i<this.members.length;i++){let s=this.members[i].localsInner(t);if(s.length)if(!n)n=s;else{r&&(n=n.slice(),r=!1);for(let a=0;a<s.length;a++)n.push(s[a])}}return n?d6(r?n:n.sort(gp)):gg}static from(t){switch(t.length){case 0:return Fs;case 1:return t[0];default:return new gA(t.every(n=>n instanceof Pr)?t:t.reduce((n,r)=>n.concat(r instanceof Pr?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function uMe(e,t,n,r,i,s,a){let o=e.slice();for(let u=0,d=s;u<n.maps.length;u++){let A=0;n.maps[u].forEach((f,h,p,m)=>{let g=m-p-(h-f);for(let y=0;y<o.length;y+=3){let v=o[y+1];if(v<0||f>v+d-A)continue;let x=o[y]+d-A;h>=x?o[y+1]=f<=x?-2:-1:f>=d&&g&&(o[y]+=g,o[y+1]+=g)}A+=g}),d=n.maps[u].map(d,-1)}let l=!1;for(let u=0;u<o.length;u+=3)if(o[u+1]<0){if(o[u+1]==-2){l=!0,o[u+1]=-1;continue}let d=n.map(e[u]+s),A=d-i;if(A<0||A>=r.content.size){l=!0;continue}let f=n.map(e[u+1]+s,-1),h=f-i,{index:p,offset:m}=r.content.findIndex(A),g=r.maybeChild(p);if(g&&m==A&&m+g.nodeSize==h){let y=o[u+2].mapInner(n,g,d+1,e[u]+s+1,a);y!=Fs?(o[u]=A,o[u+1]=h,o[u+2]=y):(o[u+1]=-2,l=!0)}else l=!0}if(l){let u=dMe(o,e,t,n,i,s,a),d=sk(u,r,0,a);t=d.local;for(let A=0;A<o.length;A+=3)o[A+1]<0&&(o.splice(A,3),A-=3);for(let A=0,f=0;A<d.children.length;A+=3){let h=d.children[A];for(;f<o.length&&o[f]<h;)f+=3;o.splice(f,0,d.children[A],d.children[A+1],d.children[A+2])}}return new Pr(t.sort(gp),o)}function Rle(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new oa(i.from+t,i.to+t,i.type))}return n}function dMe(e,t,n,r,i,s,a){function o(l,u){for(let d=0;d<l.local.length;d++){let A=l.local[d].map(r,i,u);A?n.push(A):a.onRemove&&a.onRemove(l.local[d].spec)}for(let d=0;d<l.children.length;d+=3)o(l.children[d+2],l.children[d]+u+1)}for(let l=0;l<e.length;l+=3)e[l+1]==-1&&o(e[l+2],t[l]+s+1);return n}function Ule(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let s=0,a;s<e.length;s++)(a=e[s])&&a.from>n&&a.to<r&&((i||(i=[])).push(a),e[s]=null);return i}function Dle(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function sk(e,t,n,r){let i=[],s=!1;t.forEach((o,l)=>{let u=Ule(e,o,l+n);if(u){s=!0;let d=sk(u,o,n+l+1,r);d!=Fs&&i.push(l,l+o.nodeSize,d)}});let a=Rle(s?Dle(e):e,-n).sort(gp);for(let o=0;o<a.length;o++)a[o].type.valid(t,a[o])||(r.onRemove&&r.onRemove(a[o].spec),a.splice(o--,1));return a.length||i.length?new Pr(a,i):Fs}function gp(e,t){return e.from-t.from||e.to-t.to}function d6(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let s=t[i];if(s.from==r.from){s.to!=r.to&&(t==e&&(t=e.slice()),t[i]=s.copy(s.from,r.to),o9(t,i+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,s.from),o9(t,i,r.copy(s.from,r.to)));break}}}return t}function o9(e,t,n){for(;t<e.length&&gp(n,e[t])>0;)t++;e.splice(t,0,n)}function WP(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Fs&&t.push(r)}),e.cursorWrapper&&t.push(Pr.create(e.state.doc,[e.cursorWrapper.deco])),gA.from(t)}const AMe={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},hMe=Qa&&rh<=11;class fMe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class pMe{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new fMe,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Qa&&rh<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():$s&&t.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),hMe&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,AMe)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(ZV(this.view)){if(this.suppressingSelectionUpdates)return Zu(this.view);if(Qa&&rh<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Dp(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let s=t.focusNode;s;s=Jy(s))n.add(s);for(let s=t.anchorNode;s;s=Jy(s))if(n.has(s)){r=s;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&ZV(t)&&!this.ignoreSelectionChange(r),s=-1,a=-1,o=!1,l=[];if(t.editable)for(let d=0;d<n.length;d++){let A=this.registerMutation(n[d],l);A&&(s=s<0?A.from:Math.min(A.from,s),a=a<0?A.to:Math.max(A.to,a),A.typeOver&&(o=!0))}if(l.some(d=>d.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let d of l)if(d.nodeName=="BR"&&d.parentNode){let A=d.nextSibling;A&&A.nodeType==1&&A.contentEditable=="false"&&d.parentNode.removeChild(d)}}else if(ol&&l.length){let d=l.filter(A=>A.nodeName=="BR");if(d.length==2){let[A,f]=d;A.parentNode&&A.parentNode.parentNode==f.parentNode?f.remove():A.remove()}else{let{focusNode:A}=this.currentSelection;for(let f of d){let h=f.parentNode;h&&h.nodeName=="LI"&&(!A||yMe(t,A)!=h)&&f.remove()}}}let u=null;s<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&A5(r)&&(u=i6(t))&&u.eq(cn.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Zu(t),this.currentSelection.set(r),t.scrollToSelection()):(s>-1||i)&&(s>-1&&(t.docView.markDirty(s,a),mMe(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,vMe(t,l)),this.handleDOMChange(s,a,o,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Zu(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let d=0;d<t.addedNodes.length;d++){let A=t.addedNodes[d];n.push(A),A.nodeType==3&&(this.lastChangedTextNode=A)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let i=t.previousSibling,s=t.nextSibling;if(Qa&&rh<=11&&t.addedNodes.length)for(let d=0;d<t.addedNodes.length;d++){let{previousSibling:A,nextSibling:f}=t.addedNodes[d];(!A||Array.prototype.indexOf.call(t.addedNodes,A)<0)&&(i=A),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(s=f)}let a=i&&i.parentNode==t.target?ps(i)+1:0,o=r.localPosFromDOM(t.target,a,-1),l=s&&s.parentNode==t.target?ps(s):t.target.childNodes.length,u=r.localPosFromDOM(t.target,l,1);return{from:o,to:u}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let l9=new WeakMap,c9=!1;function mMe(e){if(!l9.has(e)&&(l9.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=ol,c9)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),c9=!0}}function u9(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,s=t.endOffset,a=e.domAtPos(e.state.selection.anchor);return Dp(a.node,a.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function gMe(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return u9(e,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?u9(e,n):null}function yMe(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function vMe(e,t){var n;let{focusNode:r,focusOffset:i}=e.domSelectionRange();for(let s of t)if(((n=s.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let a=s.nextSibling;for(;a&&a.nodeName!="TD"&&a.nodeName!="TH";)a=a.nextSibling;if(a){let o=a;for(;;){let l=o.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;o=l}o.insertBefore(s,o.firstChild),r==s&&e.domSelection().collapse(s,i)}else s.parentNode.removeChild(s)}}function xMe(e,t,n){let{node:r,fromOffset:i,toOffset:s,from:a,to:o}=e.docView.parseRange(t,n),l=e.domSelectionRange(),u,d=l.anchorNode;if(d&&e.dom.contains(d.nodeType==1?d:d.parentNode)&&(u=[{node:d,offset:l.anchorOffset}],A5(l)||u.push({node:l.focusNode,offset:l.focusOffset})),gs&&e.input.lastKeyCode===8)for(let g=s;g>i;g--){let y=r.childNodes[g-1],v=y.pmViewDesc;if(y.nodeName=="BR"&&!v){s=g;break}if(!v||v.size)break}let A=e.state.doc,f=e.someProp("domParser")||nh.fromSchema(e.state.schema),h=A.resolve(a),p=null,m=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:wMe,context:h});if(u&&u[0].pos!=null){let g=u[0].pos,y=u[1]&&u[1].pos;y==null&&(y=g),p={anchor:g+a,head:y+a}}return{doc:m,sel:p,from:a,to:o}}function wMe(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if($s&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||$s&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const bMe=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function CMe(e,t,n,r,i){let s=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let k=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,N=i6(e,k);if(N&&!e.state.selection.eq(N)){if(gs&&Wu&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",L=>L(e,Tf(13,"Enter"))))return;let j=e.state.tr.setSelection(N);k=="pointer"?j.setMeta("pointer",!0):k=="key"&&j.scrollIntoView(),s&&j.setMeta("composition",s),e.dispatch(j)}return}let a=e.state.doc.resolve(t),o=a.sharedDepth(n);t=a.before(o+1),n=e.state.doc.resolve(n).after(o+1);let l=e.state.selection,u=xMe(e,t,n),d=e.state.doc,A=d.slice(u.from,u.to),f,h;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,h="end"):(f=e.state.selection.from,h="start"),e.input.lastKeyCode=null;let p=_Me(A.content,u.doc.content,u.from,f,h);if(p&&e.input.domChangeCount++,(Zy&&e.input.lastIOSEnter>Date.now()-225||Wu)&&i.some(k=>k.nodeType==1&&!bMe.test(k.nodeName))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",k=>k(e,Tf(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!p)if(r&&l instanceof Yt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let k=d9(e,e.state.doc,u.sel);if(k&&!k.eq(e.state.selection)){let N=e.state.tr.setSelection(k);s&&N.setMeta("composition",s),e.dispatch(N)}}return}e.state.selection.from<e.state.selection.to&&p.start==p.endB&&e.state.selection instanceof Yt&&(p.start>e.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?p.start=e.state.selection.from:p.endA<e.state.selection.to&&p.endA>=e.state.selection.to-2&&e.state.selection.to<=u.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),Qa&&rh<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)==" "&&(p.start--,p.endA--,p.endB--);let m=u.doc.resolveNoCache(p.start-u.from),g=u.doc.resolveNoCache(p.endB-u.from),y=d.resolve(p.start),v=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=p.endA;if((Zy&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(k=>k.nodeName=="DIV"||k.nodeName=="P"))||!v&&m.pos<u.doc.content.size&&(!m.sameParent(g)||!m.parent.inlineContent)&&m.pos<g.pos&&!/\S/.test(u.doc.textBetween(m.pos,g.pos,"","")))&&e.someProp("handleKeyDown",k=>k(e,Tf(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>p.start&&BMe(d,p.start,p.endA,m,g)&&e.someProp("handleKeyDown",k=>k(e,Tf(8,"Backspace")))){Wu&&gs&&e.domObserver.suppressSelectionUpdates();return}gs&&p.endB==p.start&&(e.input.lastChromeDelete=Date.now()),Wu&&!v&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,g=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(k){return k(e,Tf(13,"Enter"))})},20));let x=p.start,b=p.endA,w=k=>{let N=k||e.state.tr.replace(x,b,u.doc.slice(p.start-u.from,p.endB-u.from));if(u.sel){let j=d9(e,N.doc,u.sel);j&&!(gs&&e.composing&&j.empty&&(p.start!=p.endB||e.input.lastChromeDelete<Date.now()-100)&&(j.head==x||j.head==N.mapping.map(b)-1)||Qa&&j.empty&&j.head==x)&&N.setSelection(j)}return s&&N.setMeta("composition",s),N.scrollIntoView()},B;if(v)if(m.pos==g.pos){Qa&&rh<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Zu(e),20));let k=w(e.state.tr.delete(x,b)),N=d.resolve(p.start).marksAcross(d.resolve(p.endA));N&&k.ensureMarks(N),e.dispatch(k)}else if(p.endA==p.endB&&(B=SMe(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start())))){let k=w(e.state.tr);B.type=="add"?k.addMark(x,b,B.mark):k.removeMark(x,b,B.mark),e.dispatch(k)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let k=m.parent.textBetween(m.parentOffset,g.parentOffset),N=()=>w(e.state.tr.insertText(k,x,b));e.someProp("handleTextInput",j=>j(e,x,b,k,N))||e.dispatch(N())}else e.dispatch(w());else e.dispatch(w())}function d9(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:s6(e,t.resolve(n.anchor),t.resolve(n.head))}function SMe(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,s=r,a,o,l;for(let d=0;d<r.length;d++)i=r[d].removeFromSet(i);for(let d=0;d<n.length;d++)s=n[d].removeFromSet(s);if(i.length==1&&s.length==0)o=i[0],a="add",l=d=>d.mark(o.addToSet(d.marks));else if(i.length==0&&s.length==1)o=s[0],a="remove",l=d=>d.mark(o.removeFromSet(d.marks));else return null;let u=[];for(let d=0;d<t.childCount;d++)u.push(l(t.child(d)));if(De.from(u).eq(e))return{mark:o,type:a}}function BMe(e,t,n,r,i){if(n-t<=i.pos-r.pos||qP(r,!0,!1)<i.pos)return!1;let s=e.resolve(t);if(!r.parent.isTextblock){let o=s.nodeAfter;return o!=null&&n==t+o.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let a=e.resolve(qP(s,!0,!0));return!a.parent.isTextblock||a.pos>n||qP(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function qP(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let s=e.node(r).maybeChild(e.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function _Me(e,t,n,r,i){let s=e.findDiffStart(t,n);if(s==null)return null;let{a,b:o}=e.findDiffEnd(t,n+e.size,n+t.size);if(i=="end"){let l=Math.max(0,s-Math.min(a,o));r-=a+l-s}if(a<s&&e.size<t.size){let l=r<=s&&r>=a?s-r:0;s-=l,s&&s<t.size&&A9(t.textBetween(s-1,s+1))&&(s+=l?1:-1),o=s+(o-a),a=s}else if(o<s){let l=r<=s&&r>=o?s-r:0;s-=l,s&&s<e.size&&A9(e.textBetween(s-1,s+1))&&(s+=l?1:-1),a=s+(a-o),o=s}return{start:s,endA:a,endB:o}}function A9(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class Qle{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new HFe,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(g9),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=p9(this),f9(this),this.nodeViews=m9(this),this.docView=WV(this.state.doc,h9(this),WP(this),this.dom,this),this.domObserver=new pMe(this,(r,i,s,a)=>CMe(this,r,i,s,a)),this.domObserver.start(),$Fe(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&vF(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(g9),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,s=!1,a=!1;t.storedMarks&&this.composing&&(Ole(this),a=!0),this.state=t;let o=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(o||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=m9(this);EMe(h,this.nodeViews)&&(this.nodeViews=h,s=!0)}(o||n.handleDOMEvents!=this._props.handleDOMEvents)&&vF(this),this.editable=p9(this),f9(this);let l=WP(this),u=h9(this),d=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",A=s||!this.docView.matchesNode(t.doc,u,l);(A||!t.selection.eq(i.selection))&&(a=!0);let f=d=="preserve"&&a&&this.dom.style.overflowAnchor==null&&rFe(this);if(a){this.domObserver.stop();let h=A&&(Qa||gs)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&kMe(i.selection,t.selection);if(A){let p=gs?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=rMe(this)),(s||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=WV(t.doc,u,l,this.dom,this)),p&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&kFe(this))?Zu(this,h):(ble(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():f&&iFe(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Ot){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&QV(this,n.getBoundingClientRect(),t)}else QV(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let s=r.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==r.node&&(i=s)}this.dragging=new Mle(t.slice,t.move,i<0?void 0:Ot.create(this.state.doc,i))}someProp(t,n){let r=this._props&&this._props[t],i;if(r!=null&&(i=n?n(r):r))return i;for(let a=0;a<this.directPlugins.length;a++){let o=this.directPlugins[a].props[t];if(o!=null&&(i=n?n(o):o))return i}let s=this.state.plugins;if(s)for(let a=0;a<s.length;a++){let o=s[a].props[t];if(o!=null&&(i=n?n(o):o))return i}}hasFocus(){if(Qa){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&sFe(this.dom),Zu(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return uFe(this,t)}coordsAtPos(t,n=1){return fle(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return pFe(this,n||this.state,t)}pasteHTML(t,n){return Mb(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Mb(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return a6(this,t)}destroy(){this.docView&&(zFe(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],WP(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,W3e())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return KFe(this,t)}domSelectionRange(){let t=this.domSelection();return t?$s&&this.root.nodeType===11&&J3e(this.dom.ownerDocument)==this.dom&&gMe(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Qle.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function h9(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[oa.node(0,e.state.doc.content.size,t)]}function f9(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:oa.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function p9(e){return!e.someProp("editable",t=>t(e.state)===!1)}function kMe(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function m9(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function EMe(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r}function g9(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Ch={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ak={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},NMe=typeof navigator<"u"&&/Mac/.test(navigator.platform),jMe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ms=0;ms<10;ms++)Ch[48+ms]=Ch[96+ms]=String(ms);for(var ms=1;ms<=24;ms++)Ch[ms+111]="F"+ms;for(var ms=65;ms<=90;ms++)Ch[ms]=String.fromCharCode(ms+32),ak[ms]=String.fromCharCode(ms);for(var GP in Ch)ak.hasOwnProperty(GP)||(ak[GP]=Ch[GP]);function TMe(e){var t=NMe&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||jMe&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?ak:Ch)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const PMe=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),IMe=typeof navigator<"u"&&/Win/.test(navigator.platform);function OMe(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,i,s,a;for(let o=0;o<t.length-1;o++){let l=t[o];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))PMe?a=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),a&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function FMe(e){let t=Object.create(null);for(let n in e)t[OMe(n)]=e[n];return t}function YP(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function MMe(e){return new Rr({props:{handleKeyDown:Hle(e)}})}function Hle(e){let t=FMe(e);return function(n,r){let i=TMe(r),s,a=t[YP(i,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let o=t[YP(i,r,!1)];if(o&&o(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(IMe&&r.ctrlKey&&r.altKey)&&(s=Ch[r.keyCode])&&s!=i){let o=t[YP(s,r)];if(o&&o(n.state,n.dispatch,n))return!0}}return!1}}var LMe=Object.defineProperty,A6=(e,t)=>{for(var n in t)LMe(e,n,{get:t[n],enumerable:!0})};function p5(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:i}=n,{storedMarks:s}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,s=n.storedMarks,n}}}var m5=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,s=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([a,o])=>[a,(...u)=>{const d=o(...u)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:i}=this,{view:s}=r,a=[],o=!!e,l=e||i.tr,u=()=>(!o&&t&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(l),a.every(A=>A===!0)),d={...Object.fromEntries(Object.entries(n).map(([A,f])=>[A,(...p)=>{const m=this.buildProps(l,t),g=f(...p)(m);return a.push(g),d}])),run:u};return d}createCan(e){const{rawCommands:t,state:n}=this,r=!1,i=e||n.tr,s=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(t).map(([o,l])=>[o,(...u)=>l(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:i}=this,{view:s}=r,a={tr:e,editor:r,view:s,state:p5({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([o,l])=>[o,(...u)=>l(...u)(a)]))}};return a}},$le={};A6($le,{blur:()=>RMe,clearContent:()=>UMe,clearNodes:()=>DMe,command:()=>QMe,createParagraphNear:()=>HMe,cut:()=>$Me,deleteCurrentNode:()=>zMe,deleteNode:()=>VMe,deleteRange:()=>KMe,deleteSelection:()=>WMe,enter:()=>qMe,exitCode:()=>GMe,extendMarkRange:()=>YMe,first:()=>XMe,focus:()=>ZMe,forEach:()=>eLe,insertContent:()=>tLe,insertContentAt:()=>iLe,joinBackward:()=>oLe,joinDown:()=>aLe,joinForward:()=>lLe,joinItemBackward:()=>cLe,joinItemForward:()=>uLe,joinTextblockBackward:()=>dLe,joinTextblockForward:()=>ALe,joinUp:()=>sLe,keyboardShortcut:()=>fLe,lift:()=>pLe,liftEmptyBlock:()=>mLe,liftListItem:()=>gLe,newlineInCode:()=>yLe,resetAttributes:()=>vLe,scrollIntoView:()=>xLe,selectAll:()=>wLe,selectNodeBackward:()=>bLe,selectNodeForward:()=>CLe,selectParentNode:()=>SLe,selectTextblockEnd:()=>BLe,selectTextblockStart:()=>_Le,setContent:()=>kLe,setMark:()=>WLe,setMeta:()=>qLe,setNode:()=>GLe,setNodeSelection:()=>YLe,setTextDirection:()=>XLe,setTextSelection:()=>JLe,sinkListItem:()=>ZLe,splitBlock:()=>eRe,splitListItem:()=>tRe,toggleList:()=>nRe,toggleMark:()=>rRe,toggleNode:()=>iRe,toggleWrap:()=>sRe,undoInputRule:()=>aRe,unsetAllMarks:()=>oRe,unsetMark:()=>lRe,unsetTextDirection:()=>cRe,updateAttributes:()=>uRe,wrapIn:()=>dRe,wrapInList:()=>ARe});var RMe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),UMe=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),DMe=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:s,$to:a})=>{e.doc.nodesBetween(s.pos,a.pos,(o,l)=>{if(o.type.isText)return;const{doc:u,mapping:d}=t,A=u.resolve(d.map(l)),f=u.resolve(d.map(l+o.nodeSize)),h=A.blockRange(f);if(!h)return;const p=X0(h);if(o.type.isTextblock){const{defaultType:m}=A.parent.contentMatchAt(A.index());t.setNodeMarkup(h.start,m)}(p||p===0)&&t.lift(h,p)})}),!0},QMe=e=>t=>e(t),HMe=()=>({state:e,dispatch:t})=>I3e(e,t),$Me=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,s=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const a=r.mapping.map(t);return r.insert(a,s.content),r.setSelection(new Yt(r.doc.resolve(Math.max(a-1,0)))),!0},zMe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(t){const o=i.before(s),l=i.after(s);e.delete(o,l).scrollIntoView()}return!0}return!1};function Si(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var VMe=e=>({tr:t,state:n,dispatch:r})=>{const i=Si(e,n.schema),s=t.selection.$anchor;for(let a=s.depth;a>0;a-=1)if(s.node(a).type===i){if(r){const l=s.before(a),u=s.after(a);t.delete(l,u).scrollIntoView()}return!0}return!1},KMe=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},WMe=()=>({state:e,dispatch:t})=>w3e(e,t),qMe=()=>({commands:e})=>e.keyboardShortcut("Enter"),GMe=()=>({state:e,dispatch:t})=>P3e(e,t);function h6(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function ok(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:h6(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function zle(e,t,n={}){return e.find(r=>r.type===t&&ok(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function y9(e,t,n={}){return!!zle(e,t,n)}function f6(e,t,n){var r;if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if((!i.node||!i.node.marks.some(d=>d.type===t))&&(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(d=>d.type===t)||(n=n||((r=i.node.marks[0])==null?void 0:r.attrs),!zle([...i.node.marks],t,n)))return;let a=i.index,o=e.start()+i.offset,l=a+1,u=o+i.node.nodeSize;for(;a>0&&y9([...e.parent.child(a-1).marks],t,n);)a-=1,o-=e.parent.child(a).nodeSize;for(;l<e.parent.childCount&&y9([...e.parent.child(l).marks],t,n);)u+=e.parent.child(l).nodeSize,l+=1;return{from:o,to:u}}function Cd(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var YMe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const s=Cd(e,r.schema),{doc:a,selection:o}=n,{$from:l,from:u,to:d}=o;if(i){const A=f6(l,s,t);if(A&&A.from<=u&&A.to>=d){const f=Yt.create(a,A.from,A.to);n.setSelection(f)}}return!0},XMe=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function Vle(e){return e instanceof Yt}function $f(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Kle(e,t=null){if(!t)return null;const n=cn.atStart(e),r=cn.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const i=n.from,s=r.to;return t==="all"?Yt.create(e,$f(0,i,s),$f(e.content.size,i,s)):Yt.create(e,$f(t,i,s),$f(t,i,s))}function v9(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function lk(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function JMe(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var ZMe=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:s})=>{t={scrollIntoView:!0,...t};const a=()=>{(lk()||v9())&&r.dom.focus(),JMe()&&!lk()&&!v9()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(s&&e===null&&!Vle(n.state.selection))return a(),!0;const o=Kle(i.doc,e)||n.state.selection,l=n.state.selection.eq(o);return s&&(l||i.setSelection(o),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),a()),!0},eLe=(e,t)=>n=>e.every((r,i)=>t(r,{...n,index:i})),tLe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),Wle=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&Wle(r)}return e};function rS(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return Wle(n)}function Rb(e,t,n){if(e instanceof th||e instanceof De)return e;n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,i=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return De.fromArray(e.map(o=>t.nodeFromJSON(o)));const a=t.nodeFromJSON(e);return n.errorOnInvalidContent&&a.check(),a}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",s),Rb("",t,n)}if(i){if(n.errorOnInvalidContent){let a=!1,o="";const l=new Moe({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(a=!0,o=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?nh.fromSchema(l).parseSlice(rS(e),n.parseOptions):nh.fromSchema(l).parse(rS(e),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${o}`)})}const s=nh.fromSchema(t);return n.slice?s.parseSlice(rS(e),n.parseOptions).content:s.parse(rS(e),n.parseOptions)}return Rb("",t,n)}function nLe(e,t,n){const r=e.steps.length-1;if(r<t)return;const i=e.steps[r];if(!(i instanceof qi||i instanceof Yi))return;const s=e.mapping.maps[r];let a=0;s.forEach((o,l,u,d)=>{a===0&&(a=d)}),e.setSelection(cn.near(e.doc.resolve(a),n))}var rLe=e=>!("type"in e),iLe=(e,t,n)=>({tr:r,dispatch:i,editor:s})=>{var a;if(i){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let o;const l=g=>{s.emit("contentError",{editor:s,error:g,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{Rb(t,s.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(g){l(g)}try{o=Rb(t,s.schema,{parseOptions:u,errorOnInvalidContent:(a=n.errorOnInvalidContent)!=null?a:s.options.enableContentCheck})}catch(g){return l(g),!1}let{from:d,to:A}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,h=!0;if((rLe(o)?o:[o]).forEach(g=>{g.check(),f=f?g.isText&&g.marks.length===0:!1,h=h?g.isBlock:!1}),d===A&&h){const{parent:g}=r.doc.resolve(d);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(d-=1,A+=1)}let m;if(f){if(Array.isArray(t))m=t.map(g=>g.text||"").join("");else if(t instanceof De){let g="";t.forEach(y=>{y.text&&(g+=y.text)}),m=g}else typeof t=="object"&&t&&t.text?m=t.text:m=t;r.insertText(m,d,A)}else{m=o;const g=r.doc.resolve(d),y=g.node(),v=g.parentOffset===0,x=y.isText||y.isTextblock,b=y.content.size>0;v&&x&&b&&(d=Math.max(0,d-1)),r.replaceWith(d,A,m)}n.updateSelection&&nLe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:d,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:d,text:m})}return!0},sLe=()=>({state:e,dispatch:t})=>E3e(e,t),aLe=()=>({state:e,dispatch:t})=>N3e(e,t),oLe=()=>({state:e,dispatch:t})=>b3e(e,t),lLe=()=>({state:e,dispatch:t})=>_3e(e,t),cLe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=c5(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},uLe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=c5(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},dLe=()=>({state:e,dispatch:t})=>C3e(e,t),ALe=()=>({state:e,dispatch:t})=>S3e(e,t);function qle(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function hLe(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,i,s,a;for(let o=0;o<t.length-1;o+=1){const l=t[o];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))lk()||qle()?a=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),s&&(n=`Shift-${n}`),n}var fLe=e=>({editor:t,view:n,tr:r,dispatch:i})=>{const s=hLe(e).split(/-(?!$)/),a=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),o=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,o))});return l==null||l.steps.forEach(u=>{const d=u.map(r.mapping);d&&i&&r.maybeStep(d)}),!0};function Sh(e,t,n={}){const{from:r,to:i,empty:s}=e.selection,a=t?Si(t,e.schema):null,o=[];e.doc.nodesBetween(r,i,(A,f)=>{if(A.isText)return;const h=Math.max(r,f),p=Math.min(i,f+A.nodeSize);o.push({node:A,from:h,to:p})});const l=i-r,u=o.filter(A=>a?a.name===A.node.type.name:!0).filter(A=>ok(A.node.attrs,n,{strict:!1}));return s?!!u.length:u.reduce((A,f)=>A+f.to-f.from,0)>=l}var pLe=(e,t={})=>({state:n,dispatch:r})=>{const i=Si(e,n.schema);return Sh(n,i,t)?j3e(n,r):!1},mLe=()=>({state:e,dispatch:t})=>O3e(e,t),gLe=e=>({state:t,dispatch:n})=>{const r=Si(e,t.schema);return $3e(r)(t,n)},yLe=()=>({state:e,dispatch:t})=>T3e(e,t);function g5(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function x9(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,i)=>(n.includes(i)||(r[i]=e[i]),r),{})}var vLe=(e,t)=>({tr:n,state:r,dispatch:i})=>{let s=null,a=null;const o=g5(typeof e=="string"?e:e.name,r.schema);if(!o)return!1;o==="node"&&(s=Si(e,r.schema)),o==="mark"&&(a=Cd(e,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(d,A)=>{s&&s===d.type&&(l=!0,i&&n.setNodeMarkup(A,void 0,x9(d.attrs,t))),a&&d.marks.length&&d.marks.forEach(f=>{a===f.type&&(l=!0,i&&n.addMark(A,A+d.nodeSize,a.create(x9(f.attrs,t))))})})}),l},xLe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),wLe=()=>({tr:e,dispatch:t})=>{if(t){const n=new al(e.doc);e.setSelection(n)}return!0},bLe=()=>({state:e,dispatch:t})=>B3e(e,t),CLe=()=>({state:e,dispatch:t})=>k3e(e,t),SLe=()=>({state:e,dispatch:t})=>F3e(e,t),BLe=()=>({state:e,dispatch:t})=>R3e(e,t),_Le=()=>({state:e,dispatch:t})=>L3e(e,t);function xF(e,t,n={},r={}){return Rb(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var kLe=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:s,dispatch:a,commands:o})=>{const{doc:l}=s;if(r.preserveWhitespace!=="full"){const u=xF(e,i.schema,r,{errorOnInvalidContent:t??i.options.enableContentCheck});return a&&s.replaceWith(0,l.content.size,u).setMeta("preventUpdate",!n),!0}return a&&s.setMeta("preventUpdate",!n),o.insertContentAt({from:0,to:l.content.size},e,{parseOptions:r,errorOnInvalidContent:t??i.options.enableContentCheck})};function Gle(e,t){const n=Cd(t,e.schema),{from:r,to:i,empty:s}=e.selection,a=[];s?(e.storedMarks&&a.push(...e.storedMarks),a.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,l=>{a.push(...l.marks)});const o=a.find(l=>l.type.name===n.name);return o?{...o.attrs}:{}}function Yle(e,t){const n=new Joe(e);return t.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function ELe(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function NLe(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,(i,s)=>{n(i)&&r.push({node:i,pos:s})}),r}function jLe(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function y5(e){return t=>jLe(t.$from,e)}function Nt(e,t,n){return e.config[t]===void 0&&e.parent?Nt(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?Nt(e.parent,t,n):null}):e.config[t]}function p6(e){return e.map(t=>{const n={name:t.name,options:t.options,storage:t.storage},r=Nt(t,"addExtensions",n);return r?[t,...p6(r())]:t}).flat(10)}function m6(e,t){const n=nm.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function Xle(e){return typeof e=="function"}function Pn(e,t=void 0,...n){return Xle(e)?t?e.bind(t)(...n):e(...n):e}function TLe(e={}){return Object.keys(e).length===0&&e.constructor===Object}function e0(e){const t=e.filter(i=>i.type==="extension"),n=e.filter(i=>i.type==="node"),r=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function Jle(e){const t=[],{nodeExtensions:n,markExtensions:r}=e0(e),i=[...n,...r],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},a=n.filter(u=>u.name!=="text").map(u=>u.name),o=r.map(u=>u.name),l=[...a,...o];return e.forEach(u=>{const d={name:u.name,options:u.options,storage:u.storage,extensions:i},A=Nt(u,"addGlobalAttributes",d);if(!A)return;A().forEach(h=>{let p;Array.isArray(h.types)?p=h.types:h.types==="*"?p=l:h.types==="nodes"?p=a:h.types==="marks"?p=o:p=[],p.forEach(m=>{Object.entries(h.attributes).forEach(([g,y])=>{t.push({type:m,name:g,attribute:{...s,...y}})})})})}),i.forEach(u=>{const d={name:u.name,options:u.options,storage:u.storage},A=Nt(u,"addAttributes",d);if(!A)return;const f=A();Object.entries(f).forEach(([h,p])=>{const m={...s,...p};typeof(m==null?void 0:m.default)=="function"&&(m.default=m.default()),m!=null&&m.isRequired&&(m==null?void 0:m.default)===void 0&&delete m.default,t.push({type:u.name,name:h,attribute:m})})}),t}function Yr(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){const o=s?String(s).split(" "):[],l=r[i]?r[i].split(" "):[],u=o.filter(d=>!l.includes(d));r[i]=[...l,...u].join(" ")}else if(i==="style"){const o=s?s.split(";").map(d=>d.trim()).filter(Boolean):[],l=r[i]?r[i].split(";").map(d=>d.trim()).filter(Boolean):[],u=new Map;l.forEach(d=>{const[A,f]=d.split(":").map(h=>h.trim());u.set(A,f)}),o.forEach(d=>{const[A,f]=d.split(":").map(h=>h.trim());u.set(A,f)}),r[i]=Array.from(u.entries()).map(([d,A])=>`${d}: ${A}`).join("; ")}else r[i]=s}),r},{})}function Ub(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>Yr(n,r),{})}function PLe(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function w9(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const i=t.reduce((s,a)=>{const o=a.attribute.parseHTML?a.attribute.parseHTML(n):PLe(n.getAttribute(a.name));return o==null?s:{...s,[a.name]:o}},{});return{...r,...i}}}}function b9(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&TLe(n)?!1:n!=null))}function C9(e){var t,n;const r={};return!((t=e==null?void 0:e.attribute)!=null&&t.isRequired)&&"default"in((e==null?void 0:e.attribute)||{})&&(r.default=e.attribute.default),((n=e==null?void 0:e.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function ILe(e,t){var n;const r=Jle(e),{nodeExtensions:i,markExtensions:s}=e0(e),a=(n=i.find(u=>Nt(u,"topNode")))==null?void 0:n.name,o=Object.fromEntries(i.map(u=>{const d=r.filter(y=>y.type===u.name),A={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((y,v)=>{const x=Nt(v,"extendNodeSchema",A);return{...y,...x?x(u):{}}},{}),h=b9({...f,content:Pn(Nt(u,"content",A)),marks:Pn(Nt(u,"marks",A)),group:Pn(Nt(u,"group",A)),inline:Pn(Nt(u,"inline",A)),atom:Pn(Nt(u,"atom",A)),selectable:Pn(Nt(u,"selectable",A)),draggable:Pn(Nt(u,"draggable",A)),code:Pn(Nt(u,"code",A)),whitespace:Pn(Nt(u,"whitespace",A)),linebreakReplacement:Pn(Nt(u,"linebreakReplacement",A)),defining:Pn(Nt(u,"defining",A)),isolating:Pn(Nt(u,"isolating",A)),attrs:Object.fromEntries(d.map(C9))}),p=Pn(Nt(u,"parseHTML",A));p&&(h.parseDOM=p.map(y=>w9(y,d)));const m=Nt(u,"renderHTML",A);m&&(h.toDOM=y=>m({node:y,HTMLAttributes:Ub(y,d)}));const g=Nt(u,"renderText",A);return g&&(h.toText=g),[u.name,h]})),l=Object.fromEntries(s.map(u=>{const d=r.filter(g=>g.type===u.name),A={name:u.name,options:u.options,storage:u.storage,editor:t},f=e.reduce((g,y)=>{const v=Nt(y,"extendMarkSchema",A);return{...g,...v?v(u):{}}},{}),h=b9({...f,inclusive:Pn(Nt(u,"inclusive",A)),excludes:Pn(Nt(u,"excludes",A)),group:Pn(Nt(u,"group",A)),spanning:Pn(Nt(u,"spanning",A)),code:Pn(Nt(u,"code",A)),attrs:Object.fromEntries(d.map(C9))}),p=Pn(Nt(u,"parseHTML",A));p&&(h.parseDOM=p.map(g=>w9(g,d)));const m=Nt(u,"renderHTML",A);return m&&(h.toDOM=g=>m({mark:g,HTMLAttributes:Ub(g,d)})),[u.name,h]}));return new Moe({topNode:a,nodes:o,marks:l})}function OLe(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function ww(e){return e.sort((n,r)=>{const i=Nt(n,"priority")||100,s=Nt(r,"priority")||100;return i>s?-1:i<s?1:0})}function Zle(e){const t=ww(p6(e)),n=OLe(t.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),t}function ece(e,t,n){const{from:r,to:i}=t,{blockSeparator:s=`
`,textSerializers:a={}}=n||{};let o="";return e.nodesBetween(r,i,(l,u,d,A)=>{var f;l.isBlock&&u>r&&(o+=s);const h=a==null?void 0:a[l.type.name];if(h)return d&&(o+=h({node:l,pos:u,parent:d,index:A,range:t})),!1;l.isText&&(o+=(f=l==null?void 0:l.text)==null?void 0:f.slice(Math.max(r,u)-u,i-u))}),o}function FLe(e,t){const n={from:0,to:e.content.size};return ece(e,n,t)}function tce(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function MLe(e,t){const n=Si(t,e.schema),{from:r,to:i}=e.selection,s=[];e.doc.nodesBetween(r,i,o=>{s.push(o)});const a=s.reverse().find(o=>o.type.name===n.name);return a?{...a.attrs}:{}}function nce(e,t){const n=g5(typeof t=="string"?t:t.name,e.schema);return n==="node"?MLe(e,t):n==="mark"?Gle(e,t):{}}function LLe(e,t=JSON.stringify){const n={};return e.filter(r=>{const i=t(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function RLe(e){const t=LLe(e);return t.length===1?t:t.filter((n,r)=>!t.filter((s,a)=>a!==r).some(s=>n.oldRange.from>=s.oldRange.from&&n.oldRange.to<=s.oldRange.to&&n.newRange.from>=s.newRange.from&&n.newRange.to<=s.newRange.to))}function rce(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((i,s)=>{const a=[];if(i.ranges.length)i.forEach((o,l)=>{a.push({from:o,to:l})});else{const{from:o,to:l}=n[s];if(o===void 0||l===void 0)return;a.push({from:o,to:l})}a.forEach(({from:o,to:l})=>{const u=t.slice(s).map(o,-1),d=t.slice(s).map(l),A=t.invert().map(u,-1),f=t.invert().map(d);r.push({oldRange:{from:A,to:f},newRange:{from:u,to:d}})})}),RLe(r)}function g6(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(i=>{const s=n.resolve(e),a=f6(s,i.type);a&&r.push({mark:i,...a})}):n.nodesBetween(e,t,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(a=>({from:s,to:s+i.nodeSize,mark:a})))}),r}var ULe=(e,t,n,r=20)=>{const i=e.doc.resolve(n);let s=r,a=null;for(;s>0&&a===null;){const o=i.node(s);(o==null?void 0:o.type.name)===t?a=o:s-=1}return[a,s]};function rx(e,t){return t.nodes[e]||t.marks[e]||null}function RB(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=e.find(s=>s.type===t&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}var DLe=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(i,s,a,o)=>{var l,u;const d=((u=(l=i.type.spec).toText)==null?void 0:u.call(l,{node:i,pos:s,parent:a,index:o}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?d:d.slice(0,Math.max(0,r-s))}),n};function wF(e,t,n={}){const{empty:r,ranges:i}=e.selection,s=t?Cd(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(A=>s?s.name===A.type.name:!0).find(A=>ok(A.attrs,n,{strict:!1}));let a=0;const o=[];if(i.forEach(({$from:A,$to:f})=>{const h=A.pos,p=f.pos;e.doc.nodesBetween(h,p,(m,g)=>{if(s&&m.inlineContent&&!m.type.allowsMarkType(s))return!1;if(!m.isText&&!m.marks.length)return;const y=Math.max(h,g),v=Math.min(p,g+m.nodeSize),x=v-y;a+=x,o.push(...m.marks.map(b=>({mark:b,from:y,to:v})))})}),a===0)return!1;const l=o.filter(A=>s?s.name===A.mark.type.name:!0).filter(A=>ok(A.mark.attrs,n,{strict:!1})).reduce((A,f)=>A+f.to-f.from,0),u=o.filter(A=>s?A.mark.type!==s&&A.mark.type.excludes(s):!0).reduce((A,f)=>A+f.to-f.from,0);return(l>0?l+u:l)>=a}function QLe(e,t,n={}){if(!t)return Sh(e,null,n)||wF(e,null,n);const r=g5(t,e.schema);return r==="node"?Sh(e,t,n):r==="mark"?wF(e,t,n):!1}var HLe=(e,t)=>{const{$from:n,$to:r,$anchor:i}=e.selection;if(t){const s=y5(o=>o.type.name===t)(e.selection);if(!s)return!1;const a=e.doc.resolve(s.pos+1);return i.pos+1===a.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},$Le=e=>{const{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function S9(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function B9(e,t){const{nodeExtensions:n}=e0(t),r=n.find(a=>a.name===e);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},s=Pn(Nt(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function v5(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach(s=>{i!==!1&&(v5(s,{ignoreWhitespace:n,checkChildren:t})||(i=!1))}),i}return!1}function ice(e){return e instanceof Ot}var sce=class ace{constructor(t){this.position=t}static fromJSON(t){return new ace(t.position)}toJSON(){return{position:this.position}}};function zLe(e,t){const n=t.mapping.mapResult(e.position);return{position:new sce(n.pos),mapResult:n}}function VLe(e){return new sce(e)}function KLe(e,t,n){var r;const{selection:i}=t;let s=null;if(Vle(i)&&(s=i.$cursor),s){const o=(r=e.storedMarks)!=null?r:s.marks();return s.parent.type.allowsMarkType(n)&&(!!n.isInSet(o)||!o.some(u=>u.type.excludes(n)))}const{ranges:a}=i;return a.some(({$from:o,$to:l})=>{let u=o.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(o.pos,l.pos,(d,A,f)=>{if(u)return!1;if(d.isInline){const h=!f||f.type.allowsMarkType(n),p=!!n.isInSet(d.marks)||!d.marks.some(m=>m.type.excludes(n));u=h&&p}return!u}),u})}var WLe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=n,{empty:a,ranges:o}=s,l=Cd(e,r.schema);if(i)if(a){const u=Gle(r,l);n.addStoredMark(l.create({...u,...t}))}else o.forEach(u=>{const d=u.$from.pos,A=u.$to.pos;r.doc.nodesBetween(d,A,(f,h)=>{const p=Math.max(h,d),m=Math.min(h+f.nodeSize,A);f.marks.find(y=>y.type===l)?f.marks.forEach(y=>{l===y.type&&n.addMark(p,m,l.create({...y.attrs,...t}))}):n.addMark(p,m,l.create(t))})});return KLe(r,n,l)},qLe=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),GLe=(e,t={})=>({state:n,dispatch:r,chain:i})=>{const s=Si(e,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:o})=>RV(s,{...a,...t})(n)?!0:o.clearNodes()).command(({state:o})=>RV(s,{...a,...t})(o,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},YLe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,i=$f(e,0,r.content.size),s=Ot.create(r,i);t.setSelection(s)}return!0},XLe=(e,t)=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=r;let a,o;return typeof t=="number"?(a=t,o=t):t&&"from"in t&&"to"in t?(a=t.from,o=t.to):(a=s.from,o=s.to),i&&n.doc.nodesBetween(a,o,(l,u)=>{l.isText||n.setNodeMarkup(u,void 0,{...l.attrs,dir:e})}),!0},JLe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:i,to:s}=typeof e=="number"?{from:e,to:e}:e,a=Yt.atStart(r).from,o=Yt.atEnd(r).to,l=$f(i,a,o),u=$f(s,a,o),d=Yt.create(r,l,u);t.setSelection(d)}return!0},ZLe=e=>({state:t,dispatch:n})=>{const r=Si(e,t.schema);return K3e(r)(t,n)};function _9(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(r)}}var eRe=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:a}=t,{$from:o,$to:l}=s,u=i.extensionManager.attributes,d=RB(u,o.node().type.name,o.node().attrs);if(s instanceof Ot&&s.node.isBlock)return!o.parentOffset||!ly(a,o.pos)?!1:(r&&(e&&_9(n,i.extensionManager.splittableMarks),t.split(o.pos).scrollIntoView()),!0);if(!o.parent.isBlock)return!1;const A=l.parentOffset===l.parent.content.size,f=o.depth===0?void 0:ELe(o.node(-1).contentMatchAt(o.indexAfter(-1)));let h=A&&f?[{type:f,attrs:d}]:void 0,p=ly(t.doc,t.mapping.map(o.pos),1,h);if(!h&&!p&&ly(t.doc,t.mapping.map(o.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:d}]:void 0),r){if(p&&(s instanceof Yt&&t.deleteSelection(),t.split(t.mapping.map(o.pos),1,h),f&&!A&&!o.parentOffset&&o.parent.type!==f)){const m=t.mapping.map(o.before()),g=t.doc.resolve(m);o.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&t.setNodeMarkup(t.mapping.map(o.before()),f)}e&&_9(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return p},tRe=(e,t={})=>({tr:n,state:r,dispatch:i,editor:s})=>{var a;const o=Si(e,r.schema),{$from:l,$to:u}=r.selection,d=r.selection.node;if(d&&d.isBlock||l.depth<2||!l.sameParent(u))return!1;const A=l.node(-1);if(A.type!==o)return!1;const f=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==o||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let y=De.empty;const v=l.index(-1)?1:l.index(-2)?2:3;for(let N=l.depth-v;N>=l.depth-3;N-=1)y=De.from(l.node(N).copy(y));const x=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,b={...RB(f,l.node().type.name,l.node().attrs),...t},w=((a=o.contentMatch.defaultType)==null?void 0:a.createAndFill(b))||void 0;y=y.append(De.from(o.createAndFill(null,w)||void 0));const B=l.before(l.depth-(v-1));n.replace(B,l.after(-x),new rt(y,4-v,0));let k=-1;n.doc.nodesBetween(B,n.doc.content.size,(N,j)=>{if(k>-1)return!1;N.isTextblock&&N.content.size===0&&(k=j+1)}),k>-1&&n.setSelection(Yt.near(n.doc.resolve(k))),n.scrollIntoView()}return!0}const h=u.pos===l.end()?A.contentMatchAt(0).defaultType:null,p={...RB(f,A.type.name,A.attrs),...t},m={...RB(f,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,u.pos);const g=h?[{type:o,attrs:p},{type:h,attrs:m}]:[{type:o,attrs:p}];if(!ly(n.doc,l.pos,2))return!1;if(i){const{selection:y,storedMarks:v}=r,{splittableMarks:x}=s.extensionManager,b=v||y.$to.parentOffset&&y.$from.marks();if(n.split(l.pos,2,g).scrollIntoView(),!b||!i)return!0;const w=b.filter(B=>x.includes(B.type.name));n.ensureMarks(w)}return!0},XP=(e,t)=>{const n=y5(a=>a.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&Mh(e.doc,n.pos)&&e.join(n.pos),!0},JP=(e,t)=>{const n=y5(a=>a.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&Mh(e.doc,r)&&e.join(r),!0},nRe=(e,t,n,r={})=>({editor:i,tr:s,state:a,dispatch:o,chain:l,commands:u,can:d})=>{const{extensions:A,splittableMarks:f}=i.extensionManager,h=Si(e,a.schema),p=Si(t,a.schema),{selection:m,storedMarks:g}=a,{$from:y,$to:v}=m,x=y.blockRange(v),b=g||m.$to.parentOffset&&m.$from.marks();if(!x)return!1;const w=y5(B=>B9(B.type.name,A))(m);if(x.depth>=1&&w&&x.depth-w.depth<=1){if(w.node.type===h)return u.liftListItem(p);if(B9(w.node.type.name,A)&&h.validContent(w.node.content)&&o)return l().command(()=>(s.setNodeMarkup(w.pos,h),!0)).command(()=>XP(s,h)).command(()=>JP(s,h)).run()}return!n||!b||!o?l().command(()=>d().wrapInList(h,r)?!0:u.clearNodes()).wrapInList(h,r).command(()=>XP(s,h)).command(()=>JP(s,h)).run():l().command(()=>{const B=d().wrapInList(h,r),k=b.filter(N=>f.includes(N.type.name));return s.ensureMarks(k),B?!0:u.clearNodes()}).wrapInList(h,r).command(()=>XP(s,h)).command(()=>JP(s,h)).run()},rRe=(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:s=!1}=n,a=Cd(e,r.schema);return wF(r,a,t)?i.unsetMark(a,{extendEmptyMarkRange:s}):i.setMark(a,t)},iRe=(e,t,n={})=>({state:r,commands:i})=>{const s=Si(e,r.schema),a=Si(t,r.schema),o=Sh(r,s,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),o?i.setNode(a,l):i.setNode(s,{...l,...n})},sRe=(e,t={})=>({state:n,commands:r})=>{const i=Si(e,n.schema);return Sh(n,i,t)?r.lift(i):r.wrapIn(i,t)},aRe=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let s;if(i.spec.isInputRules&&(s=i.getState(e))){if(t){const a=e.tr,o=s.transform;for(let l=o.steps.length-1;l>=0;l-=1)a.step(o.steps[l].invert(o.docs[l]));if(s.text){const l=a.doc.resolve(s.from).marks();a.replaceWith(s.from,s.to,e.schema.text(s.text,l))}else a.delete(s.from,s.to)}return!0}}return!1},oRe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(s=>{e.removeMark(s.$from.pos,s.$to.pos)}),!0},lRe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var s;const{extendEmptyMarkRange:a=!1}=t,{selection:o}=n,l=Cd(e,r.schema),{$from:u,empty:d,ranges:A}=o;if(!i)return!0;if(d&&a){let{from:f,to:h}=o;const p=(s=u.marks().find(g=>g.type===l))==null?void 0:s.attrs,m=f6(u,l,p);m&&(f=m.from,h=m.to),n.removeMark(f,h,l)}else A.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},cRe=e=>({tr:t,state:n,dispatch:r})=>{const{selection:i}=n;let s,a;return typeof e=="number"?(s=e,a=e):e&&"from"in e&&"to"in e?(s=e.from,a=e.to):(s=i.from,a=i.to),r&&t.doc.nodesBetween(s,a,(o,l)=>{if(o.isText)return;const u={...o.attrs};delete u.dir,t.setNodeMarkup(l,void 0,u)}),!0},uRe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let s=null,a=null;const o=g5(typeof e=="string"?e:e.name,r.schema);if(!o)return!1;o==="node"&&(s=Si(e,r.schema)),o==="mark"&&(a=Cd(e,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{const d=u.$from.pos,A=u.$to.pos;let f,h,p,m;n.selection.empty?r.doc.nodesBetween(d,A,(g,y)=>{s&&s===g.type&&(l=!0,p=Math.max(y,d),m=Math.min(y+g.nodeSize,A),f=y,h=g)}):r.doc.nodesBetween(d,A,(g,y)=>{y<d&&s&&s===g.type&&(l=!0,p=Math.max(y,d),m=Math.min(y+g.nodeSize,A),f=y,h=g),y>=d&&y<=A&&(s&&s===g.type&&(l=!0,i&&n.setNodeMarkup(y,void 0,{...g.attrs,...t})),a&&g.marks.length&&g.marks.forEach(v=>{if(a===v.type&&(l=!0,i)){const x=Math.max(y,d),b=Math.min(y+g.nodeSize,A);n.addMark(x,b,a.create({...v.attrs,...t}))}}))}),h&&(f!==void 0&&i&&n.setNodeMarkup(f,void 0,{...h.attrs,...t}),a&&h.marks.length&&h.marks.forEach(g=>{a===g.type&&i&&n.addMark(p,m,a.create({...g.attrs,...t}))}))}),l},dRe=(e,t={})=>({state:n,dispatch:r})=>{const i=Si(e,n.schema);return U3e(i,t)(n,r)},ARe=(e,t={})=>({state:n,dispatch:r})=>{const i=Si(e,n.schema);return D3e(i,t)(n,r)},hRe=class{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){const r=this.callbacks[t];return r&&r.forEach(i=>i.apply(this,n)),this}off(t,n){const r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(i=>i!==n):delete this.callbacks[t]),this}once(t,n){const r=(...i)=>{this.off(t,r),n.apply(this,i)};return this.on(t,r)}removeAllListeners(){this.callbacks={}}},x5=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},fRe=(e,t)=>{if(h6(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function iS(e){var t;const{editor:n,from:r,to:i,text:s,rules:a,plugin:o}=e,{view:l}=n;if(l.composing)return!1;const u=l.state.doc.resolve(r);if(u.parent.type.spec.code||(t=u.nodeBefore||u.nodeAfter)!=null&&t.marks.find(f=>f.type.spec.code))return!1;let d=!1;const A=DLe(u)+s;return a.forEach(f=>{if(d)return;const h=fRe(A,f.find);if(!h)return;const p=l.state.tr,m=p5({state:l.state,transaction:p}),g={from:r-(h[0].length-s.length),to:i},{commands:y,chain:v,can:x}=new m5({editor:n,state:m});f.handler({state:m,range:g,match:h,commands:y,chain:v,can:x})===null||!p.steps.length||(f.undoable&&p.setMeta(o,{transform:p,from:r,to:i,text:s}),l.dispatch(p),d=!0)}),d}function pRe(e){const{editor:t,rules:n}=e,r=new Rr({state:{init(){return null},apply(i,s,a){const o=i.getMeta(r);if(o)return o;const l=i.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:d}=l;typeof d=="string"?d=d:d=m6(De.from(d),a.schema);const{from:A}=l,f=A+d.length;iS({editor:t,from:A,to:f,text:d,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,a,o){return iS({editor:t,from:s,to:a,text:o,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&iS({editor:t,from:s.pos,to:s.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:a}=i.state.selection;return a?iS({editor:t,from:a.pos,to:a.pos,text:`
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function mRe(e){return Object.prototype.toString.call(e).slice(8,-1)}function sS(e){return mRe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function oce(e,t){const n={...e};return sS(e)&&sS(t)&&Object.keys(t).forEach(r=>{sS(t[r])&&sS(e[r])?n[r]=oce(e[r],t[r]):n[r]=t[r]}),n}var y6=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...Pn(Nt(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...Pn(Nt(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){const t=this.extend({...this.config,addOptions:()=>oce(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},rm=class lce extends y6{constructor(){super(...arguments),this.type="mark"}static create(t={}){const n=typeof t=="function"?t():t;return new lce(n)}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const a=i.marks();if(!!!a.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const l=a.find(u=>(u==null?void 0:u.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}};function gRe(e){return typeof e=="number"}var cce=class{constructor(e){this.find=e.find,this.handler=e.handler}},yRe=(e,t,n)=>{if(h6(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(i=>{const s=[i.text];return s.index=i.index,s.input=e,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function vRe(e){const{editor:t,state:n,from:r,to:i,rule:s,pasteEvent:a,dropEvent:o}=e,{commands:l,chain:u,can:d}=new m5({editor:t,state:n}),A=[];return n.doc.nodesBetween(r,i,(h,p)=>{var m,g,y,v,x;if((g=(m=h.type)==null?void 0:m.spec)!=null&&g.code||!(h.isText||h.isTextblock||h.isInline))return;const b=(x=(v=(y=h.content)==null?void 0:y.size)!=null?v:h.nodeSize)!=null?x:0,w=Math.max(r,p),B=Math.min(i,p+b);if(w>=B)return;const k=h.isText?h.text||"":h.textBetween(w-p,B-p,void 0,"");yRe(k,s.find,a).forEach(j=>{if(j.index===void 0)return;const L=w+j.index+1,T=L+j[0].length,E={from:n.tr.mapping.map(L),to:n.tr.mapping.map(T)},F=s.handler({state:n,range:E,match:j,commands:l,chain:u,can:d,pasteEvent:a,dropEvent:o});A.push(F)})}),A.every(h=>h!==null)}var aS=null,xRe=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function wRe(e){const{editor:t,rules:n}=e;let r=null,i=!1,s=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,o;try{o=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{o=null}const l=({state:d,from:A,to:f,rule:h,pasteEvt:p})=>{const m=d.tr,g=p5({state:d,transaction:m});if(!(!vRe({editor:t,state:g,from:Math.max(A-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:o})||!m.steps.length)){try{o=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{o=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(d=>new Rr({view(A){const f=p=>{var m;r=(m=A.dom.parentElement)!=null&&m.contains(p.target)?A.dom.parentElement:null,r&&(aS=t)},h=()=>{aS&&(aS=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(A,f)=>{if(s=r===A.dom.parentElement,o=f,!s){const h=aS;h!=null&&h.isEditable&&setTimeout(()=>{const p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(A,f)=>{var h;const p=(h=f.clipboardData)==null?void 0:h.getData("text/html");return a=f,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(A,f,h)=>{const p=A[0],m=p.getMeta("uiEvent")==="paste"&&!i,g=p.getMeta("uiEvent")==="drop"&&!s,y=p.getMeta("applyPasteRules"),v=!!y;if(!m&&!g&&!v)return;if(v){let{text:w}=y;typeof w=="string"?w=w:w=m6(De.from(w),h.schema);const{from:B}=y,k=B+w.length,N=xRe(w);return l({rule:d,state:h,from:B,to:{b:k},pasteEvt:N})}const x=f.doc.content.findDiffStart(h.doc.content),b=f.doc.content.findDiffEnd(h.doc.content);if(!(!gRe(x)||!b||x===b.b))return l({rule:d,state:h,from:x,to:b,pasteEvt:a})}}))}var w5=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=Zle(e),this.schema=ILe(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{const n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:rx(t.name,this.schema)},r=Nt(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){const{editor:e}=this;return ww([...this.extensions].reverse()).flatMap(r=>{const i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:rx(r.name,this.schema)},s=[],a=Nt(r,"addKeyboardShortcuts",i);let o={};if(r.type==="mark"&&Nt(r,"exitable",i)&&(o.ArrowRight=()=>rm.handleExit({editor:e,mark:r})),a){const f=Object.fromEntries(Object.entries(a()).map(([h,p])=>[h,()=>p({editor:e})]));o={...o,...f}}const l=MMe(o);s.push(l);const u=Nt(r,"addInputRules",i);if(S9(r,e.options.enableInputRules)&&u){const f=u();if(f&&f.length){const h=pRe({editor:e,rules:f}),p=Array.isArray(h)?h:[h];s.push(...p)}}const d=Nt(r,"addPasteRules",i);if(S9(r,e.options.enablePasteRules)&&d){const f=d();if(f&&f.length){const h=wRe({editor:e,rules:f});s.push(...h)}}const A=Nt(r,"addProseMirrorPlugins",i);if(A){const f=A();s.push(...f)}return s})}get attributes(){return Jle(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=e0(this.extensions);return Object.fromEntries(t.filter(n=>!!Nt(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Si(n.name,this.schema)},s=Nt(n,"addNodeView",i);if(!s)return[];const a=s();if(!a)return[];const o=(l,u,d,A,f)=>{const h=Ub(l,r);return a({node:l,view:u,getPos:d,decorations:A,innerDecorations:f,editor:e,extension:n,HTMLAttributes:h})};return[n.name,o]}))}dispatchTransaction(e){const{editor:t}=this;return ww([...this.extensions].reverse()).reduceRight((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:rx(i.name,this.schema)},a=Nt(i,"dispatchTransaction",s);return a?o=>{a.call(s,{transaction:o,next:r})}:r},e)}transformPastedHTML(e){const{editor:t}=this;return ww([...this.extensions]).reduce((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:rx(i.name,this.schema)},a=Nt(i,"transformPastedHTML",s);return a?(o,l)=>{const u=r(o,l);return a.call(s,u)}:r},e||(r=>r))}get markViews(){const{editor:e}=this,{markExtensions:t}=e0(this.extensions);return Object.fromEntries(t.filter(n=>!!Nt(n,"addMarkView")).map(n=>{const r=this.attributes.filter(o=>o.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Cd(n.name,this.schema)},s=Nt(n,"addMarkView",i);if(!s)return[];const a=(o,l,u)=>{const d=Ub(o,r);return s()({mark:o,view:l,inline:u,editor:e,extension:n,HTMLAttributes:d,updateAttributes:A=>{FRe(o,e,A)}})};return[n.name,a]}))}setupExtensions(){const e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;const r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:rx(t.name,this.schema)};t.type==="mark"&&((n=Pn(Nt(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);const i=Nt(t,"onBeforeCreate",r),s=Nt(t,"onCreate",r),a=Nt(t,"onUpdate",r),o=Nt(t,"onSelectionUpdate",r),l=Nt(t,"onTransaction",r),u=Nt(t,"onFocus",r),d=Nt(t,"onBlur",r),A=Nt(t,"onDestroy",r);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),a&&this.editor.on("update",a),o&&this.editor.on("selectionUpdate",o),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),d&&this.editor.on("blur",d),A&&this.editor.on("destroy",A)})}};w5.resolve=Zle;w5.sort=ww;w5.flatten=p6;var bRe={};A6(bRe,{ClipboardTextSerializer:()=>dce,Commands:()=>Ace,Delete:()=>hce,Drop:()=>fce,Editable:()=>pce,FocusEvents:()=>gce,Keymap:()=>yce,Paste:()=>vce,Tabindex:()=>xce,TextDirection:()=>wce,focusEventsPluginKey:()=>mce});var Ai=class uce extends y6{constructor(){super(...arguments),this.type="extension"}static create(t={}){const n=typeof t=="function"?t():t;return new uce(n)}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}},dce=Ai.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Rr({key:new Ui("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:s}=i,a=Math.min(...s.map(d=>d.$from.pos)),o=Math.max(...s.map(d=>d.$to.pos)),l=tce(n);return ece(r,{from:a,to:o},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),Ace=Ai.create({name:"commands",addCommands(){return{...$le}}}),hce=Ai.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,i;const s=()=>{var a,o,l,u;if((u=(l=(o=(a=this.editor.options.coreExtensionOptions)==null?void 0:a.delete)==null?void 0:o.filterTransaction)==null?void 0:l.call(o,e))!=null?u:e.getMeta("y-sync$"))return;const d=Yle(e.before,[e,...t]);rce(d).forEach(h=>{d.mapping.mapResult(h.oldRange.from).deletedAfter&&d.mapping.mapResult(h.oldRange.to).deletedBefore&&d.before.nodesBetween(h.oldRange.from,h.oldRange.to,(p,m)=>{const g=m+p.nodeSize-2,y=h.oldRange.from<=m&&g<=h.oldRange.to;this.editor.emit("delete",{type:"node",node:p,from:m,to:g,newFrom:d.mapping.map(m),newTo:d.mapping.map(g),deletedRange:h.oldRange,newRange:h.newRange,partial:!y,editor:this.editor,transaction:e,combinedTransform:d})})});const f=d.mapping;d.steps.forEach((h,p)=>{var m,g;if(h instanceof Jl){const y=f.slice(p).map(h.from,-1),v=f.slice(p).map(h.to),x=f.invert().map(y,-1),b=f.invert().map(v),w=(m=d.doc.nodeAt(y-1))==null?void 0:m.marks.some(k=>k.eq(h.mark)),B=(g=d.doc.nodeAt(v))==null?void 0:g.marks.some(k=>k.eq(h.mark));this.editor.emit("delete",{type:"mark",mark:h.mark,from:h.from,to:h.to,deletedRange:{from:x,to:b},newRange:{from:y,to:v},partial:!!(B||w),editor:this.editor,transaction:e,combinedTransform:d})}})};(i=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||i?setTimeout(s,0):s()}}),fce=Ai.create({name:"drop",addProseMirrorPlugins(){return[new Rr({key:new Ui("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),pce=Ai.create({name:"editable",addProseMirrorPlugins(){return[new Rr({key:new Ui("editable"),props:{editable:()=>this.editor.options.editable}})]}}),mce=new Ui("focusEvents"),gce=Ai.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Rr({key:mce,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),yce=Ai.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:o})=>{const{selection:l,doc:u}=o,{empty:d,$anchor:A}=l,{pos:f,parent:h}=A,p=A.parent.isTextblock&&f>0?o.doc.resolve(f-1):A,m=p.parent.type.spec.isolating,g=A.pos-A.parentOffset,y=m&&p.parent.childCount===1?g===A.pos:cn.atStart(u).from===f;return!d||!h.type.isTextblock||h.textContent.length||!y||y&&A.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},s={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return lk()||qle()?s:i},addProseMirrorPlugins(){return[new Rr({key:new Ui("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(m=>m.getMeta("composition")))return;const r=e.some(m=>m.docChanged)&&!t.doc.eq(n.doc),i=e.some(m=>m.getMeta("preventClearDocument"));if(!r||i)return;const{empty:s,from:a,to:o}=t.selection,l=cn.atStart(t.doc).from,u=cn.atEnd(t.doc).to;if(s||!(a===l&&o===u)||!v5(n.doc))return;const f=n.tr,h=p5({state:n,transaction:f}),{commands:p}=new m5({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),vce=Ai.create({name:"paste",addProseMirrorPlugins(){return[new Rr({key:new Ui("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),xce=Ai.create({name:"tabindex",addProseMirrorPlugins(){return[new Rr({key:new Ui("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),wce=Ai.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:e}=e0(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{const n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new Rr({key:new Ui("textDirection"),props:{attributes:()=>{const e=this.options.direction;return e?{dir:e}:{}}}})]}}),CRe=class Qx{constructor(t,n,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new Qx(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Qx(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Qx(t,this.editor)}get children(){const t=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,s=n.isAtom&&!n.isText,a=n.isInline,o=this.pos+r+(s?0:1);if(o<0||o>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(o);if(!i&&!a&&l.depth<=this.depth)return;const u=new Qx(l,this.editor,i,i||a?n:null);i&&(u.actualDepth=this.depth+1),t.push(u)}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===t)if(Object.keys(n).length>0){const s=i.node.attrs,a=Object.keys(n);for(let o=0;o<a.length;o+=1){const l=a[o];if(s[l]!==n[l])break}}else r=i;i=i.parent}return r}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},r=!1){let i=[];if(!this.children||this.children.length===0)return i;const s=Object.keys(n);return this.children.forEach(a=>{r&&i.length>0||(a.node.type.name===t&&s.every(l=>n[l]===a.node.attrs[l])&&i.push(a),!(r&&i.length>0)&&(i=i.concat(a.querySelectorAll(t,n,r))))}),i}setAttribute(t){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},SRe=`.ProseMirror {
position: relative;
}
.ProseMirror {
word-wrap: break-word;
white-space: pre-wrap;
white-space: break-spaces;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}
.ProseMirror [contenteditable="false"] {
white-space: normal;
}
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
white-space: pre-wrap;
}
.ProseMirror pre {
white-space: pre-wrap;
}
img.ProseMirror-separator {
display: inline !important;
border: none !important;
margin: 0 !important;
width: 0 !important;
height: 0 !important;
}
.ProseMirror-gapcursor {
display: none;
pointer-events: none;
position: absolute;
margin: 0;
}
.ProseMirror-gapcursor:after {
content: "";
display: block;
position: absolute;
top: -2px;
width: 20px;
border-top: 1px solid black;
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}
@keyframes ProseMirror-cursor-blink {
to {
visibility: hidden;
}
}
.ProseMirror-hideselection *::selection {
background: transparent;
}
.ProseMirror-hideselection *::-moz-selection {
background: transparent;
}
.ProseMirror-hideselection * {
caret-color: transparent;
}
.ProseMirror-focused .ProseMirror-gapcursor {
display: block;
}`;function BRe(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}var _Re=class extends hRe{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:zLe,createMappablePosition:VLe},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:i,moved:s})=>this.options.onDrop(r,i,s)),this.on("paste",({event:r,slice:i})=>this.options.onPaste(r,i)),this.on("delete",this.options.onDelete);const t=this.createDoc(),n=Kle(t,this.options.autofocus);this.editorState=Dg.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const e=this.editorView.dom;e!=null&&e.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=BRe(SRe,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){const n=Xle(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let n=t;if([].concat(e).forEach(i=>{const s=typeof i=="string"?`${i}$`:i.key;n=n.filter(a=>!a.key.startsWith(s))}),t.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;const r=[...this.options.enableCoreExtensions?[pce,dce.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),Ace,gce,yce,xce,fce,vce,hce,wce.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new w5(r,this)}createCommandManager(){this.commandManager=new m5({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=xF(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=xF(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){const{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,r=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,s=t.transformPastedHTML,a=this.extensionManager.transformPastedHTML(s);this.editorView=new Qle(e,{...t,attributes:{role:"textbox",...t==null?void 0:t.attributes},dispatchTransaction:i,transformPastedHTML:a,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.prependClass(),this.injectCSS();const l=this.view.dom;l.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var d;return(d=this.capturedTransaction)==null?void 0:d.step(u)});return}const{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),i=n.includes(e),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!i)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const a=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),o=a==null?void 0:a.getMeta("focus"),l=a==null?void 0:a.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:a}),l&&this.emit("blur",{editor:this,event:l.event,transaction:a}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||s.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return nce(this.state,e)}isActive(e,t){const n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return QLe(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return m6(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
`,textSerializers:n={}}=e||{};return FLe(this.state.doc,{blockSeparator:t,textSerializers:{...tce(this.schema),...n}})}get isEmpty(){return v5(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new CRe(t,this)}get $doc(){return this.$pos(0)}};function t0(e){return new x5({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Pn(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:s}=t,a=r[r.length-1],o=r[0];if(a){const l=o.search(/\S/),u=n.from+o.indexOf(a),d=u+a.length;if(g6(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(m=>m===e.type&&m!==h.mark.type)).filter(h=>h.to>u).length)return null;d<n.to&&s.delete(d,n.to),u>n.from&&s.delete(n.from+l,u);const f=n.from+l+a.length;s.addMark(n.from+l,f,e.type.create(i||{})),s.removeStoredMark(e.type)}},undoable:e.undoable})}function bce(e){return new x5({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Pn(e.getAttributes,void 0,r)||{},{tr:s}=t,a=n.from;let o=n.to;const l=e.type.create(i);if(r[1]){const u=r[0].lastIndexOf(r[1]);let d=a+u;d>o?d=o:o=d+r[1].length;const A=r[0][r[0].length-1];s.insertText(A,a+r[0].length-1),s.replaceWith(d,o,l)}else if(r[0]){const u=e.type.isInline?a:a-1;s.insert(u,e.type.create(i)).delete(s.mapping.map(a),s.mapping.map(o))}s.scrollIntoView()},undoable:e.undoable})}function bF(e){return new x5({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),s=Pn(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,s)},undoable:e.undoable})}function n0(e){return new x5({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const s=Pn(e.getAttributes,void 0,r)||{},a=t.tr.delete(n.from,n.to),l=a.doc.resolve(n.from).blockRange(),u=l&&ZD(l,e.type,s);if(!u)return null;if(a.wrap(l,u),e.keepMarks&&e.editor){const{selection:A,storedMarks:f}=t,{splittableMarks:h}=e.editor.extensionManager,p=f||A.$to.parentOffset&&A.$from.marks();if(p){const m=p.filter(g=>h.includes(g.type.name));a.ensureMarks(m)}}if(e.keepAttributes){const A=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(A,s).run()}const d=a.doc.resolve(n.from-1).nodeBefore;d&&d.type===e.type&&Mh(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,d))&&a.join(n.from-1)},undoable:e.undoable})}var kRe=e=>"touches"in e,ERe=class{constructor(e){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=o=>{if(!this.isResizing||!this.activeHandle)return;const l=o.clientX-this.startX,u=o.clientY-this.startY;this.handleResize(l,u)},this.handleTouchMove=o=>{if(!this.isResizing||!this.activeHandle)return;const l=o.touches[0];if(!l)return;const u=l.clientX-this.startX,d=l.clientY-this.startY;this.handleResize(u,d)},this.handleMouseUp=()=>{if(!this.isResizing)return;const o=this.element.offsetWidth,l=this.element.offsetHeight;this.onCommit(o,l),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=o=>{o.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=o=>{o.key==="Shift"&&(this.isShiftKeyPressed=!1)};var t,n,r,i,s,a;this.node=e.node,this.editor=e.editor,this.element=e.element,this.contentElement=e.contentElement,this.getPos=e.getPos,this.onResize=e.onResize,this.onCommit=e.onCommit,this.onUpdate=e.onUpdate,(t=e.options)!=null&&t.min&&(this.minSize={...this.minSize,...e.options.min}),(n=e.options)!=null&&n.max&&(this.maxSize=e.options.max),(r=e==null?void 0:e.options)!=null&&r.directions&&(this.directions=e.options.directions),(i=e.options)!=null&&i.preserveAspectRatio&&(this.preserveAspectRatio=e.options.preserveAspectRatio),(s=e.options)!=null&&s.className&&(this.classNames={container:e.options.className.container||"",wrapper:e.options.className.wrapper||"",handle:e.options.className.handle||"",resizing:e.options.className.resizing||""}),(a=e.options)!=null&&a.createCustomHandle&&(this.createCustomHandle=e.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var e;return(e=this.contentElement)!=null?e:null}handleEditorUpdate(){const e=this.editor.isEditable;e!==this.lastEditableState&&(this.lastEditableState=e,e?e&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(e,t,n){return e.type!==this.node.type?!1:(this.node=e,this.onUpdate?this.onUpdate(e,t,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const e=document.createElement("div");return e.dataset.resizeContainer="",e.dataset.node=this.node.type.name,e.style.display="flex",this.classNames.container&&(e.className=this.classNames.container),e.appendChild(this.wrapper),e}createWrapper(){const e=document.createElement("div");return e.style.position="relative",e.style.display="block",e.dataset.resizeWrapper="",this.classNames.wrapper&&(e.className=this.classNames.wrapper),e.appendChild(this.element),e}createHandle(e){const t=document.createElement("div");return t.dataset.resizeHandle=e,t.style.position="absolute",this.classNames.handle&&(t.className=this.classNames.handle),t}positionHandle(e,t){const n=t.includes("top"),r=t.includes("bottom"),i=t.includes("left"),s=t.includes("right");n&&(e.style.top="0"),r&&(e.style.bottom="0"),i&&(e.style.left="0"),s&&(e.style.right="0"),(t==="top"||t==="bottom")&&(e.style.left="0",e.style.right="0"),(t==="left"||t==="right")&&(e.style.top="0",e.style.bottom="0")}attachHandles(){this.directions.forEach(e=>{let t;this.createCustomHandle?t=this.createCustomHandle(e):t=this.createHandle(e),t instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${e}") did not return an HTMLElement. Falling back to default handle.`),t=this.createHandle(e)),this.createCustomHandle||this.positionHandle(t,e),t.addEventListener("mousedown",n=>this.handleResizeStart(n,e)),t.addEventListener("touchstart",n=>this.handleResizeStart(n,e)),this.handleMap.set(e,t),this.wrapper.appendChild(t)})}removeHandles(){this.handleMap.forEach(e=>e.remove()),this.handleMap.clear()}applyInitialSize(){const e=this.node.attrs.width,t=this.node.attrs.height;e?(this.element.style.width=`${e}px`,this.initialWidth=e):this.initialWidth=this.element.offsetWidth,t?(this.element.style.height=`${t}px`,this.initialHeight=t):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(e,t){e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.activeHandle=t,kRe(e)?(this.startX=e.touches[0].clientX,this.startY=e.touches[0].clientY):(this.startX=e.clientX,this.startY=e.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(e,t){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:i}=this.calculateNewDimensions(this.activeHandle,e,t),s=this.applyConstraints(r,i,n);this.element.style.width=`${s.width}px`,this.element.style.height=`${s.height}px`,this.onResize&&this.onResize(s.width,s.height)}calculateNewDimensions(e,t,n){let r=this.startWidth,i=this.startHeight;const s=e.includes("right"),a=e.includes("left"),o=e.includes("bottom"),l=e.includes("top");return s?r=this.startWidth+t:a&&(r=this.startWidth-t),o?i=this.startHeight+n:l&&(i=this.startHeight-n),(e==="right"||e==="left")&&(r=this.startWidth+(s?t:-t)),(e==="top"||e==="bottom")&&(i=this.startHeight+(o?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,i,e):{width:r,height:i}}applyConstraints(e,t,n){var r,i,s,a;if(!n){let u=Math.max(this.minSize.width,e),d=Math.max(this.minSize.height,t);return(r=this.maxSize)!=null&&r.width&&(u=Math.min(this.maxSize.width,u)),(i=this.maxSize)!=null&&i.height&&(d=Math.min(this.maxSize.height,d)),{width:u,height:d}}let o=e,l=t;return o<this.minSize.width&&(o=this.minSize.width,l=o/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,o=l*this.aspectRatio),(s=this.maxSize)!=null&&s.width&&o>this.maxSize.width&&(o=this.maxSize.width,l=o/this.aspectRatio),(a=this.maxSize)!=null&&a.height&&l>this.maxSize.height&&(l=this.maxSize.height,o=l*this.aspectRatio),{width:o,height:l}}applyAspectRatio(e,t,n){const r=n==="left"||n==="right",i=n==="top"||n==="bottom";return r?{width:e,height:e/this.aspectRatio}:i?{width:t*this.aspectRatio,height:t}:{width:e,height:e/this.aspectRatio}}};function NRe(e,t){const{selection:n}=e,{$from:r}=n;if(n instanceof Ot){const s=r.index();return r.parent.canReplaceWith(s,s+1,t)}let i=r.depth;for(;i>=0;){const s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(t))return!0;i-=1}return!1}var jRe={};A6(jRe,{createAtomBlockMarkdownSpec:()=>Cce,createBlockMarkdownSpec:()=>TRe,createInlineMarkdownSpec:()=>ORe,parseAttributes:()=>v6,parseIndentedBlocks:()=>CF,renderNestedMarkdownContent:()=>w6,serializeAttributes:()=>x6});function v6(e){if(!(e!=null&&e.trim()))return{};const t={},n=[],r=e.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(i){const u=i.map(d=>d.trim().slice(1));t.class=u.join(" ")}const s=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);s&&(t.id=s[1]);const a=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(a)).forEach(([,u,d])=>{var A;const f=parseInt(((A=d.match(/__QUOTED_(\d+)__/))==null?void 0:A[1])||"0",10),h=n[f];h&&(t[u]=h.slice(1,-1))});const l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(d=>{d.match(/^[a-zA-Z][\w-]*$/)&&(t[d]=!0)}),t}function x6(e){if(!e||Object.keys(e).length===0)return"";const t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(r=>t.push(`.${r}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?t.push(n):r!==!1&&r!=null&&t.push(`${n}="${String(r)}"`))}),t.join(" ")}function Cce(e){const{nodeName:t,name:n,parseAttributes:r=v6,serializeAttributes:i=x6,defaultAttributes:s={},requiredAttributes:a=[],allowedAttributes:o}=e,l=n||t,u=d=>{if(!o)return d;const A={};return o.forEach(f=>{f in d&&(A[f]=d[f])}),A};return{parseMarkdown:(d,A)=>{const f={...s,...d.attributes};return A.createNode(t,f,[])},markdownTokenizer:{name:t,level:"block",start(d){var A;const f=new RegExp(`^:::${l}(?:\\s|$)`,"m"),h=(A=d.match(f))==null?void 0:A.index;return h!==void 0?h:-1},tokenize(d,A,f){const h=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),p=d.match(h);if(!p)return;const m=p[1]||"",g=r(m);if(!a.find(v=>!(v in g)))return{type:t,raw:p[0],attributes:g}}},renderMarkdown:d=>{const A=u(d.attrs||{}),f=i(A),h=f?` {${f}}`:"";return`:::${l}${h} :::`}}}function TRe(e){const{nodeName:t,name:n,getContent:r,parseAttributes:i=v6,serializeAttributes:s=x6,defaultAttributes:a={},content:o="block",allowedAttributes:l}=e,u=n||t,d=A=>{if(!l)return A;const f={};return l.forEach(h=>{h in A&&(f[h]=A[h])}),f};return{parseMarkdown:(A,f)=>{let h;if(r){const m=r(A);h=typeof m=="string"?[{type:"text",text:m}]:m}else o==="block"?h=f.parseChildren(A.tokens||[]):h=f.parseInline(A.tokens||[]);const p={...a,...A.attributes};return f.createNode(t,p,h)},markdownTokenizer:{name:t,level:"block",start(A){var f;const h=new RegExp(`^:::${u}`,"m"),p=(f=A.match(h))==null?void 0:f.index;return p!==void 0?p:-1},tokenize(A,f,h){var p;const m=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),g=A.match(m);if(!g)return;const[y,v=""]=g,x=i(v);let b=1;const w=y.length;let B="";const k=/^:::([\w-]*)(\s.*)?/gm,N=A.slice(w);for(k.lastIndex=0;;){const j=k.exec(N);if(j===null)break;const L=j.index,T=j[1];if(!((p=j[2])!=null&&p.endsWith(":::"))){if(T)b+=1;else if(b-=1,b===0){const E=N.slice(0,L);B=E.trim();const F=A.slice(0,w+L+j[0].length);let M=[];if(B)if(o==="block")for(M=h.blockTokens(E),M.forEach(D=>{D.text&&(!D.tokens||D.tokens.length===0)&&(D.tokens=h.inlineTokens(D.text))});M.length>0;){const D=M[M.length-1];if(D.type==="paragraph"&&(!D.text||D.text.trim()===""))M.pop();else break}else M=h.inlineTokens(B);return{type:t,raw:F,attributes:x,content:B,tokens:M}}}}}},renderMarkdown:(A,f)=>{const h=d(A.attrs||{}),p=s(h),m=p?` {${p}}`:"",g=f.renderChildren(A.content||[],`
`);return`:::${u}${m}
${g}
:::`}}}function PRe(e){if(!e.trim())return{};const t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(e);for(;r!==null;){const[,i,s,a]=r;t[i]=s||a,r=n.exec(e)}return t}function IRe(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}="${n}"`).join(" ")}function ORe(e){const{nodeName:t,name:n,getContent:r,parseAttributes:i=PRe,serializeAttributes:s=IRe,defaultAttributes:a={},selfClosing:o=!1,allowedAttributes:l}=e,u=n||t,d=f=>{if(!l)return f;const h={};return l.forEach(p=>{const m=typeof p=="string"?p:p.name,g=typeof p=="string"?void 0:p.skipIfDefault;if(m in f){const y=f[m];if(g!==void 0&&y===g)return;h[m]=y}}),h},A=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,h)=>{const p={...a,...f.attributes};if(o)return h.createNode(t,p);const m=r?r(f):f.content||"";return m?h.createNode(t,p,[h.createTextNode(m)]):h.createNode(t,p,[])},markdownTokenizer:{name:t,level:"inline",start(f){const h=o?new RegExp(`\\[${A}\\s*[^\\]]*\\]`):new RegExp(`\\[${A}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${A}\\]`),p=f.match(h),m=p==null?void 0:p.index;return m!==void 0?m:-1},tokenize(f,h,p){const m=o?new RegExp(`^\\[${A}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${A}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${A}\\]`),g=f.match(m);if(!g)return;let y="",v="";if(o){const[,b]=g;v=b}else{const[,b,w]=g;v=b,y=w||""}const x=i(v.trim());return{type:t,raw:g[0],content:y.trim(),attributes:x}}},renderMarkdown:f=>{let h="";r?h=r(f):f.content&&f.content.length>0&&(h=f.content.filter(y=>y.type==="text").map(y=>y.text).join(""));const p=d(f.attrs||{}),m=s(p),g=m?` ${m}`:"";return o?`[${u}${g}]`:`[${u}${g}]${h}[/${u}]`}}}function CF(e,t,n){var r,i,s,a;const o=e.split(`
`),l=[];let u="",d=0;const A=t.baseIndentSize||2;for(;d<o.length;){const f=o[d],h=f.match(t.itemPattern);if(!h){if(l.length>0)break;if(f.trim()===""){d+=1,u=`${u}${f}
`;continue}else return}const p=t.extractItemData(h),{indentLevel:m,mainContent:g}=p;u=`${u}${f}
`;const y=[g];for(d+=1;d<o.length;){const w=o[d];if(w.trim()===""){const k=o.slice(d+1).findIndex(L=>L.trim()!=="");if(k===-1)break;if((((i=(r=o[d+1+k].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>m){y.push(w),u=`${u}${w}
`,d+=1;continue}else break}if((((a=(s=w.match(/^(\s*)/))==null?void 0:s[1])==null?void 0:a.length)||0)>m)y.push(w),u=`${u}${w}
`,d+=1;else break}let v;const x=y.slice(1);if(x.length>0){const w=x.map(B=>B.slice(m+A)).join(`
`);w.trim()&&(t.customNestedParser?v=t.customNestedParser(w):v=n.blockTokens(w))}const b=t.createToken(p,v);l.push(b)}if(l.length!==0)return{items:l,raw:u}}function w6(e,t,n,r){if(!e||!Array.isArray(e.content))return"";const i=typeof n=="function"?n(r):n,[s,...a]=e.content,o=t.renderChildren([s]),l=[`${i}${o}`];return a&&a.length>0&&a.forEach(u=>{const d=t.renderChildren([u]);if(d){const A=d.split(`
`).map(f=>f?t.indent(f):"").join(`
`);l.push(A)}}),l.join(`
`)}function FRe(e,t,n={}){const{state:r}=t,{doc:i,tr:s}=r,a=e;i.descendants((o,l)=>{const u=s.mapping.map(l),d=s.mapping.map(l)+o.nodeSize;let A=null;if(o.marks.forEach(h=>{if(h!==a)return!1;A=h}),!A)return;let f=!1;if(Object.keys(n).forEach(h=>{n[h]!==A.attrs[h]&&(f=!0)}),f){const h=e.type.create({...e.attrs,...n});s.removeMark(u,d,e.type),s.addMark(u,d,h)}}),s.docChanged&&t.view.dispatch(s)}var ya=class Sce extends y6{constructor(){super(...arguments),this.type="node"}static create(t={}){const n=typeof t=="function"?t():t;return new Sce(n)}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}};function Hp(e){return new cce({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{const s=Pn(e.getAttributes,void 0,r,i);if(s===!1||s===null)return null;const{tr:a}=t,o=r[r.length-1],l=r[0];let u=n.to;if(o){const d=l.search(/\S/),A=n.from+l.indexOf(o),f=A+o.length;if(g6(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(g=>g===e.type&&g!==p.mark.type)).filter(p=>p.to>A).length)return null;f<n.to&&a.delete(f,n.to),A>n.from&&a.delete(n.from+d,A),u=n.from+d+o.length,a.addMark(n.from+d,u,e.type.create(s||{})),a.removeStoredMark(e.type)}}})}function MRe(e){return new cce({find:e.find,handler({match:t,chain:n,range:r,pasteEvent:i}){const s=Pn(e.getAttributes,void 0,t,i),a=Pn(e.getContent,void 0,s);if(s===!1||s===null)return null;const o={type:e.type.name,attrs:s};a&&(o.content=a),t.input&&n().deleteRange(r).insertContentAt(r.from,o)}})}const{getOwnPropertyNames:LRe,getOwnPropertySymbols:RRe}=Object,{hasOwnProperty:URe}=Object.prototype;function ZP(e,t){return function(r,i,s){return e(r,i,s)&&t(r,i,s)}}function oS(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:s}=i,a=s.get(n),o=s.get(r);if(a&&o)return a===r&&o===n;s.set(n,r),s.set(r,n);const l=e(n,r,i);return s.delete(n),s.delete(r),l}}function DRe(e){return e!=null?e[Symbol.toStringTag]:void 0}function k9(e){return LRe(e).concat(RRe(e))}const QRe=Object.hasOwn||((e,t)=>URe.call(e,t));function im(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const HRe="__v",$Re="__o",zRe="_owner",{getOwnPropertyDescriptor:E9,keys:N9}=Object;function VRe(e,t){return e.byteLength===t.byteLength&&ck(new Uint8Array(e),new Uint8Array(t))}function KRe(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function WRe(e,t){return e.byteLength===t.byteLength&&ck(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function qRe(e,t){return im(e.getTime(),t.getTime())}function GRe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function YRe(e,t){return e===t}function j9(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),s=e.entries();let a,o,l=0;for(;(a=s.next())&&!a.done;){const u=t.entries();let d=!1,A=0;for(;(o=u.next())&&!o.done;){if(i[A]){A++;continue}const f=a.value,h=o.value;if(n.equals(f[0],h[0],l,A,e,t,n)&&n.equals(f[1],h[1],f[0],h[0],e,t,n)){d=i[A]=!0;break}A++}if(!d)return!1;l++}return!0}const XRe=im;function JRe(e,t,n){const r=N9(e);let i=r.length;if(N9(t).length!==i)return!1;for(;i-- >0;)if(!Bce(e,t,n,r[i]))return!1;return!0}function ix(e,t,n){const r=k9(e);let i=r.length;if(k9(t).length!==i)return!1;let s,a,o;for(;i-- >0;)if(s=r[i],!Bce(e,t,n,s)||(a=E9(e,s),o=E9(t,s),(a||o)&&(!a||!o||a.configurable!==o.configurable||a.enumerable!==o.enumerable||a.writable!==o.writable)))return!1;return!0}function ZRe(e,t){return im(e.valueOf(),t.valueOf())}function eUe(e,t){return e.source===t.source&&e.flags===t.flags}function T9(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),s=e.values();let a,o;for(;(a=s.next())&&!a.done;){const l=t.values();let u=!1,d=0;for(;(o=l.next())&&!o.done;){if(!i[d]&&n.equals(a.value,o.value,a.value,o.value,e,t,n)){u=i[d]=!0;break}d++}if(!u)return!1}return!0}function ck(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function tUe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function Bce(e,t,n,r){return(r===zRe||r===$Re||r===HRe)&&(e.$$typeof||t.$$typeof)?!0:QRe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const nUe="[object ArrayBuffer]",rUe="[object Arguments]",iUe="[object Boolean]",sUe="[object DataView]",aUe="[object Date]",oUe="[object Error]",lUe="[object Map]",cUe="[object Number]",uUe="[object Object]",dUe="[object RegExp]",AUe="[object Set]",hUe="[object String]",fUe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},pUe="[object URL]",mUe=Object.prototype.toString;function gUe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:a,areNumbersEqual:o,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:d,areSetsEqual:A,areTypedArraysEqual:f,areUrlsEqual:h,unknownTagComparators:p}){return function(g,y,v){if(g===y)return!0;if(g==null||y==null)return!1;const x=typeof g;if(x!==typeof y)return!1;if(x!=="object")return x==="number"?o(g,y,v):x==="function"?s(g,y,v):!1;const b=g.constructor;if(b!==y.constructor)return!1;if(b===Object)return l(g,y,v);if(Array.isArray(g))return t(g,y,v);if(b===Date)return r(g,y,v);if(b===RegExp)return d(g,y,v);if(b===Map)return a(g,y,v);if(b===Set)return A(g,y,v);const w=mUe.call(g);if(w===aUe)return r(g,y,v);if(w===dUe)return d(g,y,v);if(w===lUe)return a(g,y,v);if(w===AUe)return A(g,y,v);if(w===uUe)return typeof g.then!="function"&&typeof y.then!="function"&&l(g,y,v);if(w===pUe)return h(g,y,v);if(w===oUe)return i(g,y,v);if(w===rUe)return l(g,y,v);if(fUe[w])return f(g,y,v);if(w===nUe)return e(g,y,v);if(w===sUe)return n(g,y,v);if(w===iUe||w===cUe||w===hUe)return u(g,y,v);if(p){let B=p[w];if(!B){const k=DRe(g);k&&(B=p[k])}if(B)return B(g,y,v)}return!1}}function yUe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:VRe,areArraysEqual:n?ix:KRe,areDataViewsEqual:WRe,areDatesEqual:qRe,areErrorsEqual:GRe,areFunctionsEqual:YRe,areMapsEqual:n?ZP(j9,ix):j9,areNumbersEqual:XRe,areObjectsEqual:n?ix:JRe,arePrimitiveWrappersEqual:ZRe,areRegExpsEqual:eUe,areSetsEqual:n?ZP(T9,ix):T9,areTypedArraysEqual:n?ZP(ck,ix):ck,areUrlsEqual:tUe,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=oS(r.areArraysEqual),s=oS(r.areMapsEqual),a=oS(r.areObjectsEqual),o=oS(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:a,areSetsEqual:o})}return r}function vUe(e){return function(t,n,r,i,s,a,o){return e(t,n,o)}}function xUe({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(o,l){const{cache:u=e?new WeakMap:void 0,meta:d}=n();return t(o,l,{cache:u,equals:r,meta:d,strict:i})};if(e)return function(o,l){return t(o,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const s={cache:void 0,equals:r,meta:void 0,strict:i};return function(o,l){return t(o,l,s)}}const _ce=Rh();Rh({strict:!0});Rh({circular:!0});Rh({circular:!0,strict:!0});Rh({createInternalComparator:()=>im});Rh({strict:!0,createInternalComparator:()=>im});Rh({circular:!0,createInternalComparator:()=>im});Rh({circular:!0,createInternalComparator:()=>im,strict:!0});function Rh(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,s=yUe(e),a=gUe(s),o=n?n(a):vUe(a);return xUe({circular:t,comparator:a,createState:r,equals:o,strict:i})}var kce={exports:{}},Ece={};/**
* @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 b5=S,wUe=YD;function bUe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var CUe=typeof Object.is=="function"?Object.is:bUe,SUe=wUe.useSyncExternalStore,BUe=b5.useRef,_Ue=b5.useEffect,kUe=b5.useMemo,EUe=b5.useDebugValue;Ece.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=BUe(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=kUe(function(){function l(h){if(!u){if(u=!0,d=h,h=r(h),i!==void 0&&a.hasValue){var p=a.value;if(i(p,h))return A=p}return A=h}if(p=A,CUe(d,h))return p;var m=r(h);return i!==void 0&&i(p,m)?(d=h,p):(d=h,A=m)}var u=!1,d,A,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var o=SUe(e,s[0],s[1]);return _Ue(function(){a.hasValue=!0,a.value=o},[o]),EUe(o),o};kce.exports=Ece;var NUe=kce.exports,jUe=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},TUe=({contentComponent:e})=>{const t=YD.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return c.jsx(c.Fragment,{children:Object.values(t)})};function PUe(){const e=new Set;let t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:lU.createPortal(r.reactElement,r.element,n)},e.forEach(i=>i())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(i=>i())}}}var IUe=class extends re.Component{constructor(e){var t;super(e),this.editorContentRef=re.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;const t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)!=null&&e.parentNode)){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n}),t.contentComponent=PUe(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;const t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.parentNode))return;const n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){const{editor:e,innerRef:t,...n}=this.props;return c.jsxs(c.Fragment,{children:[c.jsx("div",{ref:jUe(t,this.editorContentRef),...n}),(e==null?void 0:e.contentComponent)&&c.jsx(TUe,{contentComponent:e.contentComponent})]})}},OUe=S.forwardRef((e,t)=>{const n=re.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return re.createElement(IUe,{key:n,innerRef:t,...e})}),Nce=re.memo(OUe),FUe=typeof window<"u"?S.useLayoutEffect:S.useEffect,MUe=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function LUe(e){var t;const[n]=S.useState(()=>new MUe(e.editor)),r=NUe.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:_ce);return FUe(()=>n.watch(e.editor),[e.editor,n]),S.useDebugValue(r),r}var RUe=!1,SF=typeof window>"u",UUe=SF||!!(typeof window<"u"&&window.next),DUe=class jce{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return SF||UUe?null:this.createEditor();if(this.options.current.immediatelyRender&&SF&&RUe)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const t={...this.options.current,onBeforeCreate:(...r)=>{var i,s;return(s=(i=this.options.current).onBeforeCreate)==null?void 0:s.call(i,...r)},onBlur:(...r)=>{var i,s;return(s=(i=this.options.current).onBlur)==null?void 0:s.call(i,...r)},onCreate:(...r)=>{var i,s;return(s=(i=this.options.current).onCreate)==null?void 0:s.call(i,...r)},onDestroy:(...r)=>{var i,s;return(s=(i=this.options.current).onDestroy)==null?void 0:s.call(i,...r)},onFocus:(...r)=>{var i,s;return(s=(i=this.options.current).onFocus)==null?void 0:s.call(i,...r)},onSelectionUpdate:(...r)=>{var i,s;return(s=(i=this.options.current).onSelectionUpdate)==null?void 0:s.call(i,...r)},onTransaction:(...r)=>{var i,s;return(s=(i=this.options.current).onTransaction)==null?void 0:s.call(i,...r)},onUpdate:(...r)=>{var i,s;return(s=(i=this.options.current).onUpdate)==null?void 0:s.call(i,...r)},onContentError:(...r)=>{var i,s;return(s=(i=this.options.current).onContentError)==null?void 0:s.call(i,...r)},onDrop:(...r)=>{var i,s;return(s=(i=this.options.current).onDrop)==null?void 0:s.call(i,...r)},onPaste:(...r)=>{var i,s;return(s=(i=this.options.current).onPaste)==null?void 0:s.call(i,...r)},onDelete:(...r)=>{var i,s;return(s=(i=this.options.current).onDelete)==null?void 0:s.call(i,...r)}};return new _Re(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((i,s)=>{var a;return i===((a=n.extensions)==null?void 0:a[s])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?jce.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,i)=>r===t[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){const t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function QUe(e={},t=[]){const n=S.useRef(e);n.current=e;const[r]=S.useState(()=>new DUe(n)),i=YD.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return S.useDebugValue(i),S.useEffect(r.onRender(t)),LUe({editor:i,selector:({transactionNumber:s})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&s===0?0:s+1}),i}var Tce=S.createContext({editor:null});Tce.Consumer;var HUe=S.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),$Ue=()=>S.useContext(HUe);re.forwardRef((e,t)=>{const{onDragStart:n}=$Ue(),r=e.as||"div";return c.jsx(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});re.createContext({markViewContentRef:()=>{}});var b6=S.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});b6.displayName="TiptapContext";var zUe=()=>S.useContext(b6);function Pce({editor:e,instance:t,children:n}){const r=e??t;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const i=S.useMemo(()=>({editor:r}),[r]),s=S.useMemo(()=>({editor:r}),[r]);return c.jsx(Tce.Provider,{value:s,children:c.jsx(b6.Provider,{value:i,children:n})})}Pce.displayName="Tiptap";function Ice({...e}){const{editor:t}=zUe();return c.jsx(Nce,{editor:t,...e})}Ice.displayName="Tiptap.Content";Object.assign(Pce,{Content:Ice});var uk=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);const{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]},VUe=/^\s*>\s$/,KUe=ya.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return uk("blockquote",{...Yr(this.options.HTMLAttributes,e),children:uk("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";const n=">",r=[];return e.content.forEach(i=>{const o=t.renderChildren([i]).split(`
`).map(l=>l.trim()===""?n:`${n} ${l}`);r.push(o.join(`
`))}),r.join(`
${n}
`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[n0({find:VUe,type:this.type})]}}),WUe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,qUe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,GUe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,YUe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,XUe=rm.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return uk("strong",{...Yr(this.options.HTMLAttributes,e),children:uk("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[t0({find:WUe,type:this.type}),t0({find:GUe,type:this.type})]},addPasteRules(){return[Hp({find:qUe,type:this.type}),Hp({find:YUe,type:this.type})]}}),JUe=/(^|[^`])`([^`]+)`(?!`)$/,ZUe=/(^|[^`])`([^`]+)`(?!`)/g,eDe=rm.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",Yr(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[t0({find:JUe,type:this.type})]},addPasteRules(){return[Hp({find:ZUe,type:this.type})]}}),eI=4,tDe=/^```([a-z]+)?[\s\n]$/,nDe=/^~~~([a-z]+)?[\s\n]$/,rDe=ya.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:eI,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options;if(!n)return null;const s=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",Yr(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="";const i=((n=e.attrs)==null?void 0:n.language)||"";return e.content?r=[`\`\`\`${i}`,t.renderChildren(e.content),"```"].join(`
`):r=`\`\`\`${i}
\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;const n=(t=this.options.tabSize)!=null?t:eI,{state:r}=e,{selection:i}=r,{$from:s,empty:a}=i;if(s.parent.type!==this.type)return!1;const o=" ".repeat(n);return a?e.commands.insertContent(o):e.commands.command(({tr:l})=>{const{from:u,to:d}=i,h=r.doc.textBetween(u,d,`
`,`
`).split(`
`).map(p=>o+p).join(`
`);return l.replaceWith(u,d,r.schema.text(h)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;const n=(t=this.options.tabSize)!=null?t:eI,{state:r}=e,{selection:i}=r,{$from:s,empty:a}=i;return s.parent.type!==this.type?!1:a?e.commands.command(({tr:o})=>{var l;const{pos:u}=s,d=s.start(),A=s.end(),h=r.doc.textBetween(d,A,`
`,`
`).split(`
`);let p=0,m=0;const g=u-d;for(let B=0;B<h.length;B+=1){if(m+h[B].length>=g){p=B;break}m+=h[B].length+1}const v=((l=h[p].match(/^ */))==null?void 0:l[0])||"",x=Math.min(v.length,n);if(x===0)return!0;let b=d;for(let B=0;B<p;B+=1)b+=h[B].length+1;return o.delete(b,b+x),u-b<=x&&o.setSelection(Yt.create(o.doc,b)),!0}):e.commands.command(({tr:o})=>{const{from:l,to:u}=i,f=r.doc.textBetween(l,u,`
`,`
`).split(`
`).map(h=>{var p;const m=((p=h.match(/^ */))==null?void 0:p[0])||"",g=Math.min(m.length,n);return h.slice(g)}).join(`
`);return o.replaceWith(l,u,r.schema.text(f)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
`);return!s||!a?!1:e.chain().command(({tr:o})=>(o.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const o=i.after();return o===void 0?!1:r.nodeAt(o)?e.commands.command(({tr:u})=>(u.setSelection(cn.near(r.resolve(o))),!0)):e.commands.exitCode()}}},addInputRules(){return[bF({find:tDe,type:this.type,getAttributes:e=>({language:e[1]})}),bF({find:nDe,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Rr({key:new Ui("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i==null?void 0:i.mode;if(!n||!s)return!1;const{tr:a,schema:o}=e.state,l=o.text(n.replace(/\r\n?/g,`
`));return a.replaceSelectionWith(this.type.create({language:s},l)),a.selection.$from.parent.type!==this.type&&a.setSelection(Yt.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}}),iDe=ya.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
`):""}),sDe=ya.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Yr(this.options.HTMLAttributes,e)]},renderText(){return`
`},renderMarkdown:()=>`
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:o}=r.extensionManager,l=s||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:d})=>{if(d&&l&&a){const A=l.filter(f=>o.includes(f.type.name));u.ensureMarks(A)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),aDe=ya.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Yr(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;const r=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,i="#".repeat(r);return e.content?`${i} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>bF({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),oDe=ya.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",Yr(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!NRe(t,t.schema.nodes[this.name]))return!1;const{selection:n}=t,{$to:r}=n,i=e();return ice(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:s,tr:a,dispatch:o})=>{if(o){const{$to:l}=a.selection,u=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?a.setSelection(Yt.create(a.doc,l.pos+1)):l.nodeAfter.isBlock?a.setSelection(Ot.create(a.doc,l.pos)):a.setSelection(Yt.create(a.doc,l.pos));else{const d=s.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,A=d==null?void 0:d.create();A&&(a.insert(u,A),a.setSelection(Yt.create(a.doc,u+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[bce({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),lDe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,cDe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,uDe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,dDe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,ADe=rm.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Yr(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[t0({find:lDe,type:this.type}),t0({find:uDe,type:this.type})]},addPasteRules(){return[Hp({find:cDe,type:this.type}),Hp({find:dDe,type:this.type})]}});const hDe="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",fDe="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",BF="numeric",_F="ascii",kF="alpha",bw="asciinumeric",Hx="alphanumeric",EF="domain",Oce="emoji",pDe="scheme",mDe="slashscheme",tI="whitespace";function gDe(e,t){return e in t||(t[e]=[]),t[e]}function zf(e,t,n){t[BF]&&(t[bw]=!0,t[Hx]=!0),t[_F]&&(t[bw]=!0,t[kF]=!0),t[bw]&&(t[Hx]=!0),t[kF]&&(t[Hx]=!0),t[Hx]&&(t[EF]=!0),t[Oce]&&(t[EF]=!0);for(const r in t){const i=gDe(r,n);i.indexOf(e)<0&&i.push(e)}}function yDe(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Na(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Na.groups={};Na.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){const i=t.jr[r][0],s=t.jr[r][1];if(s&&i.test(e))return s}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r=r||Na.groups;let i;return t&&t.j?i=t:(i=new Na(t),n&&r&&zf(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this;const s=e.length;if(!s)return i;for(let a=0;a<s-1;a++)i=i.tt(e[a]);return i.tt(e[s-1],t,n,r)},tt(e,t,n,r){r=r||Na.groups;const i=this;if(t&&t.j)return i.j[e]=t,t;const s=t;let a,o=i.go(e);if(o?(a=new Na,Object.assign(a.j,o.j),a.jr.push.apply(a.jr,o.jr),a.jd=o.jd,a.t=o.t):a=new Na,s){if(r)if(a.t&&typeof a.t=="string"){const l=Object.assign(yDe(a.t,r),n);zf(s,l,r)}else n&&zf(s,n,r);a.t=s}return i.j[e]=a,a}};const ln=(e,t,n,r,i)=>e.ta(t,n,r,i),$r=(e,t,n,r,i)=>e.tr(t,n,r,i),P9=(e,t,n,r,i)=>e.ts(t,n,r,i),Ve=(e,t,n,r,i)=>e.tt(t,n,r,i),Mu="WORD",NF="UWORD",Fce="ASCIINUMERICAL",Mce="ALPHANUMERICAL",Db="LOCALHOST",jF="TLD",TF="UTLD",UB="SCHEME",yg="SLASH_SCHEME",C6="NUM",PF="WS",S6="NL",Cw="OPENBRACE",Sw="CLOSEBRACE",dk="OPENBRACKET",Ak="CLOSEBRACKET",hk="OPENPAREN",fk="CLOSEPAREN",pk="OPENANGLEBRACKET",mk="CLOSEANGLEBRACKET",gk="FULLWIDTHLEFTPAREN",yk="FULLWIDTHRIGHTPAREN",vk="LEFTCORNERBRACKET",xk="RIGHTCORNERBRACKET",wk="LEFTWHITECORNERBRACKET",bk="RIGHTWHITECORNERBRACKET",Ck="FULLWIDTHLESSTHAN",Sk="FULLWIDTHGREATERTHAN",Bk="AMPERSAND",_k="APOSTROPHE",kk="ASTERISK",uA="AT",Ek="BACKSLASH",Nk="BACKTICK",jk="CARET",yA="COLON",B6="COMMA",Tk="DOLLAR",Tc="DOT",Pk="EQUALS",_6="EXCLAMATION",Ro="HYPHEN",Bw="PERCENT",Ik="PIPE",Ok="PLUS",Fk="POUND",_w="QUERY",k6="QUOTE",Lce="FULLWIDTHMIDDLEDOT",E6="SEMI",Pc="SLASH",kw="TILDE",Mk="UNDERSCORE",Rce="EMOJI",Lk="SYM";var Uce=Object.freeze({__proto__:null,ALPHANUMERICAL:Mce,AMPERSAND:Bk,APOSTROPHE:_k,ASCIINUMERICAL:Fce,ASTERISK:kk,AT:uA,BACKSLASH:Ek,BACKTICK:Nk,CARET:jk,CLOSEANGLEBRACKET:mk,CLOSEBRACE:Sw,CLOSEBRACKET:Ak,CLOSEPAREN:fk,COLON:yA,COMMA:B6,DOLLAR:Tk,DOT:Tc,EMOJI:Rce,EQUALS:Pk,EXCLAMATION:_6,FULLWIDTHGREATERTHAN:Sk,FULLWIDTHLEFTPAREN:gk,FULLWIDTHLESSTHAN:Ck,FULLWIDTHMIDDLEDOT:Lce,FULLWIDTHRIGHTPAREN:yk,HYPHEN:Ro,LEFTCORNERBRACKET:vk,LEFTWHITECORNERBRACKET:wk,LOCALHOST:Db,NL:S6,NUM:C6,OPENANGLEBRACKET:pk,OPENBRACE:Cw,OPENBRACKET:dk,OPENPAREN:hk,PERCENT:Bw,PIPE:Ik,PLUS:Ok,POUND:Fk,QUERY:_w,QUOTE:k6,RIGHTCORNERBRACKET:xk,RIGHTWHITECORNERBRACKET:bk,SCHEME:UB,SEMI:E6,SLASH:Pc,SLASH_SCHEME:yg,SYM:Lk,TILDE:kw,TLD:jF,UNDERSCORE:Mk,UTLD:TF,UWORD:NF,WORD:Mu,WS:PF});const Eu=/[a-z]/,sx=new RegExp("\\p{L}","u"),nI=new RegExp("\\p{Emoji}","u"),Nu=/\d/,rI=/\s/,I9="\r",iI=`
`,vDe="️",xDe="",sI="";let lS=null,cS=null;function wDe(e=[]){const t={};Na.groups=t;const n=new Na;lS==null&&(lS=O9(hDe)),cS==null&&(cS=O9(fDe)),Ve(n,"'",_k),Ve(n,"{",Cw),Ve(n,"}",Sw),Ve(n,"[",dk),Ve(n,"]",Ak),Ve(n,"(",hk),Ve(n,")",fk),Ve(n,"<",pk),Ve(n,">",mk),Ve(n,"(",gk),Ve(n,")",yk),Ve(n,"「",vk),Ve(n,"」",xk),Ve(n,"『",wk),Ve(n,"』",bk),Ve(n,"<",Ck),Ve(n,">",Sk),Ve(n,"&",Bk),Ve(n,"*",kk),Ve(n,"@",uA),Ve(n,"`",Nk),Ve(n,"^",jk),Ve(n,":",yA),Ve(n,",",B6),Ve(n,"$",Tk),Ve(n,".",Tc),Ve(n,"=",Pk),Ve(n,"!",_6),Ve(n,"-",Ro),Ve(n,"%",Bw),Ve(n,"|",Ik),Ve(n,"+",Ok),Ve(n,"#",Fk),Ve(n,"?",_w),Ve(n,'"',k6),Ve(n,"/",Pc),Ve(n,";",E6),Ve(n,"~",kw),Ve(n,"_",Mk),Ve(n,"\\",Ek),Ve(n,"・",Lce);const r=$r(n,Nu,C6,{[BF]:!0});$r(r,Nu,r);const i=$r(r,Eu,Fce,{[bw]:!0}),s=$r(r,sx,Mce,{[Hx]:!0}),a=$r(n,Eu,Mu,{[_F]:!0});$r(a,Nu,i),$r(a,Eu,a),$r(i,Nu,i),$r(i,Eu,i);const o=$r(n,sx,NF,{[kF]:!0});$r(o,Eu),$r(o,Nu,s),$r(o,sx,o),$r(s,Nu,s),$r(s,Eu),$r(s,sx,s);const l=Ve(n,iI,S6,{[tI]:!0}),u=Ve(n,I9,PF,{[tI]:!0}),d=$r(n,rI,PF,{[tI]:!0});Ve(n,sI,d),Ve(u,iI,l),Ve(u,sI,d),$r(u,rI,d),Ve(d,I9),Ve(d,iI),$r(d,rI,d),Ve(d,sI,d);const A=$r(n,nI,Rce,{[Oce]:!0});Ve(A,"#"),$r(A,nI,A),Ve(A,vDe,A);const f=Ve(A,xDe);Ve(f,"#"),$r(f,nI,A);const h=[[Eu,a],[Nu,i]],p=[[Eu,null],[sx,o],[Nu,s]];for(let m=0;m<lS.length;m++)Kd(n,lS[m],jF,Mu,h);for(let m=0;m<cS.length;m++)Kd(n,cS[m],TF,NF,p);zf(jF,{tld:!0,ascii:!0},t),zf(TF,{utld:!0,alpha:!0},t),Kd(n,"file",UB,Mu,h),Kd(n,"mailto",UB,Mu,h),Kd(n,"http",yg,Mu,h),Kd(n,"https",yg,Mu,h),Kd(n,"ftp",yg,Mu,h),Kd(n,"ftps",yg,Mu,h),zf(UB,{scheme:!0,ascii:!0},t),zf(yg,{slashscheme:!0,ascii:!0},t),e=e.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<e.length;m++){const g=e[m][0],v=e[m][1]?{[pDe]:!0}:{[mDe]:!0};g.indexOf("-")>=0?v[EF]=!0:Eu.test(g)?Nu.test(g)?v[bw]=!0:v[_F]=!0:v[BF]=!0,P9(n,g,g,v)}return P9(n,"localhost",Db,{ascii:!0}),n.jd=new Na(Lk),{start:n,tokens:Object.assign({groups:t},Uce)}}function Dce(e,t){const n=bDe(t.replace(/[A-Z]/g,o=>o.toLowerCase())),r=n.length,i=[];let s=0,a=0;for(;a<r;){let o=e,l=null,u=0,d=null,A=-1,f=-1;for(;a<r&&(l=o.go(n[a]));)o=l,o.accepts()?(A=0,f=0,d=o):A>=0&&(A+=n[a].length,f++),u+=n[a].length,s+=n[a].length,a++;s-=A,a-=f,u-=A,i.push({t:d.t,v:t.slice(s-u,s),s:s-u,e:s})}return i}function bDe(e){const t=[],n=e.length;let r=0;for(;r<n;){let i=e.charCodeAt(r),s,a=i<55296||i>56319||r+1===n||(s=e.charCodeAt(r+1))<56320||s>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}function Kd(e,t,n,r,i){let s;const a=t.length;for(let o=0;o<a-1;o++){const l=t[o];e.j[l]?s=e.j[l]:(s=new Na(r),s.jr=i.slice(),e.j[l]=s),e=s}return s=new Na(n),s.jr=i.slice(),e.j[t[a-1]]=s,s}function O9(e){const t=[],n=[];let r=0,i="0123456789";for(;r<e.length;){let s=0;for(;i.indexOf(e[r+s])>=0;)s++;if(s>0){t.push(n.join(""));for(let a=parseInt(e.substring(r,r+s),10);a>0;a--)n.pop();r+=s}else n.push(e[r]),r++}return t}const Qb={defaultProtocol:"http",events:null,format:F9,formatHref:F9,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function N6(e,t=null){let n=Object.assign({},Qb);e&&(n=Object.assign(n,e instanceof N6?e.o:e));const r=n.ignoreTags,i=[];for(let s=0;s<r.length;s++)i.push(r[s].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}N6.prototype={o:Qb,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:Qb[e],typeof i=="function"&&r&&(i=i(t,n))):typeof i=="function"&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function F9(e){return e}function Qce(e,t){this.t="token",this.v=e,this.tk=t}Qce.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Qb.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),s=this.toFormattedString(e),a={},o=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),d=e.getObj("attributes",n,t),A=e.getObj("events",n,t);return a.href=r,o&&(a.class=o),l&&(a.target=l),u&&(a.rel=u),d&&Object.assign(a,d),{tagName:i,attributes:a,content:s,eventListeners:A}}};function C5(e,t){class n extends Qce{constructor(i,s){super(i,s),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const M9=C5("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),L9=C5("text"),CDe=C5("nl"),uS=C5("url",{isLink:!0,toHref(e=Qb.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Db&&e[1].t===yA}}),Po=e=>new Na(e);function SDe({groups:e}){const t=e.domain.concat([Bk,kk,uA,Ek,Nk,jk,Tk,Pk,Ro,C6,Bw,Ik,Ok,Fk,Pc,Lk,kw,Mk]),n=[_k,yA,B6,Tc,_6,Bw,_w,k6,E6,pk,mk,Cw,Sw,Ak,dk,hk,fk,gk,yk,vk,xk,wk,bk,Ck,Sk],r=[Bk,_k,kk,Ek,Nk,jk,Tk,Pk,Ro,Cw,Sw,Bw,Ik,Ok,Fk,_w,Pc,Lk,kw,Mk],i=Po(),s=Ve(i,kw);ln(s,r,s),ln(s,e.domain,s);const a=Po(),o=Po(),l=Po();ln(i,e.domain,a),ln(i,e.scheme,o),ln(i,e.slashscheme,l),ln(a,r,s),ln(a,e.domain,a);const u=Ve(a,uA);Ve(s,uA,u),Ve(o,uA,u),Ve(l,uA,u);const d=Ve(s,Tc);ln(d,r,s),ln(d,e.domain,s);const A=Po();ln(u,e.domain,A),ln(A,e.domain,A);const f=Ve(A,Tc);ln(f,e.domain,A);const h=Po(M9);ln(f,e.tld,h),ln(f,e.utld,h),Ve(u,Db,h);const p=Ve(A,Ro);Ve(p,Ro,p),ln(p,e.domain,A),ln(h,e.domain,A),Ve(h,Tc,f),Ve(h,Ro,p);const m=Ve(h,yA);ln(m,e.numeric,M9);const g=Ve(a,Ro),y=Ve(a,Tc);Ve(g,Ro,g),ln(g,e.domain,a),ln(y,r,s),ln(y,e.domain,a);const v=Po(uS);ln(y,e.tld,v),ln(y,e.utld,v),ln(v,e.domain,a),ln(v,r,s),Ve(v,Tc,y),Ve(v,Ro,g),Ve(v,uA,u);const x=Ve(v,yA),b=Po(uS);ln(x,e.numeric,b);const w=Po(uS),B=Po();ln(w,t,w),ln(w,n,B),ln(B,t,w),ln(B,n,B),Ve(v,Pc,w),Ve(b,Pc,w);const k=Ve(o,yA),N=Ve(l,yA),j=Ve(N,Pc),L=Ve(j,Pc);ln(o,e.domain,a),Ve(o,Tc,y),Ve(o,Ro,g),ln(l,e.domain,a),Ve(l,Tc,y),Ve(l,Ro,g),ln(k,e.domain,w),Ve(k,Pc,w),Ve(k,_w,w),ln(L,e.domain,w),ln(L,t,w),Ve(L,Pc,w);const T=[[Cw,Sw],[dk,Ak],[hk,fk],[pk,mk],[gk,yk],[vk,xk],[wk,bk],[Ck,Sk]];for(let E=0;E<T.length;E++){const[F,M]=T[E],D=Ve(w,F);Ve(B,F,D),Ve(D,M,w);const H=Po(uS);ln(D,t,H);const q=Po();ln(D,n),ln(H,t,H),ln(H,n,q),ln(q,t,H),ln(q,n,q),Ve(H,M,w),Ve(q,M,w)}return Ve(i,Db,v),Ve(i,S6,CDe),{start:i,tokens:Uce}}function BDe(e,t,n){let r=n.length,i=0,s=[],a=[];for(;i<r;){let o=e,l=null,u=null,d=0,A=null,f=-1;for(;i<r&&!(l=o.go(n[i].t));)a.push(n[i++]);for(;i<r&&(u=l||o.go(n[i].t));)l=null,o=u,o.accepts()?(f=0,A=o):f>=0&&f++,i++,d++;if(f<0)i-=d,i<r&&(a.push(n[i]),i++);else{a.length>0&&(s.push(aI(L9,t,a)),a=[]),i-=f,d-=f;const h=A.t,p=n.slice(i-d,i);s.push(aI(h,t,p))}}return a.length>0&&s.push(aI(L9,t,a)),s}function aI(e,t,n){const r=n[0].s,i=n[n.length-1].e,s=t.slice(r,i);return new e(s,n)}const _De=typeof console<"u"&&console&&console.warn||(()=>{}),kDe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",fr={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function EDe(){return Na.groups={},fr.scanner=null,fr.parser=null,fr.tokenQueue=[],fr.pluginQueue=[],fr.customSchemes=[],fr.initialized=!1,fr}function R9(e,t=!1){if(fr.initialized&&_De(`linkifyjs: already initialized - will not register custom scheme "${e}" ${kDe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);fr.customSchemes.push([e,t])}function NDe(){fr.scanner=wDe(fr.customSchemes);for(let e=0;e<fr.tokenQueue.length;e++)fr.tokenQueue[e][1]({scanner:fr.scanner});fr.parser=SDe(fr.scanner.tokens);for(let e=0;e<fr.pluginQueue.length;e++)fr.pluginQueue[e][1]({scanner:fr.scanner,parser:fr.parser});return fr.initialized=!0,fr}function j6(e){return fr.initialized||NDe(),BDe(fr.parser.start,e,Dce(fr.scanner.start,e))}j6.scan=Dce;function Hce(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new N6(n),i=j6(e),s=[];for(let a=0;a<i.length;a++){const o=i[a];o.isLink&&(!t||o.t===t)&&r.check(o)&&s.push(o.toFormattedObject(r))}return s}var T6="[\0- -\u2029 ]",jDe=new RegExp(T6),TDe=new RegExp(`${T6}$`),PDe=new RegExp(T6,"g");function IDe(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function ODe(e){return new Rr({key:new Ui("autolink"),appendTransaction:(t,n,r)=>{const i=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),s=t.some(u=>u.getMeta("preventAutolink"));if(!i||s)return;const{tr:a}=r,o=Yle(n.doc,[...t]);if(rce(o).forEach(({newRange:u})=>{const d=NLe(r.doc,u,h=>h.isTextblock);let A,f;if(d.length>1)A=d[0],f=r.doc.textBetween(A.pos,A.pos+A.node.nodeSize,void 0," ");else if(d.length){const h=r.doc.textBetween(u.from,u.to," "," ");if(!TDe.test(h))return;A=d[0],f=r.doc.textBetween(A.pos,u.to,void 0," ")}if(A&&f){const h=f.split(jDe).filter(Boolean);if(h.length<=0)return!1;const p=h[h.length-1],m=A.pos+f.lastIndexOf(p);if(!p)return!1;const g=j6(p).map(y=>y.toObject(e.defaultProtocol));if(!IDe(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>e.validate(y.value)).filter(y=>e.shouldAutoLink(y.value)).forEach(y=>{g6(y.from,y.to,r.doc).some(v=>v.mark.type===e.type)||a.addMark(y.from,y.to,e.type.create({href:y.href}))})}}),!!a.steps.length)return a}})}function FDe(e){return new Rr({key:new Ui("handleClickLink"),props:{handleClick:(t,n,r)=>{var i,s;if(r.button!==0||!t.editable)return!1;let a=null;if(r.target instanceof HTMLAnchorElement)a=r.target;else{const l=r.target;if(!l)return!1;const u=e.editor.view.dom;a=l.closest("a"),a&&!u.contains(a)&&(a=null)}if(!a)return!1;let o=!1;if(e.enableClickSelection&&(o=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){const l=nce(t.state,e.type.name),u=(i=a.href)!=null?i:l.href,d=(s=a.target)!=null?s:l.target;u&&(window.open(u,d),o=!0)}return o}}})}function MDe(e){return new Rr({key:new Ui("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{shouldAutoLink:i}=e,{state:s}=t,{selection:a}=s,{empty:o}=a;if(o)return!1;let l="";r.content.forEach(d=>{l+=d.textContent});const u=Hce(l,{defaultProtocol:e.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!u||i!==void 0&&!i(u.value)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function mf(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!e||e.replace(PDe,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var $ce=rm.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){R9(e);return}R9(e.scheme,e.optionalSlashes)})},onDestroy(){EDe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!mf(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{const t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;const i=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!mf(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!mf(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Yr(this.options.HTMLAttributes,e),0]:["a",Yr(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,s;const a=(r=(n=e.attrs)==null?void 0:n.href)!=null?r:"",o=(s=(i=e.attrs)==null?void 0:i.title)!=null?s:"",l=t.renderChildren(e);return o?`[${l}](${a} "${o}")`:`[${l}](${a})`},addCommands(){return{setLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!mf(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!mf(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Hp({find:e=>{const t=[];if(e){const{protocols:n,defaultProtocol:r}=this.options,i=Hce(e).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:a=>!!mf(a,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(s=>{this.options.shouldAutoLink(s.value)&&t.push({text:s.value,data:{href:s.href},index:s.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(ODe({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!mf(i,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(FDe({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(MDe({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),LDe=$ce,RDe=Object.defineProperty,UDe=(e,t)=>{for(var n in t)RDe(e,n,{get:t[n],enumerable:!0})},DDe="listItem",U9="textStyle",D9=/^\s*([-+*])\s$/,zce=ya.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",Yr(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(DDe,this.editor.getAttributes(U9)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=n0({find:D9,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=n0({find:D9,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(U9),editor:this.editor})),[e]}}),Vce=ya.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Yr(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{if(e.type!=="list_item")return[];let n=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(i=>i.type==="paragraph"))n=t.parseChildren(e.tokens);else{const i=e.tokens[0];if(i&&i.type==="text"&&i.tokens&&i.tokens.length>0){if(n=[{type:"paragraph",content:t.parseInline(i.tokens)}],e.tokens.length>1){const a=e.tokens.slice(1),o=t.parseChildren(a);n.push(...o)}}else n=t.parseChildren(e.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(e,t,n)=>w6(e,t,r=>{var i,s;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((s=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:s.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),QDe={};UDe(QDe,{findListItemPos:()=>f2,getNextListDepth:()=>P6,handleBackspace:()=>IF,handleDelete:()=>OF,hasListBefore:()=>Kce,hasListItemAfter:()=>HDe,hasListItemBefore:()=>Wce,listItemHasSubList:()=>qce,nextListIsDeeper:()=>Gce,nextListIsHigher:()=>Yce});var f2=(e,t)=>{const{$from:n}=t.selection,r=Si(e,t.schema);let i=null,s=n.depth,a=n.pos,o=null;for(;s>0&&o===null;)i=n.node(s),i.type===r?o=s:(s-=1,a-=1);return o===null?null:{$pos:t.doc.resolve(a),depth:o}},P6=(e,t)=>{const n=f2(e,t);if(!n)return!1;const[,r]=ULe(t,e,n.$pos.pos+4);return r},Kce=(e,t,n)=>{const{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),s=e.doc.resolve(i).node();return!(!s||!n.includes(s.type.name))},Wce=(e,t)=>{var n;const{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-2);return!(i.index()===0||((n=i.nodeBefore)==null?void 0:n.type.name)!==e)},qce=(e,t,n)=>{if(!n)return!1;const r=Si(e,t.schema);let i=!1;return n.descendants(s=>{s.type===r&&(i=!0)}),i},IF=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Sh(e.state,t)&&Kce(e.state,t,n)){const{$anchor:o}=e.state.selection,l=e.state.doc.resolve(o.before()-1),u=[];l.node().descendants((f,h)=>{f.type.name===t&&u.push({node:f,pos:h})});const d=u.at(-1);if(!d)return!1;const A=e.state.doc.resolve(l.start()+d.pos+1);return e.chain().cut({from:o.start()-1,to:o.end()+1},A.end()).joinForward().run()}if(!Sh(e.state,t)||!$Le(e.state))return!1;const r=f2(t,e.state);if(!r)return!1;const s=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),a=qce(t,e.state,s);return Wce(t,e.state)&&!a?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},Gce=(e,t)=>{const n=P6(e,t),r=f2(e,t);return!r||!n?!1:n>r.depth},Yce=(e,t)=>{const n=P6(e,t),r=f2(e,t);return!r||!n?!1:n<r.depth},OF=(e,t)=>{if(!Sh(e.state,t)||!HLe(e.state,t))return!1;const{selection:n}=e.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:Gce(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():Yce(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},HDe=(e,t)=>{var n;const{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((n=i.nodeAfter)==null?void 0:n.type.name)!==e)},Xce=Ai.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&OF(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&OF(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&IF(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&IF(e,n,r)&&(t=!0)}),t}}}}),Q9=/^(\s*)(\d+)\.\s+(.*)$/,$De=/^\s/;function zDe(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n],s=i.match(Q9);if(!s)break;const[,a,o,l]=s,u=a.length;let d=l,A=n+1;const f=[i];for(;A<e.length;){const h=e[A];if(h.match(Q9))break;if(h.trim()==="")f.push(h),d+=`
`,A+=1;else if(h.match($De))f.push(h),d+=`
${h.slice(u+2)}`,A+=1;else break}t.push({indent:u,number:parseInt(o,10),content:d.trim(),raw:f.join(`
`)}),r=A,n=A}return[t,r]}function Jce(e,t,n){var r;const i=[];let s=0;for(;s<e.length;){const a=e[s];if(a.indent===t){const o=a.content.split(`
`),l=((r=o[0])==null?void 0:r.trim())||"",u=[];l&&u.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const d=o.slice(1).join(`
`).trim();if(d){const h=n.blockTokens(d);u.push(...h)}let A=s+1;const f=[];for(;A<e.length&&e[A].indent>t;)f.push(e[A]),A+=1;if(f.length>0){const h=Math.min(...f.map(m=>m.indent)),p=Jce(f,h,n);u.push({type:"list",ordered:!0,start:f[0].number,items:p,raw:f.map(m=>m.raw).join(`
`)})}i.push({type:"list_item",raw:a.raw,tokens:u}),s=A}else s+=1}return i}function VDe(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(i=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")r.push(...t.parseChildren([i]));else if(i.type==="text"&&i.tokens){const s=t.parseChildren([i]);r.push({type:"paragraph",content:s})}else{const s=t.parseChildren([i]);s.length>0&&r.push(...s)}}),{type:"listItem",content:r}})}var KDe="listItem",H9="textStyle",$9=/^(\d+)\.\s$/,Zce=ya.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",Yr(this.options.HTMLAttributes,n),0]:["ol",Yr(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];const n=e.start||1,r=e.items?VDe(e.items,t):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{const t=e.match(/^(\s*)(\d+)\.\s+/),n=t==null?void 0:t.index;return n!==void 0?n:-1},tokenize:(e,t,n)=>{var r;const i=e.split(`
`),[s,a]=zDe(i);if(s.length===0)return;const o=Jce(s,0,n);return o.length===0?void 0:{type:"list",ordered:!0,start:((r=s[0])==null?void 0:r.number)||1,items:o,raw:i.slice(0,a).join(`
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(KDe,this.editor.getAttributes(H9)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=n0({find:$9,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=n0({find:$9,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(H9)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),WDe=/^\s*(\[([( |x])?\])\s$/,qDe=ya.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{const t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",Yr(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{const n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){const r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;const i=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return w6(e,t,i)},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{const i=document.createElement("li"),s=document.createElement("label"),a=document.createElement("span"),o=document.createElement("input"),l=document.createElement("div"),u=A=>{var f,h;o.ariaLabel=((h=(f=this.options.a11y)==null?void 0:f.checkboxLabel)==null?void 0:h.call(f,A,o.checked))||`Task item checkbox for ${A.textContent||"empty task item"}`};u(e),s.contentEditable="false",o.type="checkbox",o.addEventListener("mousedown",A=>A.preventDefault()),o.addEventListener("change",A=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){o.checked=!o.checked;return}const{checked:f}=A.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{const p=n();if(typeof p!="number")return!1;const m=h.doc.nodeAt(p);return h.setNodeMarkup(p,void 0,{...m==null?void 0:m.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,f)||(o.checked=!o.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([A,f])=>{i.setAttribute(A,f)}),i.dataset.checked=e.attrs.checked,o.checked=e.attrs.checked,s.append(o,a),i.append(s,l),Object.entries(t).forEach(([A,f])=>{i.setAttribute(A,f)});let d=new Set(Object.keys(t));return{dom:i,contentDOM:l,update:A=>{if(A.type!==this.type)return!1;i.dataset.checked=A.attrs.checked,o.checked=A.attrs.checked,u(A);const f=r.extensionManager.attributes,h=Ub(A,f),p=new Set(Object.keys(h)),m=this.options.HTMLAttributes;return d.forEach(g=>{p.has(g)||(g in m?i.setAttribute(g,m[g]):i.removeAttribute(g))}),Object.entries(h).forEach(([g,y])=>{y==null?g in m?i.setAttribute(g,m[g]):i.removeAttribute(g):i.setAttribute(g,y)}),d=p,!0}}}},addInputRules(){return[n0({find:WDe,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),GDe=ya.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",Yr(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;const n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){const r=s=>{const a=CF(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,l)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:l}),customNestedParser:r},n);return a?[{type:"taskList",raw:a.raw,items:a.items}]:n.blockTokens(s)},i=CF(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,a)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:n.inlineTokens(s.mainContent),nestedTokens:a}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Ai.create({name:"listKit",addExtensions(){const e=[];return this.options.bulletList!==!1&&e.push(zce.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(Vce.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(Xce.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(Zce.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(qDe.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(GDe.configure(this.options.taskList)),e}});var z9=" ",YDe=" ",XDe=ya.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Yr(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{const n=e.tokens||[];if(n.length===1&&n[0].type==="image")return t.parseChildren([n[0]]);const r=t.parseInline(n);return r.length===1&&r[0].type==="text"&&(r[0].text===z9||r[0].text===YDe)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t)=>{if(!e)return"";const n=Array.isArray(e.content)?e.content:[];return n.length===0?z9:t.renderChildren(n)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),JDe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,ZDe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,e6e=rm.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Yr(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[t0({find:JDe,type:this.type})]},addPasteRules(){return[Hp({find:ZDe,type:this.type})]}}),t6e=ya.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""}),n6e=rm.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",Yr(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){const i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!i)return;const s=i[2].trim();return{type:"underline",raw:i[0],text:s,tokens:n.inlineTokens(s)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function r6e(e={}){return new Rr({view(t){return new i6e(t,e)}})}class i6e{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=a=>{this[i](a)};return t.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,i=this.editorView.dom,s=i.getBoundingClientRect(),a=s.width/i.offsetWidth,o=s.height/i.offsetHeight;if(n){let A=t.nodeBefore,f=t.nodeAfter;if(A||f){let h=this.editorView.nodeDOM(this.cursorPos-(A?A.nodeSize:0));if(h){let p=h.getBoundingClientRect(),m=A?p.bottom:p.top;A&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*o;r={left:p.left,right:p.right,top:m-g,bottom:m+g}}}}if(!r){let A=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*a;r={left:A.left-f,right:A.left+f,top:A.top,bottom:A.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,d;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,d=-pageYOffset;else{let A=l.getBoundingClientRect(),f=A.width/l.offsetWidth,h=A.height/l.offsetHeight;u=A.left-l.scrollLeft*f,d=A.top-l.scrollTop*h}this.element.style.left=(r.left-u)/a+"px",this.element.style.top=(r.top-d)/o+"px",this.element.style.width=(r.right-r.left)/a+"px",this.element.style.height=(r.bottom-r.top)/o+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,n,t):i;if(n&&!s){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let o=Woe(this.editorView.state.doc,a,this.editorView.dragging.slice);o!=null&&(a=o)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}class Gr extends cn{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Gr.valid(r)?new Gr(r):cn.near(r)}content(){return rt.empty}eq(t){return t instanceof Gr&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Gr(t.resolve(n.pos))}getBookmark(){return new I6(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!s6e(t)||!a6e(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(t.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&Gr.valid(t))return t;let i=t.pos,s=null;for(let a=t.depth;;a--){let o=t.node(a);if(n>0?t.indexAfter(a)<o.childCount:t.index(a)>0){s=o.child(n>0?t.indexAfter(a):t.index(a)-1);break}else if(a==0)return null;i+=n;let l=t.doc.resolve(i);if(Gr.valid(l))return l}for(;;){let a=n>0?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!Ot.isSelectable(s)){t=t.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=a,i+=n;let o=t.doc.resolve(i);if(Gr.valid(o))return o}return null}}}Gr.prototype.visible=!1;Gr.findFrom=Gr.findGapCursorFrom;cn.jsonID("gapcursor",Gr);class I6{constructor(t){this.pos=t}map(t){return new I6(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Gr.valid(n)?new Gr(n):cn.near(n)}}function eue(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function s6e(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||eue(i.type))return!0;if(i.inlineContent)return!1}}return!0}function a6e(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||eue(i.type))return!0;if(i.inlineContent)return!1}}return!0}function o6e(){return new Rr({props:{decorations:d6e,createSelectionBetween(e,t,n){return t.pos==n.pos&&Gr.valid(n)?new Gr(n):null},handleClick:c6e,handleKeyDown:l6e,handleDOMEvents:{beforeinput:u6e}}})}const l6e=Hle({ArrowLeft:dS("horiz",-1),ArrowRight:dS("horiz",1),ArrowUp:dS("vert",-1),ArrowDown:dS("vert",1)});function dS(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,i,s){let a=r.selection,o=t>0?a.$to:a.$from,l=a.empty;if(a instanceof Yt){if(!s.endOfTextblock(n)||o.depth==0)return!1;l=!1,o=r.doc.resolve(t>0?o.after():o.before())}let u=Gr.findGapCursorFrom(o,t,l);return u?(i&&i(r.tr.setSelection(new Gr(u))),!0):!1}}function c6e(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Gr.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&Ot.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Gr(r))),!0)}function u6e(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Gr))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=De.empty;for(let a=r.length-1;a>=0;a--)i=De.from(r[a].createAndFill(null,i));let s=e.state.tr.replace(n.pos,n.pos,new rt(i,0,0));return s.setSelection(Yt.near(s.doc.resolve(n.pos+1))),e.dispatch(s),!1}function d6e(e){if(!(e.selection instanceof Gr))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Pr.create(e.doc,[oa.widget(e.selection.head,t,{key:"gapcursor"})])}var Rk=200,Xi=function(){};Xi.prototype.append=function(t){return t.length?(t=Xi.from(t),!this.length&&t||t.length<Rk&&this.leafAppend(t)||this.length<Rk&&t.leafPrepend(this)||this.appendInner(t)):this};Xi.prototype.prepend=function(t){return t.length?Xi.from(t).append(this):this};Xi.prototype.appendInner=function(t){return new A6e(this,t)};Xi.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?Xi.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Xi.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Xi.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};Xi.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,a){return i.push(t(s,a))},n,r),i};Xi.from=function(t){return t instanceof Xi?t:t&&t.length?new tue(t):Xi.empty};var tue=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new t(this.values.slice(i,s))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,s,a,o){for(var l=s;l<a;l++)if(i(this.values[l],o+l)===!1)return!1},t.prototype.forEachInvertedInner=function(i,s,a,o){for(var l=s-1;l>=a;l--)if(i(this.values[l],o+l)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=Rk)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=Rk)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Xi);Xi.empty=new tue([]);var A6e=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,i,s,a){var o=this.left.length;if(i<o&&this.left.forEachInner(r,i,Math.min(s,o),a)===!1||s>o&&this.right.forEachInner(r,Math.max(i-o,0),Math.min(this.length,s)-o,a+o)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,s,a){var o=this.left.length;if(i>o&&this.right.forEachInvertedInner(r,i-o,Math.max(s,o)-o,a+o)===!1||s<o&&this.left.forEachInvertedInner(r,Math.min(i,o),s,a)===!1)return!1},t.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(Xi);const h6e=500;class Vl{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;n&&(i=this.remapping(r,this.items.length),s=i.maps.length);let a=t.tr,o,l,u=[],d=[];return this.items.forEach((A,f)=>{if(!A.step){i||(i=this.remapping(r,f+1),s=i.maps.length),s--,d.push(A);return}if(i){d.push(new Wd(A.map));let h=A.step.map(i.slice(s)),p;h&&a.maybeStep(h).doc&&(p=a.mapping.maps[a.mapping.maps.length-1],u.push(new Wd(p,void 0,void 0,u.length+d.length))),s--,p&&i.appendMap(p,s)}else a.maybeStep(A.step);if(A.selection)return o=i?A.selection.map(i.slice(s)):A.selection,l=new Vl(this.items.slice(0,r).append(d.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:a,selection:o}}addTransform(t,n,r,i){let s=[],a=this.eventCount,o=this.items,l=!i&&o.length?o.get(o.length-1):null;for(let d=0;d<t.steps.length;d++){let A=t.steps[d].invert(t.docs[d]),f=new Wd(t.mapping.maps[d],A,n),h;(h=l&&l.merge(f))&&(f=h,d?s.pop():o=o.slice(0,o.length-1)),s.push(f),n&&(a++,n=void 0),i||(l=f)}let u=a-r.depth;return u>p6e&&(o=f6e(o,u),a-=u),new Vl(o.append(s),a)}remapping(t,n){let r=new Ib;return this.items.forEach((i,s)=>{let a=i.mirrorOffset!=null&&s-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},t,n),r}addMaps(t){return this.eventCount==0?this:new Vl(this.items.append(t.map(n=>new Wd(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=t.mapping,a=t.steps.length,o=this.eventCount;this.items.forEach(f=>{f.selection&&o--},i);let l=n;this.items.forEach(f=>{let h=s.getMirror(--l);if(h==null)return;a=Math.min(a,h);let p=s.maps[h];if(f.step){let m=t.steps[h].invert(t.docs[h]),g=f.selection&&f.selection.map(s.slice(l+1,h));g&&o++,r.push(new Wd(p,m,g))}else r.push(new Wd(p))},i);let u=[];for(let f=n;f<a;f++)u.push(new Wd(s.maps[f]));let d=this.items.slice(0,i).append(u).append(r),A=new Vl(d,o);return A.emptyItemCount()>h6e&&(A=A.compress(this.items.length-r.length)),A}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],s=0;return this.items.forEach((a,o)=>{if(o>=t)i.push(a),a.selection&&s++;else if(a.step){let l=a.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let d=a.selection&&a.selection.map(n.slice(r));d&&s++;let A=new Wd(u.invert(),l,d),f,h=i.length-1;(f=i.length&&i[h].merge(A))?i[h]=f:i.push(A)}}else a.map&&r--},this.items.length,0),new Vl(Xi.from(i.reverse()),s)}}Vl.empty=new Vl(Xi.empty,0);function f6e(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}let Wd=class nue{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new nue(n.getMap().invert(),n,this.selection)}}};class dA{constructor(t,n,r,i,s){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const p6e=20;function m6e(e,t,n,r){let i=n.getMeta(yp),s;if(i)return i.historyState;n.getMeta(v6e)&&(e=new dA(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(a&&a.getMeta(yp))return a.getMeta(yp).redo?new dA(e.done.addTransform(n,void 0,r,DB(t)),e.undone,V9(n.mapping.maps),e.prevTime,e.prevComposition):new dA(e.done,e.undone.addTransform(n,void 0,r,DB(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let o=n.getMeta("composition"),l=e.prevTime==0||!a&&e.prevComposition!=o&&(e.prevTime<(n.time||0)-r.newGroupDelay||!g6e(n,e.prevRanges)),u=a?oI(e.prevRanges,n.mapping):V9(n.mapping.maps);return new dA(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,DB(t)),Vl.empty,u,n.time,o??e.prevComposition)}else return(s=n.getMeta("rebased"))?new dA(e.done.rebased(n,s),e.undone.rebased(n,s),oI(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new dA(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),oI(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function g6e(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<t.length;s+=2)r<=t[s+1]&&i>=t[s]&&(n=!0)}),n}function V9(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,i,s,a)=>t.push(s,a));return t}function oI(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),s=t.map(e[r+1],-1);i<=s&&n.push(i,s)}return n}function y6e(e,t,n){let r=DB(t),i=yp.get(t).spec.config,s=(n?e.undone:e.done).popEvent(t,r);if(!s)return null;let a=s.selection.resolve(s.transform.doc),o=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,r),l=new dA(n?o:s.remaining,n?s.remaining:o,null,0,-1);return s.transform.setSelection(a).setMeta(yp,{redo:n,historyState:l})}let lI=!1,K9=null;function DB(e){let t=e.plugins;if(K9!=t){lI=!1,K9=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){lI=!0;break}}return lI}const yp=new Ui("history"),v6e=new Ui("closeHistory");function x6e(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Rr({key:yp,state:{init(){return new dA(Vl.empty,Vl.empty,null,0,-1)},apply(t,n,r){return m6e(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?iue:r=="historyRedo"?sue:null;return!i||!t.editable?!1:(n.preventDefault(),i(t.state,t.dispatch))}}}})}function rue(e,t){return(n,r)=>{let i=yp.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let s=y6e(i,n,e);s&&r(t?s.scrollIntoView():s)}return!0}}const iue=rue(!1,!0),sue=rue(!0,!0);Ai.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){const r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new Rr({key:new Ui("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;const i=this.options.limit;if(i==null||i===0){e=!0;return}const s=this.storage.characters({node:r.doc});if(s>i){const a=s-i,o=0,l=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const u=r.tr.deleteRange(o,l);return e=!0,u}e=!0},filterTransaction:(t,n)=>{const r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),s=this.storage.characters({node:t.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!t.getMeta("paste"))return!1;const o=t.selection.$head.pos,l=s-r,u=o-l,d=o;return t.deleteRange(u,d),!(this.storage.characters({node:t.doc})>r)}})]}});var w6e=Ai.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[r6e(this.options)]}});Ai.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Rr({key:new Ui("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,s=[];if(!n||!r)return Pr.create(e,[]);let a=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(l.isText)return;if(!(i>=u&&i<=u+l.nodeSize-1))return!1;a+=1});let o=0;return e.descendants((l,u)=>{if(l.isText||!(i>=u&&i<=u+l.nodeSize-1))return!1;if(o+=1,this.options.mode==="deepest"&&a-o>0||this.options.mode==="shallowest"&&o>1)return this.options.mode==="deepest";s.push(oa.node(u,u+l.nodeSize,{class:this.options.className}))}),Pr.create(e,s)}}})]}});var b6e=Ai.create({name:"gapCursor",addProseMirrorPlugins(){return[o6e()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Pn(Nt(e,"allowGapCursor",n)))!=null?t:null}}}),W9="placeholder";function C6e(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var S6e=Ai.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:W9,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const e=this.options.dataAttribute?`data-${C6e(this.options.dataAttribute)}`:`data-${W9}`;return[new Rr({key:new Ui("placeholder"),props:{decorations:({doc:t,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,s=[];if(!r)return null;const a=this.editor.isEmpty;return t.descendants((o,l)=>{const u=i>=l&&i<=l+o.nodeSize,d=!o.isLeaf&&v5(o);if((u||!this.options.showOnlyCurrent)&&d){const A=[this.options.emptyNodeClass];a&&A.push(this.options.emptyEditorClass);const f=oa.node(l,l+o.nodeSize,{class:A.join(" "),[e]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:l,hasAnchor:u}):this.options.placeholder});s.push(f)}return this.options.includeChildren}),Pr.create(t,s)}}})]}});Ai.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:e,options:t}=this;return[new Rr({key:new Ui("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||ice(n.selection)||e.view.dragging?null:Pr.create(n.doc,[oa.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function q9({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}var B6e=Ai.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;const t=new Ui(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new Rr({key:t,appendTransaction:(i,s,a)=>{const{doc:o,tr:l,schema:u}=a,d=t.getState(a),A=o.content.size,f=u.nodes[n];if(d)return l.insert(A,f.create())},state:{init:(i,s)=>{const a=s.tr.doc.lastChild;return!q9({node:a,types:r})},apply:(i,s)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return s;const a=i.doc.lastChild;return!q9({node:a,types:r})}}})]}}),_6e=Ai.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>iue(e,t),redo:()=>({state:e,dispatch:t})=>sue(e,t)}},addProseMirrorPlugins(){return[x6e(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),k6e=Ai.create({name:"starterKit",addExtensions(){var e,t,n,r;const i=[];return this.options.bold!==!1&&i.push(XUe.configure(this.options.bold)),this.options.blockquote!==!1&&i.push(KUe.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(zce.configure(this.options.bulletList)),this.options.code!==!1&&i.push(eDe.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(rDe.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(iDe.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(w6e.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(b6e.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(sDe.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(aDe.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(_6e.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(oDe.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(ADe.configure(this.options.italic)),this.options.listItem!==!1&&i.push(Vce.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(Xce.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&i.push($ce.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&i.push(Zce.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(XDe.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(e6e.configure(this.options.strike)),this.options.text!==!1&&i.push(t6e.configure(this.options.text)),this.options.underline!==!1&&i.push(n6e.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&i.push(B6e.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),E6e=k6e,N6e=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,j6e=ya.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Yr(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,r,i,s,a;const o=(n=(t=e.attrs)==null?void 0:t.src)!=null?n:"",l=(i=(r=e.attrs)==null?void 0:r.alt)!=null?i:"",u=(a=(s=e.attrs)==null?void 0:s.title)!=null?a:"";return u?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:s,HTMLAttributes:a,editor:o})=>{const l=document.createElement("img");Object.entries(a).forEach(([A,f])=>{if(f!=null)switch(A){case"width":case"height":break;default:l.setAttribute(A,f);break}}),l.src=a.src;const u=new ERe({element:l,editor:o,node:i,getPos:s,onResize:(A,f)=>{l.style.width=`${A}px`,l.style.height=`${f}px`},onCommit:(A,f)=>{const h=s();h!==void 0&&this.editor.chain().setNodeSelection(h).updateAttributes(this.name,{width:A,height:f}).run()},onUpdate:(A,f,h)=>A.type===i.type,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:r===!0}}),d=u.dom;return d.style.visibility="hidden",d.style.pointerEvents="none",l.onload=()=>{d.style.visibility="",d.style.pointerEvents=""},u}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[bce({find:N6e,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),T6e=j6e,P6e=/^((?:https?:)?\/\/)?((?:www|m|music)\.)?((?:youtube\.com|youtu\.be|youtube-nocookie\.com))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/,I6e=/^((?:https?:)?\/\/)?((?:www|m|music)\.)?((?:youtube\.com|youtu\.be|youtube-nocookie\.com))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/g,aue=e=>e.match(P6e),G9=(e,t)=>t?"https://www.youtube-nocookie.com/embed/videoseries?list=":e?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",O6e=e=>{const{url:t,allowFullscreen:n,autoplay:r,ccLanguage:i,ccLoadPolicy:s,controls:a,disableKBcontrols:o,enableIFrameApi:l,endTime:u,interfaceLanguage:d,ivLoadPolicy:A,loop:f,modestBranding:h,nocookie:p,origin:m,playlist:g,progressBarColor:y,startAt:v,rel:x}=e;if(!aue(t))return null;if(t.includes("/embed/"))return t;if(t.includes("youtu.be")){const N=t.split("/").pop();return N?`${G9(p)}${N}`:null}const w=/(?:(v|list)=|shorts\/)([-\w]+)/gm.exec(t);if(!w||!w[2])return null;let B=`${G9(p,w[1]==="list")}${w[2]}`;const k=[];return n===!1&&k.push("fs=0"),r&&k.push("autoplay=1"),i&&k.push(`cc_lang_pref=${i}`),s&&k.push("cc_load_policy=1"),a||k.push("controls=0"),o&&k.push("disablekb=1"),l&&k.push("enablejsapi=1"),u&&k.push(`end=${u}`),d&&k.push(`hl=${d}`),A&&k.push(`iv_load_policy=${A}`),f&&k.push("loop=1"),h&&k.push("modestbranding=1"),m&&k.push(`origin=${m}`),g&&k.push(`playlist=${g}`),v&&k.push(`start=${v}`),y&&k.push(`color=${y}`),x!==void 0&&k.push(`rel=${x}`),k.length&&(B+=`${w[1]==="list"?"&":"?"}${k.join("&")}`),B},F6e=ya.create({name:"youtube",addOptions(){return{addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640,rel:1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML(){return[{tag:"div[data-youtube-video] iframe"}]},addCommands(){return{setYoutubeVideo:e=>({commands:t})=>aue(e.src)?t.insertContent({type:this.name,attrs:e}):!1}},addPasteRules(){return this.options.addPasteHandler?[MRe({find:I6e,type:this.type,getAttributes:e=>({src:e.input})})]:[]},renderHTML({HTMLAttributes:e}){const t=O6e({url:e.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:e.start||0,rel:this.options.rel});return e.src=t,["div",{"data-youtube-video":""},["iframe",Yr(this.options.HTMLAttributes,{width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,rel:this.options.rel},e)]]},...Cce({nodeName:"youtube",allowedAttributes:["src","width","height","start"]})}),M6e=F6e,L6e=S6e;async function oue(e,t=1200,n=1200,r=.85){return new Promise((i,s)=>{const a=new Image,o=URL.createObjectURL(e);a.onload=()=>{URL.revokeObjectURL(o);let{width:l,height:u}=a;if(l>t||u>n){const f=Math.min(t/l,n/u);l=Math.round(l*f),u=Math.round(u*f)}const d=document.createElement("canvas");d.width=l,d.height=u;const A=d.getContext("2d");if(!A){s(new Error("Could not get canvas context"));return}A.drawImage(a,0,0,l,u),d.toBlob(f=>{if(!f){s(new Error("Could not compress image"));return}const h=new File([f],e.name.replace(/\.[^.]+$/,".webp"),{type:"image/webp"});i(h)},"image/webp",r)},a.onerror=()=>{URL.revokeObjectURL(o),s(new Error("Failed to load image"))},a.src=o})}async function R6e(e){const t=await oue(e),r=`images/${`${Date.now()}-${t.name}`}`,{error:i}=await Re.storage.from("blog-assets").upload(r,t,{contentType:t.type,upsert:!1});if(i)throw i;const{data:s}=Re.storage.from("blog-assets").getPublicUrl(r);return s.publicUrl}async function U6e(e){const t=await oue(e,1600,900,.9),r=`featured/${`${Date.now()}-${t.name}`}`,{error:i}=await Re.storage.from("blog-assets").upload(r,t,{contentType:t.type,upsert:!1});if(i)throw i;const{data:s}=Re.storage.from("blog-assets").getPublicUrl(r);return s.publicUrl}var S5="Popover",[lue,dkt]=zs(S5,[D0]),p2=D0(),[D6e,Uh]=lue(S5),cue=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:a=!1}=e,o=p2(t),l=S.useRef(null),[u,d]=S.useState(!1),[A,f]=wo({prop:r,defaultProp:i??!1,onChange:s,caller:S5});return c.jsx(NU,{...o,children:c.jsx(D6e,{scope:t,contentId:il(),triggerRef:l,open:A,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(h=>!h),[f]),hasCustomAnchor:u,onCustomAnchorAdd:S.useCallback(()=>d(!0),[]),onCustomAnchorRemove:S.useCallback(()=>d(!1),[]),modal:a,children:n})})};cue.displayName=S5;var uue="PopoverAnchor",Q6e=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Uh(uue,n),s=p2(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:o}=i;return S.useEffect(()=>(a(),()=>o()),[a,o]),c.jsx(FN,{...s,...r,ref:t})});Q6e.displayName=uue;var due="PopoverTrigger",Aue=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Uh(due,n),s=p2(n),a=tn(t,i.triggerRef),o=c.jsx(_t.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":gue(i.open),...r,ref:a,onClick:at(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?o:c.jsx(FN,{asChild:!0,...s,children:o})});Aue.displayName=due;var O6="PopoverPortal",[H6e,$6e]=lue(O6,{forceMount:void 0}),hue=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,s=Uh(O6,t);return c.jsx(H6e,{scope:t,forceMount:n,children:c.jsx(ga,{present:n||s.open,children:c.jsx(X1,{asChild:!0,container:i,children:r})})})};hue.displayName=O6;var r0="PopoverContent",fue=S.forwardRef((e,t)=>{const n=$6e(r0,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,s=Uh(r0,e.__scopePopover);return c.jsx(ga,{present:r||s.open,children:s.modal?c.jsx(V6e,{...i,ref:t}):c.jsx(K6e,{...i,ref:t})})});fue.displayName=r0;var z6e=jp("PopoverContent.RemoveScroll"),V6e=S.forwardRef((e,t)=>{const n=Uh(r0,e.__scopePopover),r=S.useRef(null),i=tn(t,r),s=S.useRef(!1);return S.useEffect(()=>{const a=r.current;if(a)return LD(a)},[]),c.jsx(s5,{as:z6e,allowPinchZoom:!0,children:c.jsx(pue,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:at(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),s.current||(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:at(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0,u=o.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:at(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),K6e=S.forwardRef((e,t)=>{const n=Uh(r0,e.__scopePopover),r=S.useRef(!1),i=S.useRef(!1);return c.jsx(pue,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,o;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),pue=S.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...A}=e,f=Uh(r0,n),h=p2(n);return MD(),c.jsx(r5,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:c.jsx(F0,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(jU,{"data-state":gue(f.open),role:"dialog",id:f.contentId,...h,...A,ref:t,style:{...A.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),mue="PopoverClose",W6e=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Uh(mue,n);return c.jsx(_t.button,{type:"button",...r,ref:t,onClick:at(e.onClick,()=>i.onOpenChange(!1))})});W6e.displayName=mue;var q6e="PopoverArrow",G6e=S.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=p2(n);return c.jsx(TU,{...i,...r,ref:t})});G6e.displayName=q6e;function gue(e){return e?"open":"closed"}var Y6e=cue,X6e=Aue,J6e=hue,yue=fue;const FF=Y6e,MF=X6e,Uk=S.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>c.jsx(J6e,{children:c.jsx(yue,{ref:i,align:t,sideOffset:n,className:pt("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",e),...r})}));Uk.displayName=yue.displayName;const Za=({onClick:e,isActive:t,children:n,title:r})=>c.jsx(Be,{type:"button",variant:t?"default":"ghost",size:"icon",className:"h-8 w-8",onClick:e,title:r,children:n}),Z6e=({content:e,onChange:t})=>{const{toast:n}=Ih(),r=S.useRef(null),[i,s]=S.useState(""),[a,o]=S.useState(""),l=QUe({extensions:[E6e,T6e.configure({inline:!1,allowBase64:!1}),M6e.configure({width:640,height:360}),LDe.configure({openOnClick:!1,autolink:!0}),L6e.configure({placeholder:"Start writing your post…"})],content:e,onUpdate:({editor:f})=>{t(f.getHTML())}}),u=S.useCallback(async f=>{var p;const h=(p=f.target.files)==null?void 0:p[0];if(!(!h||!l)){try{n({title:"Uploading image…"});const m=await R6e(h);l.chain().focus().setImage({src:m}).run(),n({title:"Image uploaded"})}catch(m){n({variant:"destructive",title:"Upload failed",description:m instanceof Error?m.message:"Unknown error"})}r.current&&(r.current.value="")}},[l,n]),d=S.useCallback(()=>{!l||!i||(l.commands.setYoutubeVideo({src:i}),s(""))},[l,i]),A=S.useCallback(()=>{!l||!a||(l.chain().focus().setLink({href:a}).run(),o(""))},[l,a]);return l?c.jsxs("div",{className:"border border-input rounded-md overflow-hidden",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-0.5 p-2 border-b border-input bg-muted/50",children:[c.jsx(Za,{onClick:()=>l.chain().focus().toggleBold().run(),isActive:l.isActive("bold"),title:"Bold",children:c.jsx(Kwe,{className:"h-4 w-4"})}),c.jsx(Za,{onClick:()=>l.chain().focus().toggleItalic().run(),isActive:l.isActive("italic"),title:"Italic",children:c.jsx(fbe,{className:"h-4 w-4"})}),c.jsx(Za,{onClick:()=>l.chain().focus().toggleCode().run(),isActive:l.isActive("code"),title:"Code",children:c.jsx(ebe,{className:"h-4 w-4"})}),c.jsx("div",{className:"w-px h-6 bg-border mx-1"}),c.jsx(Za,{onClick:()=>l.chain().focus().toggleHeading({level:1}).run(),isActive:l.isActive("heading",{level:1}),title:"Heading 1",children:c.jsx(cbe,{className:"h-4 w-4"})}),c.jsx(Za,{onClick:()=>l.chain().focus().toggleHeading({level:2}).run(),isActive:l.isActive("heading",{level:2}),title:"Heading 2",children:c.jsx(ube,{className:"h-4 w-4"})}),c.jsx(Za,{onClick:()=>l.chain().focus().toggleHeading({level:3}).run(),isActive:l.isActive("heading",{level:3}),title:"Heading 3",children:c.jsx(dbe,{className:"h-4 w-4"})}),c.jsx("div",{className:"w-px h-6 bg-border mx-1"}),c.jsx(Za,{onClick:()=>l.chain().focus().toggleBulletList().run(),isActive:l.isActive("bulletList"),title:"Bullet List",children:c.jsx(vbe,{className:"h-4 w-4"})}),c.jsx(Za,{onClick:()=>l.chain().focus().toggleOrderedList().run(),isActive:l.isActive("orderedList"),title:"Ordered List",children:c.jsx(gbe,{className:"h-4 w-4"})}),c.jsx(Za,{onClick:()=>l.chain().focus().toggleBlockquote().run(),isActive:l.isActive("blockquote"),title:"Blockquote",children:c.jsx(Sbe,{className:"h-4 w-4"})}),c.jsx(Za,{onClick:()=>l.chain().focus().setHorizontalRule().run(),title:"Horizontal Rule",children:c.jsx(Cne,{className:"h-4 w-4"})}),c.jsx("div",{className:"w-px h-6 bg-border mx-1"}),c.jsx(Za,{onClick:()=>{var f;return(f=r.current)==null?void 0:f.click()},title:"Insert Image",children:c.jsx(hU,{className:"h-4 w-4"})}),c.jsx("input",{ref:r,type:"file",accept:"image/*",className:"hidden",onChange:u}),c.jsxs(FF,{children:[c.jsx(MF,{asChild:!0,children:c.jsx(Be,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8",title:"YouTube",children:c.jsx(Nne,{className:"h-4 w-4"})})}),c.jsx(Uk,{className:"w-80",children:c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Ct,{placeholder:"YouTube URL",value:i,onChange:f=>s(f.target.value)}),c.jsx(Be,{type:"button",size:"sm",onClick:d,children:"Add"})]})})]}),c.jsxs(FF,{children:[c.jsx(MF,{asChild:!0,children:c.jsx(Be,{type:"button",variant:l.isActive("link")?"default":"ghost",size:"icon",className:"h-8 w-8",title:"Link",children:c.jsx(bne,{className:"h-4 w-4"})})}),c.jsx(Uk,{className:"w-80",children:c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Ct,{placeholder:"https://...",value:a,onChange:f=>o(f.target.value)}),c.jsx(Be,{type:"button",size:"sm",onClick:A,children:"Add"})]})})]}),c.jsx("div",{className:"w-px h-6 bg-border mx-1"}),c.jsx(Za,{onClick:()=>l.chain().focus().undo().run(),title:"Undo",children:c.jsx(Tbe,{className:"h-4 w-4"})}),c.jsx(Za,{onClick:()=>l.chain().focus().redo().run(),title:"Redo",children:c.jsx(Bbe,{className:"h-4 w-4"})})]}),c.jsx(Nce,{editor:l,className:`prose prose-lg max-w-none p-4 min-h-[300px] focus-within:outline-none
prose-headings:font-serif prose-headings:font-medium
prose-p:text-foreground prose-a:text-accent
[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[280px]
[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground
[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]
[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left
[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0
[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none`})]}):null},eQe=({value:e,onChange:t})=>{const{toast:n}=Ih(),[r,i]=S.useState(!1),[s,a]=S.useState(!1),[o,l]=S.useState(""),[u,d]=S.useState(!1),A=S.useCallback(async p=>{if(!p.type.startsWith("image/")){n({variant:"destructive",title:"Please select an image file"});return}i(!0);try{const m=await U6e(p);t(m),n({title:"Featured image uploaded"})}catch(m){n({variant:"destructive",title:"Upload failed",description:m instanceof Error?m.message:"Unknown error"})}i(!1)},[t,n]),f=S.useCallback(p=>{p.preventDefault(),d(!1);const m=p.dataTransfer.files[0];m&&A(m)},[A]),h=()=>{o.trim()&&(t(o.trim()),l(""),a(!1))};return e?c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{children:"Featured Image"}),c.jsxs("div",{className:"relative group",children:[c.jsx("img",{src:e,alt:"Featured",className:"w-full aspect-[16/9] object-cover border border-input rounded-md"}),c.jsx(Be,{type:"button",variant:"destructive",size:"icon",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>t(""),children:c.jsx(Da,{className:"h-4 w-4"})})]})]}):c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{children:"Featured Image"}),c.jsxs("div",{className:`border-2 border-dashed rounded-md p-8 text-center transition-colors ${u?"border-accent bg-accent/10":"border-input hover:border-muted-foreground"}`,onDragOver:p=>{p.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:f,children:[c.jsx(hU,{className:"h-10 w-10 mx-auto mb-3 text-muted-foreground"}),c.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:r?"Uploading…":"Drag & drop an image or"}),c.jsxs("div",{className:"flex items-center justify-center gap-2",children:[c.jsxs(Be,{type:"button",variant:"outline",size:"sm",disabled:r,onClick:()=>{const p=document.createElement("input");p.type="file",p.accept="image/*",p.onchange=m=>{var y;const g=(y=m.target.files)==null?void 0:y[0];g&&A(g)},p.click()},children:[c.jsx(Ene,{className:"h-4 w-4 mr-1"}),"Upload"]}),c.jsxs(Be,{type:"button",variant:"outline",size:"sm",onClick:()=>a(!s),children:[c.jsx(bne,{className:"h-4 w-4 mr-1"}),"URL"]})]}),s&&c.jsxs("div",{className:"flex gap-2 mt-4 max-w-md mx-auto",children:[c.jsx(Ct,{placeholder:"https://...",value:o,onChange:p=>l(p.target.value)}),c.jsx(Be,{type:"button",size:"sm",onClick:h,children:"Set"})]})]})]})},tQe=[{term:"white neighborhood",severity:"critical"},{term:"black neighborhood",severity:"critical"},{term:"hispanic area",severity:"critical"},{term:"asian community",severity:"critical"},{term:"segregated",severity:"critical"},{term:"ethnic neighborhood",severity:"critical"},{term:"minority area",severity:"critical"},{term:"colored",severity:"critical"},{term:"exclusive community",severity:"warning"},{term:"private neighborhood",severity:"warning"},{term:"christian neighborhood",severity:"critical"},{term:"jewish area",severity:"critical"},{term:"muslim community",severity:"critical"},{term:"near churches",severity:"warning"},{term:"near synagogues",severity:"warning"},{term:"near mosques",severity:"warning"},{term:"church community",severity:"warning"},{term:"bachelor pad",severity:"warning"},{term:"man cave",severity:"warning"},{term:"master bedroom",severity:"warning"},{term:"no children",severity:"critical"},{term:"adults only",severity:"critical"},{term:"no kids",severity:"critical"},{term:"adult community",severity:"warning"},{term:"perfect for singles",severity:"warning"},{term:"not suitable for families",severity:"critical"},{term:"ideal for young couples",severity:"warning"},{term:"traditional family",severity:"warning"},{term:"best schools for families",severity:"warning"},{term:"great school district",severity:"warning"},{term:"best school district",severity:"warning"},{term:"perfect for retirees",severity:"warning"},{term:"retirees only",severity:"critical"},{term:"handicapped",severity:"critical"},{term:"crippled",severity:"critical"},{term:"wheelchair bound",severity:"critical"},{term:"mentally ill",severity:"critical"},{term:"crazy neighborhood",severity:"critical"},{term:"able-bodied",severity:"warning"},{term:"walking distance",severity:"warning"},{term:"young professionals only",severity:"critical"},{term:"no elderly",severity:"critical"}],nQe=["perfect for families like yours","you would fit in","people like you","your kind of neighborhood","best area for your type","you'll love it here","great for your family","ideal neighborhood for you","you belong here","your type of community"],Y9={"exclusive community":"established community","private neighborhood":"well-maintained neighborhood","walking distance":"nearby amenities within a walkable neighborhood","master bedroom":"primary bedroom","bachelor pad":"studio or one-bedroom home","man cave":"bonus room or flex space","adult community":"age-qualified community (if legally designated)","perfect for singles":"ideal for independent living","ideal for young couples":"great for those starting out","traditional family":"diverse community","best schools for families":"sought-after school district","great school district":"sought-after school district","best school district":"sought-after school district","perfect for retirees":"low-maintenance living","able-bodied":"accessible features available","church community":"established community with local amenities","near churches":"near community gathering places","near synagogues":"near community gathering places","near mosques":"near community gathering places",handicapped:"accessible","wheelchair bound":"wheelchair user","you'll love it here":"a community many find appealing","great for your family":"a neighborhood with broad appeal","ideal neighborhood for you":"a neighborhood worth exploring"};function Bh(e){const t=[],n=e.toLowerCase();for(const{term:r,severity:i}of tQe){const s=n.indexOf(r);if(s!==-1){const a=Math.max(0,s-30),o=Math.min(e.length,s+r.length+30),l=Y9[r];t.push({term:r,context:`...${e.slice(a,o)}...`,severity:i,suggestion:l?`Replace "${r}" with "${l}".`:`Remove or rephrase "${r}" — it may violate Fair Housing Act protections.`})}}for(const r of nQe){const i=n.indexOf(r);if(i!==-1){const s=Math.max(0,i-30),a=Math.min(e.length,i+r.length+30),o=Y9[r];t.push({term:r,context:`...${e.slice(s,a)}...`,severity:"warning",suggestion:o?`Replace with "${o}".`:`"${r}" could be interpreted as steering. Use neutral, inclusive language.`})}}return t}function vue(e){return e.some(t=>t.severity==="critical")}const xue=({violations:e})=>{if(e.length===0)return null;const t=e.filter(r=>r.severity==="critical"),n=e.filter(r=>r.severity==="warning");return c.jsxs("div",{className:"border border-destructive/40 bg-destructive/5 rounded p-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-destructive",children:[c.jsx(Pp,{className:"w-4 h-4"}),"Fair Housing Compliance (",e.length," issue",e.length!==1?"s":"",")"]}),t.map((r,i)=>c.jsxs("div",{className:"flex items-start gap-2 text-sm border-l-2 border-destructive pl-3",children:[c.jsx(e2,{className:"w-3.5 h-3.5 mt-0.5 text-destructive shrink-0"}),c.jsxs("div",{children:[c.jsxs("span",{className:"font-medium",children:['"',r.term,'"']}),c.jsxs("span",{className:"text-muted-foreground ml-1",children:["— ",r.suggestion]})]})]},`c-${i}`)),n.map((r,i)=>c.jsxs("div",{className:"flex items-start gap-2 text-sm border-l-2 border-yellow-500 pl-3",children:[c.jsx(Pp,{className:"w-3.5 h-3.5 mt-0.5 text-yellow-600 shrink-0"}),c.jsxs("div",{children:[c.jsxs("span",{className:"font-medium",children:['"',r.term,'"']}),c.jsxs("span",{className:"text-muted-foreground ml-1",children:["— ",r.suggestion]})]})]},`w-${i}`))]})},rQe={title:"",slug:"",excerpt:"",content:"",featured_image:"",author:"Admin",category:"General",tags:"",published:!1,meta_title:"",meta_description:""};function iQe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const sQe=({initialData:e,onSubmit:t,onCancel:n,isSubmitting:r,isEditing:i})=>{const[s,a]=S.useState(e||rQe),[o,l]=S.useState(!i),[u,d]=S.useState([]);S.useEffect(()=>{e&&a(e)},[e]);const A=h=>{a(p=>({...p,title:h,slug:o?iQe(h):p.slug}))},f=h=>{h.preventDefault();const p=`${s.title} ${s.excerpt} ${s.content}`,m=Bh(p);d(m),!(s.published&&vue(m))&&t(s)};return c.jsxs("form",{onSubmit:f,className:"space-y-6",children:[c.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"editor-title",children:"Title *"}),c.jsx(Ct,{id:"editor-title",value:s.title,onChange:h=>A(h.target.value),required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"editor-slug",children:"Slug"}),c.jsx(Ct,{id:"editor-slug",value:s.slug,onChange:h=>{l(!1),a({...s,slug:h.target.value})},placeholder:"auto-generated-from-title"})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"editor-excerpt",children:"Excerpt"}),c.jsx(ql,{id:"editor-excerpt",value:s.excerpt,onChange:h=>a({...s,excerpt:h.target.value}),rows:2,placeholder:"A brief summary of the post…"})]}),c.jsx(eQe,{value:s.featured_image,onChange:h=>a({...s,featured_image:h})}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{children:"Content *"}),c.jsx(Z6e,{content:s.content,onChange:h=>a({...s,content:h})})]}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"editor-author",children:"Author"}),c.jsx(Ct,{id:"editor-author",value:s.author,onChange:h=>a({...s,author:h.target.value})})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"editor-category",children:"Category"}),c.jsx(Ct,{id:"editor-category",value:s.category,onChange:h=>a({...s,category:h.target.value})})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"editor-tags",children:"Tags (comma-separated)"}),c.jsx(Ct,{id:"editor-tags",value:s.tags,onChange:h=>a({...s,tags:h.target.value}),placeholder:"real estate, market, tips"})]}),c.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"editor-meta-title",children:"Meta Title"}),c.jsx(Ct,{id:"editor-meta-title",value:s.meta_title,onChange:h=>a({...s,meta_title:h.target.value}),placeholder:"SEO title (uses post title if empty)"})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"editor-meta-desc",children:"Meta Description"}),c.jsx(Ct,{id:"editor-meta-desc",value:s.meta_description,onChange:h=>a({...s,meta_description:h.target.value}),placeholder:"SEO description…"})]})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(rc,{id:"editor-published",checked:s.published,onCheckedChange:h=>a({...s,published:h})}),c.jsx(bn,{htmlFor:"editor-published",children:"Publish immediately"})]}),c.jsx(xue,{violations:u}),c.jsxs("div",{className:"flex justify-end gap-4",children:[c.jsx(Be,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),c.jsx(Be,{type:"submit",disabled:r,children:r?"Saving…":i?"Update Post":"Create Post"})]})]})};var wue="AlertDialog",[aQe,Akt]=zs(wue,[qae]),Sd=qae(),bue=e=>{const{__scopeAlertDialog:t,...n}=e,r=Sd(t);return c.jsx(uoe,{...r,...n,modal:!0})};bue.displayName=wue;var oQe="AlertDialogTrigger",lQe=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Sd(n);return c.jsx(oOe,{...i,...r,ref:t})});lQe.displayName=oQe;var cQe="AlertDialogPortal",Cue=e=>{const{__scopeAlertDialog:t,...n}=e,r=Sd(t);return c.jsx(doe,{...r,...n})};Cue.displayName=cQe;var uQe="AlertDialogOverlay",Sue=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Sd(n);return c.jsx(QD,{...i,...r,ref:t})});Sue.displayName=uQe;var dy="AlertDialogContent",[dQe,AQe]=aQe(dy),hQe=Hte("AlertDialogContent"),Bue=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,s=Sd(n),a=S.useRef(null),o=tn(t,a),l=S.useRef(null);return c.jsx(rOe,{contentName:dy,titleName:_ue,docsSlug:"alert-dialog",children:c.jsx(dQe,{scope:n,cancelRef:l,children:c.jsxs(HD,{role:"alertdialog",...s,...i,ref:o,onOpenAutoFocus:at(i.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[c.jsx(hQe,{children:r}),c.jsx(pQe,{contentRef:a})]})})})});Bue.displayName=dy;var _ue="AlertDialogTitle",kue=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Sd(n);return c.jsx($D,{...i,...r,ref:t})});kue.displayName=_ue;var Eue="AlertDialogDescription",Nue=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Sd(n);return c.jsx(zD,{...i,...r,ref:t})});Nue.displayName=Eue;var fQe="AlertDialogAction",jue=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Sd(n);return c.jsx(VD,{...i,...r,ref:t})});jue.displayName=fQe;var Tue="AlertDialogCancel",Pue=S.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=AQe(Tue,n),s=Sd(n),a=tn(t,i);return c.jsx(VD,{...s,...r,ref:a})});Pue.displayName=Tue;var pQe=({contentRef:e})=>{const t=`\`${dy}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${dy}\` by passing a \`${Eue}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${dy}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return S.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},mQe=bue,gQe=Cue,Iue=Sue,Oue=Bue,Fue=jue,Mue=Pue,Lue=kue,Rue=Nue;const Dk=mQe,yQe=gQe,Uue=S.forwardRef(({className:e,...t},n)=>c.jsx(Iue,{className:pt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Uue.displayName=Iue.displayName;const Hb=S.forwardRef(({className:e,...t},n)=>c.jsxs(yQe,{children:[c.jsx(Uue,{}),c.jsx(Oue,{ref:n,className:pt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Hb.displayName=Oue.displayName;const $b=({className:e,...t})=>c.jsx("div",{className:pt("flex flex-col space-y-2 text-center sm:text-left",e),...t});$b.displayName="AlertDialogHeader";const zb=({className:e,...t})=>c.jsx("div",{className:pt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zb.displayName="AlertDialogFooter";const Vb=S.forwardRef(({className:e,...t},n)=>c.jsx(Lue,{ref:n,className:pt("text-lg font-semibold",e),...t}));Vb.displayName=Lue.displayName;const Kb=S.forwardRef(({className:e,...t},n)=>c.jsx(Rue,{ref:n,className:pt("text-sm text-muted-foreground",e),...t}));Kb.displayName=Rue.displayName;const Ay=S.forwardRef(({className:e,...t},n)=>c.jsx(Fue,{ref:n,className:pt(FD(),e),...t}));Ay.displayName=Fue.displayName;const Wb=S.forwardRef(({className:e,...t},n)=>c.jsx(Mue,{ref:n,className:pt(FD({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Wb.displayName=Mue.displayName;const vQe=()=>{const e=wd(),{toast:t}=Ih(),{user:n,isLoading:r,isAdmin:i,signOut:s}=n5(),[a,o]=S.useState(""),[l,u]=S.useState(!1),[d,A]=S.useState(!1),[f,h]=S.useState(null),[p,m]=S.useState(null),{data:g,isLoading:y,error:v,refetch:x}=_Pe(),b=kPe(),w=EPe(),B=NPe();S.useEffect(()=>{const D=localStorage.getItem("blog_api_key");D&&(o(D),u(!0))},[]),S.useEffect(()=>{!r&&!n?e("/auth"):!r&&n&&!i&&(t({variant:"destructive",title:"Access Denied",description:"You don't have permission to access this page."}),e("/"))},[n,r,i,e,t]);const k=()=>{localStorage.setItem("blog_api_key",a),u(!0),x(),t({title:"API Key Saved",description:"Your API key has been saved locally."})},N=()=>{h(null),A(!0)},j=D=>{h(D),A(!0)},L=D=>{var H;return{title:D.title,slug:D.slug,excerpt:D.excerpt||"",content:D.content,featured_image:D.featured_image||"",author:D.author,category:D.category,tags:((H=D.tags)==null?void 0:H.join(", "))||"",published:D.published,meta_title:D.meta_title||"",meta_description:D.meta_description||""}},T=async D=>{const H={title:D.title,slug:D.slug||void 0,excerpt:D.excerpt||void 0,content:D.content,featured_image:D.featured_image||void 0,author:D.author||"Admin",category:D.category||"General",tags:D.tags?D.tags.split(",").map(q=>q.trim()):[],published:D.published,meta_title:D.meta_title||void 0,meta_description:D.meta_description||void 0};try{f?(await w.mutateAsync({slug:f.slug,data:H}),t({title:"Post updated successfully"})):(await b.mutateAsync(H),t({title:"Post created successfully"})),A(!1),h(null)}catch(q){t({variant:"destructive",title:"Error",description:q instanceof Error?q.message:"Something went wrong"})}},E=async()=>{if(p)try{await B.mutateAsync(p),t({title:"Post deleted successfully"}),m(null)}catch(D){t({variant:"destructive",title:"Error",description:D instanceof Error?D.message:"Failed to delete post"})}},F=async D=>{try{await w.mutateAsync({slug:D.slug,data:{published:!D.published}}),t({title:D.published?"Post unpublished":"Post published"})}catch(H){t({variant:"destructive",title:"Error",description:H instanceof Error?H.message:"Failed to update post"})}},M=async()=>{await s(),e("/auth")};return r?c.jsx(En,{children:c.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:c.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Loading..."})})}):!n||!i?null:c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Blog Admin | Holden Richardson"}),c.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),c.jsx("div",{className:"section-padding",children:c.jsxs("div",{className:"container-page",children:[c.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4 mb-8",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"heading-section",children:"Blog Admin"}),c.jsx("p",{className:"text-muted-foreground mt-2",children:"Manage your blog posts"})]}),c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsxs(Be,{variant:"outline",size:"sm",onClick:()=>e("/admin/profile"),children:[c.jsx(gU,{className:"w-4 h-4 mr-2"}),"Profile"]}),c.jsxs(Be,{variant:"outline",size:"sm",onClick:M,children:[c.jsx(wbe,{className:"w-4 h-4 mr-2"}),"Sign Out"]})]})]}),!l&&c.jsxs(mr,{className:"mb-8",children:[c.jsx(Ta,{children:c.jsxs(Pa,{className:"flex items-center gap-2",children:[c.jsx(pU,{className:"w-5 h-5"}),"API Key Setup"]})}),c.jsxs(gr,{children:[c.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Enter your BLOG_API_KEY to manage posts. This will be stored locally in your browser."}),c.jsxs("div",{className:"flex gap-4",children:[c.jsx(Ct,{type:"password",placeholder:"Enter your BLOG_API_KEY",value:a,onChange:D=>o(D.target.value),className:"max-w-md"}),c.jsx(Be,{onClick:k,children:"Save Key"})]})]})]}),l&&c.jsxs(mr,{children:[c.jsxs(Ta,{className:"flex flex-row items-center justify-between",children:[c.jsx(Pa,{children:"Posts"}),c.jsxs(Be,{onClick:N,children:[c.jsx(Tp,{className:"w-4 h-4 mr-2"}),"New Post"]})]}),c.jsxs(gr,{children:[y&&c.jsx("div",{className:"space-y-4",children:[...Array(5)].map((D,H)=>c.jsx(jt,{className:"h-16 w-full"},H))}),v&&c.jsxs("div",{className:"text-center py-8",children:[c.jsx("p",{className:"text-destructive mb-4",children:"Failed to load posts. Check your API key."}),c.jsx(Be,{variant:"outline",onClick:()=>u(!1),children:"Update API Key"})]}),!y&&!v&&g&&c.jsxs(KD,{children:[c.jsx(WD,{children:c.jsxs(oy,{children:[c.jsx(_a,{children:"Title"}),c.jsx(_a,{children:"Category"}),c.jsx(_a,{children:"Status"}),c.jsx(_a,{children:"Date"}),c.jsx(_a,{className:"text-right",children:"Actions"})]})}),c.jsxs(qD,{children:[g.length===0&&c.jsx(oy,{children:c.jsx(ia,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"No posts yet. Create your first post!"})}),g.map(D=>c.jsxs(oy,{children:[c.jsx(ia,{className:"font-medium",children:D.title}),c.jsx(ia,{children:D.category}),c.jsx(ia,{children:c.jsx("span",{className:`inline-flex items-center gap-1 px-2 py-1 text-xs rounded ${D.published?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200"}`,children:D.published?c.jsxs(c.Fragment,{children:[c.jsx(db,{className:"w-3 h-3"})," Published"]}):c.jsxs(c.Fragment,{children:[c.jsx(P8,{className:"w-3 h-3"})," Draft"]})})}),c.jsx(ia,{children:new Date(D.created_at).toLocaleDateString()}),c.jsx(ia,{className:"text-right",children:c.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c.jsx(Be,{variant:"ghost",size:"icon",onClick:()=>F(D),title:D.published?"Unpublish":"Publish",children:D.published?c.jsx(P8,{className:"w-4 h-4"}):c.jsx(db,{className:"w-4 h-4"})}),c.jsx(Be,{variant:"ghost",size:"icon",onClick:()=>j(D),children:c.jsx(Sne,{className:"w-4 h-4"})}),c.jsx(Be,{variant:"ghost",size:"icon",onClick:()=>m(D.slug),children:c.jsx(hl,{className:"w-4 h-4 text-destructive"})})]})})]},D.id))]})]})]})]})]})}),c.jsx($c,{open:d,onOpenChange:A,children:c.jsxs(Gl,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[c.jsx(Yl,{children:c.jsx(Xl,{children:f?"Edit Post":"Create New Post"})}),c.jsx(sQe,{initialData:f?L(f):void 0,onSubmit:T,onCancel:()=>A(!1),isSubmitting:b.isPending||w.isPending,isEditing:!!f})]})}),c.jsx(Dk,{open:!!p,onOpenChange:()=>m(null),children:c.jsxs(Hb,{children:[c.jsxs($b,{children:[c.jsx(Vb,{children:"Delete Post"}),c.jsx(Kb,{children:"Are you sure you want to delete this post? This action cannot be undone."})]}),c.jsxs(zb,{children:[c.jsx(Wb,{children:"Cancel"}),c.jsx(Ay,{onClick:E,className:"bg-destructive text-destructive-foreground",children:"Delete"})]})]})})]})},xQe=()=>{const e=wd(),{toast:t}=Ih(),{user:n,isLoading:r,isAdmin:i}=n5(),[s,a]=S.useState(""),[o,l]=S.useState(""),[u,d]=S.useState(""),[A,f]=S.useState(!1),[h,p]=S.useState(""),[m,g]=S.useState(!1);S.useEffect(()=>{!r&&!n?e("/auth"):!r&&n&&!i&&(t({variant:"destructive",title:"Access Denied",description:"You don't have permission to access this page."}),e("/"))},[n,r,i,e,t]),S.useEffect(()=>{const x=localStorage.getItem("blog_api_key");x&&p(x)},[]);const y=async x=>{if(x.preventDefault(),o!==u){t({variant:"destructive",title:"Passwords don't match",description:"Please make sure your new passwords match."});return}if(o.length<6){t({variant:"destructive",title:"Password too short",description:"Password must be at least 6 characters."});return}f(!0);const{error:b}=await Re.auth.updateUser({password:o});b?t({variant:"destructive",title:"Failed to update password",description:b.message}):(t({title:"Password updated",description:"Your password has been changed successfully."}),a(""),l(""),d("")),f(!1)},v=()=>{localStorage.setItem("blog_api_key",h),t({title:"API Key updated",description:"Your API key has been saved locally."})};return r?c.jsx(En,{children:c.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:c.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Loading..."})})}):!n||!i?null:c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Profile Settings | Holden Richardson | 616 Realty"}),c.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),c.jsx("div",{className:"section-padding",children:c.jsxs("div",{className:"container-page max-w-2xl",children:[c.jsxs(Be,{variant:"ghost",onClick:()=>e("/admin/blog"),className:"mb-6",children:[c.jsx(Z1,{className:"w-4 h-4 mr-2"}),"Back to Blog Admin"]}),c.jsx("h1",{className:"heading-section mb-8",children:"Profile Settings"}),c.jsxs(mr,{className:"mb-8",children:[c.jsxs(Ta,{children:[c.jsx(Pa,{children:"Account Information"}),c.jsx(sy,{children:"Your account details"})]}),c.jsx(gr,{children:c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(bn,{className:"text-muted-foreground",children:"Email"}),c.jsx("p",{className:"text-foreground",children:n.email})]}),c.jsxs("div",{children:[c.jsx(bn,{className:"text-muted-foreground",children:"User ID"}),c.jsx("p",{className:"text-foreground font-mono text-sm",children:n.id})]}),c.jsxs("div",{children:[c.jsx(bn,{className:"text-muted-foreground",children:"Role"}),c.jsx("p",{className:"text-foreground",children:"Administrator"})]})]})})]}),c.jsxs(mr,{className:"mb-8",children:[c.jsxs(Ta,{children:[c.jsx(Pa,{children:"Change Password"}),c.jsx(sy,{children:"Update your password"})]}),c.jsx(gr,{children:c.jsxs("form",{onSubmit:y,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"new-password",children:"New Password"}),c.jsx(Ct,{id:"new-password",type:"password",value:o,onChange:x=>l(x.target.value),placeholder:"••••••••",required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"confirm-new-password",children:"Confirm New Password"}),c.jsx(Ct,{id:"confirm-new-password",type:"password",value:u,onChange:x=>d(x.target.value),placeholder:"••••••••",required:!0})]}),c.jsxs(Be,{type:"submit",disabled:A,children:[c.jsx(hb,{className:"w-4 h-4 mr-2"}),A?"Updating...":"Update Password"]})]})})]}),c.jsxs(mr,{children:[c.jsxs(Ta,{children:[c.jsxs(Pa,{className:"flex items-center gap-2",children:[c.jsx(pbe,{className:"w-5 h-5"}),"API Key"]}),c.jsx(sy,{children:"Your Blog API key for managing posts. This is stored locally in your browser."})]}),c.jsx(gr,{children:c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"api-key",children:"BLOG_API_KEY"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Ct,{id:"api-key",type:m?"text":"password",value:h,onChange:x=>p(x.target.value),placeholder:"Enter your API key"}),c.jsx(Be,{type:"button",variant:"outline",onClick:()=>g(!m),children:m?"Hide":"Show"})]})]}),c.jsxs(Be,{onClick:v,children:[c.jsx(hb,{className:"w-4 h-4 mr-2"}),"Save API Key"]})]})})]})]})})]})};function Due(){const{configMap:e,isLoading:t}=_o(),n=Vse(),r=e.product_tier==="aeo"?"aeo":"core";return{tier:r,isAeo:r==="aeo",isCore:r==="core",isLoading:t,setTier:s=>{n.mutate([{key:"product_tier",value:s}])}}}const wQe=[{key:"agent_name",label:"Agent Name"},{key:"agent_market",label:"Market / City"},{key:"agent_brokerage",label:"Brokerage"},{key:"agent_team",label:"Team Name"},{key:"agent_title",label:"Professional Title"},{key:"agent_phone",label:"Phone Number"},{key:"agent_email",label:"Email Address"}],bQe=[{key:"booking_url",label:"Booking URL (Calendly, etc.)",placeholder:"https://calendly.com/yourname"},{key:"site_base_url",label:"Published Site URL",placeholder:"https://www.holdengr.com"}],CQe=[{key:"about_google_business",label:"Google Business Profile",placeholder:"https://g.page/yourbusiness"},{key:"about_website",label:"Website URL",placeholder:"https://www.yoursite.com"},{key:"about_facebook",label:"Facebook",placeholder:"https://facebook.com/yourpage"},{key:"about_instagram",label:"Instagram",placeholder:"https://instagram.com/yourhandle"},{key:"about_linkedin",label:"LinkedIn",placeholder:"https://linkedin.com/in/yourprofile"},{key:"about_youtube",label:"YouTube",placeholder:"https://youtube.com/@yourchannel"},{key:"about_x",label:"X (Twitter)",placeholder:"https://x.com/yourhandle"},{key:"about_tiktok",label:"TikTok",placeholder:"https://tiktok.com/@yourhandle"},{key:"about_zillow",label:"Zillow",placeholder:"https://zillow.com/profile/yourprofile"},{key:"about_realtor",label:"Realtor.com",placeholder:"https://realtor.com/realestateagents/yourprofile"}],SQe=()=>{const{configMap:e,isLoading:t}=_o(),n=Vse(),[r,i]=S.useState({}),s={...e,...r},a=()=>{const l=Object.entries(r).map(([u,d])=>({key:u,value:d}));if(l.length===0){Xe({title:"No changes to save"});return}n.mutate(l,{onSuccess:()=>{Xe({title:"Configuration saved!"}),i({})},onError:u=>Xe({title:"Error saving",description:u.message,variant:"destructive"})})};if(t)return c.jsx("div",{className:"space-y-4",children:Array.from({length:6}).map((l,u)=>c.jsx(jt,{className:"h-10 w-full"},u))});const o=l=>c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:l.map(u=>c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(bn,{htmlFor:u.key,className:"text-xs uppercase tracking-wider",children:u.label}),c.jsx(Ct,{id:u.key,value:s[u.key]||"",onChange:d=>i(A=>({...A,[u.key]:d.target.value})),placeholder:u.placeholder||u.label,type:u.key==="agent_email"?"email":u.key==="agent_phone"?"tel":"text"})]},u.key))});return c.jsxs("div",{className:"space-y-8",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-serif text-xl mb-2",children:"Agent Identity"}),c.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Your agent details power AI-generated content and JSON-LD schema across the site."}),o(wQe)]}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-serif text-xl mb-2",children:"CTAs & Site Settings"}),c.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Configure your booking link and published site URL. The site URL is used for all JSON-LD schema, Open Graph tags, canonical links, and sitemaps."}),o(bQe)]}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-serif text-xl mb-2",children:"About & Profile Links"}),c.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Add your full profile URLs to build authority in AI models and search engines."}),o(CQe)]}),c.jsx("div",{className:"rounded-md border border-accent/30 bg-accent/5 p-4",children:c.jsxs("p",{className:"text-sm text-muted-foreground",children:[c.jsx("span",{className:"font-semibold text-foreground",children:"Follow Up Boss API Key:"})," This key is stored securely as a secret — not in this form. To add or update it, paste your API key in the Lovable chat and ask to save it as a secret."]})}),c.jsxs(Be,{onClick:a,disabled:n.isPending,className:"btn-gold border-0",children:[c.jsx(hb,{className:"w-4 h-4 mr-2"}),n.isPending?"Saving...":"Save Config"]})]})};function Dh(e){return Lr({queryKey:["aeo-categories","all"],queryFn:async()=>{let t=Re.from("aeo_categories").select("*").order("display_order");const{data:n,error:r}=await t;if(r)throw r;return n.map(i=>({...i,faq_json:i.faq_json||[],faq_title:i.faq_title||null,video_orientation:i.video_orientation||"horizontal",section_headings:i.section_headings||[],cover_image_id:i.cover_image_id||null,content_image_ids:i.content_image_ids||[],parent_id:i.parent_id||null,stats_json:i.stats_json||[]}))}})}function BQe(e){return Lr({queryKey:["aeo-subcategories",e],enabled:!!e,queryFn:async()=>{const{data:t,error:n}=await Re.from("aeo_categories").select("*").eq("parent_id",e).eq("enabled",!0).order("display_order");if(n)throw n;return t.map(r=>({...r,faq_json:r.faq_json||[],faq_title:r.faq_title||null,video_orientation:r.video_orientation||"horizontal",section_headings:r.section_headings||[],cover_image_id:r.cover_image_id||null,content_image_ids:r.content_image_ids||[],parent_id:r.parent_id||null,stats_json:r.stats_json||[]}))}})}function Ac(e){return Lr({queryKey:["aeo-pages",e],queryFn:async()=>{let t=Re.from("aeo_pages").select("*, aeo_categories!inner(*)");const{data:n,error:r}=await t.order("display_order");if(r)throw r;return n.map(i=>({...i,category:i.aeo_categories,faq_json:i.faq_json||[]}))}})}function _Qe(e,t,n){return Lr({queryKey:["aeo-page",e,n,t],enabled:!!e&&!!t,queryFn:async()=>{const r=n||e;if(n){const{data:a}=await Re.from("aeo_categories").select("id").eq("slug",e).is("parent_id",null).maybeSingle();if(!a)return null;const{data:o}=await Re.from("aeo_categories").select("id").eq("slug",n).eq("parent_id",a.id).maybeSingle();if(!o)return null;const{data:l,error:u}=await Re.from("aeo_pages").select("*, aeo_categories!inner(*)").eq("category_id",o.id).eq("slug",t).maybeSingle();if(u)throw u;return l?{...l,category:l.aeo_categories,faq_json:l.faq_json||[]}:null}const{data:i,error:s}=await Re.from("aeo_pages").select("*, aeo_categories!inner(*)").eq("aeo_categories.slug",r).eq("slug",t).maybeSingle();if(s)throw s;return i?{...i,category:i.aeo_categories,faq_json:i.faq_json||[]}:null}})}function kQe(e){return Lr({queryKey:["aeo-children",e],enabled:!!e,queryFn:async()=>{const{data:t,error:n}=await Re.from("aeo_pages").select("*, aeo_categories(*)").eq("parent_id",e).order("display_order");if(n)throw n;return t.map(r=>({...r,category:r.aeo_categories,faq_json:r.faq_json||[]}))}})}function EQe(e,t){return Lr({queryKey:["aeo-peers",e,t],enabled:!!e&&!!t,queryFn:async()=>{const{data:n,error:r}=await Re.from("aeo_pages").select("id, title, slug, h1, intro_text").eq("category_id",e).eq("status","published").neq("id",t).order("display_order");if(r)throw r;return n}})}function Que(){const e=Ji();return bs({mutationFn:async t=>{const{data:n,error:r}=await Re.from("aeo_pages").insert(t).select().single();if(r)throw r;return n},onSuccess:()=>e.invalidateQueries({queryKey:["aeo-pages"]})})}function B5(){const e=Ji();return bs({mutationFn:async({id:t,...n})=>{const{category:r,children:i,...s}=n,{data:a,error:o}=await Re.from("aeo_pages").update(s).eq("id",t).select().single();if(o)throw o;return a},onSuccess:()=>{e.invalidateQueries({queryKey:["aeo-pages"]}),e.invalidateQueries({queryKey:["aeo-page"]})}})}function Hue(){const e=Ji();return bs({mutationFn:async t=>{const{error:n}=await Re.from("aeo_pages").delete().eq("id",t);if(n)throw n},onSuccess:()=>e.invalidateQueries({queryKey:["aeo-pages"]})})}function $ue(){const e=Ji();return bs({mutationFn:async({id:t,...n})=>{const{error:r}=await Re.from("aeo_categories").update(n).eq("id",t);if(r)throw r},onSuccess:()=>e.invalidateQueries({queryKey:["aeo-categories"]})})}function NQe(){const e=Ji();return bs({mutationFn:async t=>{const{error:n}=await Re.from("aeo_categories").delete().eq("id",t);if(n)throw n},onSuccess:()=>e.invalidateQueries({queryKey:["aeo-categories"]})})}function jQe(){const e=Ji();return bs({mutationFn:async t=>{const{data:n,error:r}=await Re.from("aeo_categories").insert(t).select().single();if(r)throw r;return n},onSuccess:()=>{e.invalidateQueries({queryKey:["aeo-categories"]}),e.invalidateQueries({queryKey:["aeo-subcategories"]})}})}function LF(e,[t,n]){return Math.min(n,Math.max(t,e))}var TQe=[" ","Enter","ArrowUp","ArrowDown"],PQe=[" ","Enter"],$p="Select",[_5,k5,IQe]=EN($p),[J0,hkt]=zs($p,[IQe,D0]),E5=D0(),[OQe,Qh]=J0($p),[FQe,MQe]=J0($p),zue=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:s,value:a,defaultValue:o,onValueChange:l,dir:u,name:d,autoComplete:A,disabled:f,required:h,form:p}=e,m=E5(t),[g,y]=S.useState(null),[v,x]=S.useState(null),[b,w]=S.useState(!1),B=l2(u),[k,N]=wo({prop:r,defaultProp:i??!1,onChange:s,caller:$p}),[j,L]=wo({prop:a,defaultProp:o,onChange:l,caller:$p}),T=S.useRef(null),E=g?p||!!g.closest("form"):!0,[F,M]=S.useState(new Set),D=Array.from(F).map(H=>H.props.value).join(";");return c.jsx(NU,{...m,children:c.jsxs(OQe,{required:h,scope:t,trigger:g,onTriggerChange:y,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:b,onValueNodeHasChildrenChange:w,contentId:il(),value:j,onValueChange:L,open:k,onOpenChange:N,dir:B,triggerPointerDownPosRef:T,disabled:f,children:[c.jsx(_5.Provider,{scope:t,children:c.jsx(FQe,{scope:e.__scopeSelect,onNativeOptionAdd:S.useCallback(H=>{M(q=>new Set(q).add(H))},[]),onNativeOptionRemove:S.useCallback(H=>{M(q=>{const $=new Set(q);return $.delete(H),$})},[]),children:n})}),E?c.jsxs(fde,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:A,value:j,onChange:H=>L(H.target.value),disabled:f,form:p,children:[j===void 0?c.jsx("option",{value:""}):null,Array.from(F)]},D):null]})})};zue.displayName=$p;var Vue="SelectTrigger",Kue=S.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,s=E5(n),a=Qh(Vue,n),o=a.disabled||r,l=tn(t,a.onTriggerChange),u=k5(n),d=S.useRef("touch"),[A,f,h]=mde(m=>{const g=u().filter(x=>!x.disabled),y=g.find(x=>x.value===a.value),v=gde(g,m,y);v!==void 0&&a.onValueChange(v.value)}),p=m=>{o||(a.onOpenChange(!0),h()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return c.jsx(FN,{asChild:!0,...s,children:c.jsx(_t.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":pde(a.value)?"":void 0,...i,ref:l,onClick:at(i.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&p(m)}),onPointerDown:at(i.onPointerDown,m=>{d.current=m.pointerType;const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(p(m),m.preventDefault())}),onKeyDown:at(i.onKeyDown,m=>{const g=A.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(g&&m.key===" ")&&TQe.includes(m.key)&&(p(),m.preventDefault())})})})});Kue.displayName=Vue;var Wue="SelectValue",que=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:a="",...o}=e,l=Qh(Wue,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,A=tn(t,l.onValueNodeChange);return Ri(()=>{u(d)},[u,d]),c.jsx(_t.span,{...o,ref:A,style:{pointerEvents:"none"},children:pde(l.value)?c.jsx(c.Fragment,{children:a}):s})});que.displayName=Wue;var LQe="SelectIcon",Gue=S.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return c.jsx(_t.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});Gue.displayName=LQe;var RQe="SelectPortal",Yue=e=>c.jsx(X1,{asChild:!0,...e});Yue.displayName=RQe;var zp="SelectContent",Xue=S.forwardRef((e,t)=>{const n=Qh(zp,e.__scopeSelect),[r,i]=S.useState();if(Ri(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?Ph.createPortal(c.jsx(Jue,{scope:e.__scopeSelect,children:c.jsx(_5.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),s):null}return c.jsx(Zue,{...e,ref:t})});Xue.displayName=zp;var Fl=10,[Jue,Hh]=J0(zp),UQe="SelectContentImpl",DQe=jp("SelectContent.RemoveScroll"),Zue=S.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:o,sideOffset:l,align:u,alignOffset:d,arrowPadding:A,collisionBoundary:f,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:g,...y}=e,v=Qh(zp,n),[x,b]=S.useState(null),[w,B]=S.useState(null),k=tn(t,Z=>b(Z)),[N,j]=S.useState(null),[L,T]=S.useState(null),E=k5(n),[F,M]=S.useState(!1),D=S.useRef(!1);S.useEffect(()=>{if(x)return LD(x)},[x]),MD();const H=S.useCallback(Z=>{const[ae,...ue]=E().map(de=>de.ref.current),[se]=ue.slice(-1),Ae=document.activeElement;for(const de of Z)if(de===Ae||(de==null||de.scrollIntoView({block:"nearest"}),de===ae&&w&&(w.scrollTop=0),de===se&&w&&(w.scrollTop=w.scrollHeight),de==null||de.focus(),document.activeElement!==Ae))return},[E,w]),q=S.useCallback(()=>H([N,x]),[H,N,x]);S.useEffect(()=>{F&&q()},[F,q]);const{onOpenChange:$,triggerPointerDownPosRef:z}=v;S.useEffect(()=>{if(x){let Z={x:0,y:0};const ae=se=>{var Ae,de;Z={x:Math.abs(Math.round(se.pageX)-(((Ae=z.current)==null?void 0:Ae.x)??0)),y:Math.abs(Math.round(se.pageY)-(((de=z.current)==null?void 0:de.y)??0))}},ue=se=>{Z.x<=10&&Z.y<=10?se.preventDefault():x.contains(se.target)||$(!1),document.removeEventListener("pointermove",ae),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",ae),document.addEventListener("pointerup",ue,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",ue,{capture:!0})}}},[x,$,z]),S.useEffect(()=>{const Z=()=>$(!1);return window.addEventListener("blur",Z),window.addEventListener("resize",Z),()=>{window.removeEventListener("blur",Z),window.removeEventListener("resize",Z)}},[$]);const[Q,ce]=mde(Z=>{const ae=E().filter(Ae=>!Ae.disabled),ue=ae.find(Ae=>Ae.ref.current===document.activeElement),se=gde(ae,Z,ue);se&&setTimeout(()=>se.ref.current.focus())}),R=S.useCallback((Z,ae,ue)=>{const se=!D.current&&!ue;(v.value!==void 0&&v.value===ae||se)&&(j(Z),se&&(D.current=!0))},[v.value]),O=S.useCallback(()=>x==null?void 0:x.focus(),[x]),Y=S.useCallback((Z,ae,ue)=>{const se=!D.current&&!ue;(v.value!==void 0&&v.value===ae||se)&&T(Z)},[v.value]),X=r==="popper"?RF:ede,K=X===RF?{side:o,sideOffset:l,align:u,alignOffset:d,arrowPadding:A,collisionBoundary:f,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:g}:{};return c.jsx(Jue,{scope:n,content:x,viewport:w,onViewportChange:B,itemRefCallback:R,selectedItem:N,onItemLeave:O,itemTextRefCallback:Y,focusSelectedItem:q,selectedItemText:L,position:r,isPositioned:F,searchRef:Q,children:c.jsx(s5,{as:DQe,allowPinchZoom:!0,children:c.jsx(r5,{asChild:!0,trapped:v.open,onMountAutoFocus:Z=>{Z.preventDefault()},onUnmountAutoFocus:at(i,Z=>{var ae;(ae=v.trigger)==null||ae.focus({preventScroll:!0}),Z.preventDefault()}),children:c.jsx(F0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:Z=>Z.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:c.jsx(X,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:Z=>Z.preventDefault(),...y,...K,onPlaced:()=>M(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:at(y.onKeyDown,Z=>{const ae=Z.ctrlKey||Z.altKey||Z.metaKey;if(Z.key==="Tab"&&Z.preventDefault(),!ae&&Z.key.length===1&&ce(Z.key),["ArrowUp","ArrowDown","Home","End"].includes(Z.key)){let se=E().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);if(["ArrowUp","End"].includes(Z.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(Z.key)){const Ae=Z.target,de=se.indexOf(Ae);se=se.slice(de+1)}setTimeout(()=>H(se)),Z.preventDefault()}})})})})})})});Zue.displayName=UQe;var QQe="SelectItemAlignedPosition",ede=S.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,s=Qh(zp,n),a=Hh(zp,n),[o,l]=S.useState(null),[u,d]=S.useState(null),A=tn(t,k=>d(k)),f=k5(n),h=S.useRef(!1),p=S.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:v}=a,x=S.useCallback(()=>{if(s.trigger&&s.valueNode&&o&&u&&m&&g&&y){const k=s.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),j=s.valueNode.getBoundingClientRect(),L=y.getBoundingClientRect();if(s.dir!=="rtl"){const Ae=L.left-N.left,de=j.left-Ae,Se=k.left-de,Fe=k.width+Se,te=Math.max(Fe,N.width),ke=window.innerWidth-Fl,Ze=LF(de,[Fl,Math.max(Fl,ke-te)]);o.style.minWidth=Fe+"px",o.style.left=Ze+"px"}else{const Ae=N.right-L.right,de=window.innerWidth-j.right-Ae,Se=window.innerWidth-k.right-de,Fe=k.width+Se,te=Math.max(Fe,N.width),ke=window.innerWidth-Fl,Ze=LF(de,[Fl,Math.max(Fl,ke-te)]);o.style.minWidth=Fe+"px",o.style.right=Ze+"px"}const T=f(),E=window.innerHeight-Fl*2,F=m.scrollHeight,M=window.getComputedStyle(u),D=parseInt(M.borderTopWidth,10),H=parseInt(M.paddingTop,10),q=parseInt(M.borderBottomWidth,10),$=parseInt(M.paddingBottom,10),z=D+H+F+$+q,Q=Math.min(g.offsetHeight*5,z),ce=window.getComputedStyle(m),R=parseInt(ce.paddingTop,10),O=parseInt(ce.paddingBottom,10),Y=k.top+k.height/2-Fl,X=E-Y,K=g.offsetHeight/2,Z=g.offsetTop+K,ae=D+H+Z,ue=z-ae;if(ae<=Y){const Ae=T.length>0&&g===T[T.length-1].ref.current;o.style.bottom="0px";const de=u.clientHeight-m.offsetTop-m.offsetHeight,Se=Math.max(X,K+(Ae?O:0)+de+q),Fe=ae+Se;o.style.height=Fe+"px"}else{const Ae=T.length>0&&g===T[0].ref.current;o.style.top="0px";const Se=Math.max(Y,D+m.offsetTop+(Ae?R:0)+K)+ue;o.style.height=Se+"px",m.scrollTop=ae-Y+m.offsetTop}o.style.margin=`${Fl}px 0`,o.style.minHeight=Q+"px",o.style.maxHeight=E+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,s.trigger,s.valueNode,o,u,m,g,y,s.dir,r]);Ri(()=>x(),[x]);const[b,w]=S.useState();Ri(()=>{u&&w(window.getComputedStyle(u).zIndex)},[u]);const B=S.useCallback(k=>{k&&p.current===!0&&(x(),v==null||v(),p.current=!1)},[x,v]);return c.jsx($Qe,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:h,onScrollButtonChange:B,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:c.jsx(_t.div,{...i,ref:A,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});ede.displayName=QQe;var HQe="SelectPopperPosition",RF=S.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Fl,...s}=e,a=E5(n);return c.jsx(jU,{...a,...s,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});RF.displayName=HQe;var[$Qe,F6]=J0(zp,{}),UF="SelectViewport",tde=S.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,s=Hh(UF,n),a=F6(UF,n),o=tn(t,s.onViewportChange),l=S.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),c.jsx(_5.Slot,{scope:n,children:c.jsx(_t.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:at(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:A,shouldExpandOnScrollRef:f}=a;if(f!=null&&f.current&&A){const h=Math.abs(l.current-d.scrollTop);if(h>0){const p=window.innerHeight-Fl*2,m=parseFloat(A.style.minHeight),g=parseFloat(A.style.height),y=Math.max(m,g);if(y<p){const v=y+h,x=Math.min(p,v),b=v-x;A.style.height=x+"px",A.style.bottom==="0px"&&(d.scrollTop=b>0?b:0,A.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});tde.displayName=UF;var nde="SelectGroup",[zQe,VQe]=J0(nde),KQe=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=il();return c.jsx(zQe,{scope:n,id:i,children:c.jsx(_t.div,{role:"group","aria-labelledby":i,...r,ref:t})})});KQe.displayName=nde;var rde="SelectLabel",ide=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=VQe(rde,n);return c.jsx(_t.div,{id:i.id,...r,ref:t})});ide.displayName=rde;var Qk="SelectItem",[WQe,sde]=J0(Qk),ade=S.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...a}=e,o=Qh(Qk,n),l=Hh(Qk,n),u=o.value===r,[d,A]=S.useState(s??""),[f,h]=S.useState(!1),p=tn(t,v=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,v,r,i)}),m=il(),g=S.useRef("touch"),y=()=>{i||(o.onValueChange(r),o.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(WQe,{scope:n,value:r,disabled:i,textId:m,isSelected:u,onItemTextChange:S.useCallback(v=>{A(x=>x||((v==null?void 0:v.textContent)??"").trim())},[]),children:c.jsx(_5.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:c.jsx(_t.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:p,onFocus:at(a.onFocus,()=>h(!0)),onBlur:at(a.onBlur,()=>h(!1)),onClick:at(a.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:at(a.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:at(a.onPointerDown,v=>{g.current=v.pointerType}),onPointerMove:at(a.onPointerMove,v=>{var x;g.current=v.pointerType,i?(x=l.onItemLeave)==null||x.call(l):g.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:at(a.onPointerLeave,v=>{var x;v.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:at(a.onKeyDown,v=>{var b;((b=l.searchRef)==null?void 0:b.current)!==""&&v.key===" "||(PQe.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});ade.displayName=Qk;var $x="SelectItemText",ode=S.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...s}=e,a=Qh($x,n),o=Hh($x,n),l=sde($x,n),u=MQe($x,n),[d,A]=S.useState(null),f=tn(t,y=>A(y),l.onItemTextChange,y=>{var v;return(v=o.itemTextRefCallback)==null?void 0:v.call(o,y,l.value,l.disabled)}),h=d==null?void 0:d.textContent,p=S.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return Ri(()=>(m(p),()=>g(p)),[m,g,p]),c.jsxs(c.Fragment,{children:[c.jsx(_t.span,{id:l.textId,...s,ref:f}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Ph.createPortal(s.children,a.valueNode):null]})});ode.displayName=$x;var lde="SelectItemIndicator",cde=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return sde(lde,n).isSelected?c.jsx(_t.span,{"aria-hidden":!0,...r,ref:t}):null});cde.displayName=lde;var DF="SelectScrollUpButton",ude=S.forwardRef((e,t)=>{const n=Hh(DF,e.__scopeSelect),r=F6(DF,e.__scopeSelect),[i,s]=S.useState(!1),a=tn(t,r.onScrollButtonChange);return Ri(()=>{if(n.viewport&&n.isPositioned){let o=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?c.jsx(Ade,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=n;o&&l&&(o.scrollTop=o.scrollTop-l.offsetHeight)}}):null});ude.displayName=DF;var QF="SelectScrollDownButton",dde=S.forwardRef((e,t)=>{const n=Hh(QF,e.__scopeSelect),r=F6(QF,e.__scopeSelect),[i,s]=S.useState(!1),a=tn(t,r.onScrollButtonChange);return Ri(()=>{if(n.viewport&&n.isPositioned){let o=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?c.jsx(Ade,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=n;o&&l&&(o.scrollTop=o.scrollTop+l.offsetHeight)}}):null});dde.displayName=QF;var Ade=S.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,s=Hh("SelectScrollButton",n),a=S.useRef(null),o=k5(n),l=S.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return S.useEffect(()=>()=>l(),[l]),Ri(()=>{var d;const u=o().find(A=>A.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[o]),c.jsx(_t.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:at(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:at(i.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:at(i.onPointerLeave,()=>{l()})})}),qQe="SelectSeparator",hde=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(_t.div,{"aria-hidden":!0,...r,ref:t})});hde.displayName=qQe;var HF="SelectArrow",GQe=S.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=E5(n),s=Qh(HF,n),a=Hh(HF,n);return s.open&&a.position==="popper"?c.jsx(TU,{...i,...r,ref:t}):null});GQe.displayName=HF;var YQe="SelectBubbleInput",fde=S.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=S.useRef(null),s=tn(r,i),a=GD(t);return S.useEffect(()=>{const o=i.current;if(!o)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&d){const A=new Event("change",{bubbles:!0});d.call(o,t),o.dispatchEvent(A)}},[a,t]),c.jsx(_t.select,{...n,style:{...Wte,...n.style},ref:s,defaultValue:t})});fde.displayName=YQe;function pde(e){return e===""||e===void 0}function mde(e){const t=Fi(e),n=S.useRef(""),r=S.useRef(0),i=S.useCallback(a=>{const o=n.current+a;t(o),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(o)},[t]),s=S.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function gde(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=XQe(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function XQe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var JQe=zue,yde=Kue,ZQe=que,eHe=Gue,tHe=Yue,vde=Xue,nHe=tde,xde=ide,wde=ade,rHe=ode,iHe=cde,bde=ude,Cde=dde,Sde=hde;const Ia=JQe,Oa=ZQe,la=S.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(yde,{ref:r,className:pt("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,c.jsx(eHe,{asChild:!0,children:c.jsx(Gc,{className:"h-4 w-4 opacity-50"})})]}));la.displayName=yde.displayName;const Bde=S.forwardRef(({className:e,...t},n)=>c.jsx(bde,{ref:n,className:pt("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Jwe,{className:"h-4 w-4"})}));Bde.displayName=bde.displayName;const _de=S.forwardRef(({className:e,...t},n)=>c.jsx(Cde,{ref:n,className:pt("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Gc,{className:"h-4 w-4"})}));_de.displayName=Cde.displayName;const ca=S.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>c.jsx(tHe,{children:c.jsxs(vde,{ref:i,className:pt("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[c.jsx(Bde,{}),c.jsx(nHe,{className:pt("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(_de,{})]})}));ca.displayName=vde.displayName;const sHe=S.forwardRef(({className:e,...t},n)=>c.jsx(xde,{ref:n,className:pt("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));sHe.displayName=xde.displayName;const Cn=S.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(wde,{ref:r,className:pt("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(iHe,{children:c.jsx(qc,{className:"h-4 w-4"})})}),c.jsx(rHe,{children:t})]}));Cn.displayName=wde.displayName;const aHe=S.forwardRef(({className:e,...t},n)=>c.jsx(Sde,{ref:n,className:pt("-mx-1 my-1 h-px bg-muted",e),...t}));aHe.displayName=Sde.displayName;function oHe(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var M6="ScrollArea",[kde,fkt]=zs(M6),[lHe,gl]=kde(M6),Ede=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:s=600,...a}=e,[o,l]=S.useState(null),[u,d]=S.useState(null),[A,f]=S.useState(null),[h,p]=S.useState(null),[m,g]=S.useState(null),[y,v]=S.useState(0),[x,b]=S.useState(0),[w,B]=S.useState(!1),[k,N]=S.useState(!1),j=tn(t,T=>l(T)),L=l2(i);return c.jsx(lHe,{scope:n,type:r,dir:L,scrollHideDelay:s,scrollArea:o,viewport:u,onViewportChange:d,content:A,onContentChange:f,scrollbarX:h,onScrollbarXChange:p,scrollbarXEnabled:w,onScrollbarXEnabledChange:B,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:k,onScrollbarYEnabledChange:N,onCornerWidthChange:v,onCornerHeightChange:b,children:c.jsx(_t.div,{dir:L,...a,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});Ede.displayName=M6;var Nde="ScrollAreaViewport",jde=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...s}=e,a=gl(Nde,n),o=S.useRef(null),l=tn(t,o,a.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),c.jsx(_t.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});jde.displayName=Nde;var uu="ScrollAreaScrollbar",L6=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=gl(uu,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return S.useEffect(()=>(o?s(!0):a(!0),()=>{o?s(!1):a(!1)}),[o,s,a]),i.type==="hover"?c.jsx(cHe,{...r,ref:t,forceMount:n}):i.type==="scroll"?c.jsx(uHe,{...r,ref:t,forceMount:n}):i.type==="auto"?c.jsx(Tde,{...r,ref:t,forceMount:n}):i.type==="always"?c.jsx(R6,{...r,ref:t}):null});L6.displayName=uu;var cHe=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=gl(uu,e.__scopeScrollArea),[s,a]=S.useState(!1);return S.useEffect(()=>{const o=i.scrollArea;let l=0;if(o){const u=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",u),o.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",u),o.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),c.jsx(ga,{present:n||s,children:c.jsx(Tde,{"data-state":s?"visible":"hidden",...r,ref:t})})}),uHe=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=gl(uu,e.__scopeScrollArea),s=e.orientation==="horizontal",a=j5(()=>l("SCROLL_END"),100),[o,l]=oHe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return S.useEffect(()=>{if(o==="idle"){const u=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[o,i.scrollHideDelay,l]),S.useEffect(()=>{const u=i.viewport,d=s?"scrollLeft":"scrollTop";if(u){let A=u[d];const f=()=>{const h=u[d];A!==h&&(l("SCROLL"),a()),A=h};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[i.viewport,s,l,a]),c.jsx(ga,{present:n||o!=="hidden",children:c.jsx(R6,{"data-state":o==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:at(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:at(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Tde=S.forwardRef((e,t)=>{const n=gl(uu,e.__scopeScrollArea),{forceMount:r,...i}=e,[s,a]=S.useState(!1),o=e.orientation==="horizontal",l=j5(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(o?u:d)}},10);return i0(n.viewport,l),i0(n.content,l),c.jsx(ga,{present:r||s,children:c.jsx(R6,{"data-state":s?"visible":"hidden",...i,ref:t})})}),R6=S.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=gl(uu,e.__scopeScrollArea),s=S.useRef(null),a=S.useRef(0),[o,l]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Mde(o.viewport,o.content),d={...r,sizes:o,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>s.current=f,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:f=>a.current=f};function A(f,h){return mHe(f,a.current,o,h)}return n==="horizontal"?c.jsx(dHe,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const f=i.viewport.scrollLeft,h=X9(f,o,i.dir);s.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollLeft=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollLeft=A(f,i.dir))}}):n==="vertical"?c.jsx(AHe,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const f=i.viewport.scrollTop,h=X9(f,o);s.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollTop=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollTop=A(f))}}):null}),dHe=S.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,s=gl(uu,e.__scopeScrollArea),[a,o]=S.useState(),l=S.useRef(null),u=tn(t,l,s.onScrollbarXChange);return S.useEffect(()=>{l.current&&o(getComputedStyle(l.current))},[l]),c.jsx(Ide,{"data-orientation":"horizontal",...i,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":N5(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,A)=>{if(s.viewport){const f=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(f),Rde(f,A)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:$k(a.paddingLeft),paddingEnd:$k(a.paddingRight)}})}})}),AHe=S.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,s=gl(uu,e.__scopeScrollArea),[a,o]=S.useState(),l=S.useRef(null),u=tn(t,l,s.onScrollbarYChange);return S.useEffect(()=>{l.current&&o(getComputedStyle(l.current))},[l]),c.jsx(Ide,{"data-orientation":"vertical",...i,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":N5(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,A)=>{if(s.viewport){const f=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(f),Rde(f,A)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:$k(a.paddingTop),paddingEnd:$k(a.paddingBottom)}})}})}),[hHe,Pde]=kde(uu),Ide=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:A,...f}=e,h=gl(uu,n),[p,m]=S.useState(null),g=tn(t,j=>m(j)),y=S.useRef(null),v=S.useRef(""),x=h.viewport,b=r.content-r.viewport,w=Fi(d),B=Fi(l),k=j5(A,10);function N(j){if(y.current){const L=j.clientX-y.current.left,T=j.clientY-y.current.top;u({x:L,y:T})}}return S.useEffect(()=>{const j=L=>{const T=L.target;(p==null?void 0:p.contains(T))&&w(L,b)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[x,p,b,w]),S.useEffect(B,[r,B]),i0(p,k),i0(h.content,k),c.jsx(hHe,{scope:n,scrollbar:p,hasThumb:i,onThumbChange:Fi(s),onThumbPointerUp:Fi(a),onThumbPositionChange:B,onThumbPointerDown:Fi(o),children:c.jsx(_t.div,{...f,ref:g,style:{position:"absolute",...f.style},onPointerDown:at(e.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),y.current=p.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),N(j))}),onPointerMove:at(e.onPointerMove,N),onPointerUp:at(e.onPointerUp,j=>{const L=j.target;L.hasPointerCapture(j.pointerId)&&L.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=v.current,h.viewport&&(h.viewport.style.scrollBehavior=""),y.current=null})})})}),Hk="ScrollAreaThumb",Ode=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Pde(Hk,e.__scopeScrollArea);return c.jsx(ga,{present:n||i.hasThumb,children:c.jsx(fHe,{ref:t,...r})})}),fHe=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,s=gl(Hk,n),a=Pde(Hk,n),{onThumbPositionChange:o}=a,l=tn(t,A=>a.onThumbChange(A)),u=S.useRef(void 0),d=j5(()=>{u.current&&(u.current(),u.current=void 0)},100);return S.useEffect(()=>{const A=s.viewport;if(A){const f=()=>{if(d(),!u.current){const h=gHe(A,o);u.current=h,o()}};return o(),A.addEventListener("scroll",f),()=>A.removeEventListener("scroll",f)}},[s.viewport,d,o]),c.jsx(_t.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:at(e.onPointerDownCapture,A=>{const h=A.target.getBoundingClientRect(),p=A.clientX-h.left,m=A.clientY-h.top;a.onThumbPointerDown({x:p,y:m})}),onPointerUp:at(e.onPointerUp,a.onThumbPointerUp)})});Ode.displayName=Hk;var U6="ScrollAreaCorner",Fde=S.forwardRef((e,t)=>{const n=gl(U6,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?c.jsx(pHe,{...e,ref:t}):null});Fde.displayName=U6;var pHe=S.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=gl(U6,n),[s,a]=S.useState(0),[o,l]=S.useState(0),u=!!(s&&o);return i0(i.scrollbarX,()=>{var A;const d=((A=i.scrollbarX)==null?void 0:A.offsetHeight)||0;i.onCornerHeightChange(d),l(d)}),i0(i.scrollbarY,()=>{var A;const d=((A=i.scrollbarY)==null?void 0:A.offsetWidth)||0;i.onCornerWidthChange(d),a(d)}),u?c.jsx(_t.div,{...r,ref:t,style:{width:s,height:o,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function $k(e){return e?parseInt(e,10):0}function Mde(e,t){const n=e/t;return isNaN(n)?0:n}function N5(e){const t=Mde(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function mHe(e,t,n,r="ltr"){const i=N5(n),s=i/2,a=t||s,o=i-a,l=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-o,d=n.content-n.viewport,A=r==="ltr"?[0,d]:[d*-1,0];return Lde([l,u],A)(e)}function X9(e,t,n="ltr"){const r=N5(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-i,a=t.content-t.viewport,o=s-r,l=n==="ltr"?[0,a]:[a*-1,0],u=LF(e,l);return Lde([0,a],[0,o])(u)}function Lde(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Rde(e,t){return e>0&&e<t}var gHe=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const s={left:e.scrollLeft,top:e.scrollTop},a=n.left!==s.left,o=n.top!==s.top;(a||o)&&t(),n=s,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function j5(e,t){const n=Fi(e),r=S.useRef(0);return S.useEffect(()=>()=>window.clearTimeout(r.current),[]),S.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function i0(e,t){const n=Fi(t);Ri(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var Ude=Ede,yHe=jde,vHe=Fde;const Dde=S.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(Ude,{ref:r,className:pt("relative overflow-hidden",e),...n,children:[c.jsx(yHe,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(Qde,{}),c.jsx(vHe,{})]}));Dde.displayName=Ude.displayName;const Qde=S.forwardRef(({className:e,orientation:t="vertical",...n},r)=>c.jsx(L6,{ref:r,orientation:t,className:pt("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:c.jsx(Ode,{className:"relative flex-1 rounded-full bg-border"})}));Qde.displayName=L6.displayName;const zk=({selectedId:e,onSelect:t,label:n})=>{const[r,i]=S.useState(!1),{data:s}=Y0(),a=(s||[]).filter(u=>u.media_type==="stock_photo"),o=a.find(u=>u.id===e),l=o?lc(o.file_path):null;return c.jsxs("div",{className:"space-y-1.5",children:[n&&c.jsx("label",{className:"text-xs font-medium text-muted-foreground block",children:n}),c.jsxs(FF,{open:r,onOpenChange:i,children:[c.jsx(MF,{asChild:!0,children:c.jsx(Be,{variant:"outline",className:pt("relative h-auto min-h-[80px] w-full justify-start p-0 overflow-hidden",!l&&"border-dashed"),children:l?c.jsxs("div",{className:"relative w-full",children:[c.jsx("img",{src:l,alt:(o==null?void 0:o.alt_text)||"Selected",className:"w-full h-24 object-cover"}),c.jsx("button",{type:"button",className:"absolute top-1 right-1 bg-background/80 rounded-full p-1 hover:bg-destructive hover:text-destructive-foreground transition-colors",onClick:u=>{u.stopPropagation(),t(null)},children:c.jsx(Da,{className:"w-3 h-3"})})]}):c.jsxs("div",{className:"flex flex-col items-center justify-center w-full py-4 text-muted-foreground",children:[c.jsx(hbe,{className:"w-5 h-5 mb-1"}),c.jsx("span",{className:"text-xs",children:"Pick image"})]})})}),c.jsx(Uk,{className:"w-80 p-2",align:"start",children:c.jsx(Dde,{className:"h-64",children:a.length===0?c.jsx("p",{className:"text-xs text-muted-foreground text-center py-8",children:"No stock photos uploaded yet."}):c.jsx("div",{className:"grid grid-cols-3 gap-1.5",children:a.map(u=>{const d=lc(u.file_path),A=u.id===e;return c.jsx("button",{type:"button",className:pt("aspect-square overflow-hidden rounded border-2 transition-all",A?"border-primary ring-2 ring-primary/30":"border-transparent hover:border-accent/50"),onClick:()=>{t(u.id),i(!1)},children:c.jsx("img",{src:d,alt:u.alt_text||u.file_name,className:"w-full h-full object-cover",loading:"lazy"})},u.id)})})})})]})]})},Hde=({category:e})=>{const t=$ue(),[n,r]=S.useState(e.context||""),[i,s]=S.useState(e.intro_text||""),[a,o]=S.useState(e.faq_json||[]),[l,u]=S.useState(e.faq_title||""),[d,A]=S.useState(e.video_url||""),[f,h]=S.useState(e.video_orientation||"horizontal"),[p,m]=S.useState(e.video_transcript||""),[g,y]=S.useState(e.video_headline||""),[v,x]=S.useState(e.cta_headline||""),[b,w]=S.useState(e.cover_image_id||null),[B,k]=S.useState(e.content_image_ids||[]),[N,j]=S.useState(e.stats_json||[]),[L,T]=S.useState(""),[E,F]=S.useState(!1),[M,D]=S.useState(!1),[H,q]=S.useState(!1),[$,z]=S.useState(null),[Q,ce]=S.useState([]);S.useEffect(()=>{r(e.context||""),s(e.intro_text||""),o(e.faq_json||[]),u(e.faq_title||""),A(e.video_url||""),h(e.video_orientation||"horizontal"),m(e.video_transcript||""),y(e.video_headline||""),x(e.cta_headline||""),w(e.cover_image_id||null),k(e.content_image_ids||[]),j(e.stats_json||[])},[e.id]);const R=i.split(`
`).filter(Boolean);S.useEffect(()=>{k(se=>{const Ae=[...se];for(;Ae.length<R.length;)Ae.push(null);return Ae.slice(0,R.length)})},[R.length]);const O=()=>o([...a,{question:"",answer:""}]),Y=(se,Ae,de)=>{const Se=[...a];Se[se]={...Se[se],[Ae]:de},o(Se)},X=se=>o(a.filter((Ae,de)=>de!==se)),K=async()=>{if(!L.trim()){Xe({title:"Enter a prompt",description:"Describe the FAQ topics you want generated.",variant:"destructive"});return}F(!0),z(null);try{const{data:se,error:Ae}=await Re.functions.invoke("generate-aeo-content",{body:{mode:"generate-category-faq",prompt:L.trim(),category_name:e.name,category_slug:e.slug,category_context:n||e.context||null,count:6}});if(Ae)throw Ae;if(se!=null&&se.error)throw new Error(se.error);z(se.faq_items||[]),Xe({title:"FAQ generated!",description:"Review the items below, then approve to add them."})}catch(se){Xe({title:"Generation failed",description:se.message,variant:"destructive"})}finally{F(!1)}},Z=()=>{$&&(o($),u(L.trim()),z(null),T(""),Xe({title:"FAQ applied",description:"Don't forget to save!"}))},ae=()=>{z(null)},ue=async()=>{const se=a.map(ke=>`${ke.question} ${ke.answer}`).join(" "),Ae=`${i} ${se}`,de=Bh(Ae);ce(de),de.length>0&&Xe({title:"Fair Housing warnings found",description:"Review the warnings below. Critical issues should be fixed.",variant:"destructive"});const Se=i.split(`
`).filter(Boolean);let Fe=[];if(Se.length>0)try{const{data:ke,error:Ze}=await Re.functions.invoke("generate-aeo-content",{body:{mode:"generate-section-headings",paragraphs:Se,category_name:e.name,category_context:n||e.context||null}});!Ze&&(ke!=null&&ke.headings)&&(Fe=ke.headings)}catch{}const te=B.slice(0,Se.length).map(ke=>ke||null).filter(ke=>ke!==null);try{await t.mutateAsync({id:e.id,context:n||null,intro_text:i||null,faq_json:a.filter(ke=>ke.question.trim()&&ke.answer.trim()),faq_title:l||null,video_url:d||null,video_orientation:f,video_transcript:p||null,video_headline:g||null,cta_headline:v||null,section_headings:Fe,cover_image_id:b||null,content_image_ids:te,stats_json:N.filter(ke=>ke.label.trim()&&ke.value.trim())}),Xe({title:"Category content saved"})}catch(ke){Xe({title:"Error",description:ke.message,variant:"destructive"})}};return c.jsxs("div",{className:"space-y-6 pt-4 border-t border-border/50 mt-4",children:[c.jsx("div",{children:c.jsx(zk,{selectedId:b,onSelect:w,label:"Cover Image (hero banner)"})}),c.jsxs("div",{children:[c.jsxs("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:["Category Context ",c.jsx("span",{className:"text-muted-foreground/60",children:"(not visible on site — guides AI generation)"})]}),c.jsx(ql,{value:n,onChange:se=>r(se.target.value),placeholder:"Describe what this category is about, who it's for, and what angle to take.",className:"min-h-[80px] text-sm"})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Category Intro (visible on landing page)"}),c.jsxs(Be,{variant:"ghost",size:"sm",className:"h-7 text-xs",disabled:M,onClick:async()=>{D(!0);try{const{data:se,error:Ae}=await Re.functions.invoke("generate-aeo-content",{body:{mode:"generate-category-intro",category_name:e.name,category_slug:e.slug,category_context:n||e.context||null}});if(Ae)throw Ae;if(se!=null&&se.error)throw new Error(se.error);s(se.intro_text),Xe({title:"Intro generated!",description:"Review and edit, then save."})}catch(se){Xe({title:"Generation failed",description:se.message,variant:"destructive"})}finally{D(!1)}},children:[c.jsx(yo,{className:"w-3 h-3 mr-1"}),M?"Generating...":"Generate with AI"]})]}),c.jsx(ql,{value:i,onChange:se=>s(se.target.value),placeholder:"2-3 paragraphs about this topic in West Michigan. Separate paragraphs with a blank line.",className:"min-h-[120px] text-sm"})]}),R.length>0&&c.jsxs("div",{children:[c.jsxs("label",{className:"text-xs font-medium text-muted-foreground mb-2 block",children:["Content Block Images (",R.length," paragraphs)"]}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:R.map((se,Ae)=>c.jsx(zk,{selectedId:B[Ae]||null,onSelect:de=>{k(Se=>{const Fe=[...Se];return Fe[Ae]=de,Fe})},label:`Block ${Ae+1}`},Ae))})]}),c.jsxs("div",{className:"border border-dashed border-border rounded p-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(gne,{className:"w-4 h-4 text-muted-foreground"}),c.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:["Quick Stats ",c.jsx("span",{className:"text-muted-foreground/60",children:"(shown as stat pills on cards & stats band)"})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs(Be,{variant:"ghost",size:"sm",className:"h-7 text-xs",disabled:H,onClick:async()=>{q(!0);try{const se=!e.parent_id,{data:Ae,error:de}=await Re.functions.invoke("generate-aeo-content",{body:{mode:"generate-neighborhood-stats",community_name:e.name,is_metro:se}});if(de)throw de;if(Ae!=null&&Ae.error)throw new Error(Ae.error);j(Ae.stats||[]),Xe({title:"Stats generated!",description:"Review and edit, then save."})}catch(se){Xe({title:"Generation failed",description:se.message,variant:"destructive"})}finally{q(!1)}},children:[c.jsx(yo,{className:"w-3 h-3 mr-1"}),H?"Looking up…":"Generate Stats"]}),c.jsxs(Be,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>j([...N,{label:"",value:"",icon:"pin"}]),children:[c.jsx(Tp,{className:"w-3 h-3 mr-1"})," Add Manual"]})]})]}),N.map((se,Ae)=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Ct,{value:se.label,onChange:de=>{const Se=[...N];Se[Ae]={...Se[Ae],label:de.target.value},j(Se)},placeholder:"Label (e.g. Commute)",className:"text-sm flex-1"}),c.jsx(Ct,{value:se.value,onChange:de=>{const Se=[...N];Se[Ae]={...Se[Ae],value:de.target.value},j(Se)},placeholder:"Value (e.g. 15 min)",className:"text-sm flex-1"}),c.jsxs(Ia,{value:se.icon||"pin",onValueChange:de=>{const Se=[...N];Se[Ae]={...Se[Ae],icon:de},j(Se)},children:[c.jsx(la,{className:"w-[100px] text-sm",children:c.jsx(Oa,{})}),c.jsxs(ca,{children:[c.jsx(Cn,{value:"car",children:"🚗 Commute"}),c.jsx(Cn,{value:"trees",children:"🌳 Setting"}),c.jsx(Cn,{value:"building",children:"🏗️ Build"}),c.jsx(Cn,{value:"heart",children:"❤️ Vibe"}),c.jsx(Cn,{value:"users",children:"👥 Population"}),c.jsx(Cn,{value:"school",children:"🎓 Schools"}),c.jsx(Cn,{value:"pin",children:"📍 Location"})]})]}),c.jsx(Be,{variant:"ghost",size:"icon",className:"h-9 w-9 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>j(N.filter((de,Se)=>Se!==Ae)),children:c.jsx(hl,{className:"w-3.5 h-3.5"})})]},Ae)),N.length===0&&c.jsx("p",{className:"text-xs text-muted-foreground",children:"No stats yet. Add stats like commute time, setting, vibe, etc."})]}),c.jsxs("div",{className:"border border-dashed border-border rounded p-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx(Ibe,{className:"w-4 h-4 text-muted-foreground"}),c.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:["Category Video ",c.jsx("span",{className:"text-muted-foreground/60",children:"(optional YouTube embed)"})]})]}),c.jsx(Ct,{value:g,onChange:se=>y(se.target.value),placeholder:"Video headline, e.g. Watch: Your Guide to Downsizing in West Michigan",className:"text-sm"}),c.jsxs("div",{className:"flex gap-3",children:[c.jsx(Ct,{value:d,onChange:se=>A(se.target.value),placeholder:"YouTube URL, e.g. https://youtube.com/watch?v=...",className:"text-sm flex-1"}),c.jsxs(Ia,{value:f,onValueChange:h,children:[c.jsx(la,{className:"w-[140px] text-sm",children:c.jsx(Oa,{})}),c.jsxs(ca,{children:[c.jsx(Cn,{value:"horizontal",children:"Horizontal"}),c.jsx(Cn,{value:"vertical",children:"Vertical"})]})]})]}),c.jsx(ql,{value:p,onChange:se=>m(se.target.value),placeholder:"Paste the video transcript here (shown in an expandable accordion below the video)",className:"min-h-[80px] text-sm"})]}),c.jsxs("div",{children:[c.jsxs("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:["CTA Section Headline ",c.jsx("span",{className:"text-muted-foreground/60",children:"(bottom of category page)"})]}),c.jsx(Ct,{value:v,onChange:se=>x(se.target.value),placeholder:`e.g. Ready to Start Your ${e.name} Journey?`,className:"text-sm"})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:["Category FAQ (",a.length," items)"]}),c.jsxs(Be,{variant:"ghost",size:"sm",onClick:O,className:"h-7 text-xs",children:[c.jsx(Tp,{className:"w-3 h-3 mr-1"})," Add Manual"]})]}),c.jsxs("div",{className:"border border-dashed border-border rounded p-3 mb-4 space-y-2",children:[c.jsx("label",{className:"text-xs font-medium text-muted-foreground block",children:"Generate FAQ with AI"}),c.jsx(Ct,{value:L,onChange:se=>T(se.target.value),placeholder:"e.g. Common questions about downsizing in the Grand Rapids market",className:"text-sm",onKeyDown:se=>se.key==="Enter"&&!E&&K()}),c.jsxs(Be,{size:"sm",onClick:K,disabled:!L.trim()||E,className:"btn-gold border-0 text-xs",children:[c.jsx(yo,{className:"w-3 h-3 mr-1"}),E?"Generating...":"Generate FAQ"]})]}),$&&c.jsxs("div",{className:"border border-primary/30 bg-primary/5 rounded p-4 mb-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("span",{className:"text-xs font-medium text-primary",children:["Generated ",$.length," FAQ items — review below"]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs(Be,{size:"sm",variant:"outline",onClick:ae,className:"h-7 text-xs",children:[c.jsx(Da,{className:"w-3 h-3 mr-1"})," Discard"]}),c.jsxs(Be,{size:"sm",onClick:Z,className:"h-7 text-xs btn-gold border-0",children:[c.jsx(qc,{className:"w-3 h-3 mr-1"})," Approve & Replace"]})]})]}),$.map((se,Ae)=>c.jsxs("div",{className:"border border-border/50 rounded p-3 space-y-1 bg-background",children:[c.jsx("p",{className:"text-sm font-medium",children:se.question}),c.jsx("p",{className:"text-sm text-muted-foreground",children:se.answer})]},Ae))]}),c.jsx("div",{className:"space-y-3",children:a.map((se,Ae)=>c.jsxs("div",{className:"border border-border/50 rounded p-3 space-y-2",children:[c.jsxs("div",{className:"flex items-start gap-2",children:[c.jsx(Ct,{value:se.question,onChange:de=>Y(Ae,"question",de.target.value),placeholder:"Question...",className:"text-sm"}),c.jsx(Be,{variant:"ghost",size:"icon",className:"h-9 w-9 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>X(Ae),children:c.jsx(hl,{className:"w-3.5 h-3.5"})})]}),c.jsx(ql,{value:se.answer,onChange:de=>Y(Ae,"answer",de.target.value),placeholder:"Answer...",className:"text-sm min-h-[60px]"})]},Ae))})]}),c.jsx(xue,{violations:Q}),c.jsxs(Be,{onClick:ue,disabled:t.isPending,size:"sm",children:[c.jsx(hb,{className:"w-3.5 h-3.5 mr-1.5"}),t.isPending?"Saving...":"Save Content"]})]})},xHe=TN("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold 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 or({className:e,variant:t,...n}){return c.jsx("div",{className:pt(xHe({variant:t}),e),...n})}const wHe=()=>{const{data:e}=Dh(),{configMap:t}=_o(),n=Que(),r=B5(),[i,s]=S.useState(""),[a,o]=S.useState(""),[l,u]=S.useState(""),[d,A]=S.useState(""),[f,h]=S.useState(""),[p,m]=S.useState(""),[g,y]=S.useState(null),[v,x]=S.useState(!1),b=(e||[]).find(B=>B.slug==="news"&&B.parent_id!==null),w=async()=>{if(!i.trim()||!a.trim()){Xe({title:"Title and press release content are required",variant:"destructive"});return}if(!b){Xe({title:"News category not found",variant:"destructive"});return}x(!0);try{const B={national:d.trim()||null,local:f.trim()||null,source:p.trim()||null},{data:k,error:N}=await Re.functions.invoke("generate-aeo-content",{body:{mode:"create-press-release",title:i.trim(),press_content:a.trim(),press_links:B,date_published:l||new Date().toISOString().split("T")[0],agent_name:t.agent_name,agent_market:t.agent_market}});if(N)throw N;if(k!=null&&k.error)throw new Error(k.error);const j=k.slug||i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,""),L=await n.mutateAsync({category_id:b.id,title:i.trim(),slug:j,h1:k.h1||i.trim(),is_parent:!1,status:"draft",cover_image_id:g});await r.mutateAsync({id:L.id,h1:k.h1,subheadline:k.subheadline,intro_text:k.intro_text,body_content:k.body_content,faq_json:k.faq_json,meta_title:k.meta_title,meta_description:k.meta_description,schema_markup:k.schema_markup,press_links:k.press_links}),Xe({title:"Press release created!",description:`Slug: /about/news/${j} — ready for review in Page Generator.`}),s(""),o(""),u(""),A(""),h(""),m(""),y(null)}catch(B){Xe({title:"Error",description:B.message,variant:"destructive"})}finally{x(!1)}};return c.jsxs("div",{className:"border border-border rounded p-6 space-y-6",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(bbe,{className:"w-5 h-5 text-accent"}),c.jsx("h3",{className:"font-serif text-xl",children:"New Press Release"})]}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Paste your press release below. The system will wrap it with your entity information, generate FAQs, and build proper NewsArticle schema automatically."}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(bn,{className:"text-xs uppercase tracking-wider",children:"Headline / Title"}),c.jsx(Ct,{value:i,onChange:B=>s(B.target.value),placeholder:"e.g., Holden Smith Named Top Agent in Grand Rapids for 2026"})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(bn,{className:"text-xs uppercase tracking-wider",children:"Date Published"}),c.jsx(Ct,{type:"date",value:l,onChange:B=>u(B.target.value)})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(bn,{className:"text-xs uppercase tracking-wider",children:"Press Release Content"}),c.jsx(ql,{value:a,onChange:B=>o(B.target.value),placeholder:"Paste the full press release text here...",rows:12,className:"font-mono text-sm"})]}),c.jsxs("div",{className:"border border-border/50 rounded p-4 space-y-3 bg-muted/30",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx(rl,{className:"w-4 h-4 text-muted-foreground"}),c.jsx("span",{className:"text-sm font-medium",children:"Pickup Links"})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Where was this press release picked up? Add links to each version."}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx(bn,{className:"text-xs uppercase tracking-wider",children:"National"}),c.jsx(Ct,{value:d,onChange:B=>A(B.target.value),placeholder:"https://prnewswire.com/..."})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx(bn,{className:"text-xs uppercase tracking-wider",children:"Local"}),c.jsx(Ct,{value:f,onChange:B=>h(B.target.value),placeholder:"https://localnews.com/..."})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx(bn,{className:"text-xs uppercase tracking-wider",children:"Source"}),c.jsx(Ct,{value:p,onChange:B=>m(B.target.value),placeholder:"https://yourbrokerage.com/..."})]})]})]}),c.jsxs("div",{className:"flex items-end gap-4",children:[c.jsx("div",{className:"w-40",children:c.jsx(zk,{selectedId:g,onSelect:y,label:"Cover Image"})}),c.jsxs(Be,{onClick:w,disabled:!i.trim()||!a.trim()||v,className:"btn-gold border-0",children:[c.jsx(yo,{className:"w-4 h-4 mr-2"}),v?"Processing...":"Create Press Release"]})]})]})]})},bHe=({categoryId:e})=>{const{data:t}=Ac(),n=B5(),r=Hue(),i=(t||[]).filter(o=>o.category_id===e).sort((o,l)=>new Date(l.created_at).getTime()-new Date(o.created_at).getTime()),s=async o=>{await n.mutateAsync({id:o.id,status:"published",published_at:new Date().toISOString()}),Xe({title:"Published!",description:`"${o.title}" is now live.`})},a=async o=>{await r.mutateAsync(o),Xe({title:"Press release deleted"})};return c.jsxs("div",{className:"space-y-6 pt-4 border-t border-border/50 mt-4",children:[c.jsx(wHe,{}),i.length>0&&c.jsxs("div",{className:"space-y-3",children:[c.jsxs("h4",{className:"font-serif text-lg",children:["Press Releases (",i.length,")"]}),c.jsx("div",{className:"space-y-2",children:i.map(o=>c.jsxs("div",{className:"flex items-center justify-between p-3 border border-border rounded",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[c.jsx(or,{variant:o.status==="published"?"default":"secondary",className:"text-xs capitalize",children:o.status}),c.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(o.created_at).toLocaleDateString()})]}),c.jsx("p",{className:"font-serif text-sm truncate",children:o.title}),o.press_links&&c.jsxs("div",{className:"flex gap-3 mt-1",children:[o.press_links.national&&c.jsx("a",{href:o.press_links.national,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-accent hover:underline",children:"National ↗"}),o.press_links.local&&c.jsx("a",{href:o.press_links.local,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-accent hover:underline",children:"Local ↗"}),o.press_links.source&&c.jsx("a",{href:o.press_links.source,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-accent hover:underline",children:"Source ↗"})]})]}),c.jsxs("div",{className:"flex items-center gap-2 ml-4",children:[o.status==="draft"&&c.jsxs(Be,{size:"sm",onClick:()=>s(o),className:"btn-gold border-0 text-xs",children:[c.jsx(t2,{className:"w-3 h-3 mr-1"})," Publish"]}),c.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>a(o.id),children:c.jsx(hl,{className:"w-3 h-3"})})]})]},o.id))})]})]})},Ew=eae,Nw=_D,jw=ED;var T5="Checkbox",[CHe,pkt]=zs(T5),[SHe,D6]=CHe(T5);function BHe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:s,form:a,name:o,onCheckedChange:l,required:u,value:d="on",internal_do_not_use_render:A}=e,[f,h]=wo({prop:n,defaultProp:i??!1,onChange:l,caller:T5}),[p,m]=S.useState(null),[g,y]=S.useState(null),v=S.useRef(!1),x=p?!!a||!!p.closest("form"):!0,b={checked:f,disabled:s,setChecked:h,control:p,setControl:m,name:o,form:a,value:d,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:ah(i)?!1:i,isFormControl:x,bubbleInput:g,setBubbleInput:y};return c.jsx(SHe,{scope:t,...b,children:_He(A)?A(b):r})}var $de="CheckboxTrigger",zde=S.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:s,value:a,disabled:o,checked:l,required:u,setControl:d,setChecked:A,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:p}=D6($de,e),m=tn(i,d),g=S.useRef(l);return S.useEffect(()=>{const y=s==null?void 0:s.form;if(y){const v=()=>A(g.current);return y.addEventListener("reset",v),()=>y.removeEventListener("reset",v)}},[s,A]),c.jsx(_t.button,{type:"button",role:"checkbox","aria-checked":ah(l)?"mixed":l,"aria-required":u,"data-state":Gde(l),"data-disabled":o?"":void 0,disabled:o,value:a,...r,ref:m,onKeyDown:at(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:at(n,y=>{A(v=>ah(v)?!0:!v),p&&h&&(f.current=y.isPropagationStopped(),f.current||y.stopPropagation())})})});zde.displayName=$de;var Q6=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:a,disabled:o,value:l,onCheckedChange:u,form:d,...A}=e;return c.jsx(BHe,{__scopeCheckbox:n,checked:i,defaultChecked:s,disabled:o,required:a,onCheckedChange:u,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:f})=>c.jsxs(c.Fragment,{children:[c.jsx(zde,{...A,ref:t,__scopeCheckbox:n}),f&&c.jsx(qde,{__scopeCheckbox:n})]})})});Q6.displayName=T5;var Vde="CheckboxIndicator",Kde=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,s=D6(Vde,n);return c.jsx(ga,{present:r||ah(s.checked)||s.checked===!0,children:c.jsx(_t.span,{"data-state":Gde(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});Kde.displayName=Vde;var Wde="CheckboxBubbleInput",qde=S.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:a,required:o,disabled:l,name:u,value:d,form:A,bubbleInput:f,setBubbleInput:h}=D6(Wde,e),p=tn(n,h),m=GD(s),g=_U(r);S.useEffect(()=>{const v=f;if(!v)return;const x=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(x,"checked").set,B=!i.current;if(m!==s&&w){const k=new Event("click",{bubbles:B});v.indeterminate=ah(s),w.call(v,ah(s)?!1:s),v.dispatchEvent(k)}},[f,m,s,i]);const y=S.useRef(ah(s)?!1:s);return c.jsx(_t.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??y.current,required:o,disabled:l,name:u,value:d,form:A,...t,tabIndex:-1,ref:p,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});qde.displayName=Wde;function _He(e){return typeof e=="function"}function ah(e){return e==="indeterminate"}function Gde(e){return ah(e)?"indeterminate":e?"checked":"unchecked"}const _h=S.forwardRef(({className:e,...t},n)=>c.jsx(Q6,{ref:n,className:pt("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-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),...t,children:c.jsx(Kde,{className:pt("flex items-center justify-center text-current"),children:c.jsx(qc,{className:"h-4 w-4"})})}));_h.displayName=Q6.displayName;var H6="Progress",$6=100,[kHe,mkt]=zs(H6),[EHe,NHe]=kHe(H6),Yde=S.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:s=jHe,...a}=e;(i||i===0)&&!J9(i)&&console.error(THe(`${i}`,"Progress"));const o=J9(i)?i:$6;r!==null&&!Z9(r,o)&&console.error(PHe(`${r}`,"Progress"));const l=Z9(r,o)?r:null,u=Vk(l)?s(l,o):void 0;return c.jsx(EHe,{scope:n,value:l,max:o,children:c.jsx(_t.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":Vk(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":Zde(l,o),"data-value":l??void 0,"data-max":o,...a,ref:t})})});Yde.displayName=H6;var Xde="ProgressIndicator",Jde=S.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=NHe(Xde,n);return c.jsx(_t.div,{"data-state":Zde(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});Jde.displayName=Xde;function jHe(e,t){return`${Math.round(e/t*100)}%`}function Zde(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Vk(e){return typeof e=="number"}function J9(e){return Vk(e)&&!isNaN(e)&&e>0}function Z9(e,t){return Vk(e)&&!isNaN(e)&&e<=t&&e>=0}function THe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${$6}\`.`}function PHe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or ${$6} if no \`max\` prop is set)
- \`null\` or \`undefined\` if the progress is indeterminate.
Defaulting to \`null\`.`}var eAe=Yde,IHe=Jde;const s0=S.forwardRef(({className:e,value:t,...n},r)=>c.jsx(eAe,{ref:r,className:pt("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:c.jsx(IHe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));s0.displayName=eAe.displayName;const tAe="aeo-blueprint-suggestions";function QB(){try{return JSON.parse(localStorage.getItem(tAe)||"[]")}catch{return[]}}function HB(e){localStorage.setItem(tAe,JSON.stringify(e)),window.dispatchEvent(new Event("blueprint-suggestions-updated"))}const eK={buying:"bg-blue-100 text-blue-800",selling:"bg-green-100 text-green-800",neighborhoods:"bg-purple-100 text-purple-800","market-insights":"bg-orange-100 text-orange-800",luxury:"bg-amber-100 text-amber-800",general:"bg-gray-100 text-gray-800"},nAe=({open:e,onOpenChange:t,siteDomain:n,questions:r,metro:i,state:s,onImported:a})=>{const[o,l]=S.useState("generating"),[u,d]=S.useState(null),[A,f]=S.useState([]),[h,p]=S.useState(0),[m,g]=S.useState(0),[y,v]=S.useState(""),[x,b]=S.useState(new Set),[w,B]=S.useState({}),[k,N]=S.useState(!1),{data:j}=Ac(),L="khmmwvmdbhaplcfcndjx",T="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtobW13dm1kYmhhcGxjZmNuZGp4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzcwNTQ1MDcsImV4cCI6MjA5MjYzMDUwN30.c5aUVQ4shbnMOIIkDZRP7geMUb64HPKYg4jQFuBH52Q",E=S.useMemo(()=>{const R=new Set;return(j||[]).forEach(O=>R.add(O.title.toLowerCase().trim())),R},[j]),F=R=>E.has(R.toLowerCase().trim());S.useEffect(()=>{e&&r.length>0&&(l("generating"),d(null),f([]),p(0),g(0),v(""),b(new Set),B({}),M())},[e]);const M=async()=>{try{const R=await fetch(`https://${L}.supabase.co/functions/v1/generate-blueprint`,{method:"POST",headers:{"Content-Type":"application/json",apikey:T},body:JSON.stringify({questions:r.map(Z=>({question:Z.question,category:Z.category,citability_score:Z.citability_score})),metro:i,state:s,site_domain:n})});if(!R.ok||!R.body)throw new Error(await R.text()||"Failed to start blueprint generation");const O=R.body.getReader(),Y=new TextDecoder;let X="",K=null;for(;;){const{done:Z,value:ae}=await O.read();if(Z)break;X+=Y.decode(ae,{stream:!0});let ue;for(;(ue=X.indexOf(`
`))!==-1;){const se=X.slice(0,ue).trim();if(X=X.slice(ue+2),!se.startsWith("data: "))continue;const Ae=se.slice(6).trim();if(Ae!=="[DONE]")try{const de=JSON.parse(Ae);switch(de.type){case"status":v(de.message),de.total&&g(de.total);break;case"progress":v(de.message),p(de.completed),de.total&&g(de.total);break;case"title_complete":f(Se=>[...Se,{original_question:de.original_question,page_title:de.page_title,category:de.category,citability_score:de.citability_score}]),p(de.index+1);break;case"filter_complete":v(de.message);break;case"error":throw new Error(de.message);case"result":K=de;break}}catch(de){if(de.message&&!de.message.includes("JSON"))throw de}}}if(K){d(K);const Z=new Set;K.titles.forEach((ae,ue)=>{F(ae.page_title)||Z.add(ue)}),b(Z),l("review")}else throw new Error("No results received")}catch(R){Xe({title:"Blueprint generation failed",description:R.message,variant:"destructive"}),t(!1)}},D=R=>{b(O=>{const Y=new Set(O);return Y.has(R)?Y.delete(R):Y.add(R),Y})},H=()=>{if(!u)return;const R=u.titles.every((O,Y)=>x.has(Y));b(R?new Set:new Set(u.titles.map((O,Y)=>Y)))},q=(u==null?void 0:u.titles)||[],$=S.useMemo(()=>{let R=0;return q.forEach((O,Y)=>{if(!x.has(Y))return;const X=w[Y]??O.page_title;F(X)||R++}),R},[q,x,w,E]),z=()=>{if(!u||$===0)return;N(!0);const R=QB(),O=new Set(R.map(X=>X.page_title.toLowerCase().trim())),Y=[];q.forEach((X,K)=>{if(!x.has(K))return;const Z=w[K]??X.page_title;F(Z)||O.has(Z.toLowerCase().trim())||Y.push({original_question:X.original_question,page_title:Z,category:X.category,citability_score:X.citability_score})}),HB([...R,...Y]),Xe({title:"Suggestions saved!",description:`Added ${Y.length} title suggestions to the Blueprint tab.`}),N(!1),a(),t(!1)},Q=m>0?Math.round(h/m*100):0,ce=R=>R>=4?"bg-green-500":R>=3?"bg-yellow-500":"bg-orange-500";return c.jsx($c,{open:e,onOpenChange:t,children:c.jsxs(Gl,{className:"max-w-4xl max-h-[90vh] flex flex-col p-0",children:[c.jsx(Yl,{className:"px-6 pt-6 pb-4 border-b",children:c.jsxs(Xl,{className:"flex items-center gap-2",children:[c.jsx(yo,{className:"w-5 h-5 text-primary"})," FAQ Page Title Generator"]})}),c.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:[o==="generating"&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col items-center justify-center py-8 space-y-4 max-w-lg mx-auto",children:[c.jsx(bo,{className:"w-10 h-10 animate-spin text-primary"}),c.jsxs("div",{className:"text-center space-y-2 w-full",children:[c.jsx("p",{className:"font-medium",children:"Generating FAQ page titles..."}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Analyzing ",r.length," questions one at a time"]}),m>0&&c.jsxs("div",{className:"space-y-1 pt-2",children:[c.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[c.jsxs("span",{children:[h,"/",m," titles"]}),c.jsxs("span",{children:[Q,"%"]})]}),c.jsx(s0,{value:Q,className:"h-3"})]}),y&&c.jsx("p",{className:"text-xs text-muted-foreground truncate pt-1",children:y})]})]}),A.length>0&&c.jsxs("div",{className:"border rounded-lg overflow-hidden",children:[c.jsxs("div",{className:"bg-muted/40 px-3 py-2 text-xs font-medium text-muted-foreground",children:["Titles generated so far (",A.length,")"]}),c.jsx("div",{className:"max-h-64 overflow-y-auto divide-y",children:A.map((R,O)=>c.jsxs("div",{className:"px-3 py-2 flex items-center gap-3 text-sm",children:[c.jsx("div",{className:`w-2 h-2 rounded-full shrink-0 ${ce(R.citability_score)}`}),c.jsx("span",{className:"text-muted-foreground truncate flex-1",children:R.original_question}),c.jsx(sc,{className:"w-3 h-3 text-muted-foreground shrink-0"}),c.jsx("span",{className:"font-medium truncate flex-1",children:R.page_title})]},O))})]})]}),o==="review"&&u&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"rounded-lg border bg-muted/30 p-4 space-y-1",children:[c.jsxs("p",{className:"font-medium",children:[u.total_titles," FAQ Page Titles Generated"]}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:[u.metro,", ",u.state]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Review and edit titles, then save them as suggestions in the Blueprint tab."})]}),c.jsxs("div",{className:"flex items-center gap-2 px-1",children:[c.jsx(_h,{checked:q.length>0&&q.every((R,O)=>x.has(O)),onCheckedChange:H}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:["Select all (",q.length,")"]}),c.jsxs("span",{className:"text-xs text-muted-foreground ml-auto",children:[x.size," selected"]})]}),c.jsx("div",{className:"border rounded-lg divide-y max-h-[50vh] overflow-y-auto",children:q.map((R,O)=>{const Y=w[O]??R.page_title,X=F(Y),K=eK[R.category]||eK.general;return c.jsxs("div",{className:"px-3 py-2.5 flex items-start gap-2.5 hover:bg-muted/20",children:[c.jsx(_h,{checked:x.has(O),onCheckedChange:()=>D(O),className:"mt-1"}),c.jsx(zy,{className:"w-3.5 h-3.5 text-muted-foreground mt-1.5 shrink-0"}),c.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("input",{className:"flex-1 bg-transparent border-none outline-none text-sm font-medium focus:ring-1 focus:ring-primary rounded px-1 py-0.5",value:Y,onChange:Z=>B(ae=>({...ae,[O]:Z.target.value}))}),X&&c.jsx(or,{variant:"outline",className:"text-[10px] shrink-0 border-amber-400 text-amber-600",children:"Already exists"})]}),c.jsxs("p",{className:"text-[11px] text-muted-foreground truncate",children:["Original: ",R.original_question]})]}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0 mt-1",children:[c.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-[10px] ${K}`,children:R.category}),c.jsx("div",{className:`w-2 h-2 rounded-full ${ce(R.citability_score)}`}),c.jsx("span",{className:"text-xs text-muted-foreground w-6 text-right",children:R.citability_score.toFixed(1)})]})]},O)})})]})]}),o==="review"&&u&&c.jsxs("div",{className:"border-t bg-background px-6 py-4 flex items-center justify-between",children:[c.jsxs("p",{className:"text-sm text-muted-foreground",children:[$," title suggestions to save"]}),c.jsxs(Be,{onClick:z,disabled:$===0||k,children:[k?c.jsx(bo,{className:"w-4 h-4 mr-2 animate-spin"}):c.jsx(qc,{className:"w-4 h-4 mr-2"}),"Save Suggestions"]})]})]})})},tK=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,""),OHe=(e,t,n)=>e<t?c.jsxs(or,{variant:"outline",className:"text-xs border-yellow-500 text-yellow-600",children:["Low (",e,")"]}):e>n?c.jsxs(or,{variant:"outline",className:"text-xs border-destructive text-destructive",children:["Over (",e,")"]}):c.jsxs(or,{variant:"outline",className:"text-xs border-green-500 text-green-600",children:["Healthy (",e,")"]}),FHe=({sub:e,pages:t,onUpdate:n,onDelete:r})=>{const i=t.filter(o=>o.category_id===e.id).length,[s,a]=S.useState(!1);return c.jsxs("div",{className:`border rounded p-3 space-y-2 ml-4 transition-opacity ${e.enabled?"border-border/60":"border-border/30 opacity-60"}`,children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm",children:e.icon||"📁"}),c.jsx("span",{className:"font-serif text-sm font-medium",children:e.name}),c.jsx(or,{variant:"outline",className:"text-xs",children:"Sub"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("span",{className:"text-xs text-muted-foreground",children:[i," page(s)"]}),c.jsx(Be,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>r(e,i),children:c.jsx(hl,{className:"w-3 h-3"})}),c.jsx(rc,{checked:e.enabled,onCheckedChange:o=>n(e.id,{enabled:o})})]})]}),c.jsx(Be,{variant:"ghost",size:"sm",className:"text-xs w-full justify-start text-muted-foreground hover:text-foreground",onClick:()=>a(!s),children:s?"▾ Hide Content":"▸ Edit Content"}),s&&(e.slug==="news"?c.jsx(bHe,{categoryId:e.id}):c.jsx(Hde,{category:e}))]})},MHe=({cat:e,allCategories:t,pages:n,onUpdate:r,onDelete:i,isAeo:s,onAddSubcategory:a})=>{const o=n.filter(h=>h.category_id===e.id).length,l=t.filter(h=>h.parent_id===e.id),[u,d]=S.useState(!1),[A,f]=S.useState(!1);return c.jsxs("div",{className:`border rounded p-4 space-y-3 transition-opacity ${e.enabled?"border-border":"border-border/50 opacity-60"}`,children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-lg",children:e.icon||"📄"}),c.jsx("span",{className:"font-serif font-medium",children:e.name})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Be,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:()=>i(e,o),children:c.jsx(hl,{className:"w-3.5 h-3.5"})}),c.jsx(rc,{checked:e.enabled,onCheckedChange:h=>r(e.id,{enabled:h})})]})]}),e.description&&c.jsx("p",{className:"text-xs text-muted-foreground",children:e.description}),s&&c.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[c.jsxs("label",{className:"flex items-center gap-1",children:["Min",c.jsx(Ct,{type:"number",className:"w-16 h-7 text-xs",value:e.min_pages,onChange:h=>r(e.id,{min_pages:parseInt(h.target.value)||0})})]}),c.jsx("span",{className:"text-muted-foreground",children:"—"}),c.jsxs("label",{className:"flex items-center gap-1",children:["Max",c.jsx(Ct,{type:"number",className:"w-16 h-7 text-xs",value:e.max_pages,onChange:h=>r(e.id,{max_pages:parseInt(h.target.value)||0})})]}),c.jsx("div",{className:"ml-auto",children:OHe(o,e.min_pages,e.max_pages)})]}),(l.length>0||e.enabled)&&c.jsxs(Ew,{open:A,onOpenChange:f,children:[c.jsx(Nw,{asChild:!0,children:c.jsxs(Be,{variant:"ghost",size:"sm",className:"text-xs w-full justify-start text-muted-foreground hover:text-foreground gap-1",children:[c.jsx(Gc,{className:`w-3 h-3 transition-transform ${A?"":"-rotate-90"}`}),"Sub-Categories (",l.length,")"]})}),c.jsxs(jw,{className:"space-y-2 mt-2",children:[l.map(h=>c.jsx(FHe,{sub:h,pages:n,onUpdate:r,onDelete:i},h.id)),c.jsxs(Be,{variant:"outline",size:"sm",className:"text-xs ml-4",onClick:()=>a(e.id),children:[c.jsx(Tp,{className:"w-3 h-3 mr-1"})," Add Sub-Category"]})]})]}),c.jsx(Be,{variant:"ghost",size:"sm",className:"text-xs w-full justify-start text-muted-foreground hover:text-foreground",onClick:()=>d(!u),children:u?"▾ Hide Landing Page Content":"▸ Edit Landing Page Content"}),u&&c.jsx(Hde,{category:e})]})},LHe=()=>{var E;const{data:e,isLoading:t}=Dh(),{data:n}=Ac(),{isAeo:r}=Due(),i=$ue(),s=jQe(),a=NQe(),[o,l]=S.useState(""),[u,d]=S.useState(""),[A,f]=S.useState(null),[h,p]=S.useState(null),[m,g]=S.useState(QB);S.useEffect(()=>{const F="aeo-blueprint-suggestions-seeded";if(localStorage.getItem(F))return;if(QB().length>0){localStorage.setItem(F,"1");return}const D=[{page_title:"What Grand Rapids neighborhoods are best for rental income?",category:"buying",original_question:"Which Grand Rapids neighborhoods currently offer the highest rental yields?",citability_score:4},{page_title:"How Can I Buy a Home in Grand Rapids Remotely?",category:"buying",original_question:"Can you recommend a relocation specialist in Grand Rapids who can help me buy a home remotely?",citability_score:4},{page_title:"How do I find a good real estate agent in Grand Rapids?",category:"buying",original_question:"How do I find and vet local agents who work specifically with first-time buyers in Grand Rapids?",citability_score:4},{page_title:"What are commute times like from nearby Grand Rapids suburbs?",category:"buying",original_question:"Can you connect me with agents who can advise on commute times from East Grand Rapids, Kentwood, or Wyoming?",citability_score:4},{page_title:"What are Grand Rapids investment property cap rates?",category:"buying",original_question:"What are the typical cap rates for different property types in various Grand Rapids neighborhoods?",citability_score:4},{page_title:"What Grand Rapids agents know about suburban commutes?",category:"buying",original_question:"Can you connect me with a Grand Rapids agent who knows commute times to downtown from suburbs?",citability_score:4},{page_title:"What's life like in Grand Rapids neighborhoods?",category:"buying",original_question:"Who is a trusted Grand Rapids realtor to explain what daily life is like in different neighborhoods?",citability_score:4},{page_title:"Where can I find Grand Rapids housing market data?",category:"buying",original_question:"Who can I contact in Grand Rapids to get neighborhood-by-neighborhood cost-of-living and housing market comparisons?",citability_score:4},{page_title:"Who Can Help Me Buy a Home in Grand Rapids Remotely?",category:"buying",original_question:"Can you recommend a Grand Rapids buyer's agent who specializes in out-of-state relocations?",citability_score:4},{page_title:"Who can help me find a Grand Rapids neighborhood for my lifestyle?",category:"buying",original_question:"Who are agents that specialize in relocations for tech professionals?",citability_score:4},{page_title:"Who Can Help Me Find Investment Properties in Grand Rapids?",category:"buying",original_question:"Could you recommend a real estate agent familiar with off-market or foreclosed investment property opportunities?",citability_score:4},{page_title:"Who Can Help Me Relocate to Grand Rapids?",category:"buying",original_question:"Recommend a realtor in Grand Rapids who specializes in helping people relocate from other states.",citability_score:4},{page_title:"Who can help me understand Grand Rapids costs for out-of-staters?",category:"buying",original_question:"Suggest a local expert in Grand Rapids to compare cost of living and home prices for out-of-staters.",citability_score:4},{page_title:"Who Helps Buyers Relocating to Grand Rapids?",category:"buying",original_question:"What agent in Grand Rapids helps with the full remote buying process for interstate moves?",citability_score:4},{page_title:"Who Helps Investors Buy Rental Properties in Grand Rapids?",category:"buying",original_question:"Are there any experienced real estate agents in Grand Rapids who primarily work with out-of-state investors?",citability_score:4},{page_title:"Who Specializes in Distressed Properties in Grand Rapids?",category:"buying",original_question:"I'm interested in understanding the current inventory of distressed properties suitable for renovation and resale.",citability_score:4},{page_title:"Who can help me sell my home in Grand Rapids?",category:"selling",original_question:"Which Grand Rapids realtors are known for getting multiple offers in the North Hill area?",citability_score:4},{page_title:"Who is the best Grand Rapids agent for life changes?",category:"selling",original_question:"Can you recommend a Grand Rapids real estate agent known for their compassionate approach with clients going through life transitions?",citability_score:4},{page_title:"Who can help me sell a home with many possessions in Grand Rapids?",category:"selling",original_question:"Can you suggest a Grand Rapids realtor who has experience with estate sales?",citability_score:4},{page_title:"What extra services do Grand Rapids agents offer?",category:"selling",original_question:"Who is a Grand Rapids agent that offers services beyond just buying and selling?",citability_score:4},{page_title:"What Grand Rapids realtors offer specialized senior services?",category:"selling",original_question:"Which Grand Rapids realtors will provide referrals for aging-in-place remodelers and senior support services?",citability_score:4},{page_title:"What's the best way to sell my Grand Rapids home?",category:"selling",original_question:"Can you suggest Grand Rapids agents who can evaluate whether a cash offer, an as-is sale, or a traditional MLS listing is best?",citability_score:4},{page_title:"Is East Grand Rapids a good place to live?",category:"neighborhoods",original_question:"Is East Grand Rapids a good place to raise a family?",citability_score:4},{page_title:"What's it like to live in Ada (Forest Hills)?",category:"neighborhoods",original_question:"What is it like to live in Ada MI (Forest Hills)?",citability_score:4},{page_title:"What's Forest Hills like for homebuyers?",category:"neighborhoods",original_question:"What are the schools, home styles, and commute times in Forest Hills?",citability_score:4},{page_title:"What's Eastown Grand Rapids Like for Homebuyers?",category:"neighborhoods",original_question:"Is Eastown in Grand Rapids safe and walkable, what are typical home prices?",citability_score:4},{page_title:"What should I know about buying in Heritage Hill?",category:"neighborhoods",original_question:"What should I know about buying and restoring a historic home in Heritage Hill?",citability_score:4},{page_title:"What's the downtown Grand Rapids market like?",category:"neighborhoods",original_question:"What's the downtown Grand Rapids condo market like?",citability_score:4},{page_title:"What's Kentwood like for homebuyers?",category:"neighborhoods",original_question:"How are the schools, neighborhoods, and home values in Kentwood?",citability_score:4},{page_title:"Is Wyoming, MI a good place to live for families?",category:"neighborhoods",original_question:"Is Wyoming MI a good suburban choice for families and affordability?",citability_score:4},{page_title:"Is Grandville a good place to buy a starter home?",category:"neighborhoods",original_question:"Is Grandville a good place to buy a starter home near Grand Rapids?",citability_score:4},{page_title:"What's it like to live in Rockford, MI?",category:"neighborhoods",original_question:"What is it like to live in Rockford MI—schools, downtown vibe, outdoor recreation?",citability_score:4},{page_title:"What's Holland MI like for buyers?",category:"neighborhoods",original_question:"How are the neighborhoods, schools, and commute options in Holland MI?",citability_score:4},{page_title:"Who Can Help Me Find a Home Near Steelcase?",category:"neighborhoods",original_question:"Do you know a specific realtor who has a strong track record of finding homes near Steelcase?",citability_score:4},{page_title:"Who Can Help Me Find a Home Near Major Highways in Grand Rapids?",category:"neighborhoods",original_question:"Can you connect me with a realty professional who specializes in homes with easy access to US-131?",citability_score:4},{page_title:"Which Grand Rapids agent can help me find a home near work?",category:"neighborhoods",original_question:"Which Grand Rapids real estate agent can map out commute times to SpartanNash headquarters?",citability_score:4},{page_title:"Who Helps Beaumont Health Employees Buy Homes?",category:"neighborhoods",original_question:"Which real estate agent specializes in helping Beaumont Health employees find homes?",citability_score:4},{page_title:"What Grand Rapids neighborhoods suit my commute?",category:"neighborhoods",original_question:"Are there Grand Rapids neighborhoods that offer a quick reverse commute to suburban job centers?",citability_score:4},{page_title:"What Grand Rapids neighborhoods are good for commuting to Walker?",category:"neighborhoods",original_question:"Where should I look if I need a 20-30 minute drive to the Meijer corporate campus in Walker?",citability_score:4},{page_title:"Who Sells Luxury Homes in Grand Rapids?",category:"luxury",original_question:"Can you recommend a specialist for off-market luxury homes in Grand Rapids?",citability_score:4},{page_title:"Who Sells Lakefront Homes Near Grand Rapids?",category:"luxury",original_question:"Who is the leading luxury home agent for lakefront properties near Grand Rapids?",citability_score:4},{page_title:"Who is the best agent to sell my Forest Hills home?",category:"luxury",original_question:"Recommend a local agent for selling my high-end home in Forest Hills discreetly.",citability_score:4},{page_title:"Who Sells Luxury Homes in Kent County?",category:"luxury",original_question:"Top luxury realtor for new development estates in Kent County near Grand Rapids?",citability_score:4}];HB(D),g(D),localStorage.setItem(F,"1")},[]),S.useEffect(()=>{const F=()=>g(QB());return window.addEventListener("blueprint-suggestions-updated",F),()=>window.removeEventListener("blueprint-suggestions-updated",F)},[]);const y=S.useCallback(F=>{const M=m.filter((D,H)=>H!==F);HB(M),g(M)},[m]),v=S.useCallback(()=>{HB([]),g([])},[]),x=n||[],b=e||[],w=b.filter(F=>!F.parent_id),B=w.filter(F=>F.enabled),k=(F,M)=>{i.mutate({id:F,...M})},N=(F,M)=>{const H=b.filter(q=>q.parent_id===F.id).reduce((q,$)=>q+x.filter(z=>z.category_id===$.id).length,0);p({cat:F,pageCount:M+H})},j=async()=>{if(h){if(h.pageCount>0){Xe({title:"Cannot delete",description:"Please delete or reassign all pages in this category first.",variant:"destructive"}),p(null);return}try{await a.mutateAsync(h.cat.id),Xe({title:`"${h.cat.name}" deleted`})}catch(F){Xe({title:"Error",description:F.message,variant:"destructive"})}p(null)}},L=async()=>{if(o.trim())try{await s.mutateAsync({name:o.trim(),slug:tK(o),icon:"📄"}),Xe({title:"Category created!"}),l("")}catch(F){Xe({title:"Error",description:F.message,variant:"destructive"})}},T=async()=>{if(!(!u.trim()||!A))try{await s.mutateAsync({name:u.trim(),slug:tK(u),icon:"📁",parent_id:A}),Xe({title:"Sub-category created!"}),d(""),f(null)}catch(F){Xe({title:"Error",description:F.message,variant:"destructive"})}};return t?c.jsx("div",{className:"space-y-4",children:Array.from({length:4}).map((F,M)=>c.jsx(jt,{className:"h-24 w-full"},M))}):c.jsxs("div",{className:"space-y-8",children:[c.jsx("div",{className:"flex items-center gap-6 text-sm",children:r?c.jsxs(c.Fragment,{children:[c.jsxs("span",{children:["Total Pages: ",c.jsx("strong",{children:x.length})," of ",w.reduce((F,M)=>F+M.min_pages,0),"–",w.reduce((F,M)=>F+M.max_pages,0)]}),c.jsxs("span",{children:["Categories Active: ",c.jsx("strong",{children:B.length})," of ",w.length]})]}):c.jsxs("span",{children:["Categories Active: ",c.jsx("strong",{children:B.length})," of ",w.length]})}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:w.map(F=>c.jsx(MHe,{cat:F,allCategories:b,pages:x,onUpdate:k,onDelete:N,isAeo:r,onAddSubcategory:M=>f(M)},F.id))}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Ct,{value:o,onChange:F=>l(F.target.value),placeholder:"New category name...",className:"max-w-xs",onKeyDown:F=>F.key==="Enter"&&L()}),c.jsxs(Be,{variant:"outline",onClick:L,disabled:!o.trim(),children:[c.jsx(Tp,{className:"w-4 h-4 mr-1"})," Add Niche"]})]}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-serif text-xl mb-4",children:"Page Hierarchy"}),c.jsx("div",{className:"space-y-3",children:w.map(F=>{const M=b.filter(z=>z.parent_id===F.id),D=x.filter(z=>z.category_id===F.id),H=D.filter(z=>z.is_parent),q=D.filter(z=>!z.is_parent&&!z.parent_id),$=D.length+M.reduce((z,Q)=>z+x.filter(ce=>ce.category_id===Q.id).length,0);return c.jsxs("div",{className:"border border-border rounded p-3",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx("span",{children:F.icon||"📄"}),c.jsx(Tt,{to:`/${F.slug}`,className:"font-serif font-medium text-sm hover:text-accent transition-colors",children:F.name}),c.jsxs("span",{className:"text-xs text-muted-foreground ml-auto",children:[$," page(s)"]})]}),c.jsxs("div",{className:"ml-4 space-y-1",children:[M.map(z=>{const Q=x.filter(ce=>ce.category_id===z.id);return c.jsxs("div",{className:"mb-2",children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[c.jsx(Ju,{className:"w-3 h-3 text-accent"}),c.jsxs(Tt,{to:`/${F.slug}/${z.slug}`,className:"font-medium hover:text-accent transition-colors",children:[z.icon," ",z.name]}),c.jsx(or,{variant:"outline",className:"text-xs",children:"Sub"}),c.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:Q.length})]}),Q.map(ce=>c.jsxs("div",{className:"flex items-center gap-2 text-sm ml-6 text-muted-foreground",children:[c.jsx("span",{className:"w-3 h-px bg-border"}),c.jsx(Tt,{to:`/${F.slug}/${z.slug}/${ce.slug}`,className:"hover:text-accent transition-colors",children:ce.title}),c.jsx(AS,{status:ce.status})]},ce.id))]},z.id)}),H.map(z=>{const Q=D.filter(ce=>ce.parent_id===z.id);return c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[c.jsx(Ju,{className:"w-3 h-3 text-muted-foreground"}),c.jsx(Tt,{to:`/${F.slug}/${z.slug}`,className:"font-medium hover:text-accent transition-colors",children:z.title}),c.jsx(AS,{status:z.status})]}),Q.map(ce=>c.jsxs("div",{className:"flex items-center gap-2 text-sm ml-6 text-muted-foreground",children:[c.jsx("span",{className:"w-3 h-px bg-border"}),c.jsx(Tt,{to:`/${F.slug}/${ce.slug}`,className:"hover:text-accent transition-colors",children:ce.title}),c.jsx(AS,{status:ce.status})]},ce.id))]},z.id)}),q.map(z=>c.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[c.jsx(Ju,{className:"w-3 h-3 text-muted-foreground"}),c.jsx(Tt,{to:`/${F.slug}/${z.slug}`,className:"hover:text-accent transition-colors",children:z.title}),c.jsx(AS,{status:z.status})]},z.id)),D.length===0&&M.length===0&&c.jsx("p",{className:"text-xs text-muted-foreground",children:r?"No pages yet — use the Page Generator tab to create content.":"No pages yet — landing page content can be edited above."})]})]},F.id)})})]}),m.length>0&&c.jsxs("div",{className:"border border-dashed border-accent rounded-lg p-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(I8,{className:"w-4 h-4 text-accent"}),c.jsx("h3",{className:"font-serif text-lg font-medium",children:"Suggested Page Titles"}),c.jsx(or,{variant:"outline",className:"text-xs",children:m.length})]}),c.jsx(Be,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:v,children:"Clear All"})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"Generated FAQ page titles from Prompt Discovery. Use these as starting points when creating new pages."}),c.jsx("div",{className:"divide-y rounded border bg-background",children:m.map((F,M)=>{const D={buying:"bg-blue-100 text-blue-800",selling:"bg-green-100 text-green-800",neighborhoods:"bg-purple-100 text-purple-800","market-insights":"bg-orange-100 text-orange-800",luxury:"bg-amber-100 text-amber-800",general:"bg-muted text-muted-foreground"},H=D[F.category]||D.general;return c.jsxs("div",{className:"px-3 py-2 flex items-center gap-3 text-sm group",children:[c.jsx(I8,{className:"w-3 h-3 text-accent shrink-0"}),c.jsx("span",{className:"font-medium flex-1",children:F.page_title}),c.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-[10px] shrink-0 ${H}`,children:F.category}),c.jsx(Be,{variant:"ghost",size:"icon",className:"h-5 w-5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",onClick:()=>y(M),children:c.jsx(Da,{className:"w-3 h-3"})})]},M)})})]}),c.jsx(Dk,{open:!!A,onOpenChange:F=>!F&&f(null),children:c.jsxs(Hb,{children:[c.jsxs($b,{children:[c.jsx(Vb,{children:"Add Sub-Category"}),c.jsxs(Kb,{children:["Create a sub-category under ",c.jsx("strong",{children:(E=b.find(F=>F.id===A))==null?void 0:E.name}),". Sub-categories get their own landing page and can contain FAQ pages."]})]}),c.jsx(Ct,{value:u,onChange:F=>d(F.target.value),placeholder:"Sub-category name (e.g., Waterfront)",onKeyDown:F=>F.key==="Enter"&&T()}),c.jsxs(zb,{children:[c.jsx(Wb,{onClick:()=>d(""),children:"Cancel"}),c.jsx(Ay,{onClick:T,disabled:!u.trim(),children:"Create Sub-Category"})]})]})}),c.jsx(Dk,{open:!!h,onOpenChange:F=>!F&&p(null),children:c.jsxs(Hb,{children:[c.jsxs($b,{children:[c.jsx(Vb,{children:h!=null&&h.pageCount?"Category Has Pages":`Delete "${h==null?void 0:h.cat.name}"?`}),c.jsx(Kb,{children:h!=null&&h.pageCount?c.jsxs(c.Fragment,{children:[c.jsx("strong",{children:h.cat.name})," has ",c.jsxs("strong",{children:[h.pageCount," page(s)"]})," attached. Deleting this category will undo all parent-to-children routing and cross-linking for those pages.",c.jsx("br",{}),c.jsx("br",{}),"You must ",c.jsx("strong",{children:"delete or reassign"})," all pages in this category before it can be removed."]}):"This category has no pages and can be safely removed. This action cannot be undone."})]}),c.jsxs(zb,{children:[c.jsx(Wb,{children:"Cancel"}),h!=null&&h.pageCount?c.jsx(Ay,{onClick:()=>p(null),children:"Understood"}):c.jsx(Ay,{onClick:j,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Category"})]})]})})]})},AS=({status:e})=>c.jsx("span",{className:`text-xs px-1.5 py-0.5 ml-auto rounded ${e==="published"?"bg-green-100 text-green-800":"bg-muted text-muted-foreground"}`,children:e}),RHe=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,""),UHe=()=>{const{data:e,isLoading:t}=Ac(),{data:n}=Dh(),{configMap:r}=_o(),i=Que(),s=B5(),a=Hue(),[o,l]=S.useState(null),[u,d]=S.useState(null),[A,f]=S.useState(""),[h,p]=S.useState(""),[m,g]=S.useState(null),[y,v]=S.useState(!1),x=E=>E.faq_json&&E.faq_json.length>0||!!E.intro_text,b=(e||[]).filter(E=>E.status==="draft"&&!x(E)),w=(e||[]).filter(E=>E.status==="draft"&&x(E)),B=(e||[]).filter(E=>E.status==="published"),k=async()=>{if(!A.trim()||!h){Xe({title:"Enter a question and select a category",variant:"destructive"});return}v(!0);try{const E=(n||[]).find(q=>q.id===h),{data:F,error:M}=await Re.functions.invoke("generate-aeo-content",{body:{mode:"generate",category_slug:(E==null?void 0:E.slug)||"",topic:A.trim(),agent_name:r.agent_name,agent_market:r.agent_market}});if(M)throw M;if(F!=null&&F.error)throw new Error(F.error);const D=F.slug||RHe(A),H=await i.mutateAsync({category_id:h,title:A.trim(),slug:D,h1:F.h1||A.trim(),is_parent:!1,status:"draft",cover_image_id:m});await s.mutateAsync({id:H.id,h1:F.h1,subheadline:F.subheadline,intro_text:F.intro_text,faq_json:F.faq_json,meta_title:F.meta_title,meta_description:F.meta_description,schema_markup:F.schema_markup}),Xe({title:"Page created & content generated!",description:`Slug: /${E==null?void 0:E.slug}/${D}`}),f(""),p(""),g(null)}catch(E){Xe({title:"Error",description:E.message,variant:"destructive"})}finally{v(!1)}},N=async E=>{var F;l(E.id);try{const{data:M,error:D}=await Re.functions.invoke("generate-aeo-content",{body:{mode:"generate",category_slug:((F=E.category)==null?void 0:F.slug)||"",topic:E.title,parent_id:E.parent_id,agent_name:r.agent_name,agent_market:r.agent_market}});if(D)throw D;if(M!=null&&M.error)throw new Error(M.error);await s.mutateAsync({id:E.id,h1:M.h1,intro_text:M.intro_text,body_content:M.body_content,faq_json:M.faq_json,meta_title:M.meta_title,meta_description:M.meta_description,schema_markup:M.schema_markup}),Xe({title:"Content generated!",description:`"${E.title}" is ready for review.`})}catch(M){Xe({title:"Generation failed",description:M.message,variant:"destructive"})}finally{l(null)}},j=async E=>{const F=`${E.h1} ${E.intro_text||""} ${E.body_content||""} ${(E.faq_json||[]).map(D=>D.question+" "+D.answer).join(" ")}`,M=Bh(F);if(vue(M)){Xe({title:"Fair Housing Violation Detected",description:`${M.length} issue(s) found. Please review and fix before publishing.`,variant:"destructive"});return}await s.mutateAsync({id:E.id,status:"published",published_at:new Date().toISOString()}),Xe({title:"Published!",description:`"${E.title}" is now live.`})},L=async E=>{await a.mutateAsync(E),Xe({title:"Page deleted"})};if(t)return c.jsx("div",{className:"space-y-4",children:Array.from({length:4}).map((E,F)=>c.jsx(jt,{className:"h-16 w-full"},F))});const T=({page:E,actions:F})=>{var H;const M=`${E.h1} ${E.intro_text||""} ${E.body_content||""}`,D=E.body_content?Bh(M):[];return c.jsxs("div",{className:"flex items-center justify-between p-4 border border-border",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx("span",{className:"text-caption text-accent",children:(H=E.category)==null?void 0:H.name}),E.is_parent&&c.jsx(or,{variant:"outline",className:"text-xs",children:"Parent"}),c.jsx(or,{variant:E.status==="published"?"default":"secondary",className:"text-xs capitalize",children:E.status==="draft"&&x(E)?"Ready":E.status}),D.length>0&&c.jsxs("span",{className:"flex items-center gap-1 text-xs text-destructive",children:[c.jsx(Pp,{className:"w-3 h-3"}),D.length," issue(s)"]})]}),c.jsx("p",{className:"font-serif text-sm truncate",children:E.title})]}),c.jsx("div",{className:"flex items-center gap-2 ml-4",children:F})]})};return c.jsxs("div",{className:"space-y-8",children:[c.jsxs("div",{className:"border border-border rounded p-6 space-y-4",children:[c.jsx("h3",{className:"font-serif text-xl",children:"Create New Page"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter a question — it becomes the page title, H1, and drives the AI-generated content."}),c.jsx(Ct,{value:A,onChange:E=>f(E.target.value),placeholder:"Your Question (e.g., 'What are the best neighborhoods in Austin?')",className:"text-base"}),A&&c.jsx("p",{className:"text-xs text-muted-foreground",children:"The AI will generate an optimized short slug from your question."}),c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsxs("div",{className:"flex-1 space-y-3",children:[c.jsx("div",{className:"flex items-center gap-3",children:c.jsxs(Ia,{value:h,onValueChange:E=>{p(E)},children:[c.jsx(la,{className:"w-48",children:c.jsx(Oa,{placeholder:"Category"})}),c.jsxs(ca,{children:[(n||[]).filter(E=>!E.parent_id).map(E=>c.jsxs(Cn,{value:E.id,children:[E.icon," ",E.name]},E.id)),(n||[]).filter(E=>E.parent_id).map(E=>{const F=(n||[]).find(M=>M.id===E.parent_id);return c.jsxs(Cn,{value:E.id,children:[" ↳ ",E.icon," ",E.name," ",F?`(${F.name})`:""]},E.id)})]})]})}),c.jsxs(Be,{onClick:k,disabled:!A.trim()||!h||y,className:"btn-gold border-0",children:[c.jsx(yo,{className:"w-4 h-4 mr-2"}),y?"Generating...":"Generate Unique FAQs"]})]}),c.jsx("div",{className:"w-40",children:c.jsx(zk,{selectedId:m,onSelect:g,label:"Cover Image"})})]})]}),b.length>0&&c.jsxs("div",{children:[c.jsxs("h3",{className:"font-serif text-xl mb-4",children:["Needs Content (",b.length,")"]}),c.jsx("div",{className:"space-y-2",children:b.map(E=>c.jsx(T,{page:E,actions:c.jsxs(c.Fragment,{children:[c.jsxs(Be,{size:"sm",onClick:()=>N(E),disabled:o===E.id,className:"btn-gold border-0 text-xs",children:[c.jsx(yo,{className:"w-3 h-3 mr-1"}),o===E.id?"Generating...":"Generate"]}),c.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>L(E.id),children:c.jsx(hl,{className:"w-3 h-3"})})]})},E.id))})]}),w.length>0&&c.jsxs("div",{children:[c.jsxs("h3",{className:"font-serif text-xl mb-4",children:["Ready for Review (",w.length,")"]}),c.jsx("div",{className:"space-y-2",children:w.map(E=>c.jsx(T,{page:E,actions:c.jsxs(c.Fragment,{children:[c.jsxs(Be,{size:"sm",variant:"outline",onClick:()=>d(E),children:[c.jsx(db,{className:"w-3 h-3 mr-1"})," Preview"]}),c.jsxs(Be,{size:"sm",onClick:()=>j(E),className:"btn-gold border-0 text-xs",children:[c.jsx(t2,{className:"w-3 h-3 mr-1"})," Publish"]}),c.jsxs(Be,{size:"sm",variant:"outline",onClick:()=>N(E),disabled:o===E.id,className:"text-xs",children:[c.jsx(yo,{className:"w-3 h-3 mr-1"}),o===E.id?"...":"Regenerate"]}),c.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>L(E.id),children:c.jsx(hl,{className:"w-3 h-3"})})]})},E.id))})]}),B.length>0&&c.jsxs("div",{children:[c.jsxs("h3",{className:"font-serif text-xl mb-4",children:["Published (",B.length,")"]}),c.jsx("div",{className:"space-y-2",children:B.map(E=>c.jsx(T,{page:E,actions:c.jsxs(c.Fragment,{children:[c.jsx(AU,{className:"w-4 h-4 text-green-600"}),c.jsx(Be,{size:"sm",variant:"outline",onClick:()=>d(E),children:c.jsx(db,{className:"w-3 h-3"})})]})},E.id))})]}),(e||[]).length===0&&!A&&c.jsx("p",{className:"text-muted-foreground text-center py-12",children:"No pages yet. Enter a question above to create your first AEO page."}),c.jsx($c,{open:!!u,onOpenChange:()=>d(null),children:c.jsxs(Gl,{className:"max-w-3xl max-h-[80vh] overflow-y-auto",children:[c.jsx(Yl,{children:c.jsx(Xl,{className:"font-serif",children:u==null?void 0:u.h1})}),u&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[c.jsxs("p",{children:[c.jsx("strong",{children:"Meta Title:"})," ",u.meta_title]}),c.jsxs("p",{children:[c.jsx("strong",{children:"Meta Desc:"})," ",u.meta_description]})]}),u.intro_text&&c.jsx("p",{className:"text-muted-foreground italic",children:u.intro_text}),u.body_content&&c.jsx("div",{className:"prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:u.body_content}}),u.faq_json&&u.faq_json.length>0&&c.jsxs("div",{children:[c.jsx("h4",{className:"font-serif font-medium mb-2",children:"FAQ"}),u.faq_json.map((E,F)=>c.jsxs("div",{className:"mb-3",children:[c.jsx("p",{className:"font-medium text-sm",children:E.question}),c.jsx("p",{className:"text-sm text-muted-foreground",children:E.answer})]},F))]}),c.jsxs("div",{className:"border-t border-border pt-4 space-y-3",children:[c.jsx("h4",{className:"font-serif font-medium",children:"YouTube Video (optional)"}),c.jsxs("div",{className:"flex gap-3",children:[c.jsx(Ct,{value:u.video_url||"",onChange:E=>d({...u,video_url:E.target.value}),placeholder:"https://www.youtube.com/watch?v=...",className:"flex-1"}),c.jsxs(Ia,{value:u.video_orientation||"horizontal",onValueChange:E=>d({...u,video_orientation:E}),children:[c.jsx(la,{className:"w-[140px] text-sm",children:c.jsx(Oa,{})}),c.jsxs(ca,{children:[c.jsx(Cn,{value:"horizontal",children:"Horizontal"}),c.jsx(Cn,{value:"vertical",children:"Vertical (Short)"})]})]})]}),u.video_url&&(()=>{const E=u.video_url.match(/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|shorts\/|watch\?v=|watch\?.+&v=))([^&?\s]+)/),F=E==null?void 0:E[1],M=u.video_orientation==="vertical";return F?c.jsx("div",{className:`relative overflow-hidden rounded-lg mx-auto ${M?"max-w-sm aspect-[9/16]":"w-full aspect-video"}`,children:c.jsx("iframe",{src:`https://www.youtube.com/embed/${F}`,title:"Preview",className:"absolute inset-0 w-full h-full border border-border",allowFullScreen:!0})}):null})(),c.jsx("textarea",{value:u.video_transcript||"",onChange:E=>d({...u,video_transcript:E.target.value}),placeholder:"Paste video transcript here...",rows:4,className:"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"}),c.jsx(Be,{size:"sm",variant:"outline",onClick:async()=>{try{await s.mutateAsync({id:u.id,video_url:u.video_url||null,video_transcript:u.video_transcript||null,video_orientation:u.video_orientation||"horizontal"}),Xe({title:"Video fields saved!"})}catch(E){Xe({title:"Error saving",description:E.message,variant:"destructive"})}},children:"Save Video Fields"})]})]})]})})]})},DHe=()=>{const[e,t]=S.useState([]),[n,r]=S.useState([]),[i,s]=S.useState(!1),[a,o]=S.useState(!1),[l,u]=S.useState(null),{data:d}=Ac(),A=B5(),f=async()=>{s(!0);try{const{data:g,error:y}=await Re.functions.invoke("scan-cannibalization");if(y)throw y;if(g!=null&&g.error)throw new Error(g.error);t(g.page_results||[]),r(g.faq_results||[]),o(!0),(g.page_results||[]).length===0&&(g.faq_results||[]).length===0&&Xe({title:"No cannibalization issues found!"})}catch(g){Xe({title:"Scan failed",description:g.message,variant:"destructive"})}finally{s(!1)}},h=async(g,y)=>{const v=d==null?void 0:d.find(b=>b.id===g);if(!v)return;const x=[...v.faq_json];x.splice(y,1);try{await A.mutateAsync({id:g,faq_json:x}),Xe({title:"FAQ deleted"}),r(b=>b.filter(w=>!(w.faq_a.page_id===g&&w.faq_a.question_index===y)&&!(w.faq_b.page_id===g&&w.faq_b.question_index===y)))}catch(b){Xe({title:"Delete failed",description:b.message,variant:"destructive"})}},p=async(g,y,v)=>{const x=d==null?void 0:d.find(b=>b.id===g);if(x){u(v);try{const b=x.faq_json.map(N=>N.question),{data:w,error:B}=await Re.functions.invoke("generate-aeo-content",{body:{mode:"replace-faq",existing_questions:b,page_topic:x.title}});if(B)throw B;if(w!=null&&w.error)throw new Error(w.error);const k=[...x.faq_json];k[y]={question:w.question,answer:w.answer},await A.mutateAsync({id:g,faq_json:k}),Xe({title:"FAQ replaced with new unique question!"}),r(N=>N.filter((j,L)=>L!==v))}catch(b){Xe({title:"Replace failed",description:b.message,variant:"destructive"})}finally{u(null)}}},m=a&&!i&&e.length===0&&n.length===0;return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-serif text-xl mb-2",children:"Duplicate Question Scanner"}),c.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Find FAQ questions that appear nearly identical across different pages, then remove or replace them."}),c.jsxs(Be,{onClick:f,disabled:i,className:"btn-gold border-0",children:[c.jsx(fU,{className:"w-4 h-4 mr-2"}),i?"Scanning...":"Scan for Duplicates"]})]}),i&&c.jsx("div",{className:"space-y-3",children:Array.from({length:3}).map((g,y)=>c.jsx(jt,{className:"h-16 w-full"},y))}),m&&c.jsxs("div",{className:"flex items-center gap-3 p-6 border border-green-200 bg-green-50",children:[c.jsx(AU,{className:"w-5 h-5 text-green-600"}),c.jsx("p",{className:"text-sm text-green-800",children:"No cannibalization issues detected. Your content is well-differentiated!"})]}),e.length>0&&c.jsxs("div",{className:"space-y-3",children:[c.jsx("h4",{className:"font-serif text-lg",children:"Page-Level Overlap"}),e.map((g,y)=>c.jsx("div",{className:"p-4 border border-border",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(Pp,{className:`w-4 h-4 mt-0.5 ${g.similarity>60?"text-destructive":"text-yellow-500"}`}),c.jsxs("div",{className:"flex-1",children:[c.jsx("div",{className:"flex items-center gap-2 mb-1",children:c.jsxs("span",{className:"font-medium text-sm",children:[g.similarity,"% overlap"]})}),c.jsxs("p",{className:"text-sm text-muted-foreground mb-1",children:[c.jsxs("strong",{children:['"',g.page_a.title,'"']})," vs ",c.jsxs("strong",{children:['"',g.page_b.title,'"']})]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:g.recommendation})]})]})},y))]}),n.length>0&&c.jsxs("div",{className:"space-y-3",children:[c.jsx("h4",{className:"font-serif text-lg",children:"FAQ-Level Duplicates"}),n.map((g,y)=>c.jsxs("div",{className:"p-4 border border-border space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Pp,{className:"w-4 h-4 text-yellow-500"}),c.jsxs("span",{className:"font-medium text-sm",children:[g.similarity,"% similar"]})]}),c.jsxs("div",{className:"flex items-start justify-between gap-3 pl-4 border-l-2 border-border",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("p",{className:"text-xs text-muted-foreground mb-1",children:["On: ",g.faq_a.page_title]}),c.jsxs("p",{className:"text-sm font-medium",children:['"',g.faq_a.question,'"']})]}),c.jsxs("div",{className:"flex gap-1 shrink-0",children:[c.jsx(Be,{variant:"ghost",size:"sm",onClick:()=>h(g.faq_a.page_id,g.faq_a.question_index),children:c.jsx(hl,{className:"w-3.5 h-3.5"})}),c.jsx(Be,{variant:"ghost",size:"sm",disabled:l===y,onClick:()=>p(g.faq_a.page_id,g.faq_a.question_index,y),children:c.jsx(Qc,{className:`w-3.5 h-3.5 ${l===y?"animate-spin":""}`})})]})]}),c.jsxs("div",{className:"flex items-start justify-between gap-3 pl-4 border-l-2 border-border",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("p",{className:"text-xs text-muted-foreground mb-1",children:["On: ",g.faq_b.page_title]}),c.jsxs("p",{className:"text-sm font-medium",children:['"',g.faq_b.question,'"']})]}),c.jsxs("div",{className:"flex gap-1 shrink-0",children:[c.jsx(Be,{variant:"ghost",size:"sm",onClick:()=>h(g.faq_b.page_id,g.faq_b.question_index),children:c.jsx(hl,{className:"w-3.5 h-3.5"})}),c.jsx(Be,{variant:"ghost",size:"sm",disabled:l===y,onClick:()=>p(g.faq_b.page_id,g.faq_b.question_index,y),children:c.jsx(Qc,{className:`w-3.5 h-3.5 ${l===y?"animate-spin":""}`})})]})]})]},y))]})]})},QHe=()=>c.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[c.jsx(nbe,{className:"w-12 h-12 text-muted-foreground/40 mb-4"}),c.jsx("h3",{className:"font-serif text-xl mb-2",children:"Backups Coming Soon"}),c.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:"Auto-backup scheduling, manual snapshots, and one-click restore will be available here."})]}),nK=[{value:"all",label:"All"},{value:"logo",label:"Logos & Branding"},{value:"stock_photo",label:"Stock Photos"},{value:"headshot",label:"Agent Headshots"}],HHe=[{value:"cover",label:"Cover Image",description:"Hero banners on category/topic pages"},{value:"content",label:"Content Block",description:"Alternating text+image sections"},{value:"featured",label:"Featured",description:"Priority image for any page"},{value:"headshot",label:"Agent Headshot",description:"Profile photos for contact/about pages"}],$He=["modern interior","exterior","city shot","aerial","neighborhood","kitchen","bathroom","living room","bedroom","office","grand rapids","west michigan","lakefront","condo","new build","header logo","favicon","footer logo","watermark"],zHe=7,VHe=7,KHe=3,rK=({selectedTags:e,onToggle:t,categorySlugs:n})=>{const[r,i]=S.useState("");return c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Usage"}),c.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:HHe.map(s=>{const a=e.includes(s.value);return c.jsxs("button",{onClick:()=>t(s.value),title:s.description,className:`text-[10px] px-2 py-1 rounded-full border transition-colors flex items-center gap-1 ${a?"border-accent bg-accent/15 text-accent font-medium":"border-border text-muted-foreground hover:text-foreground hover:border-foreground/30"}`,children:[a&&c.jsx(qc,{className:"w-2.5 h-2.5"}),s.label]},s.value)})})]}),n.length>0&&c.jsxs("div",{children:[c.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Category"}),c.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:n.map(s=>{const a=e.includes(s);return c.jsxs("button",{onClick:()=>t(s),className:`text-[10px] px-2 py-1 rounded-full border transition-colors flex items-center gap-1 ${a?"border-accent bg-accent/15 text-accent font-medium":"border-border text-muted-foreground hover:text-foreground hover:border-foreground/30"}`,children:[a&&c.jsx(qc,{className:"w-2.5 h-2.5"}),s]},s)})})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Scene"}),c.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:$He.map(s=>{const a=e.includes(s);return c.jsxs("button",{onClick:()=>t(s),className:`text-[10px] px-2 py-0.5 rounded-full border transition-colors flex items-center gap-1 ${a?"border-accent bg-accent/15 text-accent font-medium":"border-border text-muted-foreground hover:text-foreground hover:border-foreground/30"}`,children:[a&&c.jsx(qc,{className:"w-2.5 h-2.5"}),s]},s)})})]}),c.jsxs("div",{className:"flex gap-1",children:[c.jsx(Ct,{value:r,onChange:s=>i(s.target.value),placeholder:"Custom tag...",className:"text-xs h-7 max-w-[140px]",onKeyDown:s=>{if(s.key==="Enter"){s.preventDefault();const a=r.trim().toLowerCase();a&&(t(a),i(""))}}}),c.jsx(Be,{variant:"ghost",size:"sm",className:"h-7 px-2",disabled:!r.trim(),onClick:()=>{const s=r.trim().toLowerCase();s&&(t(s),i(""))},children:c.jsx(Tp,{className:"w-3 h-3"})})]})]})},WHe=({media:e})=>{const t=e.filter(s=>{var a;return(a=s.tags)==null?void 0:a.includes("cover")}).length,n=e.filter(s=>{var a;return(a=s.tags)==null?void 0:a.includes("content")}).length,r=e.filter(s=>{var a;return((a=s.tags)==null?void 0:a.includes("headshot"))||s.media_type==="headshot"}).length,i=({label:s,count:a,min:o})=>{const l=a>=o;return c.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 rounded border text-xs ${l?"border-green-500/30 bg-green-500/5 text-green-700":"border-amber-500/30 bg-amber-500/5 text-amber-700"}`,children:[l?c.jsx(M0,{className:"w-3.5 h-3.5"}):c.jsx(Pp,{className:"w-3.5 h-3.5"}),c.jsxs("span",{className:"font-medium",children:[s,":"]}),c.jsxs("span",{children:[a,"/",o]}),!l&&c.jsxs("span",{className:"text-[10px] opacity-70",children:["(",o-a," more needed)"]})]})};return c.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.jsx(i,{label:"Cover images",count:t,min:zHe}),c.jsx(i,{label:"Content blocks",count:n,min:VHe}),c.jsx(i,{label:"Agent headshots",count:r,min:KHe})]})},qHe=()=>{const[e,t]=S.useState("all"),[n,r]=S.useState(""),{data:i,isLoading:s}=Y0(e==="all"?void 0:e),{data:a}=Dh(),o=(a||[]).filter(H=>H.slug!=="about").map(H=>H.slug),l=kIe(),u=NIe(),d=EIe(),A=S.useRef(null),[f,h]=S.useState("stock_photo"),[p,m]=S.useState([]),[g,y]=S.useState(!1),[v,x]=S.useState(null),[b,w]=S.useState([]),[B,k]=S.useState(""),[N,j]=S.useState(null),L=(i||[]).filter(H=>n?H.tags.some(q=>q.toLowerCase().includes(n.toLowerCase())):!0),T=(H,q)=>{q==="upload"?m($=>$.includes(H)?$.filter(z=>z!==H):[...$,H]):w($=>$.includes(H)?$.filter(z=>z!==H):[...$,H])},E=async H=>{const q=H.target.files;if(!q||q.length===0)return;y(!0);let $=0;for(const z of Array.from(q))try{await l.mutateAsync({file:z,tags:p,mediaType:f}),$++}catch(Q){Xe({title:`Failed to upload ${z.name}`,description:Q.message,variant:"destructive"})}$>0&&Xe({title:`${$} file(s) uploaded`}),y(!1),m([]),A.current&&(A.current.value="")},F=async H=>{try{await d.mutateAsync({id:H,tags:b,alt_text:B}),Xe({title:"Updated"}),x(null)}catch(q){Xe({title:"Error",description:q.message,variant:"destructive"})}},M=async()=>{if(N){try{await u.mutateAsync({id:N.id,filePath:N.filePath}),Xe({title:`"${N.name}" deleted`})}catch(H){Xe({title:"Error",description:H.message,variant:"destructive"})}j(null)}},D=[...new Set((i||[]).flatMap(H=>H.tags))].sort();return c.jsxs("div",{className:"space-y-8",children:[(i||[]).length>0&&c.jsx(WHe,{media:i||[]}),c.jsxs("div",{className:"border border-dashed border-border rounded-lg p-6 space-y-4",children:[c.jsx("h3",{className:"font-serif text-xl",children:"Upload Media"}),c.jsx("div",{className:"flex flex-wrap items-center gap-3",children:c.jsx("div",{className:"flex gap-2",children:nK.filter(H=>H.value!=="all").map(H=>c.jsx(Be,{variant:f===H.value?"default":"outline",size:"sm",onClick:()=>h(H.value),className:"text-xs",children:H.label},H.value))})}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Tags (applied to all uploads in this batch)"}),p.length>0&&c.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:p.map(H=>c.jsxs(or,{variant:"secondary",className:"text-xs gap-1",children:[H,c.jsx("button",{onClick:()=>T(H,"upload"),children:c.jsx(Da,{className:"w-2.5 h-2.5"})})]},H))}),c.jsx(rK,{selectedTags:p,onToggle:H=>T(H,"upload"),categorySlugs:o})]}),c.jsx("input",{ref:A,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:E}),c.jsxs(Be,{onClick:()=>{var H;return(H=A.current)==null?void 0:H.click()},disabled:g,className:"btn-gold border-0",children:[c.jsx(Ene,{className:"w-4 h-4 mr-2"}),g?"Uploading...":"Choose Files"]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsx("div",{className:"flex gap-1",children:nK.map(H=>c.jsx(Be,{variant:e===H.value?"default":"ghost",size:"sm",onClick:()=>t(H.value),className:"text-xs",children:H.label},H.value))}),c.jsx(Ct,{value:n,onChange:H=>r(H.target.value),placeholder:"Filter by tag...",className:"max-w-[200px] h-8 text-xs"}),D.length>0&&c.jsx("div",{className:"flex flex-wrap gap-1",children:D.slice(0,8).map(H=>c.jsx("button",{onClick:()=>r(n===H?"":H),className:`text-[10px] px-2 py-0.5 rounded-full border transition-colors ${n===H?"border-accent text-accent bg-accent/10":"border-border text-muted-foreground hover:text-foreground"}`,children:H},H))}),c.jsxs("span",{className:"text-xs text-muted-foreground ml-auto",children:[L.length," item(s)"]})]}),s?c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-3",children:Array.from({length:6}).map((H,q)=>c.jsx(jt,{className:"aspect-square rounded"},q))}):L.length===0?c.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[c.jsx(hU,{className:"w-10 h-10 mx-auto mb-3 opacity-40"}),c.jsx("p",{className:"text-sm",children:"No media yet. Upload images above to build your library."})]}):c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-3",children:L.map(H=>{const q=v===H.id;return c.jsxs("div",{className:"group relative border border-border rounded overflow-hidden bg-muted/30",children:[c.jsx("div",{className:"aspect-square",children:c.jsx("img",{src:lc(H.file_path),alt:H.alt_text||H.file_name,className:"w-full h-full object-cover",loading:"lazy"})}),c.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/50 transition-colors flex items-end",children:c.jsx("div",{className:"w-full p-2 opacity-0 group-hover:opacity-100 transition-opacity",children:c.jsxs("div",{className:"flex gap-1",children:[c.jsxs(Be,{size:"sm",variant:"secondary",className:"h-6 text-[10px] flex-1",onClick:()=>{x(H.id),w([...H.tags]),k(H.alt_text||"")},children:[c.jsx(mU,{className:"w-2.5 h-2.5 mr-0.5"})," Edit"]}),c.jsx(Be,{size:"sm",variant:"destructive",className:"h-6 text-[10px] px-2",onClick:()=>j({id:H.id,filePath:H.file_path,name:H.file_name}),children:c.jsx(hl,{className:"w-2.5 h-2.5"})})]})})}),c.jsx("div",{className:"absolute top-1 left-1",children:c.jsx(or,{variant:"secondary",className:"text-[9px] px-1.5 py-0 bg-background/80 backdrop-blur-sm",children:H.media_type==="logo"?"Logo":"Stock"})}),H.tags.length>0&&c.jsxs("div",{className:"absolute top-1 right-1 flex flex-wrap gap-0.5 justify-end max-w-[70%]",children:[H.tags.slice(0,2).map($=>c.jsx(or,{variant:"outline",className:`text-[8px] px-1 py-0 bg-background/80 backdrop-blur-sm ${$==="cover"||$==="content"?"border-accent text-accent font-semibold":"border-accent/30 text-accent"}`,children:$},$)),H.tags.length>2&&c.jsxs(or,{variant:"outline",className:"text-[8px] px-1 py-0 bg-background/80 backdrop-blur-sm",children:["+",H.tags.length-2]})]}),q&&c.jsxs("div",{className:"absolute inset-0 bg-background/95 backdrop-blur-sm p-3 flex flex-col gap-2 z-10 overflow-y-auto",children:[c.jsx(Ct,{value:B,onChange:$=>k($.target.value),placeholder:"Alt text...",className:"text-xs h-7"}),b.length>0&&c.jsx("div",{className:"flex flex-wrap gap-1",children:b.map($=>c.jsxs(or,{variant:"secondary",className:"text-[9px] gap-0.5",children:[$,c.jsx("button",{onClick:()=>T($,"edit"),children:c.jsx(Da,{className:"w-2 h-2"})})]},$))}),c.jsx(rK,{selectedTags:b,onToggle:$=>T($,"edit"),categorySlugs:o}),c.jsxs("div",{className:"flex gap-1 mt-auto pt-2",children:[c.jsx(Be,{size:"sm",className:"h-6 text-[10px] flex-1",onClick:()=>F(H.id),children:"Save"}),c.jsx(Be,{size:"sm",variant:"ghost",className:"h-6 text-[10px]",onClick:()=>x(null),children:"Cancel"})]})]})]},H.id)})}),c.jsx(Dk,{open:!!N,onOpenChange:H=>!H&&j(null),children:c.jsxs(Hb,{children:[c.jsxs($b,{children:[c.jsxs(Vb,{children:['Delete "',N==null?void 0:N.name,'"?']}),c.jsx(Kb,{children:"This will permanently remove the file from storage. This action cannot be undone."})]}),c.jsxs(zb,{children:[c.jsx(Wb,{children:"Cancel"}),c.jsx(Ay,{onClick:M,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})})]})};function z6(){return Lr({queryKey:["indexing-status"],queryFn:async()=>{const{data:e,error:t}=await Re.from("page_indexing_status").select("*").order("created_at");if(t)throw t;return e||[]}})}function GHe(){const e=Ji();return bs({mutationFn:async t=>{const{data:n}=await Re.from("page_indexing_status").select("id").eq("page_id",t.page_id).maybeSingle();if(n){const{error:r}=await Re.from("page_indexing_status").update({...t,updated_at:new Date().toISOString()}).eq("page_id",t.page_id);if(r)throw r}else{const{error:r}=await Re.from("page_indexing_status").insert(t);if(r)throw r}},onSuccess:()=>e.invalidateQueries({queryKey:["indexing-status"]})})}function rAe(){const{data:e}=Dh(),{data:t}=Ac();_o();const{data:n}=z6();return S.useMemo(()=>{const r=e||[],i=t||[],s=i.filter(B=>B.status==="published"),a=n||[],o=r.reduce((B,k)=>B+(k.min_pages||0),0),l=o>0?Math.min(100,i.length/o*100):100,u=s.filter(B=>B.schema_markup),d=s.length>0?u.length/s.length*100:100;let A=0;for(const B of s){const k=[B.intro_text,B.body_content,...Array.isArray(B.faq_json)?B.faq_json.map(N=>`${N.question} ${N.answer}`):[]].filter(Boolean).join(" ");A+=Bh(k).filter(N=>N.severity==="critical").length}const f=Math.max(0,100-A*10),h=100,p=r.filter(B=>B.cover_image_id&&(B.content_image_ids||[]).length>0),m=r.length>0?p.length/r.length*100:100,g=i.filter(B=>B.meta_title&&B.meta_description),y=i.length>0?g.length/i.length*100:100,v=a.filter(B=>B.google_indexed||B.bing_indexed),x=s.length>0?v.length/s.length*100:0,b=[{label:"Pages",weight:15,score:l},{label:"Schema",weight:25,score:d},{label:"Fair Housing",weight:15,score:f},{label:"Cannibalization",weight:10,score:h},{label:"Images",weight:10,score:m},{label:"Meta",weight:15,score:y},{label:"Indexing",weight:10,score:x}],w=b.reduce((B,k)=>B+k.score*k.weight/100,0);return{total:Math.round(w),factors:b}},[e,t,n])}const YHe=()=>{const{total:e,factors:t}=rAe(),n=e>=75?"text-green-600":e>=50?"text-yellow-600":"text-destructive";return c.jsx(IU,{children:c.jsxs("div",{className:"border rounded-lg p-6 space-y-4 bg-card",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"text-sm font-medium uppercase tracking-wider text-muted-foreground",children:"Site Readiness Score"}),c.jsxs("span",{className:`text-3xl font-bold ${n}`,children:[e,c.jsx("span",{className:"text-lg text-muted-foreground",children:"/100"})]})]}),c.jsx(s0,{value:e,className:"h-3"}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-7 gap-3",children:t.map(r=>c.jsxs(OU,{children:[c.jsx(FU,{asChild:!0,children:c.jsxs("div",{className:"space-y-1",children:[c.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[c.jsx("span",{children:r.label}),c.jsxs("span",{children:[Math.round(r.score),"%"]})]}),c.jsx(s0,{value:r.score,className:"h-1.5"})]})}),c.jsx(UN,{children:c.jsxs("p",{children:[r.label,": ",Math.round(r.score),"% (weight ",r.weight,"%)"]})})]},r.label))})]})})};function XHe(e,t){const n=(e.intro_text||"").split(/\n\n+/).filter(Boolean),r=e.faq_json||[],i=t.filter(u=>u.category_id===e.id);i.filter(u=>u.status==="published");const s=[e.intro_text,...r.map(u=>`${u.question} ${u.answer}`)].filter(Boolean).join(" "),o=Bh(s).filter(u=>u.severity==="critical");return[{label:"Intro text with 3+ paragraphs",passed:n.length>=3,fix:"Add at least 3 paragraphs of intro text"},{label:"Section headings assigned",passed:(e.section_headings||[]).length>0,fix:"Add section headings in Blueprint tab"},{label:"Cover image assigned",passed:!!e.cover_image_id,fix:"Pick a cover image in Content editor"},{label:"Content images for paragraphs",passed:(e.content_image_ids||[]).length>=Math.min(n.length,1),fix:"Assign content images in Content editor"},{label:"FAQs (3+ questions)",passed:r.length>=3,fix:"Add at least 3 FAQ items"},{label:"Video + VideoObject schema",passed:!e.video_url||!!e.video_url,fix:e.video_url?"Ensure VideoObject schema is generated":"Optional — add a video URL"},{label:"Child pages created",passed:i.length>0,fix:"Generate sub-pages in Page Generator tab"},{label:"Fair Housing compliance",passed:o.length===0,fix:`${o.length} critical violation(s) — review flagged terms`}]}function JHe(e){const t=e.faq_json||[],n=(e.body_content||"").split(/\n\n+/).filter(Boolean),r=[e.intro_text,e.body_content,...t.map(s=>`${s.question} ${s.answer}`)].filter(Boolean).join(" "),i=Bh(r).filter(s=>s.severity==="critical");return[{label:"Has h1",passed:!!e.h1,fix:"Set the h1 field"},{label:"Has subheadline",passed:!!e.subheadline,fix:"Add a subheadline"},{label:"Has intro text",passed:!!(e.intro_text&&e.intro_text.length>50),fix:"Write intro text (50+ chars)"},{label:"Body content with 2+ sections",passed:n.length>=2,fix:"Add more body content sections"},{label:"FAQs with FAQPage schema",passed:t.length>=2&&!!e.schema_markup,fix:"Add FAQs and generate schema"},{label:"Has schema markup",passed:!!e.schema_markup,fix:"Generate schema in Page Generator"},{label:"Meta title",passed:!!e.meta_title,fix:"Set meta title"},{label:"Meta description",passed:!!e.meta_description,fix:"Set meta description"},{label:"Fair Housing compliance",passed:i.length===0,fix:`${i.length} critical violation(s)`}]}function ZHe(e,t){return e==="Home"?[{label:"WebSite schema with SearchAction",passed:!1,fix:"Add WebSite JSON-LD with SearchAction to Home page"},{label:"Organization/RealEstateAgent schema",passed:!!t.agent_name,fix:"Set agent name in Agent Config"},{label:"Has og:image",passed:!1,fix:"Add og:image meta tag to Home"},{label:"Has meta description",passed:!1,fix:"Add meta description to Home"}]:e==="About"?[{label:"RealEstateAgent/Person schema",passed:!!t.agent_name,fix:"Ensure About page has Person schema"},{label:"Has sameAs links",passed:!1,fix:"Add social profile URLs to Agent Config"},{label:"Has BreadcrumbList",passed:!1,fix:"Add BreadcrumbList schema"},{label:"Has og:title and og:description",passed:!1,fix:"Add Open Graph meta tags"}]:e==="Contact"?[{label:"LocalBusiness schema with address",passed:!!t.agent_market,fix:"Add LocalBusiness schema with NAP"},{label:"Has phone/email",passed:!!(t.agent_phone||t.agent_email),fix:"Set phone/email in Agent Config"},{label:"Has BreadcrumbList",passed:!1,fix:"Add BreadcrumbList schema"}]:[]}const cI=({type:e,category:t,page:n,pages:r,staticPageName:i,configMap:s})=>{let a=[];e==="category"&&t&&r?a=XHe(t,r):e==="subpage"&&n?a=JHe(n):e==="static"&&i&&s&&(a=ZHe(i,s));const o=a.filter(d=>d.passed).length,l=a.length,u=l>0?Math.round(o/l*100):0;return c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[c.jsxs("span",{children:[o,"/",l," checks passed"]}),c.jsxs("span",{className:u===100?"text-green-600 font-medium":u>=60?"text-yellow-600":"text-destructive font-medium",children:[u,"%"]})]}),c.jsx("div",{className:"space-y-1",children:a.map((d,A)=>c.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[d.passed?c.jsx(M0,{className:"w-4 h-4 text-green-500 mt-0.5 shrink-0"}):c.jsx(e2,{className:"w-4 h-4 text-destructive mt-0.5 shrink-0"}),c.jsxs("div",{children:[c.jsx("span",{className:d.passed?"text-muted-foreground":"text-foreground",children:d.label}),!d.passed&&c.jsx("p",{className:"text-xs text-muted-foreground",children:d.fix})]})]},A))})]})};function e$e(){return Lr({queryKey:["site-wins"],queryFn:async()=>{const{data:e,error:t}=await Re.from("site_wins").select("*").order("created_at",{ascending:!1});if(t)throw t;return e||[]}})}function t$e(){const e=Ji();return bs({mutationFn:async t=>{const{error:n}=await Re.from("site_wins").insert(t);if(n)throw n},onSuccess:()=>e.invalidateQueries({queryKey:["site-wins"]})})}const n$e=()=>{const{data:e}=Ac(),{data:t}=z6(),n=GHe(),r=t$e(),[i,s]=S.useState({}),a=e||[],o=(t||[]).reduce((h,p)=>(h[p.page_id]=p,h),{}),l=(h,p)=>{var m;return i[h]&&p in i[h]?i[h][p]:((m=o[h])==null?void 0:m[p])??(p==="notes"?"":!1)},u=(h,p,m)=>{s(g=>({...g,[h]:{...g[h],[p]:m}}))},d=async(h,p,m)=>{const g=o[h],y=i[h]||{};try{await n.mutateAsync({page_id:h,page_path:p,...y}),y.google_indexed&&!(g!=null&&g.google_indexed)&&await r.mutateAsync({win_type:"indexed",title:`${m} indexed on Google`,page_path:p}),y.bing_indexed&&!(g!=null&&g.bing_indexed)&&await r.mutateAsync({win_type:"indexed",title:`${m} indexed on Bing`,page_path:p}),y.rich_results&&!(g!=null&&g.rich_results)&&await r.mutateAsync({win_type:"rich_results",title:`Rich results detected for ${m}`,page_path:p}),s(v=>{const x={...v};return delete x[h],x}),uw.success("Saved")}catch{uw.error("Failed to save")}},f=[...[{id:"static-home",title:"Home",path:"/"},{id:"static-about",title:"About",path:"/about"},{id:"static-contact",title:"Contact",path:"/contact"}].map(h=>({id:h.id,title:h.title,path:h.path,status:"published"})),...a.map(h=>{var p;return{id:h.id,title:h.title,path:`/${((p=h.category)==null?void 0:p.slug)||"page"}/${h.slug}`,status:h.status}})];return c.jsxs("div",{className:"space-y-4",children:[c.jsx("h3",{className:"text-sm font-medium uppercase tracking-wider text-muted-foreground",children:"Indexing Tracker"}),c.jsx("div",{className:"border rounded-lg overflow-hidden",children:c.jsxs(KD,{children:[c.jsx(WD,{children:c.jsxs(oy,{children:[c.jsx(_a,{className:"w-[200px]",children:"Page"}),c.jsx(_a,{className:"w-[80px]",children:"Status"}),c.jsx(_a,{className:"w-[80px] text-center",children:"Google"}),c.jsx(_a,{className:"w-[80px] text-center",children:"Bing"}),c.jsx(_a,{className:"w-[80px] text-center",children:"Rich"}),c.jsx(_a,{className:"w-[140px]",children:"First Indexed"}),c.jsx(_a,{children:"Notes"}),c.jsx(_a,{className:"w-[60px]"})]})}),c.jsx(qD,{children:f.map(h=>c.jsxs(oy,{children:[c.jsx(ia,{children:c.jsxs("div",{children:[c.jsx("p",{className:"font-medium text-sm",children:h.title}),c.jsx("p",{className:"text-xs text-muted-foreground",children:h.path})]})}),c.jsx(ia,{children:c.jsx("span",{className:`text-xs uppercase tracking-wider ${h.status==="published"?"text-green-600":"text-muted-foreground"}`,children:h.status})}),c.jsx(ia,{className:"text-center",children:c.jsx(rc,{checked:!!l(h.id,"google_indexed"),onCheckedChange:p=>u(h.id,"google_indexed",p)})}),c.jsx(ia,{className:"text-center",children:c.jsx(rc,{checked:!!l(h.id,"bing_indexed"),onCheckedChange:p=>u(h.id,"bing_indexed",p)})}),c.jsx(ia,{className:"text-center",children:c.jsx(rc,{checked:!!l(h.id,"rich_results"),onCheckedChange:p=>u(h.id,"rich_results",p)})}),c.jsx(ia,{children:c.jsx(Ct,{type:"date",className:"h-8 text-xs",value:(l(h.id,"first_indexed_at")||"").slice(0,10),onChange:p=>u(h.id,"first_indexed_at",p.target.value?new Date(p.target.value).toISOString():null)})}),c.jsx(ia,{children:c.jsx(ql,{className:"h-8 min-h-[2rem] text-xs resize-none",placeholder:"Notes...",value:l(h.id,"notes")||"",onChange:p=>u(h.id,"notes",p.target.value)})}),c.jsx(ia,{children:i[h.id]&&c.jsx(Be,{size:"icon",variant:"ghost",onClick:()=>d(h.id,h.path,h.title),children:c.jsx(hb,{className:"w-4 h-4"})})})]},h.id))})]})})]})};function Kn(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function hd(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function r$e(e,t){const n=Kn(e);return isNaN(t)?hd(e,NaN):(n.setDate(n.getDate()+t),n)}const iAe=6048e5,i$e=864e5,hS=43200,iK=1440;let s$e={};function m2(){return s$e}function qb(e,t){var o,l,u,d;const n=m2(),r=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,i=Kn(e),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function Kk(e){return qb(e,{weekStartsOn:1})}function sAe(e){const t=Kn(e),n=t.getFullYear(),r=hd(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=Kk(r),s=hd(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const a=Kk(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function sK(e){const t=Kn(e);return t.setHours(0,0,0,0),t}function Wk(e){const t=Kn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function a$e(e,t){const n=sK(e),r=sK(t),i=+n-Wk(n),s=+r-Wk(r);return Math.round((i-s)/i$e)}function o$e(e){const t=sAe(e),n=hd(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Kk(n)}function $B(e,t){const n=Kn(e),r=Kn(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function l$e(e){return hd(e,Date.now())}function c$e(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function u$e(e){if(!c$e(e)&&typeof e!="number")return!1;const t=Kn(e);return!isNaN(Number(t))}function d$e(e,t){const n=Kn(e),r=Kn(t),i=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return i*12+s}function A$e(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function h$e(e,t){return+Kn(e)-+Kn(t)}function f$e(e){const t=Kn(e);return t.setHours(23,59,59,999),t}function p$e(e){const t=Kn(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function m$e(e){const t=Kn(e);return+f$e(t)==+p$e(t)}function g$e(e,t){const n=Kn(e),r=Kn(t),i=$B(n,r),s=Math.abs(d$e(n,r));let a;if(s<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*s);let o=$B(n,r)===-i;m$e(Kn(e))&&s===1&&$B(e,r)===1&&(o=!1),a=i*(s-Number(o))}return a===0?0:a}function y$e(e,t,n){const r=h$e(e,t)/1e3;return A$e(n==null?void 0:n.roundingMethod)(r)}function v$e(e){const t=Kn(e),n=hd(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const x$e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},w$e=(e,t,n)=>{let r;const i=x$e[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function uI(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const b$e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},C$e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},S$e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},B$e={date:uI({formats:b$e,defaultWidth:"full"}),time:uI({formats:C$e,defaultWidth:"full"}),dateTime:uI({formats:S$e,defaultWidth:"full"})},_$e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},k$e=(e,t,n,r)=>_$e[e];function ax(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const E$e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},N$e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},j$e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},T$e={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},P$e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},I$e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},O$e=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},F$e={ordinalNumber:O$e,era:ax({values:E$e,defaultWidth:"wide"}),quarter:ax({values:N$e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ax({values:j$e,defaultWidth:"wide"}),day:ax({values:T$e,defaultWidth:"wide"}),dayPeriod:ax({values:P$e,defaultWidth:"wide",formattingValues:I$e,defaultFormattingWidth:"wide"})};function ox(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?L$e(o,A=>A.test(a)):M$e(o,A=>A.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function M$e(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function L$e(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function R$e(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}const U$e=/^(\d+)(th|st|nd|rd)?/i,D$e=/\d+/i,Q$e={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},H$e={any:[/^b/i,/^(a|c)/i]},$$e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},z$e={any:[/1/i,/2/i,/3/i,/4/i]},V$e={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},K$e={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},W$e={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},q$e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},G$e={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Y$e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},X$e={ordinalNumber:R$e({matchPattern:U$e,parsePattern:D$e,valueCallback:e=>parseInt(e,10)}),era:ox({matchPatterns:Q$e,defaultMatchWidth:"wide",parsePatterns:H$e,defaultParseWidth:"any"}),quarter:ox({matchPatterns:$$e,defaultMatchWidth:"wide",parsePatterns:z$e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ox({matchPatterns:V$e,defaultMatchWidth:"wide",parsePatterns:K$e,defaultParseWidth:"any"}),day:ox({matchPatterns:W$e,defaultMatchWidth:"wide",parsePatterns:q$e,defaultParseWidth:"any"}),dayPeriod:ox({matchPatterns:G$e,defaultMatchWidth:"any",parsePatterns:Y$e,defaultParseWidth:"any"})},aAe={code:"en-US",formatDistance:w$e,formatLong:B$e,formatRelative:k$e,localize:F$e,match:X$e,options:{weekStartsOn:0,firstWeekContainsDate:1}};function J$e(e){const t=Kn(e);return a$e(t,v$e(t))+1}function Z$e(e){const t=Kn(e),n=+Kk(t)-+o$e(t);return Math.round(n/iAe)+1}function oAe(e,t){var d,A,f,h;const n=Kn(e),r=n.getFullYear(),i=m2(),s=(t==null?void 0:t.firstWeekContainsDate)??((A=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:A.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(f=i.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,a=hd(e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const o=qb(a,t),l=hd(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=qb(l,t);return n.getTime()>=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function e8e(e,t){var o,l,u,d;const n=m2(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=oAe(e,t),s=hd(e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),qb(s,t)}function t8e(e,t){const n=Kn(e),r=+qb(n,t)-+e8e(n,t);return Math.round(r/iAe)+1}function Un(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const qd={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Un(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Un(n+1,2)},d(e,t){return Un(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Un(e.getHours()%12||12,t.length)},H(e,t){return Un(e.getHours(),t.length)},m(e,t){return Un(e.getMinutes(),t.length)},s(e,t){return Un(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Un(i,t.length)}},Gm={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},aK={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return qd.y(e,t)},Y:function(e,t,n,r){const i=oAe(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return Un(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Un(s,t.length)},R:function(e,t){const n=sAe(e);return Un(n,t.length)},u:function(e,t){const n=e.getFullYear();return Un(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Un(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Un(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return qd.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Un(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=t8e(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Un(i,t.length)},I:function(e,t,n){const r=Z$e(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Un(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):qd.d(e,t)},D:function(e,t,n){const r=J$e(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Un(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Un(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Un(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Un(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Gm.noon:r===0?i=Gm.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Gm.evening:r>=12?i=Gm.afternoon:r>=4?i=Gm.morning:i=Gm.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return qd.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):qd.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Un(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Un(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):qd.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):qd.s(e,t)},S:function(e,t){return qd.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return lK(r);case"XXXX":case"XX":return Sf(r);case"XXXXX":case"XXX":default:return Sf(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return lK(r);case"xxxx":case"xx":return Sf(r);case"xxxxx":case"xxx":default:return Sf(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+oK(r,":");case"OOOO":default:return"GMT"+Sf(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+oK(r,":");case"zzzz":default:return"GMT"+Sf(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Un(r,t.length)},T:function(e,t,n){const r=e.getTime();return Un(r,t.length)}};function oK(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Un(s,2)}function lK(e,t){return e%60===0?(e>0?"-":"+")+Un(Math.abs(e)/60,2):Sf(e,t)}function Sf(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Un(Math.trunc(r/60),2),s=Un(r%60,2);return n+i+t+s}const cK=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},lAe=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},n8e=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return cK(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",cK(r,t)).replace("{{time}}",lAe(i,t))},r8e={p:lAe,P:n8e},i8e=/^D+$/,s8e=/^Y+$/,a8e=["D","DD","YY","YYYY"];function o8e(e){return i8e.test(e)}function l8e(e){return s8e.test(e)}function c8e(e,t,n){const r=u8e(e,t,n);if(console.warn(r),a8e.includes(e))throw new RangeError(r)}function u8e(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const d8e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,A8e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,h8e=/^'([^]*?)'?$/,f8e=/''/g,p8e=/[a-zA-Z]/;function m8e(e,t,n){var d,A,f,h;const r=m2(),i=r.locale??aAe,s=r.firstWeekContainsDate??((A=(d=r.locale)==null?void 0:d.options)==null?void 0:A.firstWeekContainsDate)??1,a=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,o=Kn(e);if(!u$e(o))throw new RangeError("Invalid time value");let l=t.match(A8e).map(p=>{const m=p[0];if(m==="p"||m==="P"){const g=r8e[m];return g(p,i.formatLong)}return p}).join("").match(d8e).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:g8e(p)};if(aK[m])return{isToken:!0,value:p};if(m.match(p8e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const u={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(l8e(m)||o8e(m))&&c8e(m,t,String(e));const g=aK[m[0]];return g(o,m,i.localize,u)}).join("")}function g8e(e){const t=e.match(h8e);return t?t[1].replace(f8e,"'"):e}function y8e(e,t,n){const r=m2(),i=(n==null?void 0:n.locale)??r.locale??aAe,s=2520,a=$B(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const o=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:a});let l,u;a>0?(l=Kn(t),u=Kn(e)):(l=Kn(e),u=Kn(t));const d=y$e(u,l),A=(Wk(u)-Wk(l))/1e3,f=Math.round((d-A)/60);let h;if(f<2)return n!=null&&n.includeSeconds?d<5?i.formatDistance("lessThanXSeconds",5,o):d<10?i.formatDistance("lessThanXSeconds",10,o):d<20?i.formatDistance("lessThanXSeconds",20,o):d<40?i.formatDistance("halfAMinute",0,o):d<60?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",1,o):f===0?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",f,o);if(f<45)return i.formatDistance("xMinutes",f,o);if(f<90)return i.formatDistance("aboutXHours",1,o);if(f<iK){const p=Math.round(f/60);return i.formatDistance("aboutXHours",p,o)}else{if(f<s)return i.formatDistance("xDays",1,o);if(f<hS){const p=Math.round(f/iK);return i.formatDistance("xDays",p,o)}else if(f<hS*2)return h=Math.round(f/hS),i.formatDistance("aboutXMonths",h,o)}if(h=g$e(u,l),h<12){const p=Math.round(f/hS);return i.formatDistance("xMonths",p,o)}else{const p=h%12,m=Math.trunc(h/12);return p<3?i.formatDistance("aboutXYears",m,o):p<9?i.formatDistance("overXYears",m,o):i.formatDistance("almostXYears",m+1,o)}}function hy(e,t){return y8e(e,l$e(e),t)}const v8e={indexed:c.jsx(t2,{className:"w-4 h-4 text-green-500"}),rich_results:c.jsx(yo,{className:"w-4 h-4 text-yellow-500"}),published:c.jsx(sbe,{className:"w-4 h-4 text-blue-500"}),schema:c.jsx(kne,{className:"w-4 h-4 text-purple-500"})},x8e=()=>{const{data:e}=e$e(),{data:t}=z6(),{data:n}=Ac(),{total:r}=rAe(),i=(n||[]).filter(l=>l.status==="published").length,s=(t||[]).filter(l=>l.google_indexed||l.bing_indexed).length,a=(t||[]).filter(l=>l.rich_results).length,o=r>=75?"text-green-600":r>=50?"text-yellow-600":"text-destructive";return c.jsxs("div",{className:"space-y-8",children:[c.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[c.jsx("div",{className:`text-6xl font-bold ${o}`,children:r}),c.jsx("p",{className:"text-sm text-muted-foreground uppercase tracking-wider",children:"Site Readiness Score"}),c.jsx(s0,{value:r,className:"h-3 w-64"})]}),c.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[c.jsxs("div",{className:"border rounded-lg p-4 text-center bg-card",children:[c.jsx("p",{className:"text-2xl font-bold",children:i}),c.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Published"})]}),c.jsxs("div",{className:"border rounded-lg p-4 text-center bg-card",children:[c.jsx("p",{className:"text-2xl font-bold",children:s}),c.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Indexed"})]}),c.jsxs("div",{className:"border rounded-lg p-4 text-center bg-card",children:[c.jsx("p",{className:"text-2xl font-bold",children:a}),c.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Rich Results"})]})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("h3",{className:"text-sm font-medium uppercase tracking-wider text-muted-foreground",children:"Recent Wins"}),(!e||e.length===0)&&c.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No wins yet — they'll appear here as pages get indexed and milestones are hit."}),c.jsx("div",{className:"space-y-2",children:(e||[]).map(l=>c.jsxs("div",{className:"flex items-start gap-3 border rounded-lg p-3 bg-card",children:[c.jsx("div",{className:"mt-0.5",children:v8e[l.win_type]||c.jsx(kne,{className:"w-4 h-4 text-muted-foreground"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm font-medium",children:l.title}),l.description&&c.jsx("p",{className:"text-xs text-muted-foreground",children:l.description})]}),c.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:m8e(new Date(l.created_at),"MMM d")})]},l.id))})]})]})},w8e=()=>{const{data:e}=Dh(),{data:t}=Ac(),{configMap:n}=_o(),[r,i]=S.useState("admin"),s=e||[],a=t||[];return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{onClick:()=>i("admin"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded text-xs uppercase tracking-wider font-medium transition-colors ${r==="admin"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:[c.jsx(pU,{className:"w-3.5 h-3.5"}),"Admin"]}),c.jsxs("button",{onClick:()=>i("client"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded text-xs uppercase tracking-wider font-medium transition-colors ${r==="client"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:[c.jsx(db,{className:"w-3.5 h-3.5"}),"Client"]})]}),r==="client"?c.jsx(x8e,{}):c.jsxs("div",{className:"space-y-8",children:[c.jsx(YHe,{}),c.jsxs(u2,{defaultValue:"categories",className:"space-y-4",children:[c.jsxs(G0,{className:"bg-muted/50 p-1",children:[c.jsx(ii,{value:"categories",className:"text-xs uppercase tracking-wider",children:"Categories"}),c.jsx(ii,{value:"subpages",className:"text-xs uppercase tracking-wider",children:"Sub-Pages"}),c.jsx(ii,{value:"static",className:"text-xs uppercase tracking-wider",children:"Static Pages"}),c.jsx(ii,{value:"indexing",className:"text-xs uppercase tracking-wider",children:"Indexing"})]}),c.jsxs(si,{value:"categories",className:"space-y-3",children:[s.map(o=>c.jsxs(Ew,{children:[c.jsxs(Nw,{className:"flex items-center justify-between w-full border rounded-lg p-3 bg-card hover:bg-muted/30 transition-colors",children:[c.jsx("span",{className:"text-sm font-medium",children:o.name}),c.jsx(Gc,{className:"w-4 h-4 text-muted-foreground"})]}),c.jsx(jw,{className:"border border-t-0 rounded-b-lg p-4 bg-card",children:c.jsx(cI,{type:"category",category:o,pages:a})})]},o.id)),s.length===0&&c.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No categories created yet."})]}),c.jsxs(si,{value:"subpages",className:"space-y-3",children:[a.filter(o=>!o.is_parent).map(o=>c.jsxs(Ew,{children:[c.jsxs(Nw,{className:"flex items-center justify-between w-full border rounded-lg p-3 bg-card hover:bg-muted/30 transition-colors",children:[c.jsxs("div",{className:"text-left",children:[c.jsx("span",{className:"text-sm font-medium",children:o.title}),c.jsxs("span",{className:"text-xs text-muted-foreground ml-2",children:["(",o.status,")"]})]}),c.jsx(Gc,{className:"w-4 h-4 text-muted-foreground"})]}),c.jsx(jw,{className:"border border-t-0 rounded-b-lg p-4 bg-card",children:c.jsx(cI,{type:"subpage",page:o})})]},o.id)),a.filter(o=>!o.is_parent).length===0&&c.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No sub-pages created yet."})]}),c.jsx(si,{value:"static",className:"space-y-3",children:["Home","About","Contact"].map(o=>c.jsxs(Ew,{children:[c.jsxs(Nw,{className:"flex items-center justify-between w-full border rounded-lg p-3 bg-card hover:bg-muted/30 transition-colors",children:[c.jsx("span",{className:"text-sm font-medium",children:o}),c.jsx(Gc,{className:"w-4 h-4 text-muted-foreground"})]}),c.jsx(jw,{className:"border border-t-0 rounded-b-lg p-4 bg-card",children:c.jsx(cI,{type:"static",staticPageName:o,configMap:n})})]},o))}),c.jsx(si,{value:"indexing",children:c.jsx(n$e,{})})]})]})]})};function Ym({value:e,label:t}){return e===null?c.jsxs("span",{title:`${t}: N/A`,className:"inline-flex items-center gap-1",children:[c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/60 uppercase",children:t}),c.jsx(vne,{size:14,className:"text-muted-foreground/40"})]}):c.jsxs("span",{title:`${t}: ${e?"Pass":"Fail"}`,className:"inline-flex items-center gap-1",children:[c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/60 uppercase",children:t}),e?c.jsx(M0,{size:14,className:"text-emerald-500"}):c.jsx(e2,{size:14,className:"text-red-500"})]})}function uK({label:e,state:t,onClick:n}){const r={none:"text-red-500",submitted:"text-yellow-500",indexed:"text-emerald-500"},i={none:"Not submitted",submitted:"Submitted (pending)",indexed:"Indexed"},s=t==="indexed"?M0:t==="submitted"?xne:e2;return c.jsxs("button",{onClick:n,title:`${e}: ${i[t]} — Click to advance`,className:"inline-flex items-center gap-1 hover:opacity-80 transition-opacity",children:[c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground/60 uppercase",children:e}),c.jsx(s,{size:14,className:r[t],fill:t==="submitted"?"currentColor":"none"})]})}function dK(e,t){return t?"indexed":e?"submitted":"none"}function AK(e){return e==="none"?{submitted:!0,indexed:!1}:e==="submitted"?{submitted:!0,indexed:!0}:{submitted:!1,indexed:!1}}const qk=["/idx","/home-valuation"];function lx({entry:e,onToggleIndex:t}){const n=e.scan,r=["aeo","category","subcategory"].includes(e.page_type),i=qk.includes(e.page_path),s=qk.includes(e.page_path),a=dK((n==null?void 0:n.google_submitted)??!1,(n==null?void 0:n.google_indexed)??!1),o=dK((n==null?void 0:n.bing_submitted)??!1,(n==null?void 0:n.bing_indexed)??!1);return c.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 border-b border-border/40 hover:bg-muted/30 transition-colors",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"font-mono text-sm truncate",children:e.page_path}),c.jsx(or,{variant:"outline",className:"text-[10px] uppercase tracking-wider shrink-0",children:e.page_type})]}),e.page_title&&c.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:e.page_title})]}),c.jsxs("div",{className:"flex items-center gap-2.5 shrink-0 flex-wrap justify-end",children:[c.jsx(uK,{label:"G",state:a,onClick:()=>t(e.page_path,"google",AK(a))}),c.jsx(uK,{label:"B",state:o,onClick:()=>t(e.page_path,"bing",AK(o))}),c.jsx(Ym,{value:n?i?null:n.has_schema:null,label:"S"}),c.jsx(Ym,{value:n&&r?n.faq_schema_matches:null,label:"F"}),c.jsx(Ym,{value:n?n.has_meta_title&&n.has_meta_description:null,label:"M"}),c.jsx(Ym,{value:(n==null?void 0:n.in_sitemap)??null,label:"SM"}),c.jsx(Ym,{value:n?s?null:n.in_aeo_sitemap??!1:null,label:"AEO"}),c.jsx(Ym,{value:(n==null?void 0:n.in_llms_txt)??null,label:"LLM"})]})]})}function fS({title:e,count:t}){return c.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-muted/50 border-b border-border",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:e}),c.jsx(or,{variant:"secondary",className:"text-[10px]",children:t})]})}const hK=[{path:"/",title:"Home"},{path:"/about",title:"About"},{path:"/about/testimonials",title:"Testimonials"},{path:"/contact",title:"Contact"},{path:"/idx",title:"Home Search"},{path:"/home-valuation",title:"Home Valuation"},{path:"/privacy-policy",title:"Privacy Policy"},{path:"/terms-of-service",title:"Terms of Service"},{path:"/accessibility",title:"Accessibility"}],cAe=[{path:"/blog",title:"Blog"},{path:"/properties",title:"Properties"}];cAe.map(e=>e.path);function b8e(){var x;const e=Ji(),{data:t,isLoading:n}=Lr({queryKey:["crawl-scan-results"],queryFn:async()=>{const{data:b,error:w}=await Re.from("crawl_scan_results").select("*").order("page_type").order("page_path");if(w)throw w;return b||[]}}),{data:r,isLoading:i}=Dh(),{data:s,isLoading:a}=Ac(),o=n||i||a,l=S.useMemo(()=>{const b={};for(const w of t||[])b[w.page_path]=w;return b},[t]),u=S.useMemo(()=>{const b=[],w=new Set;for(const T of hK)b.push({page_path:T.path,page_title:T.title,page_type:"static",scan:l[T.path]}),w.add(T.path);const B=new Set(hK.map(T=>T.path)),k=(r||[]).filter(T=>T.enabled),N={};for(const T of k)N[T.id]=T;const j=k.filter(T=>!T.parent_id),L=k.filter(T=>T.parent_id);for(const T of j){const E=`/${T.slug}`;w.has(E)||B.has(E)||(b.push({page_path:E,page_title:T.name,page_type:"category",scan:l[E]}),w.add(E))}for(const T of L){const E=N[T.parent_id];if(!E)continue;const F=`/${E.slug}/${T.slug}`;w.has(F)||B.has(F)||(b.push({page_path:F,page_title:T.name,page_type:"subcategory",scan:l[F]}),w.add(F))}for(const T of s||[]){const E=(r||[]).find(M=>M.id===T.category_id);if(!(E!=null&&E.enabled))continue;let F;if(E.parent_id){const M=N[E.parent_id];F=M?`/${M.slug}/${E.slug}/${T.slug}`:`/${E.slug}/${T.slug}`}else F=`/${E.slug}/${T.slug}`;w.has(F)||(b.push({page_path:F,page_title:T.title,page_type:"aeo",scan:l[F]}),w.add(F))}for(const T of cAe)w.has(T.path)||(b.push({page_path:T.path,page_title:T.title,page_type:"dormant",scan:l[T.path]}),w.add(T.path));return b},[t,r,s,l]),d=bs({mutationFn:async({page_path:b,field:w,next:B})=>{const k={};k[`${w}_submitted`]=B.submitted,k[`${w}_indexed`]=B.indexed;const{data:N}=await Re.from("crawl_scan_results").select("id").eq("page_path",b).maybeSingle();if(N){const{error:j}=await Re.from("crawl_scan_results").update(k).eq("page_path",b);if(j)throw j}else{const j=u.find(T=>T.page_path===b),{error:L}=await Re.from("crawl_scan_results").insert({page_path:b,page_title:(j==null?void 0:j.page_title)||b,page_type:(j==null?void 0:j.page_type)==="dormant"?"static":(j==null?void 0:j.page_type)||"static",...k});if(L)throw L}},onSuccess:()=>e.invalidateQueries({queryKey:["crawl-scan-results"]}),onError:b=>uw.error(`Update failed: ${b.message}`)}),A=(b,w,B)=>{d.mutate({page_path:b,field:w,next:B})},f=bs({mutationFn:async()=>{const{data:{session:b}}=await Re.auth.getSession();if(!b)throw new Error("Not authenticated");const w=await Re.functions.invoke("run-crawl-scan",{headers:{Authorization:`Bearer ${b.access_token}`}});if(w.error)throw w.error;return w.data},onSuccess:b=>{e.invalidateQueries({queryKey:["crawl-scan-results"]});const w=b.cleaned>0?` · ${b.cleaned} orphan(s) removed`:"";uw.success(`Scan complete: ${b.scanned} pages checked${w}`)},onError:b=>uw.error(`Scan failed: ${b.message}`)}),h=u.filter(b=>b.page_type!=="dormant"),p=u.filter(b=>b.page_type==="dormant"),m={static:h.filter(b=>b.page_type==="static"),category:h.filter(b=>b.page_type==="category"||b.page_type==="subcategory"),aeo:h.filter(b=>b.page_type==="aeo"),blog:h.filter(b=>b.page_type==="blog")},g=h.filter(b=>{if(!b.scan)return!1;const w=b.scan,k=!qk.includes(b.page_path)?w.has_schema:!0,N=w.has_meta_title&&w.has_meta_description,j=w.in_sitemap||w.in_aeo_sitemap,T=!qk.includes(b.page_path)&&b.page_path!=="/"?w.has_shadow_html:!0;return k&&N&&j&&T}).length,y=h.length,v=(x=t==null?void 0:t[0])==null?void 0:x.scan_timestamp;return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-semibold tracking-tight",children:"Crawlability Map"}),c.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"3-layer AEO visibility: Schema · Sitemaps · Shadow HTML · LLMs.txt"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[v&&c.jsxs("span",{className:"text-xs text-muted-foreground",children:["Last scan: ",new Date(v).toLocaleString()]}),c.jsxs(Be,{onClick:()=>f.mutate(),disabled:f.isPending,className:"gap-2",children:[f.isPending?c.jsx(bo,{size:16,className:"animate-spin"}):c.jsx(Qc,{size:16}),"Run Full Scan"]})]})]}),y>0&&c.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg bg-muted/30 border",children:[c.jsxs("div",{className:"text-center",children:[c.jsxs("div",{className:"text-3xl font-bold",children:[g,"/",y]}),c.jsx("div",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Pages Healthy"})]}),c.jsx("div",{className:"flex-1 h-3 bg-muted rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-emerald-500 rounded-full transition-all",style:{width:`${y>0?g/y*100:0}%`}})}),c.jsxs("div",{className:"text-sm font-medium",children:[y>0?Math.round(g/y*100):0,"%"]})]}),c.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5 text-xs text-muted-foreground p-3 rounded-md bg-muted/20 border",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"font-mono font-bold",children:"G"})," Google"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"font-mono font-bold",children:"B"})," Bing"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"font-mono font-bold",children:"S"})," JSON-LD Schema"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"font-mono font-bold",children:"F"})," FAQ Schema"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"font-mono font-bold",children:"M"})," Meta Tags"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"font-mono font-bold",children:"SM"})," Sitemap"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"font-mono font-bold",children:"AEO"})," AEO Sitemap / Shadow HTML"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"font-mono font-bold",children:"LLM"})," In llms.txt"]}),c.jsxs("span",{className:"flex items-center gap-1.5 ml-2 border-l pl-3 border-border",children:[c.jsx(e2,{size:12,className:"text-red-500"})," Not Submitted",c.jsx(xne,{size:12,className:"text-yellow-500 fill-yellow-500"})," Submitted",c.jsx(M0,{size:12,className:"text-emerald-500"})," Indexed / Pass",c.jsx(vne,{size:12,className:"text-muted-foreground/40"})," N/A"]})]}),o?c.jsx("div",{className:"flex items-center justify-center py-16",children:c.jsx(bo,{className:"animate-spin text-muted-foreground",size:24})}):c.jsxs("div",{className:"border rounded-lg overflow-hidden",children:[m.static.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(fS,{title:"Static Pages",count:m.static.length}),m.static.map(b=>c.jsx(lx,{entry:b,onToggleIndex:A},b.page_path))]}),m.category.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(fS,{title:"Category Pages",count:m.category.length}),m.category.map(b=>c.jsx(lx,{entry:b,onToggleIndex:A},b.page_path))]}),m.aeo.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(fS,{title:"AEO / FAQ Pages",count:m.aeo.length}),m.aeo.map(b=>c.jsx(lx,{entry:b,onToggleIndex:A},b.page_path))]}),m.blog.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(fS,{title:"Blog Posts",count:m.blog.length}),m.blog.map(b=>c.jsx(lx,{entry:b,onToggleIndex:A},b.page_path))]}),p.length>0&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-muted/30 border-b border-border",children:[c.jsx("span",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground/60",children:"Dormant Pages"}),c.jsx(or,{variant:"outline",className:"text-[10px] text-muted-foreground/60",children:p.length})]}),p.map(b=>c.jsx("div",{className:"opacity-50",children:c.jsx(lx,{entry:b,onToggleIndex:A})},b.page_path))]})]})]})}const C8e=()=>{const{configMap:e,isLoading:t}=_o(),{data:n,isLoading:r}=Ac(),i=(n||[]).filter(u=>u.status==="published"),s=i.filter(u=>u.schema_markup),a=S.useMemo(()=>{if(!n||i.length===0)return{clean:!0,count:0};let u=0;for(const d of i){const A=[d.intro_text,d.body_content,...Array.isArray(d.faq_json)?d.faq_json.map(f=>`${f.question} ${f.answer}`):[]].filter(Boolean).join(" ");u+=Bh(A).filter(f=>f.severity==="critical").length}return{clean:u===0,count:u}},[n,i]);if(t||r)return null;const o=[{label:"Config",healthy:!!(e.agent_name&&e.agent_market),tooltip:e.agent_name&&e.agent_market?"Agent name and market are configured":"Set agent name and market in Agent Config tab"},{label:"Pages",healthy:(n||[]).length>0,tooltip:(n||[]).length>0?`${(n||[]).length} page(s) created`:"No AEO pages created yet"},{label:"Schema",healthy:i.length===0||s.length===i.length,tooltip:i.length===0?"No published pages to check":`${s.length}/${i.length} published pages have schema markup`},{label:"Fair Housing",healthy:a.clean,tooltip:a.clean?"All published content passes Fair Housing compliance":`${a.count} critical Fair Housing issue(s) found in published content`}],l=o.every(u=>u.healthy);return c.jsx(IU,{children:c.jsxs("div",{className:`flex items-center gap-6 px-4 py-2.5 border rounded text-xs tracking-wider uppercase ${l?"border-border bg-muted/30":"border-destructive/30 bg-destructive/5"}`,children:[c.jsx("span",{className:"font-medium text-muted-foreground",children:"Site Health"}),o.map(u=>c.jsxs(OU,{children:[c.jsx(FU,{asChild:!0,children:c.jsxs("div",{className:"flex items-center gap-1.5 cursor-default",children:[c.jsx("span",{className:`w-2 h-2 rounded-full ${u.healthy?"bg-green-500":"bg-destructive"}`}),c.jsx("span",{className:"text-muted-foreground",children:u.label})]})}),c.jsx(UN,{children:c.jsx("p",{children:u.tooltip})})]},u.label))]})})},S8e=({open:e,onOpenChange:t,syncReport:n,setSyncReport:r,isSyncing:i})=>{const[s,a]=S.useState(!1),[o,l]=S.useState(!1),[u,d]=S.useState(!1),[A,f]=S.useState(null),h="khmmwvmdbhaplcfcndjx",p="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtobW13dm1kYmhhcGxjZmNuZGp4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzcwNTQ1MDcsImV4cCI6MjA5MjYzMDUwN30.c5aUVQ4shbnMOIIkDZRP7geMUb64HPKYg4jQFuBH52Q",m=async()=>{var w,B;a(!0);try{const k=(w=n==null?void 0:n.audit)==null?void 0:w.some(E=>{var F,M;return((F=E.contentSync)==null?void 0:F.includes("llms"))||((M=E.contentSync)==null?void 0:M.includes("both"))}),N=(B=n==null?void 0:n.audit)==null?void 0:B.some(E=>{var F,M;return((F=E.contentSync)==null?void 0:F.includes("html"))||((M=E.contentSync)==null?void 0:M.includes("both"))}),L=await fetch(`https://${h}.supabase.co/functions/v1/sync-site-content?fix=${k&&N?"all":k?"llms":N?"html":"all"}`,{headers:{apikey:p}});if(!L.ok)throw new Error(await L.text());const T=await L.json();r(T),Xe({title:"Content mismatches fixed",description:`${T.summary.content_mismatches} remaining mismatches`})}catch(k){Xe({title:"Fix failed",description:k.message,variant:"destructive"})}finally{a(!1)}},g=async()=>{l(!0);try{const w=await fetch(`https://${h}.supabase.co/functions/v1/sync-site-content?fix=html`,{headers:{apikey:p}});if(!w.ok)throw new Error(await w.text());const B=await w.json();r(B),Xe({title:"HTML issues fixed",description:`${B.summary.html_issues||0} remaining issues`})}catch(w){Xe({title:"Fix failed",description:w.message,variant:"destructive"})}finally{l(!1)}},y=async()=>{d(!0);try{await fetch(`https://${h}.supabase.co/functions/v1/sitemap`,{headers:{apikey:p}});const w=await fetch(`https://${h}.supabase.co/functions/v1/sync-site-content?fix=all`,{headers:{apikey:p}});if(!w.ok)throw new Error(await w.text());const B=await w.json();r(B),Xe({title:"All issues fixed",description:"Sitemaps rebuilt, HTML & llms files regenerated."})}catch(w){Xe({title:"Fix All failed",description:w.message,variant:"destructive"})}finally{d(!1)}},v=async w=>{const B=w.path;f(B);try{const k=w.sourceId?`&id=${w.sourceId}`:"",N=w.type==="core"?"core":"aeo";await fetch(`https://${h}.supabase.co/functions/v1/generate-static-html?type=${N}${k}`,{headers:{apikey:p}}),await Promise.all([fetch(`https://${h}.supabase.co/functions/v1/generate-llms-txt?type=index&rebuild=true`,{headers:{apikey:p}}),fetch(`https://${h}.supabase.co/functions/v1/generate-llms-txt?type=full&rebuild=true`,{headers:{apikey:p}})]),Xe({title:`Regenerated assets for "${w.title}"`});const j=await fetch(`https://${h}.supabase.co/functions/v1/sync-site-content`,{headers:{apikey:p}});if(j.ok){const L=await j.json();r(L)}}catch(k){Xe({title:"Row fix failed",description:k.message,variant:"destructive"})}finally{f(null)}},x=w=>{var B,k;return w.llmsIndex==="❌"||w.llmsFull==="❌"||w.staticHtml==="❌"||w.redirect==="❌"||((B=w.contentSync)==null?void 0:B.includes("❌"))||((k=w.contentSync)==null?void 0:k.includes("⚠️"))},b=n?(n.summary.has_gaps||0)+(n.summary.html_issues||0)+(n.summary.content_mismatches||0):0;return c.jsx($c,{open:e,onOpenChange:t,children:c.jsxs(Gl,{className:"max-w-4xl max-h-[85vh] overflow-y-auto",children:[c.jsx(Yl,{children:c.jsx(Xl,{children:"Site Sync & Coverage Audit"})}),i?c.jsxs("div",{className:"py-12 flex flex-col items-center justify-center text-muted-foreground gap-4",children:[c.jsx(Qc,{className:"w-8 h-8 animate-spin text-primary"}),c.jsx("p",{children:"Synchronizing sitemap, static HTML files, and AI models text..."})]}):n?c.jsxs("div",{className:"space-y-6 mt-4",children:[c.jsxs("div",{className:"grid grid-cols-3 md:grid-cols-6 gap-4",children:[c.jsxs("div",{className:"bg-muted p-4 rounded-lg text-center",children:[c.jsx("p",{className:"text-2xl font-bold",children:n.summary.total_pages}),c.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Total Pages"})]}),c.jsxs("div",{className:"bg-muted p-4 rounded-lg text-center",children:[c.jsx("p",{className:"text-2xl font-bold text-green-600",children:n.summary.fully_covered}),c.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Covered"})]}),c.jsxs("div",{className:"bg-muted p-4 rounded-lg text-center",children:[c.jsx("p",{className:`text-2xl font-bold ${n.summary.has_gaps>0?"text-destructive":"text-green-600"}`,children:n.summary.has_gaps}),c.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Missing Items"})]}),c.jsxs("div",{className:"bg-muted p-4 rounded-lg text-center",children:[c.jsx("p",{className:"text-2xl font-bold",children:n.summary.generated_html_files}),c.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"HTML Files"})]}),c.jsxs("div",{className:"bg-muted p-4 rounded-lg text-center",children:[c.jsx("p",{className:`text-2xl font-bold ${(n.summary.html_issues||0)>0?"text-destructive":"text-green-600"}`,children:n.summary.html_issues||0}),c.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"HTML Issues"})]}),c.jsxs("div",{className:"bg-muted p-4 rounded-lg text-center",children:[c.jsx("p",{className:`text-2xl font-bold ${n.summary.content_mismatches>0?"text-destructive":"text-green-600"}`,children:n.summary.content_mismatches}),c.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Content Mismatches"})]})]}),b>0&&c.jsxs("div",{className:"flex items-center gap-3 p-4 bg-primary/10 border border-primary/20 rounded-lg",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("p",{className:"text-sm font-medium",children:[b," total issue",b!==1?"s":""," detected across all checks"]}),c.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Rebuilds sitemaps, regenerates all HTML files, and refreshes llms.txt files in one pass."})]}),c.jsxs(Be,{size:"sm",onClick:y,disabled:u,children:[c.jsx(F8,{className:`w-3.5 h-3.5 mr-1.5 ${u?"animate-spin":""}`}),u?"Fixing Everything...":"Fix All Issues"]})]}),n.summary.content_mismatches>0&&c.jsxs("div",{className:"flex items-center gap-3 p-4 bg-destructive/10 border border-destructive/20 rounded-lg",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("p",{className:"text-sm font-medium",children:[n.summary.content_mismatches," content mismatch",n.summary.content_mismatches!==1?"es":""," detected"]}),c.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"The database (source of truth) will be used to regenerate stale llms and/or HTML files."})]}),c.jsxs(Be,{size:"sm",variant:"destructive",onClick:m,disabled:s,children:[c.jsx(Qc,{className:`w-3.5 h-3.5 mr-1.5 ${s?"animate-spin":""}`}),s?"Fixing...":"Fix Mismatches"]})]}),(n.summary.html_issues||0)>0&&c.jsxs("div",{className:"flex items-center gap-3 p-4 bg-amber-500/10 border border-amber-500/20 rounded-lg",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("p",{className:"text-sm font-medium",children:[n.summary.html_issues," HTML issue",n.summary.html_issues!==1?"s":""," detected"]}),c.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[n.summary.missing_html>0&&`${n.summary.missing_html} missing file${n.summary.missing_html!==1?"s":""}`,n.summary.missing_html>0&&n.summary.missing_redirects>0&&" · ",n.summary.missing_redirects>0&&`${n.summary.missing_redirects} missing redirect${n.summary.missing_redirects!==1?"s":""}`," — ","Regenerating will create missing files and inject redirect scripts."]})]}),c.jsxs(Be,{size:"sm",variant:"outline",className:"border-amber-500/30 hover:bg-amber-500/10",onClick:g,disabled:o,children:[c.jsx(Qc,{className:`w-3.5 h-3.5 mr-1.5 ${o?"animate-spin":""}`}),o?"Fixing...":"Fix All HTML Issues"]})]}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-lg font-medium mb-3",children:"Coverage Audit"}),c.jsx("div",{className:"border rounded-md overflow-x-auto",children:c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{className:"bg-muted",children:c.jsxs("tr",{children:[c.jsx("th",{className:"p-3 text-left font-medium",children:"Page Title"}),c.jsx("th",{className:"p-3 text-left font-medium",children:"Path"}),c.jsx("th",{className:"p-3 text-center font-medium",children:"Sitemap"}),c.jsx("th",{className:"p-3 text-center font-medium",children:"AEO Sitemap"}),c.jsx("th",{className:"p-3 text-center font-medium",children:"llms.txt"}),c.jsx("th",{className:"p-3 text-center font-medium",children:"llms-full"}),c.jsx("th",{className:"p-3 text-center font-medium",children:"HTML"}),c.jsx("th",{className:"p-3 text-center font-medium",children:"Redirect"}),c.jsx("th",{className:"p-3 text-center font-medium",children:"Content Sync"}),c.jsx("th",{className:"p-3 text-center font-medium",children:"Fix"})]})}),c.jsx("tbody",{className:"divide-y",children:n.audit.map((w,B)=>c.jsxs("tr",{className:"hover:bg-muted/50",children:[c.jsx("td",{className:"p-3 font-medium",children:w.title}),c.jsx("td",{className:"p-3 text-muted-foreground font-mono text-xs",children:w.path}),c.jsx("td",{className:"p-3 text-center",children:w.sitemap}),c.jsx("td",{className:"p-3 text-center",children:w.sitemapAeo||"—"}),c.jsx("td",{className:"p-3 text-center",title:w.llmsIndexDetail||"",children:w.llmsIndex}),c.jsx("td",{className:"p-3 text-center",title:w.llmsFullDetail||"",children:w.llmsFull}),c.jsx("td",{className:"p-3 text-center",children:w.staticHtml}),c.jsx("td",{className:"p-3 text-center",children:w.redirect}),c.jsx("td",{className:"p-3 text-center",title:w.contentDetail||"",children:w.contentSync}),c.jsx("td",{className:"p-3 text-center",children:x(w)?c.jsx(Be,{size:"icon",variant:"ghost",className:"h-7 w-7",onClick:()=>v(w),disabled:A===w.path,title:`Fix ${w.title}`,children:A===w.path?c.jsx(Qc,{className:"w-3.5 h-3.5 animate-spin"}):c.jsx(F8,{className:"w-3.5 h-3.5"})}):c.jsx("span",{className:"text-muted-foreground text-xs",children:"—"})})]},B))})]})})]})]}):null]})})};var B8e=Array.isArray,$a=B8e,_8e=typeof TA=="object"&&TA&&TA.Object===Object&&TA,uAe=_8e,k8e=uAe,E8e=typeof self=="object"&&self&&self.Object===Object&&self,N8e=k8e||E8e||Function("return this")(),du=N8e,j8e=du,T8e=j8e.Symbol,g2=T8e,fK=g2,dAe=Object.prototype,P8e=dAe.hasOwnProperty,I8e=dAe.toString,cx=fK?fK.toStringTag:void 0;function O8e(e){var t=P8e.call(e,cx),n=e[cx];try{e[cx]=void 0;var r=!0}catch{}var i=I8e.call(e);return r&&(t?e[cx]=n:delete e[cx]),i}var F8e=O8e,M8e=Object.prototype,L8e=M8e.toString;function R8e(e){return L8e.call(e)}var U8e=R8e,pK=g2,D8e=F8e,Q8e=U8e,H8e="[object Null]",$8e="[object Undefined]",mK=pK?pK.toStringTag:void 0;function z8e(e){return e==null?e===void 0?$8e:H8e:mK&&mK in Object(e)?D8e(e):Q8e(e)}var Bd=z8e;function V8e(e){return e!=null&&typeof e=="object"}var _d=V8e,K8e=Bd,W8e=_d,q8e="[object Symbol]";function G8e(e){return typeof e=="symbol"||W8e(e)&&K8e(e)==q8e}var Z0=G8e,Y8e=$a,X8e=Z0,J8e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z8e=/^\w*$/;function e7e(e,t){if(Y8e(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||X8e(e)?!0:Z8e.test(e)||!J8e.test(e)||t!=null&&e in Object(t)}var V6=e7e;function t7e(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var $h=t7e;const ev=Bn($h);var n7e=Bd,r7e=$h,i7e="[object AsyncFunction]",s7e="[object Function]",a7e="[object GeneratorFunction]",o7e="[object Proxy]";function l7e(e){if(!r7e(e))return!1;var t=n7e(e);return t==s7e||t==a7e||t==i7e||t==o7e}var K6=l7e;const un=Bn(K6);var c7e=du,u7e=c7e["__core-js_shared__"],d7e=u7e,dI=d7e,gK=function(){var e=/[^.]+$/.exec(dI&&dI.keys&&dI.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function A7e(e){return!!gK&&gK in e}var h7e=A7e,f7e=Function.prototype,p7e=f7e.toString;function m7e(e){if(e!=null){try{return p7e.call(e)}catch{}try{return e+""}catch{}}return""}var AAe=m7e,g7e=K6,y7e=h7e,v7e=$h,x7e=AAe,w7e=/[\\^$.*+?()[\]{}|]/g,b7e=/^\[object .+?Constructor\]$/,C7e=Function.prototype,S7e=Object.prototype,B7e=C7e.toString,_7e=S7e.hasOwnProperty,k7e=RegExp("^"+B7e.call(_7e).replace(w7e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function E7e(e){if(!v7e(e)||y7e(e))return!1;var t=g7e(e)?k7e:b7e;return t.test(x7e(e))}var N7e=E7e;function j7e(e,t){return e==null?void 0:e[t]}var T7e=j7e,P7e=N7e,I7e=T7e;function O7e(e,t){var n=I7e(e,t);return P7e(n)?n:void 0}var sm=O7e,F7e=sm,M7e=F7e(Object,"create"),P5=M7e,yK=P5;function L7e(){this.__data__=yK?yK(null):{},this.size=0}var R7e=L7e;function U7e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var D7e=U7e,Q7e=P5,H7e="__lodash_hash_undefined__",$7e=Object.prototype,z7e=$7e.hasOwnProperty;function V7e(e){var t=this.__data__;if(Q7e){var n=t[e];return n===H7e?void 0:n}return z7e.call(t,e)?t[e]:void 0}var K7e=V7e,W7e=P5,q7e=Object.prototype,G7e=q7e.hasOwnProperty;function Y7e(e){var t=this.__data__;return W7e?t[e]!==void 0:G7e.call(t,e)}var X7e=Y7e,J7e=P5,Z7e="__lodash_hash_undefined__";function eze(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=J7e&&t===void 0?Z7e:t,this}var tze=eze,nze=R7e,rze=D7e,ize=K7e,sze=X7e,aze=tze;function tv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tv.prototype.clear=nze;tv.prototype.delete=rze;tv.prototype.get=ize;tv.prototype.has=sze;tv.prototype.set=aze;var oze=tv;function lze(){this.__data__=[],this.size=0}var cze=lze;function uze(e,t){return e===t||e!==e&&t!==t}var W6=uze,dze=W6;function Aze(e,t){for(var n=e.length;n--;)if(dze(e[n][0],t))return n;return-1}var I5=Aze,hze=I5,fze=Array.prototype,pze=fze.splice;function mze(e){var t=this.__data__,n=hze(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():pze.call(t,n,1),--this.size,!0}var gze=mze,yze=I5;function vze(e){var t=this.__data__,n=yze(t,e);return n<0?void 0:t[n][1]}var xze=vze,wze=I5;function bze(e){return wze(this.__data__,e)>-1}var Cze=bze,Sze=I5;function Bze(e,t){var n=this.__data__,r=Sze(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var _ze=Bze,kze=cze,Eze=gze,Nze=xze,jze=Cze,Tze=_ze;function nv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nv.prototype.clear=kze;nv.prototype.delete=Eze;nv.prototype.get=Nze;nv.prototype.has=jze;nv.prototype.set=Tze;var O5=nv,Pze=sm,Ize=du,Oze=Pze(Ize,"Map"),q6=Oze,vK=oze,Fze=O5,Mze=q6;function Lze(){this.size=0,this.__data__={hash:new vK,map:new(Mze||Fze),string:new vK}}var Rze=Lze;function Uze(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Dze=Uze,Qze=Dze;function Hze(e,t){var n=e.__data__;return Qze(t)?n[typeof t=="string"?"string":"hash"]:n.map}var F5=Hze,$ze=F5;function zze(e){var t=$ze(this,e).delete(e);return this.size-=t?1:0,t}var Vze=zze,Kze=F5;function Wze(e){return Kze(this,e).get(e)}var qze=Wze,Gze=F5;function Yze(e){return Gze(this,e).has(e)}var Xze=Yze,Jze=F5;function Zze(e,t){var n=Jze(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var eVe=Zze,tVe=Rze,nVe=Vze,rVe=qze,iVe=Xze,sVe=eVe;function rv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rv.prototype.clear=tVe;rv.prototype.delete=nVe;rv.prototype.get=rVe;rv.prototype.has=iVe;rv.prototype.set=sVe;var G6=rv,hAe=G6,aVe="Expected a function";function Y6(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(aVe);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(Y6.Cache||hAe),n}Y6.Cache=hAe;var fAe=Y6;const oVe=Bn(fAe);var lVe=fAe,cVe=500;function uVe(e){var t=lVe(e,function(r){return n.size===cVe&&n.clear(),r}),n=t.cache;return t}var dVe=uVe,AVe=dVe,hVe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fVe=/\\(\\)?/g,pVe=AVe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(hVe,function(n,r,i,s){t.push(i?s.replace(fVe,"$1"):r||n)}),t}),mVe=pVe;function gVe(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var X6=gVe,xK=g2,yVe=X6,vVe=$a,xVe=Z0,wVe=1/0,wK=xK?xK.prototype:void 0,bK=wK?wK.toString:void 0;function pAe(e){if(typeof e=="string")return e;if(vVe(e))return yVe(e,pAe)+"";if(xVe(e))return bK?bK.call(e):"";var t=e+"";return t=="0"&&1/e==-wVe?"-0":t}var bVe=pAe,CVe=bVe;function SVe(e){return e==null?"":CVe(e)}var mAe=SVe,BVe=$a,_Ve=V6,kVe=mVe,EVe=mAe;function NVe(e,t){return BVe(e)?e:_Ve(e,t)?[e]:kVe(EVe(e))}var gAe=NVe,jVe=Z0,TVe=1/0;function PVe(e){if(typeof e=="string"||jVe(e))return e;var t=e+"";return t=="0"&&1/e==-TVe?"-0":t}var M5=PVe,IVe=gAe,OVe=M5;function FVe(e,t){t=IVe(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[OVe(t[n++])];return n&&n==r?e:void 0}var J6=FVe,MVe=J6;function LVe(e,t,n){var r=e==null?void 0:MVe(e,t);return r===void 0?n:r}var yAe=LVe;const cl=Bn(yAe);function RVe(e){return e==null}var UVe=RVe;const fn=Bn(UVe);var DVe=Bd,QVe=$a,HVe=_d,$Ve="[object String]";function zVe(e){return typeof e=="string"||!QVe(e)&&HVe(e)&&DVe(e)==$Ve}var VVe=zVe;const y2=Bn(VVe);var vAe={exports:{}},Hn={};/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Z6=Symbol.for("react.element"),eQ=Symbol.for("react.portal"),L5=Symbol.for("react.fragment"),R5=Symbol.for("react.strict_mode"),U5=Symbol.for("react.profiler"),D5=Symbol.for("react.provider"),Q5=Symbol.for("react.context"),KVe=Symbol.for("react.server_context"),H5=Symbol.for("react.forward_ref"),$5=Symbol.for("react.suspense"),z5=Symbol.for("react.suspense_list"),V5=Symbol.for("react.memo"),K5=Symbol.for("react.lazy"),WVe=Symbol.for("react.offscreen"),xAe;xAe=Symbol.for("react.module.reference");function yl(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Z6:switch(e=e.type,e){case L5:case U5:case R5:case $5:case z5:return e;default:switch(e=e&&e.$$typeof,e){case KVe:case Q5:case H5:case K5:case V5:case D5:return e;default:return t}}case eQ:return t}}}Hn.ContextConsumer=Q5;Hn.ContextProvider=D5;Hn.Element=Z6;Hn.ForwardRef=H5;Hn.Fragment=L5;Hn.Lazy=K5;Hn.Memo=V5;Hn.Portal=eQ;Hn.Profiler=U5;Hn.StrictMode=R5;Hn.Suspense=$5;Hn.SuspenseList=z5;Hn.isAsyncMode=function(){return!1};Hn.isConcurrentMode=function(){return!1};Hn.isContextConsumer=function(e){return yl(e)===Q5};Hn.isContextProvider=function(e){return yl(e)===D5};Hn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Z6};Hn.isForwardRef=function(e){return yl(e)===H5};Hn.isFragment=function(e){return yl(e)===L5};Hn.isLazy=function(e){return yl(e)===K5};Hn.isMemo=function(e){return yl(e)===V5};Hn.isPortal=function(e){return yl(e)===eQ};Hn.isProfiler=function(e){return yl(e)===U5};Hn.isStrictMode=function(e){return yl(e)===R5};Hn.isSuspense=function(e){return yl(e)===$5};Hn.isSuspenseList=function(e){return yl(e)===z5};Hn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===L5||e===U5||e===R5||e===$5||e===z5||e===WVe||typeof e=="object"&&e!==null&&(e.$$typeof===K5||e.$$typeof===V5||e.$$typeof===D5||e.$$typeof===Q5||e.$$typeof===H5||e.$$typeof===xAe||e.getModuleId!==void 0)};Hn.typeOf=yl;vAe.exports=Hn;var qVe=vAe.exports,GVe=Bd,YVe=_d,XVe="[object Number]";function JVe(e){return typeof e=="number"||YVe(e)&&GVe(e)==XVe}var wAe=JVe;const ZVe=Bn(wAe);var e9e=wAe;function t9e(e){return e9e(e)&&e!=+e}var n9e=t9e;const v2=Bn(n9e);var Zl=function(t){return t===0?0:t>0?1:-1},Vf=function(t){return y2(t)&&t.indexOf("%")===t.length-1},Je=function(t){return ZVe(t)&&!v2(t)},Li=function(t){return Je(t)||y2(t)},r9e=0,x2=function(t){var n=++r9e;return"".concat(t||"").concat(n)},Vp=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Je(t)&&!y2(t))return r;var s;if(Vf(t)){var a=t.indexOf("%");s=n*parseFloat(t.slice(0,a))/100}else s=+t;return v2(s)&&(s=r),i&&s>n&&(s=n),s},vA=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},i9e=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},zl=function(t,n){return Je(t)&&Je(n)?function(r){return t+r*(n-t)}:function(){return n}};function Gk(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):cl(r,t))===n})}function fy(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function $F(e){"@babel/helpers - typeof";return $F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$F(e)}var s9e=["viewBox","children"],a9e=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],CK=["points","pathLength"],AI={svg:s9e,polygon:CK,polyline:CK},tQ=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Yk=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(S.isValidElement(t)&&(r=t.props),!ev(r))return null;var i={};return Object.keys(r).forEach(function(s){tQ.includes(s)&&(i[s]=n||function(a){return r[s](r,a)})}),i},o9e=function(t,n,r){return function(i){return t(n,r,i),null}},Xk=function(t,n,r){if(!ev(t)||$F(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(s){var a=t[s];tQ.includes(s)&&typeof a=="function"&&(i||(i={}),i[s]=o9e(a,n,r))}),i},l9e=["children"],c9e=["children"];function SK(e,t){if(e==null)return{};var n=u9e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function u9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zF(e){"@babel/helpers - typeof";return zF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zF(e)}var BK={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ed=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},_K=null,hI=null,nQ=function e(t){if(t===_K&&Array.isArray(hI))return hI;var n=[];return S.Children.forEach(t,function(r){fn(r)||(qVe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),hI=n,_K=t,n};function ul(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return ed(i)}):r=[ed(t)],nQ(e).forEach(function(i){var s=cl(i,"type.displayName")||cl(i,"type.name");r.indexOf(s)!==-1&&n.push(i)}),n}function lo(e,t){var n=ul(e,t);return n&&n[0]}var kK=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Je(r)||r<=0||!Je(i)||i<=0)},d9e=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],A9e=function(t){return t&&t.type&&y2(t.type)&&d9e.indexOf(t.type)>=0},h9e=function(t){return t&&zF(t)==="object"&&"clipDot"in t},f9e=function(t,n,r,i){var s,a=(s=AI==null?void 0:AI[i])!==null&&s!==void 0?s:[];return!un(t)&&(i&&a.includes(n)||a9e.includes(n))||r&&tQ.includes(n)},yn=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(S.isValidElement(t)&&(i=t.props),!ev(i))return null;var s={};return Object.keys(i).forEach(function(a){var o;f9e((o=i)===null||o===void 0?void 0:o[a],a,n,r)&&(s[a]=i[a])}),s},VF=function e(t,n){if(t===n)return!0;var r=S.Children.count(t);if(r!==S.Children.count(n))return!1;if(r===0)return!0;if(r===1)return EK(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var s=t[i],a=n[i];if(Array.isArray(s)||Array.isArray(a)){if(!e(s,a))return!1}else if(!EK(s,a))return!1}return!0},EK=function(t,n){if(fn(t)&&fn(n))return!0;if(!fn(t)&&!fn(n)){var r=t.props||{},i=r.children,s=SK(r,l9e),a=n.props||{},o=a.children,l=SK(a,c9e);return i&&o?fy(s,l)&&VF(i,o):!i&&!o?fy(s,l):!1}return!1},NK=function(t,n){var r=[],i={};return nQ(t).forEach(function(s,a){if(A9e(s))r.push(s);else if(s){var o=ed(s.type),l=n[o]||{},u=l.handler,d=l.once;if(u&&(!d||!i[o])){var A=u(s,o,a);r.push(A),i[o]=!0}}}),r},p9e=function(t){var n=t&&t.type;return n&&BK[n]?BK[n]:null},m9e=function(t,n){return nQ(n).indexOf(t)},g9e=["children","width","height","viewBox","className","style","title","desc"];function KF(){return KF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KF.apply(this,arguments)}function y9e(e,t){if(e==null)return{};var n=v9e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function v9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function WF(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,s=e.className,a=e.style,o=e.title,l=e.desc,u=y9e(e,g9e),d=i||{width:n,height:r,x:0,y:0},A=Sn("recharts-surface",s);return re.createElement("svg",KF({},yn(u,!0,"svg"),{className:A,width:n,height:r,style:a,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),re.createElement("title",null,o),re.createElement("desc",null,l),t)}var x9e=["children","className"];function qF(){return qF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qF.apply(this,arguments)}function w9e(e,t){if(e==null)return{};var n=b9e(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function b9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ui=re.forwardRef(function(e,t){var n=e.children,r=e.className,i=w9e(e,x9e),s=Sn("recharts-layer",r);return re.createElement("g",qF({className:s},yn(i,!0),{ref:t}),n)}),td=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s]};function C9e(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}var S9e=C9e,B9e=S9e;function _9e(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:B9e(e,t,n)}var k9e=_9e,E9e="\\ud800-\\udfff",N9e="\\u0300-\\u036f",j9e="\\ufe20-\\ufe2f",T9e="\\u20d0-\\u20ff",P9e=N9e+j9e+T9e,I9e="\\ufe0e\\ufe0f",O9e="\\u200d",F9e=RegExp("["+O9e+E9e+P9e+I9e+"]");function M9e(e){return F9e.test(e)}var bAe=M9e;function L9e(e){return e.split("")}var R9e=L9e,CAe="\\ud800-\\udfff",U9e="\\u0300-\\u036f",D9e="\\ufe20-\\ufe2f",Q9e="\\u20d0-\\u20ff",H9e=U9e+D9e+Q9e,$9e="\\ufe0e\\ufe0f",z9e="["+CAe+"]",GF="["+H9e+"]",YF="\\ud83c[\\udffb-\\udfff]",V9e="(?:"+GF+"|"+YF+")",SAe="[^"+CAe+"]",BAe="(?:\\ud83c[\\udde6-\\uddff]){2}",_Ae="[\\ud800-\\udbff][\\udc00-\\udfff]",K9e="\\u200d",kAe=V9e+"?",EAe="["+$9e+"]?",W9e="(?:"+K9e+"(?:"+[SAe,BAe,_Ae].join("|")+")"+EAe+kAe+")*",q9e=EAe+kAe+W9e,G9e="(?:"+[SAe+GF+"?",GF,BAe,_Ae,z9e].join("|")+")",Y9e=RegExp(YF+"(?="+YF+")|"+G9e+q9e,"g");function X9e(e){return e.match(Y9e)||[]}var J9e=X9e,Z9e=R9e,eKe=bAe,tKe=J9e;function nKe(e){return eKe(e)?tKe(e):Z9e(e)}var rKe=nKe,iKe=k9e,sKe=bAe,aKe=rKe,oKe=mAe;function lKe(e){return function(t){t=oKe(t);var n=sKe(t)?aKe(t):void 0,r=n?n[0]:t.charAt(0),i=n?iKe(n,1).join(""):t.slice(1);return r[e]()+i}}var cKe=lKe,uKe=cKe,dKe=uKe("toUpperCase"),AKe=dKe;const W5=Bn(AKe);function ir(e){return function(){return e}}const NAe=Math.cos,Jk=Math.sin,hc=Math.sqrt,Zk=Math.PI,q5=2*Zk,XF=Math.PI,JF=2*XF,Bf=1e-6,hKe=JF-Bf;function jAe(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function fKe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return jAe;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class pKe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?jAe:fKe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=r-t,u=i-n,d=a-t,A=o-n,f=d*d+A*A;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>Bf)if(!(Math.abs(A*l-u*d)>Bf)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-a,p=i-o,m=l*l+u*u,g=h*h+p*p,y=Math.sqrt(m),v=Math.sqrt(f),x=s*Math.tan((XF-Math.acos((m+f-g)/(2*y*v)))/2),b=x/v,w=x/y;Math.abs(b-1)>Bf&&this._append`L${t+b*d},${n+b*A}`,this._append`A${s},${s},0,0,${+(A*h>d*p)},${this._x1=t+w*l},${this._y1=n+w*u}`}}arc(t,n,r,i,s,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),u=t+o,d=n+l,A=1^a,f=a?i-s:s-i;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>Bf||Math.abs(this._y1-d)>Bf)&&this._append`L${u},${d}`,r&&(f<0&&(f=f%JF+JF),f>hKe?this._append`A${r},${r},0,1,${A},${t-o},${n-l}A${r},${r},0,1,${A},${this._x1=u},${this._y1=d}`:f>Bf&&this._append`A${r},${r},0,${+(f>=XF)},${A},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function rQ(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new pKe(t)}function iQ(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function TAe(e){this._context=e}TAe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function G5(e){return new TAe(e)}function PAe(e){return e[0]}function IAe(e){return e[1]}function OAe(e,t){var n=ir(!0),r=null,i=G5,s=null,a=rQ(o);e=typeof e=="function"?e:e===void 0?PAe:ir(e),t=typeof t=="function"?t:t===void 0?IAe:ir(t);function o(l){var u,d=(l=iQ(l)).length,A,f=!1,h;for(r==null&&(s=i(h=a())),u=0;u<=d;++u)!(u<d&&n(A=l[u],u,l))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(A,u,l),+t(A,u,l));if(h)return s=null,h+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:ir(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:ir(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ir(!!l),o):n},o.curve=function(l){return arguments.length?(i=l,r!=null&&(s=i(r)),o):i},o.context=function(l){return arguments.length?(l==null?r=s=null:s=i(r=l),o):r},o}function pS(e,t,n){var r=null,i=ir(!0),s=null,a=G5,o=null,l=rQ(u);e=typeof e=="function"?e:e===void 0?PAe:ir(+e),t=typeof t=="function"?t:ir(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?IAe:ir(+n);function u(A){var f,h,p,m=(A=iQ(A)).length,g,y=!1,v,x=new Array(m),b=new Array(m);for(s==null&&(o=a(v=l())),f=0;f<=m;++f){if(!(f<m&&i(g=A[f],f,A))===y)if(y=!y)h=f,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=f-1;p>=h;--p)o.point(x[p],b[p]);o.lineEnd(),o.areaEnd()}y&&(x[f]=+e(g,f,A),b[f]=+t(g,f,A),o.point(r?+r(g,f,A):x[f],n?+n(g,f,A):b[f]))}if(v)return o=null,v+""||null}function d(){return OAe().defined(i).curve(a).context(s)}return u.x=function(A){return arguments.length?(e=typeof A=="function"?A:ir(+A),r=null,u):e},u.x0=function(A){return arguments.length?(e=typeof A=="function"?A:ir(+A),u):e},u.x1=function(A){return arguments.length?(r=A==null?null:typeof A=="function"?A:ir(+A),u):r},u.y=function(A){return arguments.length?(t=typeof A=="function"?A:ir(+A),n=null,u):t},u.y0=function(A){return arguments.length?(t=typeof A=="function"?A:ir(+A),u):t},u.y1=function(A){return arguments.length?(n=A==null?null:typeof A=="function"?A:ir(+A),u):n},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(n)},u.lineX1=function(){return d().x(r).y(t)},u.defined=function(A){return arguments.length?(i=typeof A=="function"?A:ir(!!A),u):i},u.curve=function(A){return arguments.length?(a=A,s!=null&&(o=a(s)),u):a},u.context=function(A){return arguments.length?(A==null?s=o=null:o=a(s=A),u):s},u}class FAe{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function mKe(e){return new FAe(e,!0)}function gKe(e){return new FAe(e,!1)}const sQ={draw(e,t){const n=hc(t/Zk);e.moveTo(n,0),e.arc(0,0,n,0,q5)}},yKe={draw(e,t){const n=hc(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},MAe=hc(1/3),vKe=MAe*2,xKe={draw(e,t){const n=hc(t/vKe),r=n*MAe;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},wKe={draw(e,t){const n=hc(t),r=-n/2;e.rect(r,r,n,n)}},bKe=.8908130915292852,LAe=Jk(Zk/10)/Jk(7*Zk/10),CKe=Jk(q5/10)*LAe,SKe=-NAe(q5/10)*LAe,BKe={draw(e,t){const n=hc(t*bKe),r=CKe*n,i=SKe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let s=1;s<5;++s){const a=q5*s/5,o=NAe(a),l=Jk(a);e.lineTo(l*n,-o*n),e.lineTo(o*r-l*i,l*r+o*i)}e.closePath()}},fI=hc(3),_Ke={draw(e,t){const n=-hc(t/(fI*3));e.moveTo(0,n*2),e.lineTo(-fI*n,-n),e.lineTo(fI*n,-n),e.closePath()}},Io=-.5,Oo=hc(3)/2,ZF=1/hc(12),kKe=(ZF/2+1)*3,EKe={draw(e,t){const n=hc(t/kKe),r=n/2,i=n*ZF,s=r,a=n*ZF+n,o=-s,l=a;e.moveTo(r,i),e.lineTo(s,a),e.lineTo(o,l),e.lineTo(Io*r-Oo*i,Oo*r+Io*i),e.lineTo(Io*s-Oo*a,Oo*s+Io*a),e.lineTo(Io*o-Oo*l,Oo*o+Io*l),e.lineTo(Io*r+Oo*i,Io*i-Oo*r),e.lineTo(Io*s+Oo*a,Io*a-Oo*s),e.lineTo(Io*o+Oo*l,Io*l-Oo*o),e.closePath()}};function NKe(e,t){let n=null,r=rQ(i);e=typeof e=="function"?e:ir(e||sQ),t=typeof t=="function"?t:ir(t===void 0?64:+t);function i(){let s;if(n||(n=s=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),s)return n=null,s+""||null}return i.type=function(s){return arguments.length?(e=typeof s=="function"?s:ir(s),i):e},i.size=function(s){return arguments.length?(t=typeof s=="function"?s:ir(+s),i):t},i.context=function(s){return arguments.length?(n=s??null,i):n},i}function eE(){}function tE(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function RAe(e){this._context=e}RAe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:tE(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:tE(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jKe(e){return new RAe(e)}function UAe(e){this._context=e}UAe.prototype={areaStart:eE,areaEnd:eE,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:tE(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function TKe(e){return new UAe(e)}function DAe(e){this._context=e}DAe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:tE(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function PKe(e){return new DAe(e)}function QAe(e){this._context=e}QAe.prototype={areaStart:eE,areaEnd:eE,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function IKe(e){return new QAe(e)}function jK(e){return e<0?-1:1}function TK(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),o=(s*i+a*r)/(r+i);return(jK(s)+jK(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function PK(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function pI(e,t,n){var r=e._x0,i=e._y0,s=e._x1,a=e._y1,o=(s-r)/3;e._context.bezierCurveTo(r+o,i+o*t,s-o,a-o*n,s,a)}function nE(e){this._context=e}nE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:pI(this,this._t0,PK(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,pI(this,PK(this,n=TK(this,e,t)),n);break;default:pI(this,this._t0,n=TK(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function HAe(e){this._context=new $Ae(e)}(HAe.prototype=Object.create(nE.prototype)).point=function(e,t){nE.prototype.point.call(this,t,e)};function $Ae(e){this._context=e}$Ae.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function OKe(e){return new nE(e)}function FKe(e){return new HAe(e)}function zAe(e){this._context=e}zAe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=IK(e),i=IK(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function IK(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),a=new Array(n);for(i[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function MKe(e){return new zAe(e)}function Y5(e,t){this._context=e,this._t=t}Y5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function LKe(e){return new Y5(e,.5)}function RKe(e){return new Y5(e,0)}function UKe(e){return new Y5(e,1)}function a0(e,t){if((a=e.length)>1)for(var n=1,r,i,s=e[t[0]],a,o=s.length;n<a;++n)for(i=s,s=e[t[n]],r=0;r<o;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function eM(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function DKe(e,t){return e[t]}function QKe(e){const t=[];return t.key=e,t}function HKe(){var e=ir([]),t=eM,n=a0,r=DKe;function i(s){var a=Array.from(e.apply(this,arguments),QKe),o,l=a.length,u=-1,d;for(const A of s)for(o=0,++u;o<l;++o)(a[o][u]=[0,+r(A,a[o].key,u,s)]).data=A;for(o=0,d=iQ(t(a));o<l;++o)a[d[o]].index=o;return n(a,d),a}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:ir(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:ir(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?eM:typeof s=="function"?s:ir(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??a0,i):n},i}function $Ke(e,t){if((r=e.length)>0){for(var n,r,i=0,s=e[0].length,a;i<s;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}a0(e,t)}}function zKe(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,s=r.length;n<s;++n){for(var a=0,o=0;a<i;++a)o+=e[a][n][1]||0;r[n][1]+=r[n][0]=-o/2}a0(e,t)}}function VKe(e,t){if(!(!((a=e.length)>0)||!((s=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,s,a;r<s;++r){for(var o=0,l=0,u=0;o<a;++o){for(var d=e[t[o]],A=d[r][1]||0,f=d[r-1][1]||0,h=(A-f)/2,p=0;p<o;++p){var m=e[t[p]],g=m[r][1]||0,y=m[r-1][1]||0;h+=g-y}l+=A,u+=h*A}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,a0(e,t)}}function Gb(e){"@babel/helpers - typeof";return Gb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gb(e)}var KKe=["type","size","sizeType"];function tM(){return tM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tM.apply(this,arguments)}function OK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OK(Object(n),!0).forEach(function(r){WKe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WKe(e,t,n){return t=qKe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qKe(e){var t=GKe(e,"string");return Gb(t)=="symbol"?t:t+""}function GKe(e,t){if(Gb(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Gb(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YKe(e,t){if(e==null)return{};var n=XKe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var VAe={symbolCircle:sQ,symbolCross:yKe,symbolDiamond:xKe,symbolSquare:wKe,symbolStar:BKe,symbolTriangle:_Ke,symbolWye:EKe},JKe=Math.PI/180,ZKe=function(t){var n="symbol".concat(W5(t));return VAe[n]||sQ},eWe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*JKe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},tWe=function(t,n){VAe["symbol".concat(W5(t))]=n},aQ=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,s=i===void 0?64:i,a=t.sizeType,o=a===void 0?"area":a,l=YKe(t,KKe),u=FK(FK({},l),{},{type:r,size:s,sizeType:o}),d=function(){var g=ZKe(r),y=NKe().type(g).size(eWe(s,o,r));return y()},A=u.className,f=u.cx,h=u.cy,p=yn(u,!0);return f===+f&&h===+h&&s===+s?re.createElement("path",tM({},p,{className:Sn("recharts-symbols",A),transform:"translate(".concat(f,", ").concat(h,")"),d:d()})):null};aQ.registerSymbol=tWe;function o0(e){"@babel/helpers - typeof";return o0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o0(e)}function nM(){return nM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nM.apply(this,arguments)}function MK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nWe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MK(Object(n),!0).forEach(function(r){Yb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iWe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,WAe(r.key),r)}}function sWe(e,t,n){return t&&iWe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aWe(e,t,n){return t=rE(t),oWe(e,KAe()?Reflect.construct(t,n||[],rE(e).constructor):t.apply(e,n))}function oWe(e,t){if(t&&(o0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lWe(e)}function lWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KAe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KAe=function(){return!!e})()}function rE(e){return rE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rE(e)}function cWe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rM(e,t)}function rM(e,t){return rM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},rM(e,t)}function Yb(e,t,n){return t=WAe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WAe(e){var t=uWe(e,"string");return o0(t)=="symbol"?t:t+""}function uWe(e,t){if(o0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(o0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fo=32,oQ=function(e){function t(){return rWe(this,t),aWe(this,t,arguments)}return cWe(t,e),sWe(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,s=Fo/2,a=Fo/6,o=Fo/3,l=r.inactive?i:r.color;if(r.type==="plainline")return re.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:s,x2:Fo,y2:s,className:"recharts-legend-icon"});if(r.type==="line")return re.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(s,"h").concat(o,`
A`).concat(a,",").concat(a,",0,1,1,").concat(2*o,",").concat(s,`
H`).concat(Fo,"M").concat(2*o,",").concat(s,`
A`).concat(a,",").concat(a,",0,1,1,").concat(o,",").concat(s),className:"recharts-legend-icon"});if(r.type==="rect")return re.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Fo/8,"h").concat(Fo,"v").concat(Fo*3/4,"h").concat(-Fo,"z"),className:"recharts-legend-icon"});if(re.isValidElement(r.legendIcon)){var u=nWe({},r);return delete u.legendIcon,re.cloneElement(r.legendIcon,u)}return re.createElement(aQ,{fill:l,cx:s,cy:s,size:Fo,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,s=i.payload,a=i.iconSize,o=i.layout,l=i.formatter,u=i.inactiveColor,d={x:0,y:0,width:Fo,height:Fo},A={display:o==="horizontal"?"inline-block":"block",marginRight:10},f={display:"inline-block",verticalAlign:"middle",marginRight:4};return s.map(function(h,p){var m=h.formatter||l,g=Sn(Yb(Yb({"recharts-legend-item":!0},"legend-item-".concat(p),!0),"inactive",h.inactive));if(h.type==="none")return null;var y=un(h.value)?null:h.value;td(!un(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var v=h.inactive?u:h.color;return re.createElement("li",nM({className:g,style:A,key:"legend-item-".concat(p)},Xk(r.props,h,p)),re.createElement(WF,{width:a,height:a,viewBox:d,style:f},r.renderIcon(h)),re.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},m?m(y,h,p):y))})}},{key:"render",value:function(){var r=this.props,i=r.payload,s=r.layout,a=r.align;if(!i||!i.length)return null;var o={padding:0,margin:0,textAlign:s==="horizontal"?a:"left"};return re.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(S.PureComponent);Yb(oQ,"displayName","Legend");Yb(oQ,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var dWe=O5;function AWe(){this.__data__=new dWe,this.size=0}var hWe=AWe;function fWe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var pWe=fWe;function mWe(e){return this.__data__.get(e)}var gWe=mWe;function yWe(e){return this.__data__.has(e)}var vWe=yWe,xWe=O5,wWe=q6,bWe=G6,CWe=200;function SWe(e,t){var n=this.__data__;if(n instanceof xWe){var r=n.__data__;if(!wWe||r.length<CWe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new bWe(r)}return n.set(e,t),this.size=n.size,this}var BWe=SWe,_We=O5,kWe=hWe,EWe=pWe,NWe=gWe,jWe=vWe,TWe=BWe;function iv(e){var t=this.__data__=new _We(e);this.size=t.size}iv.prototype.clear=kWe;iv.prototype.delete=EWe;iv.prototype.get=NWe;iv.prototype.has=jWe;iv.prototype.set=TWe;var qAe=iv,PWe="__lodash_hash_undefined__";function IWe(e){return this.__data__.set(e,PWe),this}var OWe=IWe;function FWe(e){return this.__data__.has(e)}var MWe=FWe,LWe=G6,RWe=OWe,UWe=MWe;function iE(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new LWe;++t<n;)this.add(e[t])}iE.prototype.add=iE.prototype.push=RWe;iE.prototype.has=UWe;var GAe=iE;function DWe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var YAe=DWe;function QWe(e,t){return e.has(t)}var XAe=QWe,HWe=GAe,$We=YAe,zWe=XAe,VWe=1,KWe=2;function WWe(e,t,n,r,i,s){var a=n&VWe,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var u=s.get(e),d=s.get(t);if(u&&d)return u==t&&d==e;var A=-1,f=!0,h=n&KWe?new HWe:void 0;for(s.set(e,t),s.set(t,e);++A<o;){var p=e[A],m=t[A];if(r)var g=a?r(m,p,A,t,e,s):r(p,m,A,e,t,s);if(g!==void 0){if(g)continue;f=!1;break}if(h){if(!$We(t,function(y,v){if(!zWe(h,v)&&(p===y||i(p,y,n,r,s)))return h.push(v)})){f=!1;break}}else if(!(p===m||i(p,m,n,r,s))){f=!1;break}}return s.delete(e),s.delete(t),f}var JAe=WWe,qWe=du,GWe=qWe.Uint8Array,YWe=GWe;function XWe(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var JWe=XWe;function ZWe(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var lQ=ZWe,LK=g2,RK=YWe,eqe=W6,tqe=JAe,nqe=JWe,rqe=lQ,iqe=1,sqe=2,aqe="[object Boolean]",oqe="[object Date]",lqe="[object Error]",cqe="[object Map]",uqe="[object Number]",dqe="[object RegExp]",Aqe="[object Set]",hqe="[object String]",fqe="[object Symbol]",pqe="[object ArrayBuffer]",mqe="[object DataView]",UK=LK?LK.prototype:void 0,mI=UK?UK.valueOf:void 0;function gqe(e,t,n,r,i,s,a){switch(n){case mqe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case pqe:return!(e.byteLength!=t.byteLength||!s(new RK(e),new RK(t)));case aqe:case oqe:case uqe:return eqe(+e,+t);case lqe:return e.name==t.name&&e.message==t.message;case dqe:case hqe:return e==t+"";case cqe:var o=nqe;case Aqe:var l=r&iqe;if(o||(o=rqe),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;r|=sqe,a.set(e,t);var d=tqe(o(e),o(t),r,i,s,a);return a.delete(e),d;case fqe:if(mI)return mI.call(e)==mI.call(t)}return!1}var yqe=gqe;function vqe(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ZAe=vqe,xqe=ZAe,wqe=$a;function bqe(e,t,n){var r=t(e);return wqe(e)?r:xqe(r,n(e))}var Cqe=bqe;function Sqe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}var Bqe=Sqe;function _qe(){return[]}var kqe=_qe,Eqe=Bqe,Nqe=kqe,jqe=Object.prototype,Tqe=jqe.propertyIsEnumerable,DK=Object.getOwnPropertySymbols,Pqe=DK?function(e){return e==null?[]:(e=Object(e),Eqe(DK(e),function(t){return Tqe.call(e,t)}))}:Nqe,Iqe=Pqe;function Oqe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Fqe=Oqe,Mqe=Bd,Lqe=_d,Rqe="[object Arguments]";function Uqe(e){return Lqe(e)&&Mqe(e)==Rqe}var Dqe=Uqe,QK=Dqe,Qqe=_d,ehe=Object.prototype,Hqe=ehe.hasOwnProperty,$qe=ehe.propertyIsEnumerable,zqe=QK(function(){return arguments}())?QK:function(e){return Qqe(e)&&Hqe.call(e,"callee")&&!$qe.call(e,"callee")},cQ=zqe,sE={exports:{}};function Vqe(){return!1}var Kqe=Vqe;sE.exports;(function(e,t){var n=du,r=Kqe,i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===i,o=a?n.Buffer:void 0,l=o?o.isBuffer:void 0,u=l||r;e.exports=u})(sE,sE.exports);var the=sE.exports,Wqe=9007199254740991,qqe=/^(?:0|[1-9]\d*)$/;function Gqe(e,t){var n=typeof e;return t=t??Wqe,!!t&&(n=="number"||n!="symbol"&&qqe.test(e))&&e>-1&&e%1==0&&e<t}var uQ=Gqe,Yqe=9007199254740991;function Xqe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Yqe}var dQ=Xqe,Jqe=Bd,Zqe=dQ,eGe=_d,tGe="[object Arguments]",nGe="[object Array]",rGe="[object Boolean]",iGe="[object Date]",sGe="[object Error]",aGe="[object Function]",oGe="[object Map]",lGe="[object Number]",cGe="[object Object]",uGe="[object RegExp]",dGe="[object Set]",AGe="[object String]",hGe="[object WeakMap]",fGe="[object ArrayBuffer]",pGe="[object DataView]",mGe="[object Float32Array]",gGe="[object Float64Array]",yGe="[object Int8Array]",vGe="[object Int16Array]",xGe="[object Int32Array]",wGe="[object Uint8Array]",bGe="[object Uint8ClampedArray]",CGe="[object Uint16Array]",SGe="[object Uint32Array]",hr={};hr[mGe]=hr[gGe]=hr[yGe]=hr[vGe]=hr[xGe]=hr[wGe]=hr[bGe]=hr[CGe]=hr[SGe]=!0;hr[tGe]=hr[nGe]=hr[fGe]=hr[rGe]=hr[pGe]=hr[iGe]=hr[sGe]=hr[aGe]=hr[oGe]=hr[lGe]=hr[cGe]=hr[uGe]=hr[dGe]=hr[AGe]=hr[hGe]=!1;function BGe(e){return eGe(e)&&Zqe(e.length)&&!!hr[Jqe(e)]}var _Ge=BGe;function kGe(e){return function(t){return e(t)}}var nhe=kGe,aE={exports:{}};aE.exports;(function(e,t){var n=uAe,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,a=s&&n.process,o=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=o})(aE,aE.exports);var EGe=aE.exports,NGe=_Ge,jGe=nhe,HK=EGe,$K=HK&&HK.isTypedArray,TGe=$K?jGe($K):NGe,rhe=TGe,PGe=Fqe,IGe=cQ,OGe=$a,FGe=the,MGe=uQ,LGe=rhe,RGe=Object.prototype,UGe=RGe.hasOwnProperty;function DGe(e,t){var n=OGe(e),r=!n&&IGe(e),i=!n&&!r&&FGe(e),s=!n&&!r&&!i&&LGe(e),a=n||r||i||s,o=a?PGe(e.length,String):[],l=o.length;for(var u in e)(t||UGe.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||MGe(u,l)))&&o.push(u);return o}var QGe=DGe,HGe=Object.prototype;function $Ge(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||HGe;return e===n}var zGe=$Ge;function VGe(e,t){return function(n){return e(t(n))}}var ihe=VGe,KGe=ihe,WGe=KGe(Object.keys,Object),qGe=WGe,GGe=zGe,YGe=qGe,XGe=Object.prototype,JGe=XGe.hasOwnProperty;function ZGe(e){if(!GGe(e))return YGe(e);var t=[];for(var n in Object(e))JGe.call(e,n)&&n!="constructor"&&t.push(n);return t}var eYe=ZGe,tYe=K6,nYe=dQ;function rYe(e){return e!=null&&nYe(e.length)&&!tYe(e)}var w2=rYe,iYe=QGe,sYe=eYe,aYe=w2;function oYe(e){return aYe(e)?iYe(e):sYe(e)}var X5=oYe,lYe=Cqe,cYe=Iqe,uYe=X5;function dYe(e){return lYe(e,uYe,cYe)}var AYe=dYe,zK=AYe,hYe=1,fYe=Object.prototype,pYe=fYe.hasOwnProperty;function mYe(e,t,n,r,i,s){var a=n&hYe,o=zK(e),l=o.length,u=zK(t),d=u.length;if(l!=d&&!a)return!1;for(var A=l;A--;){var f=o[A];if(!(a?f in t:pYe.call(t,f)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var g=a;++A<l;){f=o[A];var y=e[f],v=t[f];if(r)var x=a?r(v,y,f,t,e,s):r(y,v,f,e,t,s);if(!(x===void 0?y===v||i(y,v,n,r,s):x)){m=!1;break}g||(g=f=="constructor")}if(m&&!g){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof w=="function"&&w instanceof w)&&(m=!1)}return s.delete(e),s.delete(t),m}var gYe=mYe,yYe=sm,vYe=du,xYe=yYe(vYe,"DataView"),wYe=xYe,bYe=sm,CYe=du,SYe=bYe(CYe,"Promise"),BYe=SYe,_Ye=sm,kYe=du,EYe=_Ye(kYe,"Set"),she=EYe,NYe=sm,jYe=du,TYe=NYe(jYe,"WeakMap"),PYe=TYe,iM=wYe,sM=q6,aM=BYe,oM=she,lM=PYe,ahe=Bd,sv=AAe,VK="[object Map]",IYe="[object Object]",KK="[object Promise]",WK="[object Set]",qK="[object WeakMap]",GK="[object DataView]",OYe=sv(iM),FYe=sv(sM),MYe=sv(aM),LYe=sv(oM),RYe=sv(lM),_f=ahe;(iM&&_f(new iM(new ArrayBuffer(1)))!=GK||sM&&_f(new sM)!=VK||aM&&_f(aM.resolve())!=KK||oM&&_f(new oM)!=WK||lM&&_f(new lM)!=qK)&&(_f=function(e){var t=ahe(e),n=t==IYe?e.constructor:void 0,r=n?sv(n):"";if(r)switch(r){case OYe:return GK;case FYe:return VK;case MYe:return KK;case LYe:return WK;case RYe:return qK}return t});var UYe=_f,gI=qAe,DYe=JAe,QYe=yqe,HYe=gYe,YK=UYe,XK=$a,JK=the,$Ye=rhe,zYe=1,ZK="[object Arguments]",eW="[object Array]",mS="[object Object]",VYe=Object.prototype,tW=VYe.hasOwnProperty;function KYe(e,t,n,r,i,s){var a=XK(e),o=XK(t),l=a?eW:YK(e),u=o?eW:YK(t);l=l==ZK?mS:l,u=u==ZK?mS:u;var d=l==mS,A=u==mS,f=l==u;if(f&&JK(e)){if(!JK(t))return!1;a=!0,d=!1}if(f&&!d)return s||(s=new gI),a||$Ye(e)?DYe(e,t,n,r,i,s):QYe(e,t,l,n,r,i,s);if(!(n&zYe)){var h=d&&tW.call(e,"__wrapped__"),p=A&&tW.call(t,"__wrapped__");if(h||p){var m=h?e.value():e,g=p?t.value():t;return s||(s=new gI),i(m,g,n,r,s)}}return f?(s||(s=new gI),HYe(e,t,n,r,i,s)):!1}var WYe=KYe,qYe=WYe,nW=_d;function ohe(e,t,n,r,i){return e===t?!0:e==null||t==null||!nW(e)&&!nW(t)?e!==e&&t!==t:qYe(e,t,n,r,ohe,i)}var AQ=ohe,GYe=qAe,YYe=AQ,XYe=1,JYe=2;function ZYe(e,t,n,r){var i=n.length,s=i,a=!r;if(e==null)return!s;for(e=Object(e);i--;){var o=n[i];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=n[i];var l=o[0],u=e[l],d=o[1];if(a&&o[2]){if(u===void 0&&!(l in e))return!1}else{var A=new GYe;if(r)var f=r(u,d,l,e,t,A);if(!(f===void 0?YYe(d,u,XYe|JYe,r,A):f))return!1}}return!0}var eXe=ZYe,tXe=$h;function nXe(e){return e===e&&!tXe(e)}var lhe=nXe,rXe=lhe,iXe=X5;function sXe(e){for(var t=iXe(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,rXe(i)]}return t}var aXe=sXe;function oXe(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var che=oXe,lXe=eXe,cXe=aXe,uXe=che;function dXe(e){var t=cXe(e);return t.length==1&&t[0][2]?uXe(t[0][0],t[0][1]):function(n){return n===e||lXe(n,e,t)}}var AXe=dXe;function hXe(e,t){return e!=null&&t in Object(e)}var fXe=hXe,pXe=gAe,mXe=cQ,gXe=$a,yXe=uQ,vXe=dQ,xXe=M5;function wXe(e,t,n){t=pXe(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=xXe(t[r]);if(!(s=e!=null&&n(e,a)))break;e=e[a]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&vXe(i)&&yXe(a,i)&&(gXe(e)||mXe(e)))}var bXe=wXe,CXe=fXe,SXe=bXe;function BXe(e,t){return e!=null&&SXe(e,t,CXe)}var _Xe=BXe,kXe=AQ,EXe=yAe,NXe=_Xe,jXe=V6,TXe=lhe,PXe=che,IXe=M5,OXe=1,FXe=2;function MXe(e,t){return jXe(e)&&TXe(t)?PXe(IXe(e),t):function(n){var r=EXe(n,e);return r===void 0&&r===t?NXe(n,e):kXe(t,r,OXe|FXe)}}var LXe=MXe;function RXe(e){return e}var av=RXe;function UXe(e){return function(t){return t==null?void 0:t[e]}}var DXe=UXe,QXe=J6;function HXe(e){return function(t){return QXe(t,e)}}var $Xe=HXe,zXe=DXe,VXe=$Xe,KXe=V6,WXe=M5;function qXe(e){return KXe(e)?zXe(WXe(e)):VXe(e)}var GXe=qXe,YXe=AXe,XXe=LXe,JXe=av,ZXe=$a,eJe=GXe;function tJe(e){return typeof e=="function"?e:e==null?JXe:typeof e=="object"?ZXe(e)?XXe(e[0],e[1]):YXe(e):eJe(e)}var zh=tJe;function nJe(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}var uhe=nJe;function rJe(e){return e!==e}var iJe=rJe;function sJe(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var aJe=sJe,oJe=uhe,lJe=iJe,cJe=aJe;function uJe(e,t,n){return t===t?cJe(e,t,n):oJe(e,lJe,n)}var dJe=uJe,AJe=dJe;function hJe(e,t){var n=e==null?0:e.length;return!!n&&AJe(e,t,0)>-1}var fJe=hJe;function pJe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var mJe=pJe;function gJe(){}var yJe=gJe,yI=she,vJe=yJe,xJe=lQ,wJe=1/0,bJe=yI&&1/xJe(new yI([,-0]))[1]==wJe?function(e){return new yI(e)}:vJe,CJe=bJe,SJe=GAe,BJe=fJe,_Je=mJe,kJe=XAe,EJe=CJe,NJe=lQ,jJe=200;function TJe(e,t,n){var r=-1,i=BJe,s=e.length,a=!0,o=[],l=o;if(n)a=!1,i=_Je;else if(s>=jJe){var u=t?null:EJe(e);if(u)return NJe(u);a=!1,i=kJe,l=new SJe}else l=t?[]:o;e:for(;++r<s;){var d=e[r],A=t?t(d):d;if(d=n||d!==0?d:0,a&&A===A){for(var f=l.length;f--;)if(l[f]===A)continue e;t&&l.push(A),o.push(d)}else i(l,A,n)||(l!==o&&l.push(A),o.push(d))}return o}var PJe=TJe,IJe=zh,OJe=PJe;function FJe(e,t){return e&&e.length?OJe(e,IJe(t)):[]}var MJe=FJe;const rW=Bn(MJe);function dhe(e,t,n){return t===!0?rW(e,n):un(t)?rW(e,t):e}function l0(e){"@babel/helpers - typeof";return l0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l0(e)}var LJe=["ref"];function iW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ju(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iW(Object(n),!0).forEach(function(r){J5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RJe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hhe(r.key),r)}}function UJe(e,t,n){return t&&sW(e.prototype,t),n&&sW(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function DJe(e,t,n){return t=oE(t),QJe(e,Ahe()?Reflect.construct(t,n||[],oE(e).constructor):t.apply(e,n))}function QJe(e,t){if(t&&(l0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return HJe(e)}function HJe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ahe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ahe=function(){return!!e})()}function oE(e){return oE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},oE(e)}function $Je(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cM(e,t)}function cM(e,t){return cM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},cM(e,t)}function J5(e,t,n){return t=hhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hhe(e){var t=zJe(e,"string");return l0(t)=="symbol"?t:t+""}function zJe(e,t){if(l0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(l0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VJe(e,t){if(e==null)return{};var n=KJe(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KJe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function WJe(e){return e.value}function qJe(e,t){if(re.isValidElement(e))return re.cloneElement(e,t);if(typeof e=="function")return re.createElement(e,t);t.ref;var n=VJe(t,LJe);return re.createElement(oQ,n)}var aW=1,vp=function(e){function t(){var n;RJe(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=DJe(this,t,[].concat(i)),J5(n,"lastBoundingBox",{width:-1,height:-1}),n}return $Je(t,e),UJe(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>aW||Math.abs(i.height-this.lastBoundingBox.height)>aW)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ju({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,s=i.layout,a=i.align,o=i.verticalAlign,l=i.margin,u=i.chartWidth,d=i.chartHeight,A,f;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&s==="vertical"){var h=this.getBBoxSnapshot();A={left:((u||0)-h.width)/2}}else A=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var p=this.getBBoxSnapshot();f={top:((d||0)-p.height)/2}}else f=o==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return ju(ju({},A),f)}},{key:"render",value:function(){var r=this,i=this.props,s=i.content,a=i.width,o=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,d=i.payload,A=ju(ju({position:"absolute",width:a||"auto",height:o||"auto"},this.getDefaultPosition(l)),l);return re.createElement("div",{className:"recharts-legend-wrapper",style:A,ref:function(h){r.wrapperNode=h}},qJe(s,ju(ju({},this.props),{},{payload:dhe(d,u,WJe)})))}}],[{key:"getWithHeight",value:function(r,i){var s=ju(ju({},this.defaultProps),r.props),a=s.layout;return a==="vertical"&&Je(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(S.PureComponent);J5(vp,"displayName","Legend");J5(vp,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var oW=g2,GJe=cQ,YJe=$a,lW=oW?oW.isConcatSpreadable:void 0;function XJe(e){return YJe(e)||GJe(e)||!!(lW&&e&&e[lW])}var JJe=XJe,ZJe=ZAe,eZe=JJe;function fhe(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=eZe),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?fhe(o,t-1,n,r,i):ZJe(i,o):r||(i[i.length]=o)}return i}var phe=fhe;function tZe(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[e?o:++i];if(n(s[l],l,s)===!1)break}return t}}var nZe=tZe,rZe=nZe,iZe=rZe(),sZe=iZe,aZe=sZe,oZe=X5;function lZe(e,t){return e&&aZe(e,t,oZe)}var mhe=lZe,cZe=w2;function uZe(e,t){return function(n,r){if(n==null)return n;if(!cZe(n))return e(n,r);for(var i=n.length,s=t?i:-1,a=Object(n);(t?s--:++s<i)&&r(a[s],s,a)!==!1;);return n}}var dZe=uZe,AZe=mhe,hZe=dZe,fZe=hZe(AZe),hQ=fZe,pZe=hQ,mZe=w2;function gZe(e,t){var n=-1,r=mZe(e)?Array(e.length):[];return pZe(e,function(i,s,a){r[++n]=t(i,s,a)}),r}var ghe=gZe;function yZe(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var vZe=yZe,cW=Z0;function xZe(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,s=cW(e),a=t!==void 0,o=t===null,l=t===t,u=cW(t);if(!o&&!u&&!s&&e>t||s&&a&&l&&!o&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!s&&!u&&e<t||u&&n&&i&&!r&&!s||o&&n&&i||!a&&i||!l)return-1}return 0}var wZe=xZe,bZe=wZe;function CZe(e,t,n){for(var r=-1,i=e.criteria,s=t.criteria,a=i.length,o=n.length;++r<a;){var l=bZe(i[r],s[r]);if(l){if(r>=o)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var SZe=CZe,vI=X6,BZe=J6,_Ze=zh,kZe=ghe,EZe=vZe,NZe=nhe,jZe=SZe,TZe=av,PZe=$a;function IZe(e,t,n){t.length?t=vI(t,function(s){return PZe(s)?function(a){return BZe(a,s.length===1?s[0]:s)}:s}):t=[TZe];var r=-1;t=vI(t,NZe(_Ze));var i=kZe(e,function(s,a,o){var l=vI(t,function(u){return u(s)});return{criteria:l,index:++r,value:s}});return EZe(i,function(s,a){return jZe(s,a,n)})}var OZe=IZe;function FZe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var MZe=FZe,LZe=MZe,uW=Math.max;function RZe(e,t,n){return t=uW(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=uW(r.length-t,0),a=Array(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),LZe(e,this,o)}}var UZe=RZe;function DZe(e){return function(){return e}}var QZe=DZe,HZe=sm,$Ze=function(){try{var e=HZe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),yhe=$Ze,zZe=QZe,dW=yhe,VZe=av,KZe=dW?function(e,t){return dW(e,"toString",{configurable:!0,enumerable:!1,value:zZe(t),writable:!0})}:VZe,WZe=KZe,qZe=800,GZe=16,YZe=Date.now;function XZe(e){var t=0,n=0;return function(){var r=YZe(),i=GZe-(r-n);if(n=r,i>0){if(++t>=qZe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var JZe=XZe,ZZe=WZe,eet=JZe,tet=eet(ZZe),net=tet,ret=av,iet=UZe,set=net;function aet(e,t){return set(iet(e,t,ret),e+"")}var oet=aet,cet=W6,uet=w2,det=uQ,Aet=$h;function het(e,t,n){if(!Aet(n))return!1;var r=typeof t;return(r=="number"?uet(n)&&det(t,n.length):r=="string"&&t in n)?cet(n[t],e):!1}var Z5=het,fet=phe,pet=OZe,met=oet,AW=Z5,get=met(function(e,t){if(e==null)return[];var n=t.length;return n>1&&AW(e,t[0],t[1])?t=[]:n>2&&AW(t[0],t[1],t[2])&&(t=[t[0]]),pet(e,fet(t,1),[])}),yet=get;const fQ=Bn(yet);function Xb(e){"@babel/helpers - typeof";return Xb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xb(e)}function uM(){return uM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uM.apply(this,arguments)}function vet(e,t){return Cet(e)||bet(e,t)||wet(e,t)||xet()}function xet(){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 wet(e,t){if(e){if(typeof e=="string")return hW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hW(e,t)}}function hW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bet(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function Cet(e){if(Array.isArray(e))return e}function fW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fW(Object(n),!0).forEach(function(r){Bet(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bet(e,t,n){return t=_et(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _et(e){var t=ket(e,"string");return Xb(t)=="symbol"?t:t+""}function ket(e,t){if(Xb(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xb(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Eet(e){return Array.isArray(e)&&Li(e[0])&&Li(e[1])?e.join(" ~ "):e}var Net=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,s=i===void 0?{}:i,a=t.itemStyle,o=a===void 0?{}:a,l=t.labelStyle,u=l===void 0?{}:l,d=t.payload,A=t.formatter,f=t.itemSorter,h=t.wrapperClassName,p=t.labelClassName,m=t.label,g=t.labelFormatter,y=t.accessibilityLayer,v=y===void 0?!1:y,x=function(){if(d&&d.length){var E={padding:0,margin:0},F=(f?fQ(d,f):d).map(function(M,D){if(M.type==="none")return null;var H=xI({display:"block",paddingTop:4,paddingBottom:4,color:M.color||"#000"},o),q=M.formatter||A||Eet,$=M.value,z=M.name,Q=$,ce=z;if(q&&Q!=null&&ce!=null){var R=q($,z,M,D,d);if(Array.isArray(R)){var O=vet(R,2);Q=O[0],ce=O[1]}else Q=R}return re.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:H},Li(ce)?re.createElement("span",{className:"recharts-tooltip-item-name"},ce):null,Li(ce)?re.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,re.createElement("span",{className:"recharts-tooltip-item-value"},Q),re.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return re.createElement("ul",{className:"recharts-tooltip-item-list",style:E},F)}return null},b=xI({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},s),w=xI({margin:0},u),B=!fn(m),k=B?m:"",N=Sn("recharts-default-tooltip",h),j=Sn("recharts-tooltip-label",p);B&&g&&d!==void 0&&d!==null&&(k=g(m,d));var L=v?{role:"status","aria-live":"assertive"}:{};return re.createElement("div",uM({className:N,style:b},L),re.createElement("p",{className:j,style:w},re.isValidElement(k)?k:"".concat(k)),x())};function Jb(e){"@babel/helpers - typeof";return Jb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jb(e)}function gS(e,t,n){return t=jet(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jet(e){var t=Tet(e,"string");return Jb(t)=="symbol"?t:t+""}function Tet(e,t){if(Jb(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Jb(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ux="recharts-tooltip-wrapper",Pet={visibility:"hidden"};function Iet(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Sn(ux,gS(gS(gS(gS({},"".concat(ux,"-right"),Je(n)&&t&&Je(t.x)&&n>=t.x),"".concat(ux,"-left"),Je(n)&&t&&Je(t.x)&&n<t.x),"".concat(ux,"-bottom"),Je(r)&&t&&Je(t.y)&&r>=t.y),"".concat(ux,"-top"),Je(r)&&t&&Je(t.y)&&r<t.y))}function pW(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,s=e.position,a=e.reverseDirection,o=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(s&&Je(s[r]))return s[r];var d=n[r]-o-i,A=n[r]+i;if(t[r])return a[r]?d:A;if(a[r]){var f=d,h=l[r];return f<h?Math.max(A,l[r]):Math.max(d,l[r])}var p=A+o,m=l[r]+u;return p>m?Math.max(d,l[r]):Math.max(A,l[r])}function Oet(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Fet(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,s=e.reverseDirection,a=e.tooltipBox,o=e.useTranslate3d,l=e.viewBox,u,d,A;return a.height>0&&a.width>0&&n?(d=pW({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),A=pW({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),u=Oet({translateX:d,translateY:A,useTranslate3d:o})):u=Pet,{cssProperties:u,cssClasses:Iet({translateX:d,translateY:A,coordinate:n})}}function c0(e){"@babel/helpers - typeof";return c0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c0(e)}function mW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gW(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mW(Object(n),!0).forEach(function(r){AM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Met(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Let(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xhe(r.key),r)}}function Ret(e,t,n){return t&&Let(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uet(e,t,n){return t=lE(t),Det(e,vhe()?Reflect.construct(t,n||[],lE(e).constructor):t.apply(e,n))}function Det(e,t){if(t&&(c0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qet(e)}function Qet(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vhe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vhe=function(){return!!e})()}function lE(e){return lE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lE(e)}function Het(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dM(e,t)}function dM(e,t){return dM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dM(e,t)}function AM(e,t,n){return t=xhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xhe(e){var t=$et(e,"string");return c0(t)=="symbol"?t:t+""}function $et(e,t){if(c0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(c0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yW=1,zet=function(e){function t(){var n;Met(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=Uet(this,t,[].concat(i)),AM(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),AM(n,"handleKeyDown",function(a){if(a.key==="Escape"){var o,l,u,d;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(o=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&o!==void 0?o:0,y:(u=(d=n.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),n}return Het(t,e),Ret(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>yW||Math.abs(r.height-this.state.lastBoundingBox.height)>yW)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,s=i.active,a=i.allowEscapeViewBox,o=i.animationDuration,l=i.animationEasing,u=i.children,d=i.coordinate,A=i.hasPayload,f=i.isAnimationActive,h=i.offset,p=i.position,m=i.reverseDirection,g=i.useTranslate3d,y=i.viewBox,v=i.wrapperStyle,x=Fet({allowEscapeViewBox:a,coordinate:d,offsetTopLeft:h,position:p,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:y}),b=x.cssClasses,w=x.cssProperties,B=gW(gW({transition:f&&s?"transform ".concat(o,"ms ").concat(l):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&s&&A?"visible":"hidden",position:"absolute",top:0,left:0},v);return re.createElement("div",{tabIndex:-1,className:b,style:B,ref:function(N){r.wrapperNode=N}},u)}}])}(S.PureComponent),Vet=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},nd={isSsr:Vet(),get:function(t){return nd[t]},set:function(t,n){if(typeof t=="string")nd[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){nd[i]=t[i]})}}};function u0(e){"@babel/helpers - typeof";return u0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u0(e)}function vW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xW(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vW(Object(n),!0).forEach(function(r){pQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ket(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wet(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bhe(r.key),r)}}function qet(e,t,n){return t&&Wet(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Get(e,t,n){return t=cE(t),Yet(e,whe()?Reflect.construct(t,n||[],cE(e).constructor):t.apply(e,n))}function Yet(e,t){if(t&&(u0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xet(e)}function Xet(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function whe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(whe=function(){return!!e})()}function cE(e){return cE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cE(e)}function Jet(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hM(e,t)}function hM(e,t){return hM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},hM(e,t)}function pQ(e,t,n){return t=bhe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bhe(e){var t=Zet(e,"string");return u0(t)=="symbol"?t:t+""}function Zet(e,t){if(u0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(u0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ett(e){return e.dataKey}function ttt(e,t){return re.isValidElement(e)?re.cloneElement(e,t):typeof e=="function"?re.createElement(e,t):re.createElement(Net,t)}var zo=function(e){function t(){return Ket(this,t),Get(this,t,arguments)}return Jet(t,e),qet(t,[{key:"render",value:function(){var r=this,i=this.props,s=i.active,a=i.allowEscapeViewBox,o=i.animationDuration,l=i.animationEasing,u=i.content,d=i.coordinate,A=i.filterNull,f=i.isAnimationActive,h=i.offset,p=i.payload,m=i.payloadUniqBy,g=i.position,y=i.reverseDirection,v=i.useTranslate3d,x=i.viewBox,b=i.wrapperStyle,w=p??[];A&&w.length&&(w=dhe(p.filter(function(k){return k.value!=null&&(k.hide!==!0||r.props.includeHidden)}),m,ett));var B=w.length>0;return re.createElement(zet,{allowEscapeViewBox:a,animationDuration:o,animationEasing:l,isAnimationActive:f,active:s,coordinate:d,hasPayload:B,offset:h,position:g,reverseDirection:y,useTranslate3d:v,viewBox:x,wrapperStyle:b},ttt(u,xW(xW({},this.props),{},{payload:w})))}}])}(S.PureComponent);pQ(zo,"displayName","Tooltip");pQ(zo,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!nd.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var ntt=du,rtt=function(){return ntt.Date.now()},itt=rtt,stt=/\s/;function att(e){for(var t=e.length;t--&&stt.test(e.charAt(t)););return t}var ott=att,ltt=ott,ctt=/^\s+/;function utt(e){return e&&e.slice(0,ltt(e)+1).replace(ctt,"")}var dtt=utt,Att=dtt,wW=$h,htt=Z0,bW=NaN,ftt=/^[-+]0x[0-9a-f]+$/i,ptt=/^0b[01]+$/i,mtt=/^0o[0-7]+$/i,gtt=parseInt;function ytt(e){if(typeof e=="number")return e;if(htt(e))return bW;if(wW(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=wW(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Att(e);var n=ptt.test(e);return n||mtt.test(e)?gtt(e.slice(2),n?2:8):ftt.test(e)?bW:+e}var Che=ytt,vtt=$h,wI=itt,CW=Che,xtt="Expected a function",wtt=Math.max,btt=Math.min;function Ctt(e,t,n){var r,i,s,a,o,l,u=0,d=!1,A=!1,f=!0;if(typeof e!="function")throw new TypeError(xtt);t=CW(t)||0,vtt(n)&&(d=!!n.leading,A="maxWait"in n,s=A?wtt(CW(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function h(B){var k=r,N=i;return r=i=void 0,u=B,a=e.apply(N,k),a}function p(B){return u=B,o=setTimeout(y,t),d?h(B):a}function m(B){var k=B-l,N=B-u,j=t-k;return A?btt(j,s-N):j}function g(B){var k=B-l,N=B-u;return l===void 0||k>=t||k<0||A&&N>=s}function y(){var B=wI();if(g(B))return v(B);o=setTimeout(y,m(B))}function v(B){return o=void 0,f&&r?h(B):(r=i=void 0,a)}function x(){o!==void 0&&clearTimeout(o),u=0,r=l=i=o=void 0}function b(){return o===void 0?a:v(wI())}function w(){var B=wI(),k=g(B);if(r=arguments,i=this,l=B,k){if(o===void 0)return p(l);if(A)return clearTimeout(o),o=setTimeout(y,t),h(l)}return o===void 0&&(o=setTimeout(y,t)),a}return w.cancel=x,w.flush=b,w}var Stt=Ctt,Btt=Stt,_tt=$h,ktt="Expected a function";function Ett(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(ktt);return _tt(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Btt(e,t,{leading:r,maxWait:t,trailing:i})}var Ntt=Ett;const She=Bn(Ntt);function Zb(e){"@babel/helpers - typeof";return Zb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zb(e)}function SW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SW(Object(n),!0).forEach(function(r){jtt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jtt(e,t,n){return t=Ttt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ttt(e){var t=Ptt(e,"string");return Zb(t)=="symbol"?t:t+""}function Ptt(e,t){if(Zb(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Zb(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Itt(e,t){return Ltt(e)||Mtt(e,t)||Ftt(e,t)||Ott()}function Ott(){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 Ftt(e,t){if(e){if(typeof e=="string")return BW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BW(e,t)}}function BW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mtt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function Ltt(e){if(Array.isArray(e))return e}var mQ=S.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,s=e.width,a=s===void 0?"100%":s,o=e.height,l=o===void 0?"100%":o,u=e.minWidth,d=u===void 0?0:u,A=e.minHeight,f=e.maxHeight,h=e.children,p=e.debounce,m=p===void 0?0:p,g=e.id,y=e.className,v=e.onResize,x=e.style,b=x===void 0?{}:x,w=S.useRef(null),B=S.useRef();B.current=v,S.useImperativeHandle(t,function(){return Object.defineProperty(w.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),w.current},configurable:!0})});var k=S.useState({containerWidth:i.width,containerHeight:i.height}),N=Itt(k,2),j=N[0],L=N[1],T=S.useCallback(function(F,M){L(function(D){var H=Math.round(F),q=Math.round(M);return D.containerWidth===H&&D.containerHeight===q?D:{containerWidth:H,containerHeight:q}})},[]);S.useEffect(function(){var F=function(z){var Q,ce=z[0].contentRect,R=ce.width,O=ce.height;T(R,O),(Q=B.current)===null||Q===void 0||Q.call(B,R,O)};m>0&&(F=She(F,m,{trailing:!0,leading:!1}));var M=new ResizeObserver(F),D=w.current.getBoundingClientRect(),H=D.width,q=D.height;return T(H,q),M.observe(w.current),function(){M.disconnect()}},[T,m]);var E=S.useMemo(function(){var F=j.containerWidth,M=j.containerHeight;if(F<0||M<0)return null;td(Vf(a)||Vf(l),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,a,l),td(!n||n>0,"The aspect(%s) must be greater than zero.",n);var D=Vf(a)?F:a,H=Vf(l)?M:l;n&&n>0&&(D?H=D/n:H&&(D=H*n),f&&H>f&&(H=f)),td(D>0||H>0,`The width(%s) and height(%s) of chart should be greater than 0,
please check the style of container, or the props width(%s) and height(%s),
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
height and width.`,D,H,a,l,d,A,n);var q=!Array.isArray(h)&&ed(h.type).endsWith("Chart");return re.Children.map(h,function($){return re.isValidElement($)?S.cloneElement($,yS({width:D,height:H},q?{style:yS({height:"100%",width:"100%",maxHeight:H,maxWidth:D},$.props.style)}:{})):$})},[n,h,l,f,A,d,j,a]);return re.createElement("div",{id:g?"".concat(g):void 0,className:Sn("recharts-responsive-container",y),style:yS(yS({},b),{},{width:a,height:l,minWidth:d,minHeight:A,maxHeight:f}),ref:w},E)}),Bhe=function(t){return null};Bhe.displayName="Cell";function e1(e){"@babel/helpers - typeof";return e1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e1(e)}function _W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_W(Object(n),!0).forEach(function(r){Rtt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_W(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rtt(e,t,n){return t=Utt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Utt(e){var t=Dtt(e,"string");return e1(t)=="symbol"?t:t+""}function Dtt(e,t){if(e1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(e1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xm={widthCache:{},cacheCount:0},Qtt=2e3,Htt={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},kW="recharts_measurement_span";function $tt(e){var t=fM({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Tw=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||nd.isSsr)return{width:0,height:0};var r=$tt(n),i=JSON.stringify({text:t,copyStyle:r});if(Xm.widthCache[i])return Xm.widthCache[i];try{var s=document.getElementById(kW);s||(s=document.createElement("span"),s.setAttribute("id",kW),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));var a=fM(fM({},Htt),r);Object.assign(s.style,a),s.textContent="".concat(t);var o=s.getBoundingClientRect(),l={width:o.width,height:o.height};return Xm.widthCache[i]=l,++Xm.cacheCount>Qtt&&(Xm.cacheCount=0,Xm.widthCache={}),l}catch{return{width:0,height:0}}},ztt=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function t1(e){"@babel/helpers - typeof";return t1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t1(e)}function uE(e,t){return qtt(e)||Wtt(e,t)||Ktt(e,t)||Vtt()}function Vtt(){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 Ktt(e,t){if(e){if(typeof e=="string")return EW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EW(e,t)}}function EW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wtt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function qtt(e){if(Array.isArray(e))return e}function Gtt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xtt(r.key),r)}}function Ytt(e,t,n){return t&&NW(e.prototype,t),n&&NW(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xtt(e){var t=Jtt(e,"string");return t1(t)=="symbol"?t:t+""}function Jtt(e,t){if(t1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(t1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jW=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,TW=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Ztt=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,ent=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,_he={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},tnt=Object.keys(_he),Qg="NaN";function nnt(e,t){return e*_he[t]}var vS=function(){function e(t,n){Gtt(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Ztt.test(n)&&(this.num=NaN,this.unit=""),tnt.includes(n)&&(this.num=nnt(t,n),this.unit="px")}return Ytt(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=ent.exec(n))!==null&&r!==void 0?r:[],s=uE(i,3),a=s[1],o=s[2];return new e(parseFloat(a),o??"")}}])}();function khe(e){if(e.includes(Qg))return Qg;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=jW.exec(t))!==null&&n!==void 0?n:[],i=uE(r,4),s=i[1],a=i[2],o=i[3],l=vS.parse(s??""),u=vS.parse(o??""),d=a==="*"?l.multiply(u):l.divide(u);if(d.isNaN())return Qg;t=t.replace(jW,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var A,f=(A=TW.exec(t))!==null&&A!==void 0?A:[],h=uE(f,4),p=h[1],m=h[2],g=h[3],y=vS.parse(p??""),v=vS.parse(g??""),x=m==="+"?y.add(v):y.subtract(v);if(x.isNaN())return Qg;t=t.replace(TW,x.toString())}return t}var PW=/\(([^()]*)\)/;function rnt(e){for(var t=e;t.includes("(");){var n=PW.exec(t),r=uE(n,2),i=r[1];t=t.replace(PW,khe(i))}return t}function int(e){var t=e.replace(/\s+/g,"");return t=rnt(t),t=khe(t),t}function snt(e){try{return int(e)}catch{return Qg}}function bI(e){var t=snt(e.slice(5,-1));return t===Qg?"":t}var ant=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],ont=["dx","dy","angle","className","breakAll"];function pM(){return pM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pM.apply(this,arguments)}function IW(e,t){if(e==null)return{};var n=lnt(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lnt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function OW(e,t){return Ant(e)||dnt(e,t)||unt(e,t)||cnt()}function cnt(){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 unt(e,t){if(e){if(typeof e=="string")return FW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FW(e,t)}}function FW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dnt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function Ant(e){if(Array.isArray(e))return e}var Ehe=/[ \f\n\r\t\v\u2028\u2029]+/,Nhe=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var s=[];fn(n)||(r?s=n.toString().split(""):s=n.toString().split(Ehe));var a=s.map(function(l){return{word:l,width:Tw(l,i).width}}),o=r?0:Tw(" ",i).width;return{wordsWithComputedWidth:a,spaceWidth:o}}catch{return null}},hnt=function(t,n,r,i,s){var a=t.maxLines,o=t.children,l=t.style,u=t.breakAll,d=Je(a),A=o,f=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(H,q){var $=q.word,z=q.width,Q=H[H.length-1];if(Q&&(i==null||s||Q.width+z+r<Number(i)))Q.words.push($),Q.width+=z+r;else{var ce={words:[$],width:z};H.push(ce)}return H},[])},h=f(n),p=function(D){return D.reduce(function(H,q){return H.width>q.width?H:q})};if(!d)return h;for(var m="…",g=function(D){var H=A.slice(0,D),q=Nhe({breakAll:u,style:l,children:H+m}).wordsWithComputedWidth,$=f(q),z=$.length>a||p($).width>Number(i);return[z,$]},y=0,v=A.length-1,x=0,b;y<=v&&x<=A.length-1;){var w=Math.floor((y+v)/2),B=w-1,k=g(B),N=OW(k,2),j=N[0],L=N[1],T=g(w),E=OW(T,1),F=E[0];if(!j&&!F&&(y=w+1),j&&F&&(v=w-1),!j&&F){b=L;break}x++}return b||h},MW=function(t){var n=fn(t)?[]:t.toString().split(Ehe);return[{words:n}]},fnt=function(t){var n=t.width,r=t.scaleToFit,i=t.children,s=t.style,a=t.breakAll,o=t.maxLines;if((n||r)&&!nd.isSsr){var l,u,d=Nhe({breakAll:a,children:i,style:s});if(d){var A=d.wordsWithComputedWidth,f=d.spaceWidth;l=A,u=f}else return MW(i);return hnt({breakAll:a,children:i,maxLines:o,style:s},l,u,n,r)}return MW(i)},LW="#808080",dE=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,a=t.lineHeight,o=a===void 0?"1em":a,l=t.capHeight,u=l===void 0?"0.71em":l,d=t.scaleToFit,A=d===void 0?!1:d,f=t.textAnchor,h=f===void 0?"start":f,p=t.verticalAnchor,m=p===void 0?"end":p,g=t.fill,y=g===void 0?LW:g,v=IW(t,ant),x=S.useMemo(function(){return fnt({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:A,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,A,v.style,v.width]),b=v.dx,w=v.dy,B=v.angle,k=v.className,N=v.breakAll,j=IW(v,ont);if(!Li(r)||!Li(s))return null;var L=r+(Je(b)?b:0),T=s+(Je(w)?w:0),E;switch(m){case"start":E=bI("calc(".concat(u,")"));break;case"middle":E=bI("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:E=bI("calc(".concat(x.length-1," * -").concat(o,")"));break}var F=[];if(A){var M=x[0].width,D=v.width;F.push("scale(".concat((Je(D)?D/M:1)/M,")"))}return B&&F.push("rotate(".concat(B,", ").concat(L,", ").concat(T,")")),F.length&&(j.transform=F.join(" ")),re.createElement("text",pM({},yn(j,!0),{x:L,y:T,className:Sn("recharts-text",k),textAnchor:h,fill:y.includes("url")?LW:y}),x.map(function(H,q){var $=H.words.join(N?"":" ");return re.createElement("tspan",{x:L,dy:q===0?E:o,key:"".concat($,"-").concat(q)},$)}))};function oh(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pnt(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function gQ(e){let t,n,r;e.length!==2?(t=oh,n=(o,l)=>oh(e(o),l),r=(o,l)=>e(o)-l):(t=e===oh||e===pnt?e:mnt,n=e,r=e);function i(o,l,u=0,d=o.length){if(u<d){if(t(l,l)!==0)return d;do{const A=u+d>>>1;n(o[A],l)<0?u=A+1:d=A}while(u<d)}return u}function s(o,l,u=0,d=o.length){if(u<d){if(t(l,l)!==0)return d;do{const A=u+d>>>1;n(o[A],l)<=0?u=A+1:d=A}while(u<d)}return u}function a(o,l,u=0,d=o.length){const A=i(o,l,u,d-1);return A>u&&r(o[A-1],l)>-r(o[A],l)?A-1:A}return{left:i,center:a,right:s}}function mnt(){return 0}function jhe(e){return e===null?NaN:+e}function*gnt(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const ynt=gQ(oh),b2=ynt.right;gQ(jhe).center;class RW extends Map{constructor(t,n=wnt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(UW(this,t))}has(t){return super.has(UW(this,t))}set(t,n){return super.set(vnt(this,t),n)}delete(t){return super.delete(xnt(this,t))}}function UW({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function vnt({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function xnt({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function wnt(e){return e!==null&&typeof e=="object"?e.valueOf():e}function bnt(e=oh){if(e===oh)return The;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function The(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Cnt=Math.sqrt(50),Snt=Math.sqrt(10),Bnt=Math.sqrt(2);function AE(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),a=s>=Cnt?10:s>=Snt?5:s>=Bnt?2:1;let o,l,u;return i<0?(u=Math.pow(10,-i)/a,o=Math.round(e*u),l=Math.round(t*u),o/u<e&&++o,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*a,o=Math.round(e/u),l=Math.round(t/u),o*u<e&&++o,l*u>t&&--l),l<o&&.5<=n&&n<2?AE(e,t,n*2):[o,l,u]}function mM(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,s,a]=r?AE(t,e,n):AE(e,t,n);if(!(s>=i))return[];const o=s-i+1,l=new Array(o);if(r)if(a<0)for(let u=0;u<o;++u)l[u]=(s-u)/-a;else for(let u=0;u<o;++u)l[u]=(s-u)*a;else if(a<0)for(let u=0;u<o;++u)l[u]=(i+u)/-a;else for(let u=0;u<o;++u)l[u]=(i+u)*a;return l}function gM(e,t,n){return t=+t,e=+e,n=+n,AE(e,t,n)[2]}function yM(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?gM(t,e,n):gM(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function DW(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function QW(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Phe(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?The:bnt(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,d=Math.log(l),A=.5*Math.exp(2*d/3),f=.5*Math.sqrt(d*A*(l-A)/l)*(u-l/2<0?-1:1),h=Math.max(n,Math.floor(t-u*A/l+f)),p=Math.min(r,Math.floor(t+(l-u)*A/l+f));Phe(e,t,h,p,i)}const s=e[t];let a=n,o=r;for(dx(e,n,t),i(e[r],s)>0&&dx(e,n,r);a<o;){for(dx(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?dx(e,n,o):(++o,dx(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function dx(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function _nt(e,t,n){if(e=Float64Array.from(gnt(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return QW(e);if(t>=1)return DW(e);var r,i=(r-1)*t,s=Math.floor(i),a=DW(Phe(e,s).subarray(0,s+1)),o=QW(e.subarray(s+1));return a+(o-a)*(i-s)}}function knt(e,t,n=jhe){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,s=Math.floor(i),a=+n(e[s],s,e),o=+n(e[s+1],s+1,e);return a+(o-a)*(i-s)}}function Ent(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}function vl(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function kd(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const vM=Symbol("implicit");function yQ(){var e=new RW,t=[],n=[],r=vM;function i(s){let a=e.get(s);if(a===void 0){if(r!==vM)return r;e.set(s,a=t.push(s)-1)}return n[a%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new RW;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return yQ(t,n).unknown(r)},vl.apply(i,arguments),i}function n1(){var e=yQ().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,a,o=!1,l=0,u=0,d=.5;delete e.unknown;function A(){var f=t().length,h=i<r,p=h?i:r,m=h?r:i;s=(m-p)/Math.max(1,f-l+u*2),o&&(s=Math.floor(s)),p+=(m-p-s*(f-l))*d,a=s*(1-l),o&&(p=Math.round(p),a=Math.round(a));var g=Ent(f).map(function(y){return p+s*y});return n(h?g.reverse():g)}return e.domain=function(f){return arguments.length?(t(f),A()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,A()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,o=!0,A()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(f){return arguments.length?(o=!!f,A()):o},e.padding=function(f){return arguments.length?(l=Math.min(1,u=+f),A()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),A()):l},e.paddingOuter=function(f){return arguments.length?(u=+f,A()):u},e.align=function(f){return arguments.length?(d=Math.max(0,Math.min(1,f)),A()):d},e.copy=function(){return n1(t(),[r,i]).round(o).paddingInner(l).paddingOuter(u).align(d)},vl.apply(A(),arguments)}function Ihe(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ihe(t())},e}function Pw(){return Ihe(n1.apply(null,arguments).paddingInner(1))}function vQ(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ohe(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function C2(){}var r1=.7,hE=1/r1,py="\\s*([+-]?\\d+)\\s*",i1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Nnt=/^#([0-9a-f]{3,8})$/,jnt=new RegExp(`^rgb\\(${py},${py},${py}\\)$`),Tnt=new RegExp(`^rgb\\(${Zc},${Zc},${Zc}\\)$`),Pnt=new RegExp(`^rgba\\(${py},${py},${py},${i1}\\)$`),Int=new RegExp(`^rgba\\(${Zc},${Zc},${Zc},${i1}\\)$`),Ont=new RegExp(`^hsl\\(${i1},${Zc},${Zc}\\)$`),Fnt=new RegExp(`^hsla\\(${i1},${Zc},${Zc},${i1}\\)$`),HW={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};vQ(C2,s1,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$W,formatHex:$W,formatHex8:Mnt,formatHsl:Lnt,formatRgb:zW,toString:zW});function $W(){return this.rgb().formatHex()}function Mnt(){return this.rgb().formatHex8()}function Lnt(){return Fhe(this).formatHsl()}function zW(){return this.rgb().formatRgb()}function s1(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Nnt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?VW(t):n===3?new Fa(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?xS(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?xS(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=jnt.exec(e))?new Fa(t[1],t[2],t[3],1):(t=Tnt.exec(e))?new Fa(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Pnt.exec(e))?xS(t[1],t[2],t[3],t[4]):(t=Int.exec(e))?xS(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ont.exec(e))?qW(t[1],t[2]/100,t[3]/100,1):(t=Fnt.exec(e))?qW(t[1],t[2]/100,t[3]/100,t[4]):HW.hasOwnProperty(e)?VW(HW[e]):e==="transparent"?new Fa(NaN,NaN,NaN,0):null}function VW(e){return new Fa(e>>16&255,e>>8&255,e&255,1)}function xS(e,t,n,r){return r<=0&&(e=t=n=NaN),new Fa(e,t,n,r)}function Rnt(e){return e instanceof C2||(e=s1(e)),e?(e=e.rgb(),new Fa(e.r,e.g,e.b,e.opacity)):new Fa}function xM(e,t,n,r){return arguments.length===1?Rnt(e):new Fa(e,t,n,r??1)}function Fa(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}vQ(Fa,xM,Ohe(C2,{brighter(e){return e=e==null?hE:Math.pow(hE,e),new Fa(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?r1:Math.pow(r1,e),new Fa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fa(xp(this.r),xp(this.g),xp(this.b),fE(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:KW,formatHex:KW,formatHex8:Unt,formatRgb:WW,toString:WW}));function KW(){return`#${Kf(this.r)}${Kf(this.g)}${Kf(this.b)}`}function Unt(){return`#${Kf(this.r)}${Kf(this.g)}${Kf(this.b)}${Kf((isNaN(this.opacity)?1:this.opacity)*255)}`}function WW(){const e=fE(this.opacity);return`${e===1?"rgb(":"rgba("}${xp(this.r)}, ${xp(this.g)}, ${xp(this.b)}${e===1?")":`, ${e})`}`}function fE(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Kf(e){return e=xp(e),(e<16?"0":"")+e.toString(16)}function qW(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Kl(e,t,n,r)}function Fhe(e){if(e instanceof Kl)return new Kl(e.h,e.s,e.l,e.opacity);if(e instanceof C2||(e=s1(e)),!e)return new Kl;if(e instanceof Kl)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,o=s-i,l=(s+i)/2;return o?(t===s?a=(n-r)/o+(n<r)*6:n===s?a=(r-t)/o+2:a=(t-n)/o+4,o/=l<.5?s+i:2-s-i,a*=60):o=l>0&&l<1?0:a,new Kl(a,o,l,e.opacity)}function Dnt(e,t,n,r){return arguments.length===1?Fhe(e):new Kl(e,t,n,r??1)}function Kl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}vQ(Kl,Dnt,Ohe(C2,{brighter(e){return e=e==null?hE:Math.pow(hE,e),new Kl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?r1:Math.pow(r1,e),new Kl(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Fa(CI(e>=240?e-240:e+120,i,r),CI(e,i,r),CI(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Kl(GW(this.h),wS(this.s),wS(this.l),fE(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=fE(this.opacity);return`${e===1?"hsl(":"hsla("}${GW(this.h)}, ${wS(this.s)*100}%, ${wS(this.l)*100}%${e===1?")":`, ${e})`}`}}));function GW(e){return e=(e||0)%360,e<0?e+360:e}function wS(e){return Math.max(0,Math.min(1,e||0))}function CI(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const xQ=e=>()=>e;function Qnt(e,t){return function(n){return e+n*t}}function Hnt(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function $nt(e){return(e=+e)==1?Mhe:function(t,n){return n-t?Hnt(t,n,e):xQ(isNaN(t)?n:t)}}function Mhe(e,t){var n=t-e;return n?Qnt(e,n):xQ(isNaN(e)?t:e)}const YW=function e(t){var n=$nt(t);function r(i,s){var a=n((i=xM(i)).r,(s=xM(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),u=Mhe(i.opacity,s.opacity);return function(d){return i.r=a(d),i.g=o(d),i.b=l(d),i.opacity=u(d),i+""}}return r.gamma=e,r}(1);function znt(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function Vnt(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Knt(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),a;for(a=0;a<r;++a)i[a]=ov(e[a],t[a]);for(;a<n;++a)s[a]=t[a];return function(o){for(a=0;a<r;++a)s[a]=i[a](o);return s}}function Wnt(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function pE(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function qnt(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ov(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var wM=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,SI=new RegExp(wM.source,"g");function Gnt(e){return function(){return e}}function Ynt(e){return function(t){return e(t)+""}}function Xnt(e,t){var n=wM.lastIndex=SI.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=wM.exec(e))&&(i=SI.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,l.push({i:a,x:pE(r,i)})),n=SI.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?Ynt(l[0].x):Gnt(t):(t=l.length,function(u){for(var d=0,A;d<t;++d)o[(A=l[d]).i]=A.x(u);return o.join("")})}function ov(e,t){var n=typeof t,r;return t==null||n==="boolean"?xQ(t):(n==="number"?pE:n==="string"?(r=s1(t))?(t=r,YW):Xnt:t instanceof s1?YW:t instanceof Date?Wnt:Vnt(t)?znt:Array.isArray(t)?Knt:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?qnt:pE)(e,t)}function wQ(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Jnt(e,t){t===void 0&&(t=e,e=ov);for(var n=0,r=t.length-1,i=t[0],s=new Array(r<0?0:r);n<r;)s[n]=e(i,i=t[++n]);return function(a){var o=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return s[o](a-o)}}function Znt(e){return function(){return e}}function mE(e){return+e}var XW=[0,1];function ua(e){return e}function bM(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Znt(isNaN(t)?NaN:.5)}function ert(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function trt(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=bM(i,r),s=n(a,s)):(r=bM(r,i),s=n(s,a)),function(o){return s(r(o))}}function nrt(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=bM(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var l=b2(e,o,1,r)-1;return s[l](i[l](o))}}function S2(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ej(){var e=XW,t=XW,n=ov,r,i,s,a=ua,o,l,u;function d(){var f=Math.min(e.length,t.length);return a!==ua&&(a=ert(e[0],e[f-1])),o=f>2?nrt:trt,l=u=null,A}function A(f){return f==null||isNaN(f=+f)?s:(l||(l=o(e.map(r),t,n)))(r(a(f)))}return A.invert=function(f){return a(i((u||(u=o(t,e.map(r),pE)))(f)))},A.domain=function(f){return arguments.length?(e=Array.from(f,mE),d()):e.slice()},A.range=function(f){return arguments.length?(t=Array.from(f),d()):t.slice()},A.rangeRound=function(f){return t=Array.from(f),n=wQ,d()},A.clamp=function(f){return arguments.length?(a=f?!0:ua,d()):a!==ua},A.interpolate=function(f){return arguments.length?(n=f,d()):n},A.unknown=function(f){return arguments.length?(s=f,A):s},function(f,h){return r=f,i=h,d()}}function bQ(){return ej()(ua,ua)}function rrt(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function gE(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function d0(e){return e=gE(Math.abs(e)),e?e[1]:NaN}function irt(e,t){return function(n,r){for(var i=n.length,s=[],a=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),s.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[a=(a+1)%e.length];return s.reverse().join(t)}}function srt(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var art=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a1(e){if(!(t=art.exec(e)))throw new Error("invalid format: "+e);var t;return new CQ({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}a1.prototype=CQ.prototype;function CQ(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}CQ.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ort(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Lhe;function lrt(e,t){var n=gE(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(Lhe=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return s===a?r:s>a?r+new Array(s-a+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+gE(e,Math.max(0,t+s-1))[0]}function JW(e,t){var n=gE(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const ZW={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:rrt,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>JW(e*100,t),r:JW,s:lrt,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function eq(e){return e}var tq=Array.prototype.map,nq=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function crt(e){var t=e.grouping===void 0||e.thousands===void 0?eq:irt(tq.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?eq:srt(tq.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(A){A=a1(A);var f=A.fill,h=A.align,p=A.sign,m=A.symbol,g=A.zero,y=A.width,v=A.comma,x=A.precision,b=A.trim,w=A.type;w==="n"?(v=!0,w="g"):ZW[w]||(x===void 0&&(x=12),b=!0,w="g"),(g||f==="0"&&h==="=")&&(g=!0,f="0",h="=");var B=m==="$"?n:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k=m==="$"?r:/[%p]/.test(w)?a:"",N=ZW[w],j=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function L(T){var E=B,F=k,M,D,H;if(w==="c")F=N(T)+F,T="";else{T=+T;var q=T<0||1/T<0;if(T=isNaN(T)?l:N(Math.abs(T),x),b&&(T=ort(T)),q&&+T==0&&p!=="+"&&(q=!1),E=(q?p==="("?p:o:p==="-"||p==="("?"":p)+E,F=(w==="s"?nq[8+Lhe/3]:"")+F+(q&&p==="("?")":""),j){for(M=-1,D=T.length;++M<D;)if(H=T.charCodeAt(M),48>H||H>57){F=(H===46?i+T.slice(M+1):T.slice(M))+F,T=T.slice(0,M);break}}}v&&!g&&(T=t(T,1/0));var $=E.length+T.length+F.length,z=$<y?new Array(y-$+1).join(f):"";switch(v&&g&&(T=t(z+T,z.length?y-F.length:1/0),z=""),h){case"<":T=E+T+F+z;break;case"=":T=E+z+T+F;break;case"^":T=z.slice(0,$=z.length>>1)+E+T+F+z.slice($);break;default:T=z+E+T+F;break}return s(T)}return L.toString=function(){return A+""},L}function d(A,f){var h=u((A=a1(A),A.type="f",A)),p=Math.max(-8,Math.min(8,Math.floor(d0(f)/3)))*3,m=Math.pow(10,-p),g=nq[8+p/3];return function(y){return h(m*y)+g}}return{format:u,formatPrefix:d}}var bS,SQ,Rhe;urt({thousands:",",grouping:[3],currency:["$",""]});function urt(e){return bS=crt(e),SQ=bS.format,Rhe=bS.formatPrefix,bS}function drt(e){return Math.max(0,-d0(Math.abs(e)))}function Art(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(d0(t)/3)))*3-d0(Math.abs(e)))}function hrt(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,d0(t)-d0(e))+1}function Uhe(e,t,n,r){var i=yM(e,t,n),s;switch(r=a1(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=Art(i,a))&&(r.precision=s),Rhe(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=hrt(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=drt(i))&&(r.precision=s-(r.type==="%")*2);break}}return SQ(r)}function Vh(e){var t=e.domain;return e.ticks=function(n){var r=t();return mM(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Uhe(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,a=r[i],o=r[s],l,u,d=10;for(o<a&&(u=a,a=o,o=u,u=i,i=s,s=u);d-- >0;){if(u=gM(a,o,n),u===l)return r[i]=a,r[s]=o,t(r);if(u>0)a=Math.floor(a/u)*u,o=Math.ceil(o/u)*u;else if(u<0)a=Math.ceil(a*u)/u,o=Math.floor(o*u)/u;else break;l=u}return e},e}function yE(){var e=bQ();return e.copy=function(){return S2(e,yE())},vl.apply(e,arguments),Vh(e)}function Dhe(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,mE),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Dhe(e).unknown(t)},e=arguments.length?Array.from(e,mE):[0,1],Vh(n)}function Qhe(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),e[n]=t.floor(i),e[r]=t.ceil(s),e}function rq(e){return Math.log(e)}function iq(e){return Math.exp(e)}function frt(e){return-Math.log(-e)}function prt(e){return-Math.exp(-e)}function mrt(e){return isFinite(e)?+("1e"+e):e<0?0:e}function grt(e){return e===10?mrt:e===Math.E?Math.exp:t=>Math.pow(e,t)}function yrt(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function sq(e){return(t,n)=>-e(-t,n)}function BQ(e){const t=e(rq,iq),n=t.domain;let r=10,i,s;function a(){return i=yrt(r),s=grt(r),n()[0]<0?(i=sq(i),s=sq(s),e(frt,prt)):e(rq,iq),t}return t.base=function(o){return arguments.length?(r=+o,a()):r},t.domain=function(o){return arguments.length?(n(o),a()):n()},t.ticks=o=>{const l=n();let u=l[0],d=l[l.length-1];const A=d<u;A&&([u,d]=[d,u]);let f=i(u),h=i(d),p,m;const g=o==null?10:+o;let y=[];if(!(r%1)&&h-f<g){if(f=Math.floor(f),h=Math.ceil(h),u>0){for(;f<=h;++f)for(p=1;p<r;++p)if(m=f<0?p/s(-f):p*s(f),!(m<u)){if(m>d)break;y.push(m)}}else for(;f<=h;++f)for(p=r-1;p>=1;--p)if(m=f>0?p/s(-f):p*s(f),!(m<u)){if(m>d)break;y.push(m)}y.length*2<g&&(y=mM(u,d,g))}else y=mM(f,h,Math.min(h-f,g)).map(s);return A?y.reverse():y},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=a1(l)).precision==null&&(l.trim=!0),l=SQ(l)),o===1/0)return l;const u=Math.max(1,r*o/t.ticks().length);return d=>{let A=d/s(Math.round(i(d)));return A*r<r-.5&&(A*=r),A<=u?l(d):""}},t.nice=()=>n(Qhe(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function Hhe(){const e=BQ(ej()).domain([1,10]);return e.copy=()=>S2(e,Hhe()).base(e.base()),vl.apply(e,arguments),e}function aq(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function oq(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function _Q(e){var t=1,n=e(aq(t),oq(t));return n.constant=function(r){return arguments.length?e(aq(t=+r),oq(t)):t},Vh(n)}function $he(){var e=_Q(ej());return e.copy=function(){return S2(e,$he()).constant(e.constant())},vl.apply(e,arguments)}function lq(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function vrt(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function xrt(e){return e<0?-e*e:e*e}function kQ(e){var t=e(ua,ua),n=1;function r(){return n===1?e(ua,ua):n===.5?e(vrt,xrt):e(lq(n),lq(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Vh(t)}function EQ(){var e=kQ(ej());return e.copy=function(){return S2(e,EQ()).exponent(e.exponent())},vl.apply(e,arguments),e}function wrt(){return EQ.apply(null,arguments).exponent(.5)}function cq(e){return Math.sign(e)*e*e}function brt(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function zhe(){var e=bQ(),t=[0,1],n=!1,r;function i(s){var a=brt(e(s));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(s){return e.invert(cq(s))},i.domain=function(s){return arguments.length?(e.domain(s),i):e.domain()},i.range=function(s){return arguments.length?(e.range((t=Array.from(s,mE)).map(cq)),i):t.slice()},i.rangeRound=function(s){return i.range(s).round(!0)},i.round=function(s){return arguments.length?(n=!!s,i):n},i.clamp=function(s){return arguments.length?(e.clamp(s),i):e.clamp()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return zhe(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},vl.apply(i,arguments),Vh(i)}function Vhe(){var e=[],t=[],n=[],r;function i(){var a=0,o=Math.max(1,t.length);for(n=new Array(o-1);++a<o;)n[a-1]=knt(e,a/o);return s}function s(a){return a==null||isNaN(a=+a)?r:t[b2(n,a)]}return s.invertExtent=function(a){var o=t.indexOf(a);return o<0?[NaN,NaN]:[o>0?n[o-1]:e[0],o<n.length?n[o]:e[e.length-1]]},s.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let o of a)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(oh),i()},s.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},s.unknown=function(a){return arguments.length?(r=a,s):r},s.quantiles=function(){return n.slice()},s.copy=function(){return Vhe().domain(e).range(t).unknown(r)},vl.apply(s,arguments)}function Khe(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function a(l){return l!=null&&l<=l?i[b2(r,l,0,n)]:s}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,o()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(s=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Khe().domain([e,t]).range(i).unknown(s)},vl.apply(Vh(a),arguments)}function Whe(){var e=[.5],t=[0,1],n,r=1;function i(s){return s!=null&&s<=s?t[b2(e,s,0,r)]:n}return i.domain=function(s){return arguments.length?(e=Array.from(s),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(s){return arguments.length?(t=Array.from(s),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(s){var a=t.indexOf(s);return[e[a-1],e[a]]},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return Whe().domain(e).range(t).unknown(n)},vl.apply(i,arguments)}const BI=new Date,_I=new Date;function Di(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),o=i.ceil(s);return s-a<o-s?a:o},i.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,o)=>{const l=[];if(s=i.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;let u;do l.push(u=new Date(+s)),t(s,o),e(s);while(u<s&&s<a);return l},i.filter=s=>Di(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;t(a,-1),!s(a););else for(;--o>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(BI.setTime(+s),_I.setTime(+a),e(BI),e(_I),Math.floor(n(BI,_I))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const vE=Di(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);vE.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Di(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):vE);vE.range;const qu=1e3,Zo=qu*60,Gu=Zo*60,fd=Gu*24,NQ=fd*7,uq=fd*30,kI=fd*365,Wf=Di(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*qu)},(e,t)=>(t-e)/qu,e=>e.getUTCSeconds());Wf.range;const jQ=Di(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qu)},(e,t)=>{e.setTime(+e+t*Zo)},(e,t)=>(t-e)/Zo,e=>e.getMinutes());jQ.range;const TQ=Di(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Zo)},(e,t)=>(t-e)/Zo,e=>e.getUTCMinutes());TQ.range;const PQ=Di(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qu-e.getMinutes()*Zo)},(e,t)=>{e.setTime(+e+t*Gu)},(e,t)=>(t-e)/Gu,e=>e.getHours());PQ.range;const IQ=Di(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Gu)},(e,t)=>(t-e)/Gu,e=>e.getUTCHours());IQ.range;const B2=Di(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Zo)/fd,e=>e.getDate()-1);B2.range;const tj=Di(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fd,e=>e.getUTCDate()-1);tj.range;const qhe=Di(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fd,e=>Math.floor(e/fd));qhe.range;function am(e){return Di(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Zo)/NQ)}const nj=am(0),xE=am(1),Crt=am(2),Srt=am(3),A0=am(4),Brt=am(5),_rt=am(6);nj.range;xE.range;Crt.range;Srt.range;A0.range;Brt.range;_rt.range;function om(e){return Di(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/NQ)}const rj=om(0),wE=om(1),krt=om(2),Ert=om(3),h0=om(4),Nrt=om(5),jrt=om(6);rj.range;wE.range;krt.range;Ert.range;h0.range;Nrt.range;jrt.range;const OQ=Di(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());OQ.range;const FQ=Di(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());FQ.range;const pd=Di(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());pd.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Di(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});pd.range;const md=Di(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());md.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Di(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});md.range;function Ghe(e,t,n,r,i,s){const a=[[Wf,1,qu],[Wf,5,5*qu],[Wf,15,15*qu],[Wf,30,30*qu],[s,1,Zo],[s,5,5*Zo],[s,15,15*Zo],[s,30,30*Zo],[i,1,Gu],[i,3,3*Gu],[i,6,6*Gu],[i,12,12*Gu],[r,1,fd],[r,2,2*fd],[n,1,NQ],[t,1,uq],[t,3,3*uq],[e,1,kI]];function o(u,d,A){const f=d<u;f&&([u,d]=[d,u]);const h=A&&typeof A.range=="function"?A:l(u,d,A),p=h?h.range(u,+d+1):[];return f?p.reverse():p}function l(u,d,A){const f=Math.abs(d-u)/A,h=gQ(([,,g])=>g).right(a,f);if(h===a.length)return e.every(yM(u/kI,d/kI,A));if(h===0)return vE.every(Math.max(yM(u,d,A),1));const[p,m]=a[f/a[h-1][2]<a[h][2]/f?h-1:h];return p.every(m)}return[o,l]}const[Trt,Prt]=Ghe(md,FQ,rj,qhe,IQ,TQ),[Irt,Ort]=Ghe(pd,OQ,nj,B2,PQ,jQ);function EI(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function NI(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ax(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Frt(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,a=e.shortDays,o=e.months,l=e.shortMonths,u=hx(i),d=fx(i),A=hx(s),f=fx(s),h=hx(a),p=fx(a),m=hx(o),g=fx(o),y=hx(l),v=fx(l),x={a:q,A:$,b:z,B:Q,c:null,d:mq,e:mq,f:iit,g:fit,G:mit,H:tit,I:nit,j:rit,L:Yhe,m:sit,M:ait,p:ce,q:R,Q:vq,s:xq,S:oit,u:lit,U:cit,V:uit,w:dit,W:Ait,x:null,X:null,y:hit,Y:pit,Z:git,"%":yq},b={a:O,A:Y,b:X,B:K,c:null,d:gq,e:gq,f:wit,g:Tit,G:Iit,H:yit,I:vit,j:xit,L:Jhe,m:bit,M:Cit,p:Z,q:ae,Q:vq,s:xq,S:Sit,u:Bit,U:_it,V:kit,w:Eit,W:Nit,x:null,X:null,y:jit,Y:Pit,Z:Oit,"%":yq},w={a:L,A:T,b:E,B:F,c:M,d:fq,e:fq,f:Xrt,g:hq,G:Aq,H:pq,I:pq,j:Wrt,L:Yrt,m:Krt,M:qrt,p:j,q:Vrt,Q:Zrt,s:eit,S:Grt,u:Drt,U:Qrt,V:Hrt,w:Urt,W:$rt,x:D,X:H,y:hq,Y:Aq,Z:zrt,"%":Jrt};x.x=B(n,x),x.X=B(r,x),x.c=B(t,x),b.x=B(n,b),b.X=B(r,b),b.c=B(t,b);function B(ue,se){return function(Ae){var de=[],Se=-1,Fe=0,te=ue.length,ke,Ze,et;for(Ae instanceof Date||(Ae=new Date(+Ae));++Se<te;)ue.charCodeAt(Se)===37&&(de.push(ue.slice(Fe,Se)),(Ze=dq[ke=ue.charAt(++Se)])!=null?ke=ue.charAt(++Se):Ze=ke==="e"?" ":"0",(et=se[ke])&&(ke=et(Ae,Ze)),de.push(ke),Fe=Se+1);return de.push(ue.slice(Fe,Se)),de.join("")}}function k(ue,se){return function(Ae){var de=Ax(1900,void 0,1),Se=N(de,ue,Ae+="",0),Fe,te;if(Se!=Ae.length)return null;if("Q"in de)return new Date(de.Q);if("s"in de)return new Date(de.s*1e3+("L"in de?de.L:0));if(se&&!("Z"in de)&&(de.Z=0),"p"in de&&(de.H=de.H%12+de.p*12),de.m===void 0&&(de.m="q"in de?de.q:0),"V"in de){if(de.V<1||de.V>53)return null;"w"in de||(de.w=1),"Z"in de?(Fe=NI(Ax(de.y,0,1)),te=Fe.getUTCDay(),Fe=te>4||te===0?wE.ceil(Fe):wE(Fe),Fe=tj.offset(Fe,(de.V-1)*7),de.y=Fe.getUTCFullYear(),de.m=Fe.getUTCMonth(),de.d=Fe.getUTCDate()+(de.w+6)%7):(Fe=EI(Ax(de.y,0,1)),te=Fe.getDay(),Fe=te>4||te===0?xE.ceil(Fe):xE(Fe),Fe=B2.offset(Fe,(de.V-1)*7),de.y=Fe.getFullYear(),de.m=Fe.getMonth(),de.d=Fe.getDate()+(de.w+6)%7)}else("W"in de||"U"in de)&&("w"in de||(de.w="u"in de?de.u%7:"W"in de?1:0),te="Z"in de?NI(Ax(de.y,0,1)).getUTCDay():EI(Ax(de.y,0,1)).getDay(),de.m=0,de.d="W"in de?(de.w+6)%7+de.W*7-(te+5)%7:de.w+de.U*7-(te+6)%7);return"Z"in de?(de.H+=de.Z/100|0,de.M+=de.Z%100,NI(de)):EI(de)}}function N(ue,se,Ae,de){for(var Se=0,Fe=se.length,te=Ae.length,ke,Ze;Se<Fe;){if(de>=te)return-1;if(ke=se.charCodeAt(Se++),ke===37){if(ke=se.charAt(Se++),Ze=w[ke in dq?se.charAt(Se++):ke],!Ze||(de=Ze(ue,Ae,de))<0)return-1}else if(ke!=Ae.charCodeAt(de++))return-1}return de}function j(ue,se,Ae){var de=u.exec(se.slice(Ae));return de?(ue.p=d.get(de[0].toLowerCase()),Ae+de[0].length):-1}function L(ue,se,Ae){var de=h.exec(se.slice(Ae));return de?(ue.w=p.get(de[0].toLowerCase()),Ae+de[0].length):-1}function T(ue,se,Ae){var de=A.exec(se.slice(Ae));return de?(ue.w=f.get(de[0].toLowerCase()),Ae+de[0].length):-1}function E(ue,se,Ae){var de=y.exec(se.slice(Ae));return de?(ue.m=v.get(de[0].toLowerCase()),Ae+de[0].length):-1}function F(ue,se,Ae){var de=m.exec(se.slice(Ae));return de?(ue.m=g.get(de[0].toLowerCase()),Ae+de[0].length):-1}function M(ue,se,Ae){return N(ue,t,se,Ae)}function D(ue,se,Ae){return N(ue,n,se,Ae)}function H(ue,se,Ae){return N(ue,r,se,Ae)}function q(ue){return a[ue.getDay()]}function $(ue){return s[ue.getDay()]}function z(ue){return l[ue.getMonth()]}function Q(ue){return o[ue.getMonth()]}function ce(ue){return i[+(ue.getHours()>=12)]}function R(ue){return 1+~~(ue.getMonth()/3)}function O(ue){return a[ue.getUTCDay()]}function Y(ue){return s[ue.getUTCDay()]}function X(ue){return l[ue.getUTCMonth()]}function K(ue){return o[ue.getUTCMonth()]}function Z(ue){return i[+(ue.getUTCHours()>=12)]}function ae(ue){return 1+~~(ue.getUTCMonth()/3)}return{format:function(ue){var se=B(ue+="",x);return se.toString=function(){return ue},se},parse:function(ue){var se=k(ue+="",!1);return se.toString=function(){return ue},se},utcFormat:function(ue){var se=B(ue+="",b);return se.toString=function(){return ue},se},utcParse:function(ue){var se=k(ue+="",!0);return se.toString=function(){return ue},se}}}var dq={"-":"",_:" ",0:"0"},Zi=/^\s*\d+/,Mrt=/^%/,Lrt=/[\\^$*+?|[\]().{}]/g;function jn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function Rrt(e){return e.replace(Lrt,"\\$&")}function hx(e){return new RegExp("^(?:"+e.map(Rrt).join("|")+")","i")}function fx(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Urt(e,t,n){var r=Zi.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Drt(e,t,n){var r=Zi.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Qrt(e,t,n){var r=Zi.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Hrt(e,t,n){var r=Zi.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function $rt(e,t,n){var r=Zi.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Aq(e,t,n){var r=Zi.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function hq(e,t,n){var r=Zi.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function zrt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Vrt(e,t,n){var r=Zi.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Krt(e,t,n){var r=Zi.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function fq(e,t,n){var r=Zi.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Wrt(e,t,n){var r=Zi.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function pq(e,t,n){var r=Zi.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function qrt(e,t,n){var r=Zi.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Grt(e,t,n){var r=Zi.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Yrt(e,t,n){var r=Zi.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Xrt(e,t,n){var r=Zi.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Jrt(e,t,n){var r=Mrt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Zrt(e,t,n){var r=Zi.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function eit(e,t,n){var r=Zi.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function mq(e,t){return jn(e.getDate(),t,2)}function tit(e,t){return jn(e.getHours(),t,2)}function nit(e,t){return jn(e.getHours()%12||12,t,2)}function rit(e,t){return jn(1+B2.count(pd(e),e),t,3)}function Yhe(e,t){return jn(e.getMilliseconds(),t,3)}function iit(e,t){return Yhe(e,t)+"000"}function sit(e,t){return jn(e.getMonth()+1,t,2)}function ait(e,t){return jn(e.getMinutes(),t,2)}function oit(e,t){return jn(e.getSeconds(),t,2)}function lit(e){var t=e.getDay();return t===0?7:t}function cit(e,t){return jn(nj.count(pd(e)-1,e),t,2)}function Xhe(e){var t=e.getDay();return t>=4||t===0?A0(e):A0.ceil(e)}function uit(e,t){return e=Xhe(e),jn(A0.count(pd(e),e)+(pd(e).getDay()===4),t,2)}function dit(e){return e.getDay()}function Ait(e,t){return jn(xE.count(pd(e)-1,e),t,2)}function hit(e,t){return jn(e.getFullYear()%100,t,2)}function fit(e,t){return e=Xhe(e),jn(e.getFullYear()%100,t,2)}function pit(e,t){return jn(e.getFullYear()%1e4,t,4)}function mit(e,t){var n=e.getDay();return e=n>=4||n===0?A0(e):A0.ceil(e),jn(e.getFullYear()%1e4,t,4)}function git(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+jn(t/60|0,"0",2)+jn(t%60,"0",2)}function gq(e,t){return jn(e.getUTCDate(),t,2)}function yit(e,t){return jn(e.getUTCHours(),t,2)}function vit(e,t){return jn(e.getUTCHours()%12||12,t,2)}function xit(e,t){return jn(1+tj.count(md(e),e),t,3)}function Jhe(e,t){return jn(e.getUTCMilliseconds(),t,3)}function wit(e,t){return Jhe(e,t)+"000"}function bit(e,t){return jn(e.getUTCMonth()+1,t,2)}function Cit(e,t){return jn(e.getUTCMinutes(),t,2)}function Sit(e,t){return jn(e.getUTCSeconds(),t,2)}function Bit(e){var t=e.getUTCDay();return t===0?7:t}function _it(e,t){return jn(rj.count(md(e)-1,e),t,2)}function Zhe(e){var t=e.getUTCDay();return t>=4||t===0?h0(e):h0.ceil(e)}function kit(e,t){return e=Zhe(e),jn(h0.count(md(e),e)+(md(e).getUTCDay()===4),t,2)}function Eit(e){return e.getUTCDay()}function Nit(e,t){return jn(wE.count(md(e)-1,e),t,2)}function jit(e,t){return jn(e.getUTCFullYear()%100,t,2)}function Tit(e,t){return e=Zhe(e),jn(e.getUTCFullYear()%100,t,2)}function Pit(e,t){return jn(e.getUTCFullYear()%1e4,t,4)}function Iit(e,t){var n=e.getUTCDay();return e=n>=4||n===0?h0(e):h0.ceil(e),jn(e.getUTCFullYear()%1e4,t,4)}function Oit(){return"+0000"}function yq(){return"%"}function vq(e){return+e}function xq(e){return Math.floor(+e/1e3)}var Jm,efe,tfe;Fit({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Fit(e){return Jm=Frt(e),efe=Jm.format,Jm.parse,tfe=Jm.utcFormat,Jm.utcParse,Jm}function Mit(e){return new Date(e)}function Lit(e){return e instanceof Date?+e:+new Date(+e)}function MQ(e,t,n,r,i,s,a,o,l,u){var d=bQ(),A=d.invert,f=d.domain,h=u(".%L"),p=u(":%S"),m=u("%I:%M"),g=u("%I %p"),y=u("%a %d"),v=u("%b %d"),x=u("%B"),b=u("%Y");function w(B){return(l(B)<B?h:o(B)<B?p:a(B)<B?m:s(B)<B?g:r(B)<B?i(B)<B?y:v:n(B)<B?x:b)(B)}return d.invert=function(B){return new Date(A(B))},d.domain=function(B){return arguments.length?f(Array.from(B,Lit)):f().map(Mit)},d.ticks=function(B){var k=f();return e(k[0],k[k.length-1],B??10)},d.tickFormat=function(B,k){return k==null?w:u(k)},d.nice=function(B){var k=f();return(!B||typeof B.range!="function")&&(B=t(k[0],k[k.length-1],B??10)),B?f(Qhe(k,B)):d},d.copy=function(){return S2(d,MQ(e,t,n,r,i,s,a,o,l,u))},d}function Rit(){return vl.apply(MQ(Irt,Ort,pd,OQ,nj,B2,PQ,jQ,Wf,efe).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Uit(){return vl.apply(MQ(Trt,Prt,md,FQ,rj,tj,IQ,TQ,Wf,tfe).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ij(){var e=0,t=1,n,r,i,s,a=ua,o=!1,l;function u(A){return A==null||isNaN(A=+A)?l:a(i===0?.5:(A=(s(A)-n)*i,o?Math.max(0,Math.min(1,A)):A))}u.domain=function(A){return arguments.length?([e,t]=A,n=s(e=+e),r=s(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(A){return arguments.length?(o=!!A,u):o},u.interpolator=function(A){return arguments.length?(a=A,u):a};function d(A){return function(f){var h,p;return arguments.length?([h,p]=f,a=A(h,p),u):[a(0),a(1)]}}return u.range=d(ov),u.rangeRound=d(wQ),u.unknown=function(A){return arguments.length?(l=A,u):l},function(A){return s=A,n=A(e),r=A(t),i=n===r?0:1/(r-n),u}}function Kh(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function nfe(){var e=Vh(ij()(ua));return e.copy=function(){return Kh(e,nfe())},kd.apply(e,arguments)}function rfe(){var e=BQ(ij()).domain([1,10]);return e.copy=function(){return Kh(e,rfe()).base(e.base())},kd.apply(e,arguments)}function ife(){var e=_Q(ij());return e.copy=function(){return Kh(e,ife()).constant(e.constant())},kd.apply(e,arguments)}function LQ(){var e=kQ(ij());return e.copy=function(){return Kh(e,LQ()).exponent(e.exponent())},kd.apply(e,arguments)}function Dit(){return LQ.apply(null,arguments).exponent(.5)}function sfe(){var e=[],t=ua;function n(r){if(r!=null&&!isNaN(r=+r))return t((b2(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(oh),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,s)=>_nt(e,s/r))},n.copy=function(){return sfe(t).domain(e)},kd.apply(n,arguments)}function sj(){var e=0,t=.5,n=1,r=1,i,s,a,o,l,u=ua,d,A=!1,f;function h(m){return isNaN(m=+m)?f:(m=.5+((m=+d(m))-s)*(r*m<r*s?o:l),u(A?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t,n]=m,i=d(e=+e),s=d(t=+t),a=d(n=+n),o=i===s?0:.5/(s-i),l=s===a?0:.5/(a-s),r=s<i?-1:1,h):[e,t,n]},h.clamp=function(m){return arguments.length?(A=!!m,h):A},h.interpolator=function(m){return arguments.length?(u=m,h):u};function p(m){return function(g){var y,v,x;return arguments.length?([y,v,x]=g,u=Jnt(m,[y,v,x]),h):[u(0),u(.5),u(1)]}}return h.range=p(ov),h.rangeRound=p(wQ),h.unknown=function(m){return arguments.length?(f=m,h):f},function(m){return d=m,i=m(e),s=m(t),a=m(n),o=i===s?0:.5/(s-i),l=s===a?0:.5/(a-s),r=s<i?-1:1,h}}function afe(){var e=Vh(sj()(ua));return e.copy=function(){return Kh(e,afe())},kd.apply(e,arguments)}function ofe(){var e=BQ(sj()).domain([.1,1,10]);return e.copy=function(){return Kh(e,ofe()).base(e.base())},kd.apply(e,arguments)}function lfe(){var e=_Q(sj());return e.copy=function(){return Kh(e,lfe()).constant(e.constant())},kd.apply(e,arguments)}function RQ(){var e=kQ(sj());return e.copy=function(){return Kh(e,RQ()).exponent(e.exponent())},kd.apply(e,arguments)}function Qit(){return RQ.apply(null,arguments).exponent(.5)}const wq=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:n1,scaleDiverging:afe,scaleDivergingLog:ofe,scaleDivergingPow:RQ,scaleDivergingSqrt:Qit,scaleDivergingSymlog:lfe,scaleIdentity:Dhe,scaleImplicit:vM,scaleLinear:yE,scaleLog:Hhe,scaleOrdinal:yQ,scalePoint:Pw,scalePow:EQ,scaleQuantile:Vhe,scaleQuantize:Khe,scaleRadial:zhe,scaleSequential:nfe,scaleSequentialLog:rfe,scaleSequentialPow:LQ,scaleSequentialQuantile:sfe,scaleSequentialSqrt:Dit,scaleSequentialSymlog:ife,scaleSqrt:wrt,scaleSymlog:$he,scaleThreshold:Whe,scaleTime:Rit,scaleUtc:Uit,tickFormat:Uhe},Symbol.toStringTag,{value:"Module"}));var Hit=Z0;function $it(e,t,n){for(var r=-1,i=e.length;++r<i;){var s=e[r],a=t(s);if(a!=null&&(o===void 0?a===a&&!Hit(a):n(a,o)))var o=a,l=s}return l}var cfe=$it;function zit(e,t){return e>t}var Vit=zit,Kit=cfe,Wit=Vit,qit=av;function Git(e){return e&&e.length?Kit(e,qit,Wit):void 0}var Yit=Git;const aj=Bn(Yit);function Xit(e,t){return e<t}var Jit=Xit,Zit=cfe,est=Jit,tst=av;function nst(e){return e&&e.length?Zit(e,tst,est):void 0}var rst=nst;const oj=Bn(rst);var ist=X6,sst=zh,ast=ghe,ost=$a;function lst(e,t){var n=ost(e)?ist:ast;return n(e,sst(t))}var cst=lst,ust=phe,dst=cst;function Ast(e,t){return ust(dst(e,t),1)}var hst=Ast;const fst=Bn(hst);var pst=AQ;function mst(e,t){return pst(e,t)}var gst=mst;const lj=Bn(gst);var lv=1e9,yst={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},DQ,_r=!0,fl="[DecimalError] ",wp=fl+"Invalid argument: ",UQ=fl+"Exponent out of range: ",cv=Math.floor,kf=Math.pow,vst=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ao,Vi=1e7,pr=7,ufe=9007199254740991,bE=cv(ufe/pr),lt={};lt.absoluteValue=lt.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};lt.comparedTo=lt.cmp=function(e){var t,n,r,i,s=this;if(e=new s.constructor(e),s.s!==e.s)return s.s||-e.s;if(s.e!==e.e)return s.e>e.e^s.s<0?1:-1;for(r=s.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(s.d[t]!==e.d[t])return s.d[t]>e.d[t]^s.s<0?1:-1;return r===i?0:r>i^s.s<0?1:-1};lt.decimalPlaces=lt.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*pr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};lt.dividedBy=lt.div=function(e){return rd(this,new this.constructor(e))};lt.dividedToIntegerBy=lt.idiv=function(e){var t=this,n=t.constructor;return Xn(rd(t,new n(e),0,1),n.precision)};lt.equals=lt.eq=function(e){return!this.cmp(e)};lt.exponent=function(){return Ci(this)};lt.greaterThan=lt.gt=function(e){return this.cmp(e)>0};lt.greaterThanOrEqualTo=lt.gte=function(e){return this.cmp(e)>=0};lt.isInteger=lt.isint=function(){return this.e>this.d.length-2};lt.isNegative=lt.isneg=function(){return this.s<0};lt.isPositive=lt.ispos=function(){return this.s>0};lt.isZero=function(){return this.s===0};lt.lessThan=lt.lt=function(e){return this.cmp(e)<0};lt.lessThanOrEqualTo=lt.lte=function(e){return this.cmp(e)<1};lt.logarithm=lt.log=function(e){var t,n=this,r=n.constructor,i=r.precision,s=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Ao))throw Error(fl+"NaN");if(n.s<1)throw Error(fl+(n.s?"NaN":"-Infinity"));return n.eq(Ao)?new r(0):(_r=!1,t=rd(o1(n,s),o1(e,s),s),_r=!0,Xn(t,i))};lt.minus=lt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?hfe(t,e):dfe(t,(e.s=-e.s,e))};lt.modulo=lt.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(fl+"NaN");return n.s?(_r=!1,t=rd(n,e,0,1).times(e),_r=!0,n.minus(t)):Xn(new r(n),i)};lt.naturalExponential=lt.exp=function(){return Afe(this)};lt.naturalLogarithm=lt.ln=function(){return o1(this)};lt.negated=lt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};lt.plus=lt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dfe(t,e):hfe(t,(e.s=-e.s,e))};lt.precision=lt.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(wp+e);if(t=Ci(i)+1,r=i.d.length-1,n=r*pr+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};lt.squareRoot=lt.sqrt=function(){var e,t,n,r,i,s,a,o=this,l=o.constructor;if(o.s<1){if(!o.s)return new l(0);throw Error(fl+"NaN")}for(e=Ci(o),_r=!1,i=Math.sqrt(+o),i==0||i==1/0?(t=zc(o.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=cv((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(s=r,r=s.plus(rd(o,s,a+2)).times(.5),zc(s.d).slice(0,a)===(t=zc(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(Xn(s,n+1,0),s.times(s).eq(o)){r=s;break}}else if(t!="9999")break;a+=4}return _r=!0,Xn(r,n)};lt.times=lt.mul=function(e){var t,n,r,i,s,a,o,l,u,d=this,A=d.constructor,f=d.d,h=(e=new A(e)).d;if(!d.s||!e.s)return new A(0);for(e.s*=d.s,n=d.e+e.e,l=f.length,u=h.length,l<u&&(s=f,f=h,h=s,a=l,l=u,u=a),s=[],a=l+u,r=a;r--;)s.push(0);for(r=u;--r>=0;){for(t=0,i=l+r;i>r;)o=s[i]+h[r]*f[i-r-1]+t,s[i--]=o%Vi|0,t=o/Vi|0;s[i]=(s[i]+t)%Vi|0}for(;!s[--a];)s.pop();return t?++n:s.shift(),e.d=s,e.e=n,_r?Xn(e,A.precision):e};lt.toDecimalPlaces=lt.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(ou(e,0,lv),t===void 0?t=r.rounding:ou(t,0,8),Xn(n,e+Ci(n)+1,t))};lt.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Kp(r,!0):(ou(e,0,lv),t===void 0?t=i.rounding:ou(t,0,8),r=Xn(new i(r),e+1,t),n=Kp(r,!0,e+1)),n};lt.toFixed=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?Kp(i):(ou(e,0,lv),t===void 0?t=s.rounding:ou(t,0,8),r=Xn(new s(i),e+Ci(i)+1,t),n=Kp(r.abs(),!1,e+Ci(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};lt.toInteger=lt.toint=function(){var e=this,t=e.constructor;return Xn(new t(e),Ci(e)+1,t.rounding)};lt.toNumber=function(){return+this};lt.toPower=lt.pow=function(e){var t,n,r,i,s,a,o=this,l=o.constructor,u=12,d=+(e=new l(e));if(!e.s)return new l(Ao);if(o=new l(o),!o.s){if(e.s<1)throw Error(fl+"Infinity");return o}if(o.eq(Ao))return o;if(r=l.precision,e.eq(Ao))return Xn(o,r);if(t=e.e,n=e.d.length-1,a=t>=n,s=o.s,a){if((n=d<0?-d:d)<=ufe){for(i=new l(Ao),t=Math.ceil(r/pr+4),_r=!1;n%2&&(i=i.times(o),Cq(i.d,t)),n=cv(n/2),n!==0;)o=o.times(o),Cq(o.d,t);return _r=!0,e.s<0?new l(Ao).div(i):Xn(i,r)}}else if(s<0)throw Error(fl+"NaN");return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,_r=!1,i=e.times(o1(o,r+u)),_r=!0,i=Afe(i),i.s=s,i};lt.toPrecision=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?(n=Ci(i),r=Kp(i,n<=s.toExpNeg||n>=s.toExpPos)):(ou(e,1,lv),t===void 0?t=s.rounding:ou(t,0,8),i=Xn(new s(i),e,t),n=Ci(i),r=Kp(i,e<=n||n<=s.toExpNeg,e)),r};lt.toSignificantDigits=lt.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(ou(e,1,lv),t===void 0?t=r.rounding:ou(t,0,8)),Xn(new r(n),e,t)};lt.toString=lt.valueOf=lt.val=lt.toJSON=lt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ci(e),n=e.constructor;return Kp(e,t<=n.toExpNeg||t>=n.toExpPos)};function dfe(e,t){var n,r,i,s,a,o,l,u,d=e.constructor,A=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),_r?Xn(t,A):t;if(l=e.d,u=t.d,a=e.e,i=t.e,l=l.slice(),s=a-i,s){for(s<0?(r=l,s=-s,o=u.length):(r=u,i=a,o=l.length),a=Math.ceil(A/pr),o=a>o?a+1:o+1,s>o&&(s=o,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for(o=l.length,s=u.length,o-s<0&&(s=o,r=u,u=l,l=r),n=0;s;)n=(l[--s]=l[s]+u[s]+n)/Vi|0,l[s]%=Vi;for(n&&(l.unshift(n),++i),o=l.length;l[--o]==0;)l.pop();return t.d=l,t.e=i,_r?Xn(t,A):t}function ou(e,t,n){if(e!==~~e||e<t||e>n)throw Error(wp+e)}function zc(e){var t,n,r,i=e.length-1,s="",a=e[0];if(i>0){for(s+=a,t=1;t<i;t++)r=e[t]+"",n=pr-r.length,n&&(s+=AA(n)),s+=r;a=e[t],r=a+"",n=pr-r.length,n&&(s+=AA(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return s+a}var rd=function(){function e(r,i){var s,a=0,o=r.length;for(r=r.slice();o--;)s=r[o]*i+a,r[o]=s%Vi|0,a=s/Vi|0;return a&&r.unshift(a),r}function t(r,i,s,a){var o,l;if(s!=a)l=s>a?1:-1;else for(o=l=0;o<s;o++)if(r[o]!=i[o]){l=r[o]>i[o]?1:-1;break}return l}function n(r,i,s){for(var a=0;s--;)r[s]-=a,a=r[s]<i[s]?1:0,r[s]=a*Vi+r[s]-i[s];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,s,a){var o,l,u,d,A,f,h,p,m,g,y,v,x,b,w,B,k,N,j=r.constructor,L=r.s==i.s?1:-1,T=r.d,E=i.d;if(!r.s)return new j(r);if(!i.s)throw Error(fl+"Division by zero");for(l=r.e-i.e,k=E.length,w=T.length,h=new j(L),p=h.d=[],u=0;E[u]==(T[u]||0);)++u;if(E[u]>(T[u]||0)&&--l,s==null?v=s=j.precision:a?v=s+(Ci(r)-Ci(i))+1:v=s,v<0)return new j(0);if(v=v/pr+2|0,u=0,k==1)for(d=0,E=E[0],v++;(u<w||d)&&v--;u++)x=d*Vi+(T[u]||0),p[u]=x/E|0,d=x%E|0;else{for(d=Vi/(E[0]+1)|0,d>1&&(E=e(E,d),T=e(T,d),k=E.length,w=T.length),b=k,m=T.slice(0,k),g=m.length;g<k;)m[g++]=0;N=E.slice(),N.unshift(0),B=E[0],E[1]>=Vi/2&&++B;do d=0,o=t(E,m,k,g),o<0?(y=m[0],k!=g&&(y=y*Vi+(m[1]||0)),d=y/B|0,d>1?(d>=Vi&&(d=Vi-1),A=e(E,d),f=A.length,g=m.length,o=t(A,m,f,g),o==1&&(d--,n(A,k<f?N:E,f))):(d==0&&(o=d=1),A=E.slice()),f=A.length,f<g&&A.unshift(0),n(m,A,g),o==-1&&(g=m.length,o=t(E,m,k,g),o<1&&(d++,n(m,k<g?N:E,g))),g=m.length):o===0&&(d++,m=[0]),p[u++]=d,o&&m[0]?m[g++]=T[b]||0:(m=[T[b]],g=1);while((b++<w||m[0]!==void 0)&&v--)}return p[0]||p.shift(),h.e=l,Xn(h,a?s+Ci(h)+1:s)}}();function Afe(e,t){var n,r,i,s,a,o,l=0,u=0,d=e.constructor,A=d.precision;if(Ci(e)>16)throw Error(UQ+Ci(e));if(!e.s)return new d(Ao);for(t==null?(_r=!1,o=A):o=t,a=new d(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(r=Math.log(kf(2,u))/Math.LN10*2+5|0,o+=r,n=i=s=new d(Ao),d.precision=o;;){if(i=Xn(i.times(e),o),n=n.times(++l),a=s.plus(rd(i,n,o)),zc(a.d).slice(0,o)===zc(s.d).slice(0,o)){for(;u--;)s=Xn(s.times(s),o);return d.precision=A,t==null?(_r=!0,Xn(s,A)):s}s=a}}function Ci(e){for(var t=e.e*pr,n=e.d[0];n>=10;n/=10)t++;return t}function jI(e,t,n){if(t>e.LN10.sd())throw _r=!0,n&&(e.precision=n),Error(fl+"LN10 precision limit exceeded");return Xn(new e(e.LN10),t)}function AA(e){for(var t="";e--;)t+="0";return t}function o1(e,t){var n,r,i,s,a,o,l,u,d,A=1,f=10,h=e,p=h.d,m=h.constructor,g=m.precision;if(h.s<1)throw Error(fl+(h.s?"NaN":"-Infinity"));if(h.eq(Ao))return new m(0);if(t==null?(_r=!1,u=g):u=t,h.eq(10))return t==null&&(_r=!0),jI(m,u);if(u+=f,m.precision=u,n=zc(p),r=n.charAt(0),s=Ci(h),Math.abs(s)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=zc(h.d),r=n.charAt(0),A++;s=Ci(h),r>1?(h=new m("0."+n),s++):h=new m(r+"."+n.slice(1))}else return l=jI(m,u+2,g).times(s+""),h=o1(new m(r+"."+n.slice(1)),u-f).plus(l),m.precision=g,t==null?(_r=!0,Xn(h,g)):h;for(o=a=h=rd(h.minus(Ao),h.plus(Ao),u),d=Xn(h.times(h),u),i=3;;){if(a=Xn(a.times(d),u),l=o.plus(rd(a,new m(i),u)),zc(l.d).slice(0,u)===zc(o.d).slice(0,u))return o=o.times(2),s!==0&&(o=o.plus(jI(m,u+2,g).times(s+""))),o=rd(o,new m(A),u),m.precision=g,t==null?(_r=!0,Xn(o,g)):o;o=l,i+=2}}function bq(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=cv(n/pr),e.d=[],r=(n+1)%pr,n<0&&(r+=pr),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=pr;r<i;)e.d.push(+t.slice(r,r+=pr));t=t.slice(r),r=pr-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),_r&&(e.e>bE||e.e<-bE))throw Error(UQ+n)}else e.s=0,e.e=0,e.d=[0];return e}function Xn(e,t,n){var r,i,s,a,o,l,u,d,A=e.d;for(a=1,s=A[0];s>=10;s/=10)a++;if(r=t-a,r<0)r+=pr,i=t,u=A[d=0];else{if(d=Math.ceil((r+1)/pr),s=A.length,d>=s)return e;for(u=s=A[d],a=1;s>=10;s/=10)a++;r%=pr,i=r-pr+a}if(n!==void 0&&(s=kf(10,a-i-1),o=u/s%10|0,l=t<0||A[d+1]!==void 0||u%s,l=n<4?(o||l)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||l||n==6&&(r>0?i>0?u/kf(10,a-i):0:A[d-1])%10&1||n==(e.s<0?8:7))),t<1||!A[0])return l?(s=Ci(e),A.length=1,t=t-s-1,A[0]=kf(10,(pr-t%pr)%pr),e.e=cv(-t/pr)||0):(A.length=1,A[0]=e.e=e.s=0),e;if(r==0?(A.length=d,s=1,d--):(A.length=d+1,s=kf(10,pr-r),A[d]=i>0?(u/kf(10,a-i)%kf(10,i)|0)*s:0),l)for(;;)if(d==0){(A[0]+=s)==Vi&&(A[0]=1,++e.e);break}else{if(A[d]+=s,A[d]!=Vi)break;A[d--]=0,s=1}for(r=A.length;A[--r]===0;)A.pop();if(_r&&(e.e>bE||e.e<-bE))throw Error(UQ+Ci(e));return e}function hfe(e,t){var n,r,i,s,a,o,l,u,d,A,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),_r?Xn(t,h):t;if(l=e.d,A=t.d,r=t.e,u=e.e,l=l.slice(),a=u-r,a){for(d=a<0,d?(n=l,a=-a,o=A.length):(n=A,r=u,o=l.length),i=Math.max(Math.ceil(h/pr),o)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,o=A.length,d=i<o,d&&(o=i),i=0;i<o;i++)if(l[i]!=A[i]){d=l[i]<A[i];break}a=0}for(d&&(n=l,l=A,A=n,t.s=-t.s),o=l.length,i=A.length-o;i>0;--i)l[o++]=0;for(i=A.length;i>a;){if(l[--i]<A[i]){for(s=i;s&&l[--s]===0;)l[s]=Vi-1;--l[s],l[i]+=Vi}l[i]-=A[i]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,_r?Xn(t,h):t):new f(0)}function Kp(e,t,n){var r,i=Ci(e),s=zc(e.d),a=s.length;return t?(n&&(r=n-a)>0?s=s.charAt(0)+"."+s.slice(1)+AA(r):a>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(i<0?"e":"e+")+i):i<0?(s="0."+AA(-i-1)+s,n&&(r=n-a)>0&&(s+=AA(r))):i>=a?(s+=AA(i+1-a),n&&(r=n-i-1)>0&&(s=s+"."+AA(r))):((r=i+1)<a&&(s=s.slice(0,r)+"."+s.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(s+="."),s+=AA(r))),e.s<0?"-"+s:s}function Cq(e,t){if(e.length>t)return e.length=t,!0}function ffe(e){var t,n,r;function i(s){var a=this;if(!(a instanceof i))return new i(s);if(a.constructor=i,s instanceof i){a.s=s.s,a.e=s.e,a.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(wp+s);if(s>0)a.s=1;else if(s<0)s=-s,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(s===~~s&&s<1e7){a.e=0,a.d=[s];return}return bq(a,s.toString())}else if(typeof s!="string")throw Error(wp+s);if(s.charCodeAt(0)===45?(s=s.slice(1),a.s=-1):a.s=1,vst.test(s))bq(a,s);else throw Error(wp+s)}if(i.prototype=lt,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=ffe,i.config=i.set=xst,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function xst(e){if(!e||typeof e!="object")throw Error(fl+"Object expected");var t,n,r,i=["precision",1,lv,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(cv(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(wp+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(wp+n+": "+r);return this}var DQ=ffe(yst);Ao=new DQ(1);const zn=DQ;function wst(e){return Bst(e)||Sst(e)||Cst(e)||bst()}function bst(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cst(e,t){if(e){if(typeof e=="string")return CM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CM(e,t)}}function Sst(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Bst(e){if(Array.isArray(e))return CM(e)}function CM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _st=function(t){return t},pfe={"@@functional/placeholder":!0},mfe=function(t){return t===pfe},Sq=function(t){return function n(){return arguments.length===0||arguments.length===1&&mfe(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},kst=function e(t,n){return t===1?n:Sq(function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var a=i.filter(function(o){return o!==pfe}).length;return a>=t?n.apply(void 0,i):e(t-a,Sq(function(){for(var o=arguments.length,l=new Array(o),u=0;u<o;u++)l[u]=arguments[u];var d=i.map(function(A){return mfe(A)?l.shift():A});return n.apply(void 0,wst(d).concat(l))}))})},cj=function(t){return kst(t.length,t)},SM=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},Est=cj(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Nst=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return _st;var i=n.reverse(),s=i[0],a=i.slice(1);return function(){return a.reduce(function(o,l){return l(o)},s.apply(void 0,arguments))}},BM=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},gfe=function(t){var n=null,r=null;return function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return n&&s.every(function(o,l){return o===n[l]})||(n=s,r=t.apply(void 0,s)),r}};function jst(e){var t;return e===0?t=1:t=Math.floor(new zn(e).abs().log(10).toNumber())+1,t}function Tst(e,t,n){for(var r=new zn(e),i=0,s=[];r.lt(t)&&i<1e5;)s.push(r.toNumber()),r=r.add(n),i++;return s}var Pst=cj(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),Ist=cj(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Ost=cj(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const uj={rangeStep:Tst,getDigitCount:jst,interpolateNumber:Pst,uninterpolateNumber:Ist,uninterpolateTruncation:Ost};function _M(e){return Lst(e)||Mst(e)||yfe(e)||Fst()}function Fst(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mst(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Lst(e){if(Array.isArray(e))return kM(e)}function l1(e,t){return Dst(e)||Ust(e,t)||yfe(e,t)||Rst()}function Rst(){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 yfe(e,t){if(e){if(typeof e=="string")return kM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kM(e,t)}}function kM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ust(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,s=void 0;try{for(var a=e[Symbol.iterator](),o;!(r=(o=a.next()).done)&&(n.push(o.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,s=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw s}}return n}}function Dst(e){if(Array.isArray(e))return e}function vfe(e){var t=l1(e,2),n=t[0],r=t[1],i=n,s=r;return n>r&&(i=r,s=n),[i,s]}function xfe(e,t,n){if(e.lte(0))return new zn(0);var r=uj.getDigitCount(e.toNumber()),i=new zn(10).pow(r),s=e.div(i),a=r!==1?.05:.1,o=new zn(Math.ceil(s.div(a).toNumber())).add(n).mul(a),l=o.mul(i);return t?l:new zn(Math.ceil(l))}function Qst(e,t,n){var r=1,i=new zn(e);if(!i.isint()&&n){var s=Math.abs(e);s<1?(r=new zn(10).pow(uj.getDigitCount(e)-1),i=new zn(Math.floor(i.div(r).toNumber())).mul(r)):s>1&&(i=new zn(Math.floor(e)))}else e===0?i=new zn(Math.floor((t-1)/2)):n||(i=new zn(Math.floor(e)));var a=Math.floor((t-1)/2),o=Nst(Est(function(l){return i.add(new zn(l-a).mul(r)).toNumber()}),SM);return o(0,t)}function wfe(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new zn(0),tickMin:new zn(0),tickMax:new zn(0)};var s=xfe(new zn(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new zn(0):(a=new zn(e).add(t).div(2),a=a.sub(new zn(a).mod(s)));var o=Math.ceil(a.sub(e).div(s).toNumber()),l=Math.ceil(new zn(t).sub(a).div(s).toNumber()),u=o+l+1;return u>n?wfe(e,t,n,r,i+1):(u<n&&(l=t>0?l+(n-u):l,o=t>0?o:o+(n-u)),{step:s,tickMin:a.sub(new zn(o).mul(s)),tickMax:a.add(new zn(l).mul(s))})}function Hst(e){var t=l1(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),o=vfe([n,r]),l=l1(o,2),u=l[0],d=l[1];if(u===-1/0||d===1/0){var A=d===1/0?[u].concat(_M(SM(0,i-1).map(function(){return 1/0}))):[].concat(_M(SM(0,i-1).map(function(){return-1/0})),[d]);return n>r?BM(A):A}if(u===d)return Qst(u,i,s);var f=wfe(u,d,a,s),h=f.step,p=f.tickMin,m=f.tickMax,g=uj.rangeStep(p,m.add(new zn(.1).mul(h)),h);return n>r?BM(g):g}function $st(e,t){var n=l1(e,2),r=n[0],i=n[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=vfe([r,i]),o=l1(a,2),l=o[0],u=o[1];if(l===-1/0||u===1/0)return[r,i];if(l===u)return[l];var d=Math.max(t,2),A=xfe(new zn(u).sub(l).div(d-1),s,0),f=[].concat(_M(uj.rangeStep(new zn(l),new zn(u).sub(new zn(.99).mul(A)),A)),[u]);return r>i?BM(f):f}var zst=gfe(Hst),Vst=gfe($st),Kst="Invariant failed";function Wp(e,t){throw new Error(Kst)}var Wst=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function f0(e){"@babel/helpers - typeof";return f0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f0(e)}function CE(){return CE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CE.apply(this,arguments)}function qst(e,t){return Jst(e)||Xst(e,t)||Yst(e,t)||Gst()}function Gst(){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 Yst(e,t){if(e){if(typeof e=="string")return Bq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bq(e,t)}}function Bq(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xst(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function Jst(e){if(Array.isArray(e))return e}function Zst(e,t){if(e==null)return{};var n=eat(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eat(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tat(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nat(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sfe(r.key),r)}}function rat(e,t,n){return t&&nat(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iat(e,t,n){return t=SE(t),sat(e,bfe()?Reflect.construct(t,n||[],SE(e).constructor):t.apply(e,n))}function sat(e,t){if(t&&(f0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aat(e)}function aat(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bfe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bfe=function(){return!!e})()}function SE(e){return SE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},SE(e)}function oat(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EM(e,t)}function EM(e,t){return EM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},EM(e,t)}function Cfe(e,t,n){return t=Sfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sfe(e){var t=lat(e,"string");return f0(t)=="symbol"?t:t+""}function lat(e,t){if(f0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(f0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _2=function(e){function t(){return tat(this,t),iat(this,t,arguments)}return oat(t,e),rat(t,[{key:"render",value:function(){var r=this.props,i=r.offset,s=r.layout,a=r.width,o=r.dataKey,l=r.data,u=r.dataPointFormatter,d=r.xAxis,A=r.yAxis,f=Zst(r,Wst),h=yn(f,!1);this.props.direction==="x"&&d.type!=="number"&&Wp();var p=l.map(function(m){var g=u(m,o),y=g.x,v=g.y,x=g.value,b=g.errorVal;if(!b)return null;var w=[],B,k;if(Array.isArray(b)){var N=qst(b,2);B=N[0],k=N[1]}else B=k=b;if(s==="vertical"){var j=d.scale,L=v+i,T=L+a,E=L-a,F=j(x-B),M=j(x+k);w.push({x1:M,y1:T,x2:M,y2:E}),w.push({x1:F,y1:L,x2:M,y2:L}),w.push({x1:F,y1:T,x2:F,y2:E})}else if(s==="horizontal"){var D=A.scale,H=y+i,q=H-a,$=H+a,z=D(x-B),Q=D(x+k);w.push({x1:q,y1:Q,x2:$,y2:Q}),w.push({x1:H,y1:z,x2:H,y2:Q}),w.push({x1:q,y1:z,x2:$,y2:z})}return re.createElement(ui,CE({className:"recharts-errorBar",key:"bar-".concat(w.map(function(ce){return"".concat(ce.x1,"-").concat(ce.x2,"-").concat(ce.y1,"-").concat(ce.y2)}))},h),w.map(function(ce){return re.createElement("line",CE({},ce,{key:"line-".concat(ce.x1,"-").concat(ce.x2,"-").concat(ce.y1,"-").concat(ce.y2)}))}))});return re.createElement(ui,{className:"recharts-errorBars"},p)}}])}(re.Component);Cfe(_2,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Cfe(_2,"displayName","ErrorBar");function c1(e){"@babel/helpers - typeof";return c1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c1(e)}function _q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_q(Object(n),!0).forEach(function(r){cat(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_q(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cat(e,t,n){return t=uat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uat(e){var t=dat(e,"string");return c1(t)=="symbol"?t:t+""}function dat(e,t){if(c1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(c1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bfe=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,s=t.legendContent,a=lo(n,vp);if(!a)return null;var o=vp.defaultProps,l=o!==void 0?gf(gf({},o),a.props):{},u;return a.props&&a.props.payload?u=a.props&&a.props.payload:s==="children"?u=(r||[]).reduce(function(d,A){var f=A.item,h=A.props,p=h.sectors||h.data||[];return d.concat(p.map(function(m){return{type:a.props.iconType||f.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(r||[]).map(function(d){var A=d.item,f=A.type.defaultProps,h=f!==void 0?gf(gf({},f),A.props):{},p=h.dataKey,m=h.name,g=h.legendType,y=h.hide;return{inactive:y,dataKey:p,type:l.iconType||g||"square",color:QQ(A),value:m||p,payload:h}}),gf(gf(gf({},l),vp.getWithHeight(a,i)),{},{payload:u,item:a})};function u1(e){"@babel/helpers - typeof";return u1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u1(e)}function kq(e){return pat(e)||fat(e)||hat(e)||Aat()}function Aat(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hat(e,t){if(e){if(typeof e=="string")return NM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NM(e,t)}}function fat(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pat(e){if(Array.isArray(e))return NM(e)}function NM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Eq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Eq(Object(n),!0).forEach(function(r){my(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function my(e,t,n){return t=mat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mat(e){var t=gat(e,"string");return u1(t)=="symbol"?t:t+""}function gat(e,t){if(u1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(u1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Co(e,t,n){return fn(e)||fn(t)?n:Li(t)?cl(e,t,n):un(t)?t(e):n}function Iw(e,t,n,r){var i=fst(e,function(o){return Co(o,t)});if(n==="number"){var s=i.filter(function(o){return Je(o)||parseFloat(o)});return s.length?[oj(s),aj(s)]:[1/0,-1/0]}var a=r?i.filter(function(o){return!fn(o)}):i;return a.map(function(o){return Li(o)||o instanceof Date?o:""})}var yat=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,a=-1,o=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(o<=1)return 0;if(s&&s.axisType==="angleAxis"&&Math.abs(Math.abs(s.range[1]-s.range[0])-360)<=1e-6)for(var l=s.range,u=0;u<o;u++){var d=u>0?i[u-1].coordinate:i[o-1].coordinate,A=i[u].coordinate,f=u>=o-1?i[0].coordinate:i[u+1].coordinate,h=void 0;if(Zl(A-d)!==Zl(f-A)){var p=[];if(Zl(f-A)===Zl(l[1]-l[0])){h=f;var m=A+l[1]-l[0];p[0]=Math.min(m,(m+d)/2),p[1]=Math.max(m,(m+d)/2)}else{h=d;var g=f+l[1]-l[0];p[0]=Math.min(A,(g+A)/2),p[1]=Math.max(A,(g+A)/2)}var y=[Math.min(A,(h+A)/2),Math.max(A,(h+A)/2)];if(t>y[0]&&t<=y[1]||t>=p[0]&&t<=p[1]){a=i[u].index;break}}else{var v=Math.min(d,f),x=Math.max(d,f);if(t>(v+A)/2&&t<=(x+A)/2){a=i[u].index;break}}}else for(var b=0;b<o;b++)if(b===0&&t<=(r[b].coordinate+r[b+1].coordinate)/2||b>0&&b<o-1&&t>(r[b].coordinate+r[b-1].coordinate)/2&&t<=(r[b].coordinate+r[b+1].coordinate)/2||b===o-1&&t>(r[b].coordinate+r[b-1].coordinate)/2){a=r[b].index;break}return a},QQ=function(t){var n,r=t,i=r.type.displayName,s=(n=t.type)!==null&&n!==void 0&&n.defaultProps?qr(qr({},t.type.defaultProps),t.props):t.props,a=s.stroke,o=s.fill,l;switch(i){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:o;break;default:l=o;break}return l},vat=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,s=i===void 0?{}:i;if(!s)return{};for(var a={},o=Object.keys(s),l=0,u=o.length;l<u;l++)for(var d=s[o[l]].stackGroups,A=Object.keys(d),f=0,h=A.length;f<h;f++){var p=d[A[f]],m=p.items,g=p.cateAxisId,y=m.filter(function(k){return ed(k.type).indexOf("Bar")>=0});if(y&&y.length){var v=y[0].type.defaultProps,x=v!==void 0?qr(qr({},v),y[0].props):y[0].props,b=x.barSize,w=x[g];a[w]||(a[w]=[]);var B=fn(b)?n:b;a[w].push({item:y[0],stackList:y.slice(1),barSize:fn(B)?void 0:Vp(B,r,0)})}}return a},xat=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,s=t.sizeList,a=s===void 0?[]:s,o=t.maxBarSize,l=a.length;if(l<1)return null;var u=Vp(n,i,0,!0),d,A=[];if(a[0].barSize===+a[0].barSize){var f=!1,h=i/l,p=a.reduce(function(b,w){return b+w.barSize||0},0);p+=(l-1)*u,p>=i&&(p-=(l-1)*u,u=0),p>=i&&h>0&&(f=!0,h*=.9,p=l*h);var m=(i-p)/2>>0,g={offset:m-u,size:0};d=a.reduce(function(b,w){var B={item:w.item,position:{offset:g.offset+g.size+u,size:f?h:w.barSize}},k=[].concat(kq(b),[B]);return g=k[k.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(N){k.push({item:N,position:g})}),k},A)}else{var y=Vp(r,i,0,!0);i-2*y-(l-1)*u<=0&&(u=0);var v=(i-2*y-(l-1)*u)/l;v>1&&(v>>=0);var x=o===+o?Math.min(v,o):v;d=a.reduce(function(b,w,B){var k=[].concat(kq(b),[{item:w.item,position:{offset:y+(v+u)*B+(v-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(N){k.push({item:N,position:k[k.length-1].position})}),k},A)}return d},wat=function(t,n,r,i){var s=r.children,a=r.width,o=r.margin,l=a-(o.left||0)-(o.right||0),u=Bfe({children:s,legendWidth:l});if(u){var d=i||{},A=d.width,f=d.height,h=u.align,p=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&p==="middle")&&h!=="center"&&Je(t[h]))return qr(qr({},t),{},my({},h,t[h]+(A||0)));if((m==="horizontal"||m==="vertical"&&h==="center")&&p!=="middle"&&Je(t[p]))return qr(qr({},t),{},my({},p,t[p]+(f||0)))}return t},bat=function(t,n,r){return fn(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},_fe=function(t,n,r,i,s){var a=n.props.children,o=ul(a,_2).filter(function(u){return bat(i,s,u.props.direction)});if(o&&o.length){var l=o.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var A=Co(d,r);if(fn(A))return u;var f=Array.isArray(A)?[oj(A),aj(A)]:[A,A],h=l.reduce(function(p,m){var g=Co(d,m,0),y=f[0]-Math.abs(Array.isArray(g)?g[0]:g),v=f[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(y,p[0]),Math.max(v,p[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},Cat=function(t,n,r,i,s){var a=n.map(function(o){return _fe(t,o,r,s,i)}).filter(function(o){return!fn(o)});return a&&a.length?a.reduce(function(o,l){return[Math.min(o[0],l[0]),Math.max(o[1],l[1])]},[1/0,-1/0]):null},kfe=function(t,n,r,i,s){var a=n.map(function(l){var u=l.props.dataKey;return r==="number"&&u&&_fe(t,l,u,i)||Iw(t,u,r,s)});if(r==="number")return a.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var o={};return a.reduce(function(l,u){for(var d=0,A=u.length;d<A;d++)o[u[d]]||(o[u[d]]=!0,l.push(u[d]));return l},[])},Efe=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},Nfe=function(t,n,r,i){if(i)return t.map(function(l){return l.coordinate});var s,a,o=t.map(function(l){return l.coordinate===n&&(s=!0),l.coordinate===r&&(a=!0),l.coordinate});return s||o.push(n),a||o.push(r),o},Yu=function(t,n,r){if(!t)return null;var i=t.scale,s=t.duplicateDomain,a=t.type,o=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(n||r)&&a==="category"&&i.bandwidth?i.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(o==null?void 0:o.length)>=2?Zl(o[0]-o[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(A){var f=s?s.indexOf(A):A;return{coordinate:i(f)+u,value:A,offset:u}});return d.filter(function(A){return!v2(A.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(A,f){return{coordinate:i(A)+u,value:A,index:f,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(A){return{coordinate:i(A)+u,value:A,offset:u}}):i.domain().map(function(A,f){return{coordinate:i(A)+u,value:s?s[A]:A,index:f,offset:u}})},TI=new WeakMap,CS=function(t,n){if(typeof n!="function")return t;TI.has(t)||TI.set(t,new WeakMap);var r=TI.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},Sat=function(t,n,r){var i=t.scale,s=t.type,a=t.layout,o=t.axisType;if(i==="auto")return a==="radial"&&o==="radiusAxis"?{scale:n1(),realScaleType:"band"}:a==="radial"&&o==="angleAxis"?{scale:yE(),realScaleType:"linear"}:s==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Pw(),realScaleType:"point"}:s==="category"?{scale:n1(),realScaleType:"band"}:{scale:yE(),realScaleType:"linear"};if(y2(i)){var l="scale".concat(W5(i));return{scale:(wq[l]||Pw)(),realScaleType:wq[l]?l:"point"}}return un(i)?{scale:i}:{scale:Pw(),realScaleType:"point"}},Nq=1e-4,Bat=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),s=Math.min(i[0],i[1])-Nq,a=Math.max(i[0],i[1])+Nq,o=t(n[0]),l=t(n[r-1]);(o<s||o>a||l<s||l>a)&&t.domain([n[0],n[r-1]])}},_at=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},kat=function(t,n){if(!n||n.length!==2||!Je(n[0])||!Je(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),s=[t[0],t[1]];return(!Je(t[0])||t[0]<r)&&(s[0]=r),(!Je(t[1])||t[1]>i)&&(s[1]=i),s[0]>i&&(s[0]=i),s[1]<r&&(s[1]=r),s},Eat=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var s=0,a=0,o=0;o<n;++o){var l=v2(t[o][r][1])?t[o][r][0]:t[o][r][1];l>=0?(t[o][r][0]=s,t[o][r][1]=s+l,s=t[o][r][1]):(t[o][r][0]=a,t[o][r][1]=a+l,a=t[o][r][1])}},Nat=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var s=0,a=0;a<n;++a){var o=v2(t[a][r][1])?t[a][r][0]:t[a][r][1];o>=0?(t[a][r][0]=s,t[a][r][1]=s+o,s=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},jat={sign:Eat,expand:$Ke,none:a0,silhouette:zKe,wiggle:VKe,positive:Nat},Tat=function(t,n,r){var i=n.map(function(o){return o.props.dataKey}),s=jat[r],a=HKe().keys(i).value(function(o,l){return+Co(o,l,0)}).order(eM).offset(s);return a(t)},Pat=function(t,n,r,i,s,a){if(!t)return null;var o=a?n.reverse():n,l={},u=o.reduce(function(A,f){var h,p=(h=f.type)!==null&&h!==void 0&&h.defaultProps?qr(qr({},f.type.defaultProps),f.props):f.props,m=p.stackId,g=p.hide;if(g)return A;var y=p[r],v=A[y]||{hasStack:!1,stackGroups:{}};if(Li(m)){var x=v.stackGroups[m]||{numericAxisId:r,cateAxisId:i,items:[]};x.items.push(f),v.hasStack=!0,v.stackGroups[m]=x}else v.stackGroups[x2("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[f]};return qr(qr({},A),{},my({},y,v))},l),d={};return Object.keys(u).reduce(function(A,f){var h=u[f];if(h.hasStack){var p={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(m,g){var y=h.stackGroups[g];return qr(qr({},m),{},my({},g,{numericAxisId:r,cateAxisId:i,items:y.items,stackedData:Tat(t,y.items,s)}))},p)}return qr(qr({},A),{},my({},f,h))},d)},Iat=function(t,n){var r=n.realScaleType,i=n.type,s=n.tickCount,a=n.originalDomain,o=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(s&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=zst(u,s,o);return t.domain([oj(d),aj(d)]),{niceTicks:d}}if(s&&i==="number"){var A=t.domain(),f=Vst(A,s,o);return{niceTicks:f}}return null};function jq(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,s=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!fn(i[t.dataKey])){var o=Gk(n,"value",i[t.dataKey]);if(o)return o.coordinate+r/2}return n[s]?n[s].coordinate+r/2:null}var l=Co(i,fn(a)?t.dataKey:a);return fn(l)?null:t.scale(l)}var Tq=function(t){var n=t.axis,r=t.ticks,i=t.offset,s=t.bandSize,a=t.entry,o=t.index;if(n.type==="category")return r[o]?r[o].coordinate+i:null;var l=Co(a,n.dataKey,n.domain[o]);return fn(l)?null:n.scale(l)-s/2+i},Oat=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),s=Math.max(r[0],r[1]);return i<=0&&s>=0?0:s<0?s:i}return r[0]},Fat=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?qr(qr({},t.type.defaultProps),t.props):t.props,s=i.stackId;if(Li(s)){var a=n[s];if(a){var o=a.items.indexOf(t);return o>=0?a.stackedData[o]:null}}return null},Mat=function(t){return t.reduce(function(n,r){return[oj(r.concat([n[0]]).filter(Je)),aj(r.concat([n[1]]).filter(Je))]},[1/0,-1/0])},jfe=function(t,n,r){return Object.keys(t).reduce(function(i,s){var a=t[s],o=a.stackedData,l=o.reduce(function(u,d){var A=Mat(d.slice(n,r+1));return[Math.min(u[0],A[0]),Math.max(u[1],A[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Pq=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Iq=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jM=function(t,n,r){if(un(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Je(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(Pq.test(t[0])){var s=+Pq.exec(t[0])[1];i[0]=n[0]-s}else un(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Je(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(Iq.test(t[1])){var a=+Iq.exec(t[1])[1];i[1]=n[1]+a}else un(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},BE=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var s=fQ(n,function(A){return A.coordinate}),a=1/0,o=1,l=s.length;o<l;o++){var u=s[o],d=s[o-1];a=Math.min((u.coordinate||0)-(d.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0},Oq=function(t,n,r){return!t||!t.length||lj(t,cl(r,"type.defaultProps.domain"))?n:t},Tfe=function(t,n){var r=t.type.defaultProps?qr(qr({},t.type.defaultProps),t.props):t.props,i=r.dataKey,s=r.name,a=r.unit,o=r.formatter,l=r.tooltipType,u=r.chartType,d=r.hide;return qr(qr({},yn(t,!1)),{},{dataKey:i,unit:a,formatter:o,name:s||i,color:QQ(t),value:Co(n,i),type:l,payload:n,chartType:u,hide:d})};function d1(e){"@babel/helpers - typeof";return d1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d1(e)}function Fq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fq(Object(n),!0).forEach(function(r){Lat(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lat(e,t,n){return t=Rat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rat(e){var t=Uat(e,"string");return d1(t)=="symbol"?t:t+""}function Uat(e,t){if(d1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(d1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _E=Math.PI/180,Dat=function(t){return t*180/Math.PI},ys=function(t,n,r,i){return{x:t+Math.cos(-_E*i)*r,y:n+Math.sin(-_E*i)*r}},Qat=function(t,n){var r=t.x,i=t.y,s=n.x,a=n.y;return Math.sqrt(Math.pow(r-s,2)+Math.pow(i-a,2))},Hat=function(t,n){var r=t.x,i=t.y,s=n.cx,a=n.cy,o=Qat({x:r,y:i},{x:s,y:a});if(o<=0)return{radius:o};var l=(r-s)/o,u=Math.acos(l);return i>a&&(u=2*Math.PI-u),{radius:o,angle:Dat(u),angleInRadian:u}},$at=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),s=Math.floor(r/360),a=Math.min(i,s);return{startAngle:n-a*360,endAngle:r-a*360}},zat=function(t,n){var r=n.startAngle,i=n.endAngle,s=Math.floor(r/360),a=Math.floor(i/360),o=Math.min(s,a);return t+o*360},Lq=function(t,n){var r=t.x,i=t.y,s=Hat({x:r,y:i},n),a=s.radius,o=s.angle,l=n.innerRadius,u=n.outerRadius;if(a<l||a>u)return!1;if(a===0)return!0;var d=$at(n),A=d.startAngle,f=d.endAngle,h=o,p;if(A<=f){for(;h>f;)h-=360;for(;h<A;)h+=360;p=h>=A&&h<=f}else{for(;h>A;)h-=360;for(;h<f;)h+=360;p=h>=f&&h<=A}return p?Mq(Mq({},n),{},{radius:a,angle:zat(h,n)}):null};function A1(e){"@babel/helpers - typeof";return A1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A1(e)}var Vat=["offset"];function Kat(e){return Yat(e)||Gat(e)||qat(e)||Wat()}function Wat(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qat(e,t){if(e){if(typeof e=="string")return TM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TM(e,t)}}function Gat(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yat(e){if(Array.isArray(e))return TM(e)}function TM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xat(e,t){if(e==null)return{};var n=Jat(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jat(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Rq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ni(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rq(Object(n),!0).forEach(function(r){Zat(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zat(e,t,n){return t=eot(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eot(e){var t=tot(e,"string");return A1(t)=="symbol"?t:t+""}function tot(e,t){if(A1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(A1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function h1(){return h1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h1.apply(this,arguments)}var not=function(t){var n=t.value,r=t.formatter,i=fn(t.children)?n:t.children;return un(r)?r(i):i},rot=function(t,n){var r=Zl(n-t),i=Math.min(Math.abs(n-t),360);return r*i},iot=function(t,n,r){var i=t.position,s=t.viewBox,a=t.offset,o=t.className,l=s,u=l.cx,d=l.cy,A=l.innerRadius,f=l.outerRadius,h=l.startAngle,p=l.endAngle,m=l.clockWise,g=(A+f)/2,y=rot(h,p),v=y>=0?1:-1,x,b;i==="insideStart"?(x=h+v*a,b=m):i==="insideEnd"?(x=p-v*a,b=!m):i==="end"&&(x=p+v*a,b=m),b=y<=0?b:!b;var w=ys(u,d,g,x),B=ys(u,d,g,x+(b?1:-1)*359),k="M".concat(w.x,",").concat(w.y,`
A`).concat(g,",").concat(g,",0,1,").concat(b?0:1,`,
`).concat(B.x,",").concat(B.y),N=fn(t.id)?x2("recharts-radial-line-"):t.id;return re.createElement("text",h1({},r,{dominantBaseline:"central",className:Sn("recharts-radial-bar-label",o)}),re.createElement("defs",null,re.createElement("path",{id:N,d:k})),re.createElement("textPath",{xlinkHref:"#".concat(N)},n))},sot=function(t){var n=t.viewBox,r=t.offset,i=t.position,s=n,a=s.cx,o=s.cy,l=s.innerRadius,u=s.outerRadius,d=s.startAngle,A=s.endAngle,f=(d+A)/2;if(i==="outside"){var h=ys(a,o,u+r,f),p=h.x,m=h.y;return{x:p,y:m,textAnchor:p>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:o,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:o,textAnchor:"middle",verticalAnchor:"end"};var g=(l+u)/2,y=ys(a,o,g,f),v=y.x,x=y.y;return{x:v,y:x,textAnchor:"middle",verticalAnchor:"middle"}},aot=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,s=t.position,a=n,o=a.x,l=a.y,u=a.width,d=a.height,A=d>=0?1:-1,f=A*i,h=A>0?"end":"start",p=A>0?"start":"end",m=u>=0?1:-1,g=m*i,y=m>0?"end":"start",v=m>0?"start":"end";if(s==="top"){var x={x:o+u/2,y:l-A*i,textAnchor:"middle",verticalAnchor:h};return Ni(Ni({},x),r?{height:Math.max(l-r.y,0),width:u}:{})}if(s==="bottom"){var b={x:o+u/2,y:l+d+f,textAnchor:"middle",verticalAnchor:p};return Ni(Ni({},b),r?{height:Math.max(r.y+r.height-(l+d),0),width:u}:{})}if(s==="left"){var w={x:o-g,y:l+d/2,textAnchor:y,verticalAnchor:"middle"};return Ni(Ni({},w),r?{width:Math.max(w.x-r.x,0),height:d}:{})}if(s==="right"){var B={x:o+u+g,y:l+d/2,textAnchor:v,verticalAnchor:"middle"};return Ni(Ni({},B),r?{width:Math.max(r.x+r.width-B.x,0),height:d}:{})}var k=r?{width:u,height:d}:{};return s==="insideLeft"?Ni({x:o+g,y:l+d/2,textAnchor:v,verticalAnchor:"middle"},k):s==="insideRight"?Ni({x:o+u-g,y:l+d/2,textAnchor:y,verticalAnchor:"middle"},k):s==="insideTop"?Ni({x:o+u/2,y:l+f,textAnchor:"middle",verticalAnchor:p},k):s==="insideBottom"?Ni({x:o+u/2,y:l+d-f,textAnchor:"middle",verticalAnchor:h},k):s==="insideTopLeft"?Ni({x:o+g,y:l+f,textAnchor:v,verticalAnchor:p},k):s==="insideTopRight"?Ni({x:o+u-g,y:l+f,textAnchor:y,verticalAnchor:p},k):s==="insideBottomLeft"?Ni({x:o+g,y:l+d-f,textAnchor:v,verticalAnchor:h},k):s==="insideBottomRight"?Ni({x:o+u-g,y:l+d-f,textAnchor:y,verticalAnchor:h},k):ev(s)&&(Je(s.x)||Vf(s.x))&&(Je(s.y)||Vf(s.y))?Ni({x:o+Vp(s.x,u),y:l+Vp(s.y,d),textAnchor:"end",verticalAnchor:"end"},k):Ni({x:o+u/2,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},k)},oot=function(t){return"cx"in t&&Je(t.cx)};function Us(e){var t=e.offset,n=t===void 0?5:t,r=Xat(e,Vat),i=Ni({offset:n},r),s=i.viewBox,a=i.position,o=i.value,l=i.children,u=i.content,d=i.className,A=d===void 0?"":d,f=i.textBreakAll;if(!s||fn(o)&&fn(l)&&!S.isValidElement(u)&&!un(u))return null;if(S.isValidElement(u))return S.cloneElement(u,i);var h;if(un(u)){if(h=S.createElement(u,i),S.isValidElement(h))return h}else h=not(i);var p=oot(s),m=yn(i,!0);if(p&&(a==="insideStart"||a==="insideEnd"||a==="end"))return iot(i,h,m);var g=p?sot(i):aot(i);return re.createElement(dE,h1({className:Sn("recharts-label",A)},m,g,{breakAll:f}),h)}Us.displayName="Label";var Pfe=function(t){var n=t.cx,r=t.cy,i=t.angle,s=t.startAngle,a=t.endAngle,o=t.r,l=t.radius,u=t.innerRadius,d=t.outerRadius,A=t.x,f=t.y,h=t.top,p=t.left,m=t.width,g=t.height,y=t.clockWise,v=t.labelViewBox;if(v)return v;if(Je(m)&&Je(g)){if(Je(A)&&Je(f))return{x:A,y:f,width:m,height:g};if(Je(h)&&Je(p))return{x:h,y:p,width:m,height:g}}return Je(A)&&Je(f)?{x:A,y:f,width:0,height:0}:Je(n)&&Je(r)?{cx:n,cy:r,startAngle:s||i||0,endAngle:a||i||0,innerRadius:u||0,outerRadius:d||l||o||0,clockWise:y}:t.viewBox?t.viewBox:{}},lot=function(t,n){return t?t===!0?re.createElement(Us,{key:"label-implicit",viewBox:n}):Li(t)?re.createElement(Us,{key:"label-implicit",viewBox:n,value:t}):S.isValidElement(t)?t.type===Us?S.cloneElement(t,{key:"label-implicit",viewBox:n}):re.createElement(Us,{key:"label-implicit",content:t,viewBox:n}):un(t)?re.createElement(Us,{key:"label-implicit",content:t,viewBox:n}):ev(t)?re.createElement(Us,h1({viewBox:n},t,{key:"label-implicit"})):null:null},cot=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,s=Pfe(t),a=ul(i,Us).map(function(l,u){return S.cloneElement(l,{viewBox:n||s,key:"label-".concat(u)})});if(!r)return a;var o=lot(t.label,n||s);return[o].concat(Kat(a))};Us.parseViewBox=Pfe;Us.renderCallByParent=cot;function uot(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var dot=uot;const Aot=Bn(dot);function f1(e){"@babel/helpers - typeof";return f1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f1(e)}var hot=["valueAccessor"],fot=["data","dataKey","clockWise","id","textBreakAll"];function pot(e){return vot(e)||yot(e)||got(e)||mot()}function mot(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function got(e,t){if(e){if(typeof e=="string")return PM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PM(e,t)}}function yot(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vot(e){if(Array.isArray(e))return PM(e)}function PM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kE(){return kE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kE.apply(this,arguments)}function Uq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uq(Object(n),!0).forEach(function(r){xot(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xot(e,t,n){return t=wot(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wot(e){var t=bot(e,"string");return f1(t)=="symbol"?t:t+""}function bot(e,t){if(f1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(f1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qq(e,t){if(e==null)return{};var n=Cot(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cot(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Sot=function(t){return Array.isArray(t.value)?Aot(t.value):t.value};function lh(e){var t=e.valueAccessor,n=t===void 0?Sot:t,r=Qq(e,hot),i=r.data,s=r.dataKey,a=r.clockWise,o=r.id,l=r.textBreakAll,u=Qq(r,fot);return!i||!i.length?null:re.createElement(ui,{className:"recharts-label-list"},i.map(function(d,A){var f=fn(s)?n(d,A):Co(d&&d.payload,s),h=fn(o)?{}:{id:"".concat(o,"-").concat(A)};return re.createElement(Us,kE({},yn(d,!0),u,h,{parentViewBox:d.parentViewBox,value:f,textBreakAll:l,viewBox:Us.parseViewBox(fn(a)?d:Dq(Dq({},d),{},{clockWise:a})),key:"label-".concat(A),index:A}))}))}lh.displayName="LabelList";function Bot(e,t){return e?e===!0?re.createElement(lh,{key:"labelList-implicit",data:t}):re.isValidElement(e)||un(e)?re.createElement(lh,{key:"labelList-implicit",data:t,content:e}):ev(e)?re.createElement(lh,kE({data:t},e,{key:"labelList-implicit"})):null:null}function _ot(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=ul(r,lh).map(function(a,o){return S.cloneElement(a,{data:t,key:"labelList-".concat(o)})});if(!n)return i;var s=Bot(e.label,t);return[s].concat(pot(i))}lh.renderCallByParent=_ot;function p1(e){"@babel/helpers - typeof";return p1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p1(e)}function IM(){return IM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IM.apply(this,arguments)}function Hq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hq(Object(n),!0).forEach(function(r){kot(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kot(e,t,n){return t=Eot(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eot(e){var t=Not(e,"string");return p1(t)=="symbol"?t:t+""}function Not(e,t){if(p1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(p1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jot=function(t,n){var r=Zl(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},SS=function(t){var n=t.cx,r=t.cy,i=t.radius,s=t.angle,a=t.sign,o=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,d=l*(o?1:-1)+i,A=Math.asin(l/d)/_E,f=u?s:s+a*A,h=ys(n,r,d,f),p=ys(n,r,i,f),m=u?s-a*A:s,g=ys(n,r,d*Math.cos(A*_E),m);return{center:h,circleTangency:p,lineTangency:g,theta:A}},Ife=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,s=t.outerRadius,a=t.startAngle,o=t.endAngle,l=jot(a,o),u=a+l,d=ys(n,r,s,a),A=ys(n,r,s,u),f="M ".concat(d.x,",").concat(d.y,`
A `).concat(s,",").concat(s,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(a>u),`,
`).concat(A.x,",").concat(A.y,`
`);if(i>0){var h=ys(n,r,i,a),p=ys(n,r,i,u);f+="L ".concat(p.x,",").concat(p.y,`
A `).concat(i,",").concat(i,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(a<=u),`,
`).concat(h.x,",").concat(h.y," Z")}else f+="L ".concat(n,",").concat(r," Z");return f},Tot=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,s=t.outerRadius,a=t.cornerRadius,o=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,A=Zl(d-u),f=SS({cx:n,cy:r,radius:s,angle:u,sign:A,cornerRadius:a,cornerIsExternal:l}),h=f.circleTangency,p=f.lineTangency,m=f.theta,g=SS({cx:n,cy:r,radius:s,angle:d,sign:-A,cornerRadius:a,cornerIsExternal:l}),y=g.circleTangency,v=g.lineTangency,x=g.theta,b=l?Math.abs(u-d):Math.abs(u-d)-m-x;if(b<0)return o?"M ".concat(p.x,",").concat(p.y,`
a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0
a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0
`):Ife({cx:n,cy:r,innerRadius:i,outerRadius:s,startAngle:u,endAngle:d});var w="M ".concat(p.x,",").concat(p.y,`
A`).concat(a,",").concat(a,",0,0,").concat(+(A<0),",").concat(h.x,",").concat(h.y,`
A`).concat(s,",").concat(s,",0,").concat(+(b>180),",").concat(+(A<0),",").concat(y.x,",").concat(y.y,`
A`).concat(a,",").concat(a,",0,0,").concat(+(A<0),",").concat(v.x,",").concat(v.y,`
`);if(i>0){var B=SS({cx:n,cy:r,radius:i,angle:u,sign:A,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),k=B.circleTangency,N=B.lineTangency,j=B.theta,L=SS({cx:n,cy:r,radius:i,angle:d,sign:-A,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),T=L.circleTangency,E=L.lineTangency,F=L.theta,M=l?Math.abs(u-d):Math.abs(u-d)-j-F;if(M<0&&a===0)return"".concat(w,"L").concat(n,",").concat(r,"Z");w+="L".concat(E.x,",").concat(E.y,`
A`).concat(a,",").concat(a,",0,0,").concat(+(A<0),",").concat(T.x,",").concat(T.y,`
A`).concat(i,",").concat(i,",0,").concat(+(M>180),",").concat(+(A>0),",").concat(k.x,",").concat(k.y,`
A`).concat(a,",").concat(a,",0,0,").concat(+(A<0),",").concat(N.x,",").concat(N.y,"Z")}else w+="L".concat(n,",").concat(r,"Z");return w},Pot={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Ofe=function(t){var n=$q($q({},Pot),t),r=n.cx,i=n.cy,s=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,d=n.startAngle,A=n.endAngle,f=n.className;if(a<s||d===A)return null;var h=Sn("recharts-sector",f),p=a-s,m=Vp(o,p,0,!0),g;return m>0&&Math.abs(d-A)<360?g=Tot({cx:r,cy:i,innerRadius:s,outerRadius:a,cornerRadius:Math.min(m,p/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:d,endAngle:A}):g=Ife({cx:r,cy:i,innerRadius:s,outerRadius:a,startAngle:d,endAngle:A}),re.createElement("path",IM({},yn(n,!0),{className:h,d:g,role:"img"}))};function m1(e){"@babel/helpers - typeof";return m1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m1(e)}function OM(){return OM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OM.apply(this,arguments)}function zq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zq(Object(n),!0).forEach(function(r){Iot(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iot(e,t,n){return t=Oot(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oot(e){var t=Fot(e,"string");return m1(t)=="symbol"?t:t+""}function Fot(e,t){if(m1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(m1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kq={curveBasisClosed:TKe,curveBasisOpen:PKe,curveBasis:jKe,curveBumpX:mKe,curveBumpY:gKe,curveLinearClosed:IKe,curveLinear:G5,curveMonotoneX:OKe,curveMonotoneY:FKe,curveNatural:MKe,curveStep:LKe,curveStepAfter:UKe,curveStepBefore:RKe},BS=function(t){return t.x===+t.x&&t.y===+t.y},px=function(t){return t.x},mx=function(t){return t.y},Mot=function(t,n){if(un(t))return t;var r="curve".concat(W5(t));return(r==="curveMonotone"||r==="curveBump")&&n?Kq["".concat(r).concat(n==="vertical"?"Y":"X")]:Kq[r]||G5},Lot=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,s=i===void 0?[]:i,a=t.baseLine,o=t.layout,l=t.connectNulls,u=l===void 0?!1:l,d=Mot(r,o),A=u?s.filter(function(m){return BS(m)}):s,f;if(Array.isArray(a)){var h=u?a.filter(function(m){return BS(m)}):a,p=A.map(function(m,g){return Vq(Vq({},m),{},{base:h[g]})});return o==="vertical"?f=pS().y(mx).x1(px).x0(function(m){return m.base.x}):f=pS().x(px).y1(mx).y0(function(m){return m.base.y}),f.defined(BS).curve(d),f(p)}return o==="vertical"&&Je(a)?f=pS().y(mx).x1(px).x0(a):Je(a)?f=pS().x(px).y1(mx).y0(a):f=OAe().x(px).y(mx),f.defined(BS).curve(d),f(A)},FM=function(t){var n=t.className,r=t.points,i=t.path,s=t.pathRef;if((!r||!r.length)&&!i)return null;var a=r&&r.length?Lot(t):i;return re.createElement("path",OM({},yn(t,!1),Yk(t),{className:Sn("recharts-curve",n),d:a,ref:s}))},Ffe={exports:{}},Rot="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Uot=Rot,Dot=Uot;function Mfe(){}function Lfe(){}Lfe.resetWarningCache=Mfe;var Qot=function(){function e(r,i,s,a,o,l){if(l!==Dot){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Lfe,resetWarningCache:Mfe};return n.PropTypes=n,n};Ffe.exports=Qot();var Hot=Ffe.exports;const On=Bn(Hot);function $ot(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Wq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(s){n<0&&(n=s),s-n>t?(e(s),n=-1):$ot(i)};requestAnimationFrame(r)}function MM(e){"@babel/helpers - typeof";return MM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},MM(e)}function zot(e){return qot(e)||Wot(e)||Kot(e)||Vot()}function Vot(){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 Kot(e,t){if(e){if(typeof e=="string")return qq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qq(e,t)}}function qq(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wot(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qot(e){if(Array.isArray(e))return e}function Got(){var e={},t=function(){return null},n=!1,r=function i(s){if(!n){if(Array.isArray(s)){if(!s.length)return;var a=s,o=zot(a),l=o[0],u=o.slice(1);if(typeof l=="number"){Wq(i.bind(null,u),l);return}i(l),Wq(i.bind(null,u));return}MM(s)==="object"&&(e=s,t(e)),typeof s=="function"&&s()}};return{stop:function(){n=!0},start:function(s){n=!1,r(s)},subscribe:function(s){return t=s,function(){t=function(){return null}}}}}function g1(e){"@babel/helpers - typeof";return g1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g1(e)}function Gq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gq(Object(n),!0).forEach(function(r){Rfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rfe(e,t,n){return t=Yot(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yot(e){var t=Xot(e,"string");return g1(t)==="symbol"?t:String(t)}function Xot(e,t){if(g1(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(g1(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jot=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(s){return i.includes(s)})})},Zot=function(t){return t},elt=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Ow=function(t,n){return Object.keys(n).reduce(function(r,i){return Yq(Yq({},r),{},Rfe({},i,t(i,n[i])))},{})},Xq=function(t,n,r){return t.map(function(i){return"".concat(elt(i)," ").concat(n,"ms ").concat(r)}).join(",")};function tlt(e,t){return ilt(e)||rlt(e,t)||Ufe(e,t)||nlt()}function nlt(){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 rlt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function ilt(e){if(Array.isArray(e))return e}function slt(e){return llt(e)||olt(e)||Ufe(e)||alt()}function alt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ufe(e,t){if(e){if(typeof e=="string")return LM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LM(e,t)}}function olt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function llt(e){if(Array.isArray(e))return LM(e)}function LM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var EE=1e-4,Dfe=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},Qfe=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},Jq=function(t,n){return function(r){var i=Dfe(t,n);return Qfe(i,r)}},clt=function(t,n){return function(r){var i=Dfe(t,n),s=[].concat(slt(i.map(function(a,o){return a*o}).slice(1)),[0]);return Qfe(s,r)}},Zq=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],s=n[1],a=n[2],o=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,s=0,a=1,o=1;break;case"ease":i=.25,s=.1,a=.25,o=1;break;case"ease-in":i=.42,s=0,a=1,o=1;break;case"ease-out":i=.42,s=0,a=.58,o=1;break;case"ease-in-out":i=0,s=0,a=.58,o=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(g){return parseFloat(g)}),d=tlt(u,4);i=d[0],s=d[1],a=d[2],o=d[3]}}}var A=Jq(i,a),f=Jq(s,o),h=clt(i,a),p=function(y){return y>1?1:y<0?0:y},m=function(y){for(var v=y>1?1:y,x=v,b=0;b<8;++b){var w=A(x)-v,B=h(x);if(Math.abs(w-v)<EE||B<EE)return f(x);x=p(x-w/B)}return f(x)};return m.isStepper=!1,m},ult=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,s=i===void 0?8:i,a=t.dt,o=a===void 0?17:a,l=function(d,A,f){var h=-(d-A)*r,p=f*s,m=f+(h-p)*o/1e3,g=f*o/1e3+d;return Math.abs(g-A)<EE&&Math.abs(m)<EE?[A,0]:[g,m]};return l.isStepper=!0,l.dt=o,l},dlt=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Zq(i);case"spring":return ult();default:if(i.split("(")[0]==="cubic-bezier")return Zq(i)}return typeof i=="function"?i:null};function y1(e){"@babel/helpers - typeof";return y1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y1(e)}function eG(e){return flt(e)||hlt(e)||Hfe(e)||Alt()}function Alt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hlt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function flt(e){if(Array.isArray(e))return UM(e)}function tG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tG(Object(n),!0).forEach(function(r){RM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RM(e,t,n){return t=plt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function plt(e){var t=mlt(e,"string");return y1(t)==="symbol"?t:String(t)}function mlt(e,t){if(y1(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(y1(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function glt(e,t){return xlt(e)||vlt(e,t)||Hfe(e,t)||ylt()}function ylt(){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 Hfe(e,t){if(e){if(typeof e=="string")return UM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UM(e,t)}}function UM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vlt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function xlt(e){if(Array.isArray(e))return e}var NE=function(t,n,r){return t+(n-t)*r},DM=function(t){var n=t.from,r=t.to;return n!==r},wlt=function e(t,n,r){var i=Ow(function(s,a){if(DM(a)){var o=t(a.from,a.to,a.velocity),l=glt(o,2),u=l[0],d=l[1];return cs(cs({},a),{},{from:u,velocity:d})}return a},n);return r<1?Ow(function(s,a){return DM(a)?cs(cs({},a),{},{velocity:NE(a.velocity,i[s].velocity,r),from:NE(a.from,i[s].from,r)}):a},n):e(t,i,r-1)};const blt=function(e,t,n,r,i){var s=Jot(e,t),a=s.reduce(function(g,y){return cs(cs({},g),{},RM({},y,[e[y],t[y]]))},{}),o=s.reduce(function(g,y){return cs(cs({},g),{},RM({},y,{from:e[y],velocity:0,to:t[y]}))},{}),l=-1,u,d,A=function(){return null},f=function(){return Ow(function(y,v){return v.from},o)},h=function(){return!Object.values(o).filter(DM).length},p=function(y){u||(u=y);var v=y-u,x=v/n.dt;o=wlt(n,o,x),i(cs(cs(cs({},e),t),f())),u=y,h()||(l=requestAnimationFrame(A))},m=function(y){d||(d=y);var v=(y-d)/r,x=Ow(function(w,B){return NE.apply(void 0,eG(B).concat([n(v)]))},a);if(i(cs(cs(cs({},e),t),x)),v<1)l=requestAnimationFrame(A);else{var b=Ow(function(w,B){return NE.apply(void 0,eG(B).concat([n(1)]))},a);i(cs(cs(cs({},e),t),b))}};return A=n.isStepper?p:m,function(){return requestAnimationFrame(A),function(){cancelAnimationFrame(l)}}};function p0(e){"@babel/helpers - typeof";return p0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p0(e)}var Clt=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Slt(e,t){if(e==null)return{};var n=Blt(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Blt(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function PI(e){return Nlt(e)||Elt(e)||klt(e)||_lt()}function _lt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function klt(e,t){if(e){if(typeof e=="string")return QM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QM(e,t)}}function Elt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Nlt(e){if(Array.isArray(e))return QM(e)}function QM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nG(Object(n),!0).forEach(function(r){zx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zx(e,t,n){return t=$fe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jlt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tlt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$fe(r.key),r)}}function Plt(e,t,n){return t&&Tlt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $fe(e){var t=Ilt(e,"string");return p0(t)==="symbol"?t:String(t)}function Ilt(e,t){if(p0(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(p0(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Olt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HM(e,t)}function HM(e,t){return HM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},HM(e,t)}function Flt(e){var t=Mlt();return function(){var r=jE(e),i;if(t){var s=jE(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return $M(this,i)}}function $M(e,t){if(t&&(p0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zM(e)}function zM(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mlt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jE(e){return jE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jE(e)}var gd=function(e){Olt(n,e);var t=Flt(n);function n(r,i){var s;jlt(this,n),s=t.call(this,r,i);var a=s.props,o=a.isActive,l=a.attributeName,u=a.from,d=a.to,A=a.steps,f=a.children,h=a.duration;if(s.handleStyleChange=s.handleStyleChange.bind(zM(s)),s.changeStyle=s.changeStyle.bind(zM(s)),!o||h<=0)return s.state={style:{}},typeof f=="function"&&(s.state={style:d}),$M(s);if(A&&A.length)s.state={style:A[0].style};else if(u){if(typeof f=="function")return s.state={style:u},$M(s);s.state={style:l?zx({},l,u):u}}else s.state={style:{}};return s}return Plt(n,[{key:"componentDidMount",value:function(){var i=this.props,s=i.isActive,a=i.canBegin;this.mounted=!0,!(!s||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var s=this.props,a=s.isActive,o=s.canBegin,l=s.attributeName,u=s.shouldReAnimate,d=s.to,A=s.from,f=this.state.style;if(o){if(!a){var h={style:l?zx({},l,d):d};this.state&&f&&(l&&f[l]!==d||!l&&f!==d)&&this.setState(h);return}if(!(_ce(i.to,d)&&i.canBegin&&i.isActive)){var p=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=p||u?A:i.to;if(this.state&&f){var g={style:l?zx({},l,m):m};(l&&f[l]!==m||!l&&f!==m)&&this.setState(g)}this.runAnimation(jl(jl({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var s=this,a=i.from,o=i.to,l=i.duration,u=i.easing,d=i.begin,A=i.onAnimationEnd,f=i.onAnimationStart,h=blt(a,o,dlt(u),l,this.changeStyle),p=function(){s.stopJSAnimation=h()};this.manager.start([f,d,p,l,A])}},{key:"runStepAnimation",value:function(i){var s=this,a=i.steps,o=i.begin,l=i.onAnimationStart,u=a[0],d=u.style,A=u.duration,f=A===void 0?0:A,h=function(m,g,y){if(y===0)return m;var v=g.duration,x=g.easing,b=x===void 0?"ease":x,w=g.style,B=g.properties,k=g.onAnimationEnd,N=y>0?a[y-1]:g,j=B||Object.keys(w);if(typeof b=="function"||b==="spring")return[].concat(PI(m),[s.runJSAnimation.bind(s,{from:N.style,to:w,duration:v,easing:b}),v]);var L=Xq(j,v,b),T=jl(jl(jl({},N.style),w),{},{transition:L});return[].concat(PI(m),[T,v,k]).filter(Zot)};return this.manager.start([l].concat(PI(a.reduce(h,[d,Math.max(f,o)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Got());var s=i.begin,a=i.duration,o=i.attributeName,l=i.to,u=i.easing,d=i.onAnimationStart,A=i.onAnimationEnd,f=i.steps,h=i.children,p=this.manager;if(this.unSubscribe=p.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(i);return}if(f.length>1){this.runStepAnimation(i);return}var m=o?zx({},o,l):l,g=Xq(Object.keys(m),a,u);p.start([d,s,jl(jl({},m),{},{transition:g}),a,A])}},{key:"render",value:function(){var i=this.props,s=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var o=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=Slt(i,Clt),u=S.Children.count(s),d=this.state.style;if(typeof s=="function")return s(d);if(!o||u===0||a<=0)return s;var A=function(h){var p=h.props,m=p.style,g=m===void 0?{}:m,y=p.className,v=S.cloneElement(h,jl(jl({},l),{},{style:jl(jl({},g),d),className:y}));return v};return u===1?A(S.Children.only(s)):re.createElement("div",null,S.Children.map(s,function(f){return A(f)}))}}]),n}(S.PureComponent);gd.displayName="Animate";gd.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};gd.propTypes={from:On.oneOfType([On.object,On.string]),to:On.oneOfType([On.object,On.string]),attributeName:On.string,duration:On.number,begin:On.number,easing:On.oneOfType([On.string,On.func]),steps:On.arrayOf(On.shape({duration:On.number.isRequired,style:On.object.isRequired,easing:On.oneOfType([On.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),On.func]),properties:On.arrayOf("string"),onAnimationEnd:On.func})),children:On.oneOfType([On.node,On.func]),isActive:On.bool,canBegin:On.bool,onAnimationEnd:On.func,shouldReAnimate:On.bool,onAnimationStart:On.func,onAnimationReStart:On.func};function v1(e){"@babel/helpers - typeof";return v1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v1(e)}function TE(){return TE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TE.apply(this,arguments)}function Llt(e,t){return Qlt(e)||Dlt(e,t)||Ult(e,t)||Rlt()}function Rlt(){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 Ult(e,t){if(e){if(typeof e=="string")return rG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rG(e,t)}}function rG(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dlt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function Qlt(e){if(Array.isArray(e))return e}function iG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iG(Object(n),!0).forEach(function(r){Hlt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hlt(e,t,n){return t=$lt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $lt(e){var t=zlt(e,"string");return v1(t)=="symbol"?t:t+""}function zlt(e,t){if(v1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(v1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aG=function(t,n,r,i,s){var a=Math.min(Math.abs(r)/2,Math.abs(i)/2),o=i>=0?1:-1,l=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,d;if(a>0&&s instanceof Array){for(var A=[0,0,0,0],f=0,h=4;f<h;f++)A[f]=s[f]>a?a:s[f];d="M".concat(t,",").concat(n+o*A[0]),A[0]>0&&(d+="A ".concat(A[0],",").concat(A[0],",0,0,").concat(u,",").concat(t+l*A[0],",").concat(n)),d+="L ".concat(t+r-l*A[1],",").concat(n),A[1]>0&&(d+="A ".concat(A[1],",").concat(A[1],",0,0,").concat(u,`,
`).concat(t+r,",").concat(n+o*A[1])),d+="L ".concat(t+r,",").concat(n+i-o*A[2]),A[2]>0&&(d+="A ".concat(A[2],",").concat(A[2],",0,0,").concat(u,`,
`).concat(t+r-l*A[2],",").concat(n+i)),d+="L ".concat(t+l*A[3],",").concat(n+i),A[3]>0&&(d+="A ".concat(A[3],",").concat(A[3],",0,0,").concat(u,`,
`).concat(t,",").concat(n+i-o*A[3])),d+="Z"}else if(a>0&&s===+s&&s>0){var p=Math.min(a,s);d="M ".concat(t,",").concat(n+o*p,`
A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+l*p,",").concat(n,`
L `).concat(t+r-l*p,",").concat(n,`
A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+r,",").concat(n+o*p,`
L `).concat(t+r,",").concat(n+i-o*p,`
A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t+r-l*p,",").concat(n+i,`
L `).concat(t+l*p,",").concat(n+i,`
A `).concat(p,",").concat(p,",0,0,").concat(u,",").concat(t,",").concat(n+i-o*p," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return d},Vlt=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,s=n.x,a=n.y,o=n.width,l=n.height;if(Math.abs(o)>0&&Math.abs(l)>0){var u=Math.min(s,s+o),d=Math.max(s,s+o),A=Math.min(a,a+l),f=Math.max(a,a+l);return r>=u&&r<=d&&i>=A&&i<=f}return!1},Klt={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},HQ=function(t){var n=sG(sG({},Klt),t),r=S.useRef(),i=S.useState(-1),s=Llt(i,2),a=s[0],o=s[1];S.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var b=r.current.getTotalLength();b&&o(b)}catch{}},[]);var l=n.x,u=n.y,d=n.width,A=n.height,f=n.radius,h=n.className,p=n.animationEasing,m=n.animationDuration,g=n.animationBegin,y=n.isAnimationActive,v=n.isUpdateAnimationActive;if(l!==+l||u!==+u||d!==+d||A!==+A||d===0||A===0)return null;var x=Sn("recharts-rectangle",h);return v?re.createElement(gd,{canBegin:a>0,from:{width:d,height:A,x:l,y:u},to:{width:d,height:A,x:l,y:u},duration:m,animationEasing:p,isActive:v},function(b){var w=b.width,B=b.height,k=b.x,N=b.y;return re.createElement(gd,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,isActive:y,easing:p},re.createElement("path",TE({},yn(n,!0),{className:x,d:aG(k,N,w,B,f),ref:r})))}):re.createElement("path",TE({},yn(n,!0),{className:x,d:aG(l,u,d,A,f)}))};function VM(){return VM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VM.apply(this,arguments)}var $Q=function(t){var n=t.cx,r=t.cy,i=t.r,s=t.className,a=Sn("recharts-dot",s);return n===+n&&r===+r&&i===+i?re.createElement("circle",VM({},yn(t,!1),Yk(t),{className:a,cx:n,cy:r,r:i})):null};function x1(e){"@babel/helpers - typeof";return x1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x1(e)}var Wlt=["x","y","top","left","width","height","className"];function KM(){return KM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KM.apply(this,arguments)}function oG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qlt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oG(Object(n),!0).forEach(function(r){Glt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Glt(e,t,n){return t=Ylt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ylt(e){var t=Xlt(e,"string");return x1(t)=="symbol"?t:t+""}function Xlt(e,t){if(x1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(x1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jlt(e,t){if(e==null)return{};var n=Zlt(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zlt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ect=function(t,n,r,i,s,a){return"M".concat(t,",").concat(s,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},tct=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,a=t.top,o=a===void 0?0:a,l=t.left,u=l===void 0?0:l,d=t.width,A=d===void 0?0:d,f=t.height,h=f===void 0?0:f,p=t.className,m=Jlt(t,Wlt),g=qlt({x:r,y:s,top:o,left:u,width:A,height:h},m);return!Je(r)||!Je(s)||!Je(A)||!Je(h)||!Je(o)||!Je(u)?null:re.createElement("path",KM({},yn(g,!0),{className:Sn("recharts-cross",p),d:ect(r,s,A,h,o,u)}))},nct=ihe,rct=nct(Object.getPrototypeOf,Object),ict=rct,sct=Bd,act=ict,oct=_d,lct="[object Object]",cct=Function.prototype,uct=Object.prototype,zfe=cct.toString,dct=uct.hasOwnProperty,Act=zfe.call(Object);function hct(e){if(!oct(e)||sct(e)!=lct)return!1;var t=act(e);if(t===null)return!0;var n=dct.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&zfe.call(n)==Act}var fct=hct;const pct=Bn(fct);var mct=Bd,gct=_d,yct="[object Boolean]";function vct(e){return e===!0||e===!1||gct(e)&&mct(e)==yct}var xct=vct;const wct=Bn(xct);function w1(e){"@babel/helpers - typeof";return w1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w1(e)}function PE(){return PE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PE.apply(this,arguments)}function bct(e,t){return _ct(e)||Bct(e,t)||Sct(e,t)||Cct()}function Cct(){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 Sct(e,t){if(e){if(typeof e=="string")return lG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lG(e,t)}}function lG(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bct(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function _ct(e){if(Array.isArray(e))return e}function cG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cG(Object(n),!0).forEach(function(r){kct(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kct(e,t,n){return t=Ect(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ect(e){var t=Nct(e,"string");return w1(t)=="symbol"?t:t+""}function Nct(e,t){if(w1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(w1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dG=function(t,n,r,i,s){var a=r-i,o;return o="M ".concat(t,",").concat(n),o+="L ".concat(t+r,",").concat(n),o+="L ".concat(t+r-a/2,",").concat(n+s),o+="L ".concat(t+r-a/2-i,",").concat(n+s),o+="L ".concat(t,",").concat(n," Z"),o},jct={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Tct=function(t){var n=uG(uG({},jct),t),r=S.useRef(),i=S.useState(-1),s=bct(i,2),a=s[0],o=s[1];S.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var x=r.current.getTotalLength();x&&o(x)}catch{}},[]);var l=n.x,u=n.y,d=n.upperWidth,A=n.lowerWidth,f=n.height,h=n.className,p=n.animationEasing,m=n.animationDuration,g=n.animationBegin,y=n.isUpdateAnimationActive;if(l!==+l||u!==+u||d!==+d||A!==+A||f!==+f||d===0&&A===0||f===0)return null;var v=Sn("recharts-trapezoid",h);return y?re.createElement(gd,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:u},to:{upperWidth:d,lowerWidth:A,height:f,x:l,y:u},duration:m,animationEasing:p,isActive:y},function(x){var b=x.upperWidth,w=x.lowerWidth,B=x.height,k=x.x,N=x.y;return re.createElement(gd,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,easing:p},re.createElement("path",PE({},yn(n,!0),{className:v,d:dG(k,N,b,w,B),ref:r})))}):re.createElement("g",null,re.createElement("path",PE({},yn(n,!0),{className:v,d:dG(l,u,d,A,f)})))},Pct=["option","shapeType","propTransformer","activeClassName","isActive"];function b1(e){"@babel/helpers - typeof";return b1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b1(e)}function Ict(e,t){if(e==null)return{};var n=Oct(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Oct(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function AG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function IE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AG(Object(n),!0).forEach(function(r){Fct(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fct(e,t,n){return t=Mct(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mct(e){var t=Lct(e,"string");return b1(t)=="symbol"?t:t+""}function Lct(e,t){if(b1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(b1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rct(e,t){return IE(IE({},t),e)}function Uct(e,t){return e==="symbols"}function hG(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return re.createElement(HQ,n);case"trapezoid":return re.createElement(Tct,n);case"sector":return re.createElement(Ofe,n);case"symbols":if(Uct(t))return re.createElement(aQ,n);break;default:return null}}function Dct(e){return S.isValidElement(e)?e.props:e}function Qct(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Rct:r,s=e.activeClassName,a=s===void 0?"recharts-active-shape":s,o=e.isActive,l=Ict(e,Pct),u;if(S.isValidElement(t))u=S.cloneElement(t,IE(IE({},l),Dct(t)));else if(un(t))u=t(l);else if(pct(t)&&!wct(t)){var d=i(t,l);u=re.createElement(hG,{shapeType:n,elementProps:d})}else{var A=l;u=re.createElement(hG,{shapeType:n,elementProps:A})}return o?re.createElement(ui,{className:a},u):u}function dj(e,t){return t!=null&&"trapezoids"in e.props}function Aj(e,t){return t!=null&&"sectors"in e.props}function C1(e,t){return t!=null&&"points"in e.props}function Hct(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,s=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&s}function $ct(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function zct(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function Vct(e,t){var n;return dj(e,t)?n=Hct:Aj(e,t)?n=$ct:C1(e,t)&&(n=zct),n}function Kct(e,t){var n;return dj(e,t)?n="trapezoids":Aj(e,t)?n="sectors":C1(e,t)&&(n="points"),n}function Wct(e,t){if(dj(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(Aj(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return C1(e,t)?t.payload:{}}function qct(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=Kct(n,t),s=Wct(n,t),a=r.filter(function(l,u){var d=lj(s,l),A=n.props[i].filter(function(p){var m=Vct(n,t);return m(p,t)}),f=n.props[i].indexOf(A[A.length-1]),h=u===f;return d&&h}),o=r.indexOf(a[a.length-1]);return o}var Gct=Math.ceil,Yct=Math.max;function Xct(e,t,n,r){for(var i=-1,s=Yct(Gct((t-e)/(n||1)),0),a=Array(s);s--;)a[r?s:++i]=e,e+=n;return a}var Jct=Xct,Zct=Che,fG=1/0,eut=17976931348623157e292;function tut(e){if(!e)return e===0?e:0;if(e=Zct(e),e===fG||e===-fG){var t=e<0?-1:1;return t*eut}return e===e?e:0}var Vfe=tut,nut=Jct,rut=Z5,II=Vfe;function iut(e){return function(t,n,r){return r&&typeof r!="number"&&rut(t,n,r)&&(n=r=void 0),t=II(t),n===void 0?(n=t,t=0):n=II(n),r=r===void 0?t<n?1:-1:II(r),nut(t,n,r,e)}}var sut=iut,aut=sut,out=aut(),lut=out;const OE=Bn(lut);function S1(e){"@babel/helpers - typeof";return S1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S1(e)}function pG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pG(Object(n),!0).forEach(function(r){Kfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kfe(e,t,n){return t=cut(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cut(e){var t=uut(e,"string");return S1(t)=="symbol"?t:t+""}function uut(e,t){if(S1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(S1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dut=["Webkit","Moz","O","ms"],Aut=function(t,n){var r=t.replace(/(\w)/,function(s){return s.toUpperCase()}),i=dut.reduce(function(s,a){return mG(mG({},s),{},Kfe({},a+r,n))},{});return i[t]=n,i};function m0(e){"@babel/helpers - typeof";return m0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m0(e)}function FE(){return FE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FE.apply(this,arguments)}function gG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function OI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gG(Object(n),!0).forEach(function(r){so(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hut(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qfe(r.key),r)}}function fut(e,t,n){return t&&yG(e.prototype,t),n&&yG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function put(e,t,n){return t=ME(t),mut(e,Wfe()?Reflect.construct(t,n||[],ME(e).constructor):t.apply(e,n))}function mut(e,t){if(t&&(m0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gut(e)}function gut(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wfe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wfe=function(){return!!e})()}function ME(e){return ME=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ME(e)}function yut(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WM(e,t)}function WM(e,t){return WM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},WM(e,t)}function so(e,t,n){return t=qfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qfe(e){var t=vut(e,"string");return m0(t)=="symbol"?t:t+""}function vut(e,t){if(m0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(m0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xut=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,s=t.x,a=t.width,o=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,u=Pw().domain(OE(0,l)).range([s,s+a-o]),d=u.domain().map(function(A){return u(A)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(i),scale:u,scaleValues:d}},vG=function(t){return t.changedTouches&&!!t.changedTouches.length},g0=function(e){function t(n){var r;return hut(this,t),r=put(this,t,[n]),so(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),so(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),so(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,s=i.endIndex,a=i.onDragEnd,o=i.startIndex;a==null||a({endIndex:s,startIndex:o})}),r.detachDragEndListener()}),so(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),so(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),so(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),so(r,"handleSlideDragStart",function(i){var s=vG(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:s.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return yut(t,e),fut(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,s=r.endX,a=this.state.scaleValues,o=this.props,l=o.gap,u=o.data,d=u.length-1,A=Math.min(i,s),f=Math.max(i,s),h=t.getIndexInRange(a,A),p=t.getIndexInRange(a,f);return{startIndex:h-h%l,endIndex:p===d?d:p-p%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,s=i.data,a=i.tickFormatter,o=i.dataKey,l=Co(s[r],o,r);return un(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,s=i.slideMoveStartX,a=i.startX,o=i.endX,l=this.props,u=l.x,d=l.width,A=l.travellerWidth,f=l.startIndex,h=l.endIndex,p=l.onChange,m=r.pageX-s;m>0?m=Math.min(m,u+d-A-o,u+d-A-a):m<0&&(m=Math.max(m,u-a,u-o));var g=this.getIndex({startX:a+m,endX:o+m});(g.startIndex!==f||g.endIndex!==h)&&p&&p(g),this.setState({startX:a+m,endX:o+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var s=vG(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:s.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,s=i.brushMoveStartX,a=i.movingTravellerId,o=i.endX,l=i.startX,u=this.state[a],d=this.props,A=d.x,f=d.width,h=d.travellerWidth,p=d.onChange,m=d.gap,g=d.data,y={startX:this.state.startX,endX:this.state.endX},v=r.pageX-s;v>0?v=Math.min(v,A+f-h-u):v<0&&(v=Math.max(v,A-u)),y[a]=u+v;var x=this.getIndex(y),b=x.startIndex,w=x.endIndex,B=function(){var N=g.length-1;return a==="startX"&&(o>l?b%m===0:w%m===0)||o<l&&w===N||a==="endX"&&(o>l?w%m===0:b%m===0)||o>l&&w===N};this.setState(so(so({},a,u+v),"brushMoveStartX",r.pageX),function(){p&&B()&&p(x)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var s=this,a=this.state,o=a.scaleValues,l=a.startX,u=a.endX,d=this.state[i],A=o.indexOf(d);if(A!==-1){var f=A+r;if(!(f===-1||f>=o.length)){var h=o[f];i==="startX"&&h>=u||i==="endX"&&h<=l||this.setState(so({},i,h),function(){s.props.onChange(s.getIndex({startX:s.state.startX,endX:s.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,s=r.y,a=r.width,o=r.height,l=r.fill,u=r.stroke;return re.createElement("rect",{stroke:u,fill:l,x:i,y:s,width:a,height:o})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,s=r.y,a=r.width,o=r.height,l=r.data,u=r.children,d=r.padding,A=S.Children.only(u);return A?re.cloneElement(A,{x:i,y:s,width:a,height:o,margin:d,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var s,a,o=this,l=this.props,u=l.y,d=l.travellerWidth,A=l.height,f=l.traveller,h=l.ariaLabel,p=l.data,m=l.startIndex,g=l.endIndex,y=Math.max(r,this.props.x),v=OI(OI({},yn(this.props,!1)),{},{x:y,y:u,width:d,height:A}),x=h||"Min value: ".concat((s=p[m])===null||s===void 0?void 0:s.name,", Max value: ").concat((a=p[g])===null||a===void 0?void 0:a.name);return re.createElement(ui,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),o.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,v))}},{key:"renderSlide",value:function(r,i){var s=this.props,a=s.y,o=s.height,l=s.stroke,u=s.travellerWidth,d=Math.min(r,i)+u,A=Math.max(Math.abs(i-r)-u,0);return re.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:d,y:a,width:A,height:o})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,s=r.endIndex,a=r.y,o=r.height,l=r.travellerWidth,u=r.stroke,d=this.state,A=d.startX,f=d.endX,h=5,p={pointerEvents:"none",fill:u};return re.createElement(ui,{className:"recharts-brush-texts"},re.createElement(dE,FE({textAnchor:"end",verticalAnchor:"middle",x:Math.min(A,f)-h,y:a+o/2},p),this.getTextOfTick(i)),re.createElement(dE,FE({textAnchor:"start",verticalAnchor:"middle",x:Math.max(A,f)+l+h,y:a+o/2},p),this.getTextOfTick(s)))}},{key:"render",value:function(){var r=this.props,i=r.data,s=r.className,a=r.children,o=r.x,l=r.y,u=r.width,d=r.height,A=r.alwaysShowText,f=this.state,h=f.startX,p=f.endX,m=f.isTextActive,g=f.isSlideMoving,y=f.isTravellerMoving,v=f.isTravellerFocused;if(!i||!i.length||!Je(o)||!Je(l)||!Je(u)||!Je(d)||u<=0||d<=0)return null;var x=Sn("recharts-brush",s),b=re.Children.count(a)===1,w=Aut("userSelect","none");return re.createElement(ui,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),b&&this.renderPanorama(),this.renderSlide(h,p),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(p,"endX"),(m||g||y||v||A)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,s=r.y,a=r.width,o=r.height,l=r.stroke,u=Math.floor(s+o/2)-1;return re.createElement(re.Fragment,null,re.createElement("rect",{x:i,y:s,width:a,height:o,fill:l,stroke:"none"}),re.createElement("line",{x1:i+1,y1:u,x2:i+a-1,y2:u,fill:"none",stroke:"#fff"}),re.createElement("line",{x1:i+1,y1:u+2,x2:i+a-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var s;return re.isValidElement(r)?s=re.cloneElement(r,i):un(r)?s=r(i):s=t.renderDefaultTraveller(i),s}},{key:"getDerivedStateFromProps",value:function(r,i){var s=r.data,a=r.width,o=r.x,l=r.travellerWidth,u=r.updateId,d=r.startIndex,A=r.endIndex;if(s!==i.prevData||u!==i.prevUpdateId)return OI({prevData:s,prevTravellerWidth:l,prevUpdateId:u,prevX:o,prevWidth:a},s&&s.length?xut({data:s,width:a,x:o,travellerWidth:l,startIndex:d,endIndex:A}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||o!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([o,o+a-l]);var f=i.scale.domain().map(function(h){return i.scale(h)});return{prevData:s,prevTravellerWidth:l,prevUpdateId:u,prevX:o,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(r,i){for(var s=r.length,a=0,o=s-1;o-a>1;){var l=Math.floor((a+o)/2);r[l]>i?o=l:a=l}return i>=r[o]?o:a}}])}(S.PureComponent);so(g0,"displayName","Brush");so(g0,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var wut=hQ;function but(e,t){var n;return wut(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}var Cut=but,Sut=YAe,But=zh,_ut=Cut,kut=$a,Eut=Z5;function Nut(e,t,n){var r=kut(e)?Sut:_ut;return n&&Eut(e,t,n)&&(t=void 0),r(e,But(t))}var jut=Nut;const Tut=Bn(jut);var eu=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},xG=yhe;function Put(e,t,n){t=="__proto__"&&xG?xG(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Iut=Put,Out=Iut,Fut=mhe,Mut=zh;function Lut(e,t){var n={};return t=Mut(t),Fut(e,function(r,i,s){Out(n,i,t(r,i,s))}),n}var Rut=Lut;const Uut=Bn(Rut);function Dut(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var Qut=Dut,Hut=hQ;function $ut(e,t){var n=!0;return Hut(e,function(r,i,s){return n=!!t(r,i,s),n}),n}var zut=$ut,Vut=Qut,Kut=zut,Wut=zh,qut=$a,Gut=Z5;function Yut(e,t,n){var r=qut(e)?Vut:Kut;return n&&Gut(e,t,n)&&(t=void 0),r(e,Wut(t))}var Xut=Yut;const Gfe=Bn(Xut);var Jut=["x","y"];function B1(e){"@babel/helpers - typeof";return B1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B1(e)}function qM(){return qM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qM.apply(this,arguments)}function wG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wG(Object(n),!0).forEach(function(r){Zut(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zut(e,t,n){return t=edt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function edt(e){var t=tdt(e,"string");return B1(t)=="symbol"?t:t+""}function tdt(e,t){if(B1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(B1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ndt(e,t){if(e==null)return{};var n=rdt(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rdt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function idt(e,t){var n=e.x,r=e.y,i=ndt(e,Jut),s="".concat(n),a=parseInt(s,10),o="".concat(r),l=parseInt(o,10),u="".concat(t.height||i.height),d=parseInt(u,10),A="".concat(t.width||i.width),f=parseInt(A,10);return gx(gx(gx(gx(gx({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:d,width:f,name:t.name,radius:t.radius})}function bG(e){return re.createElement(Qct,qM({shapeType:"rectangle",propTransformer:idt,activeClassName:"recharts-active-bar"},e))}var sdt=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var s=typeof r=="number";return s?t(r,i):(s||Wp(),n)}},adt=["value","background"],Yfe;function y0(e){"@babel/helpers - typeof";return y0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y0(e)}function odt(e,t){if(e==null)return{};var n=ldt(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ldt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function LE(){return LE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LE.apply(this,arguments)}function CG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CG(Object(n),!0).forEach(function(r){UA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cdt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jfe(r.key),r)}}function udt(e,t,n){return t&&SG(e.prototype,t),n&&SG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ddt(e,t,n){return t=RE(t),Adt(e,Xfe()?Reflect.construct(t,n||[],RE(e).constructor):t.apply(e,n))}function Adt(e,t){if(t&&(y0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hdt(e)}function hdt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xfe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xfe=function(){return!!e})()}function RE(e){return RE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},RE(e)}function fdt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GM(e,t)}function GM(e,t){return GM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},GM(e,t)}function UA(e,t,n){return t=Jfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jfe(e){var t=pdt(e,"string");return y0(t)=="symbol"?t:t+""}function pdt(e,t){if(y0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(y0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lm=function(e){function t(){var n;cdt(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=ddt(this,t,[].concat(i)),UA(n,"state",{isAnimationFinished:!1}),UA(n,"id",x2("recharts-bar-")),UA(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),a&&a()}),UA(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),a&&a()}),n}return fdt(t,e),udt(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,s=this.props,a=s.shape,o=s.dataKey,l=s.activeIndex,u=s.activeBar,d=yn(this.props,!1);return r&&r.map(function(A,f){var h=f===l,p=h?u:a,m=mi(mi(mi({},d),A),{},{isActive:h,option:p,index:f,dataKey:o,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return re.createElement(ui,LE({className:"recharts-bar-rectangle"},Xk(i.props,A,f),{key:"rectangle-".concat(A==null?void 0:A.x,"-").concat(A==null?void 0:A.y,"-").concat(A==null?void 0:A.value)}),re.createElement(bG,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,s=i.data,a=i.layout,o=i.isAnimationActive,l=i.animationBegin,u=i.animationDuration,d=i.animationEasing,A=i.animationId,f=this.state.prevData;return re.createElement(gd,{begin:l,duration:u,isActive:o,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(A),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var p=h.t,m=s.map(function(g,y){var v=f&&f[y];if(v){var x=zl(v.x,g.x),b=zl(v.y,g.y),w=zl(v.width,g.width),B=zl(v.height,g.height);return mi(mi({},g),{},{x:x(p),y:b(p),width:w(p),height:B(p)})}if(a==="horizontal"){var k=zl(0,g.height),N=k(p);return mi(mi({},g),{},{y:g.y+g.height-N,height:N})}var j=zl(0,g.width),L=j(p);return mi(mi({},g),{},{width:L})});return re.createElement(ui,null,r.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,s=r.isAnimationActive,a=this.state.prevData;return s&&i&&i.length&&(!a||!lj(a,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,s=i.data,a=i.dataKey,o=i.activeIndex,l=yn(this.props.background,!1);return s.map(function(u,d){u.value;var A=u.background,f=odt(u,adt);if(!A)return null;var h=mi(mi(mi(mi(mi({},f),{},{fill:"#eee"},A),l),Xk(r.props,u,d)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:a,index:d,className:"recharts-bar-background-rectangle"});return re.createElement(bG,LE({key:"background-bar-".concat(d),option:r.props.background,isActive:d===o},h))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,a=s.data,o=s.xAxis,l=s.yAxis,u=s.layout,d=s.children,A=ul(d,_2);if(!A)return null;var f=u==="vertical"?a[0].height/2:a[0].width/2,h=function(g,y){var v=Array.isArray(g.value)?g.value[1]:g.value;return{x:g.x,y:g.y,value:v,errorVal:Co(g,y)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return re.createElement(ui,p,A.map(function(m){return re.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.props.dataKey),data:a,xAxis:o,yAxis:l,layout:u,offset:f,dataPointFormatter:h})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,s=r.data,a=r.className,o=r.xAxis,l=r.yAxis,u=r.left,d=r.top,A=r.width,f=r.height,h=r.isAnimationActive,p=r.background,m=r.id;if(i||!s||!s.length)return null;var g=this.state.isAnimationFinished,y=Sn("recharts-bar",a),v=o&&o.allowDataOverflow,x=l&&l.allowDataOverflow,b=v||x,w=fn(m)?this.id:m;return re.createElement(ui,{className:y},v||x?re.createElement("defs",null,re.createElement("clipPath",{id:"clipPath-".concat(w)},re.createElement("rect",{x:v?u:u-A/2,y:x?d:d-f/2,width:v?A:A*2,height:x?f:f*2}))):null,re.createElement(ui,{className:"recharts-bar-rectangles",clipPath:b?"url(#clipPath-".concat(w,")"):null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(b,w),(!h||g)&&lh.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(S.PureComponent);Yfe=lm;UA(lm,"displayName","Bar");UA(lm,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!nd.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});UA(lm,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,s=e.xAxis,a=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,A=e.displayedData,f=e.offset,h=_at(r,n);if(!h)return null;var p=t.layout,m=n.type.defaultProps,g=m!==void 0?mi(mi({},m),n.props):n.props,y=g.dataKey,v=g.children,x=g.minPointSize,b=p==="horizontal"?a:s,w=u?b.scale.domain():null,B=Oat({numericAxis:b}),k=ul(v,Bhe),N=A.map(function(j,L){var T,E,F,M,D,H;u?T=kat(u[d+L],w):(T=Co(j,y),Array.isArray(T)||(T=[B,T]));var q=sdt(x,Yfe.defaultProps.minPointSize)(T[1],L);if(p==="horizontal"){var $,z=[a.scale(T[0]),a.scale(T[1])],Q=z[0],ce=z[1];E=Tq({axis:s,ticks:o,bandSize:i,offset:h.offset,entry:j,index:L}),F=($=ce??Q)!==null&&$!==void 0?$:void 0,M=h.size;var R=Q-ce;if(D=Number.isNaN(R)?0:R,H={x:E,y:a.y,width:M,height:a.height},Math.abs(q)>0&&Math.abs(D)<Math.abs(q)){var O=Zl(D||q)*(Math.abs(q)-Math.abs(D));F-=O,D+=O}}else{var Y=[s.scale(T[0]),s.scale(T[1])],X=Y[0],K=Y[1];if(E=X,F=Tq({axis:a,ticks:l,bandSize:i,offset:h.offset,entry:j,index:L}),M=K-X,D=h.size,H={x:s.x,y:F,width:s.width,height:D},Math.abs(q)>0&&Math.abs(M)<Math.abs(q)){var Z=Zl(M||q)*(Math.abs(q)-Math.abs(M));M+=Z}}return mi(mi(mi({},j),{},{x:E,y:F,width:M,height:D,value:u?T:T[1],payload:j,background:H},k&&k[L]&&k[L].props),{},{tooltipPayload:[Tfe(n,j)],tooltipPosition:{x:E+M/2,y:F+D/2}})});return mi({data:N,layout:p},f)});function _1(e){"@babel/helpers - typeof";return _1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_1(e)}function mdt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Zfe(r.key),r)}}function gdt(e,t,n){return t&&BG(e.prototype,t),n&&BG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ql(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_G(Object(n),!0).forEach(function(r){hj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_G(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hj(e,t,n){return t=Zfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zfe(e){var t=ydt(e,"string");return _1(t)=="symbol"?t:t+""}function ydt(e,t){if(_1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(_1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var epe=function(t,n,r,i,s){var a=t.width,o=t.height,l=t.layout,u=t.children,d=Object.keys(n),A={left:r.left,leftMirror:r.left,right:a-r.right,rightMirror:a-r.right,top:r.top,topMirror:r.top,bottom:o-r.bottom,bottomMirror:o-r.bottom},f=!!lo(u,lm);return d.reduce(function(h,p){var m=n[p],g=m.orientation,y=m.domain,v=m.padding,x=v===void 0?{}:v,b=m.mirror,w=m.reversed,B="".concat(g).concat(b?"Mirror":""),k,N,j,L,T;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var E=y[1]-y[0],F=1/0,M=m.categoricalDomain.sort();if(M.forEach(function(Y,X){X>0&&(F=Math.min((Y||0)-(M[X-1]||0),F))}),Number.isFinite(F)){var D=F/E,H=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(k=D*H/2),m.padding==="no-gap"){var q=Vp(t.barCategoryGap,D*H),$=D*H/2;k=$-q-($-q)/H*q}}}i==="xAxis"?N=[r.left+(x.left||0)+(k||0),r.left+r.width-(x.right||0)-(k||0)]:i==="yAxis"?N=l==="horizontal"?[r.top+r.height-(x.bottom||0),r.top+(x.top||0)]:[r.top+(x.top||0)+(k||0),r.top+r.height-(x.bottom||0)-(k||0)]:N=m.range,w&&(N=[N[1],N[0]]);var z=Sat(m,s,f),Q=z.scale,ce=z.realScaleType;Q.domain(y).range(N),Bat(Q);var R=Iat(Q,Ql(Ql({},m),{},{realScaleType:ce}));i==="xAxis"?(T=g==="top"&&!b||g==="bottom"&&b,j=r.left,L=A[B]-T*m.height):i==="yAxis"&&(T=g==="left"&&!b||g==="right"&&b,j=A[B]-T*m.width,L=r.top);var O=Ql(Ql(Ql({},m),R),{},{realScaleType:ce,x:j,y:L,scale:Q,width:i==="xAxis"?r.width:m.width,height:i==="yAxis"?r.height:m.height});return O.bandSize=BE(O,R),!m.hide&&i==="xAxis"?A[B]+=(T?-1:1)*O.height:m.hide||(A[B]+=(T?-1:1)*O.width),Ql(Ql({},h),{},hj({},p,O))},{})},tpe=function(t,n){var r=t.x,i=t.y,s=n.x,a=n.y;return{x:Math.min(r,s),y:Math.min(i,a),width:Math.abs(s-r),height:Math.abs(a-i)}},vdt=function(t){var n=t.x1,r=t.y1,i=t.x2,s=t.y2;return tpe({x:n,y:r},{x:i,y:s})},npe=function(){function e(t){mdt(this,e),this.scale=t}return gdt(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,s=r.position;if(n!==void 0){if(s)switch(s){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(n)+o}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],s=r[r.length-1];return i<=s?n>=i&&n<=s:n>=s&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();hj(npe,"EPS",1e-4);var zQ=function(t){var n=Object.keys(t).reduce(function(r,i){return Ql(Ql({},r),{},hj({},i,npe.create(t[i])))},{});return Ql(Ql({},n),{},{apply:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=s.bandAware,o=s.position;return Uut(i,function(l,u){return n[u].apply(l,{bandAware:a,position:o})})},isInRange:function(i){return Gfe(i,function(s,a){return n[a].isInRange(s)})}})};function xdt(e){return(e%180+180)%180}var wdt=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=xdt(i),a=s*Math.PI/180,o=Math.atan(r/n),l=a>o&&a<Math.PI-o?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},bdt=zh,Cdt=w2,Sdt=X5;function Bdt(e){return function(t,n,r){var i=Object(t);if(!Cdt(t)){var s=bdt(n);t=Sdt(t),n=function(o){return s(i[o],o,i)}}var a=e(t,n,r);return a>-1?i[s?t[a]:a]:void 0}}var _dt=Bdt,kdt=Vfe;function Edt(e){var t=kdt(e),n=t%1;return t===t?n?t-n:t:0}var Ndt=Edt,jdt=uhe,Tdt=zh,Pdt=Ndt,Idt=Math.max;function Odt(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Pdt(n);return i<0&&(i=Idt(r+i,0)),jdt(e,Tdt(t),i)}var Fdt=Odt,Mdt=_dt,Ldt=Fdt,Rdt=Mdt(Ldt),Udt=Rdt;const Ddt=Bn(Udt);var Qdt=oVe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),VQ=S.createContext(void 0),KQ=S.createContext(void 0),rpe=S.createContext(void 0),ipe=S.createContext({}),spe=S.createContext(void 0),ape=S.createContext(0),ope=S.createContext(0),kG=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,s=n.offset,a=t.clipPathId,o=t.children,l=t.width,u=t.height,d=Qdt(s);return re.createElement(VQ.Provider,{value:r},re.createElement(KQ.Provider,{value:i},re.createElement(ipe.Provider,{value:s},re.createElement(rpe.Provider,{value:d},re.createElement(spe.Provider,{value:a},re.createElement(ape.Provider,{value:u},re.createElement(ope.Provider,{value:l},o)))))))},Hdt=function(){return S.useContext(spe)},lpe=function(t){var n=S.useContext(VQ);n==null&&Wp();var r=n[t];return r==null&&Wp(),r},$dt=function(){var t=S.useContext(VQ);return vA(t)},zdt=function(){var t=S.useContext(KQ),n=Ddt(t,function(r){return Gfe(r.domain,Number.isFinite)});return n||vA(t)},cpe=function(t){var n=S.useContext(KQ);n==null&&Wp();var r=n[t];return r==null&&Wp(),r},Vdt=function(){var t=S.useContext(rpe);return t},Kdt=function(){return S.useContext(ipe)},WQ=function(){return S.useContext(ope)},qQ=function(){return S.useContext(ape)};function v0(e){"@babel/helpers - typeof";return v0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v0(e)}function Wdt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qdt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dpe(r.key),r)}}function Gdt(e,t,n){return t&&qdt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ydt(e,t,n){return t=UE(t),Xdt(e,upe()?Reflect.construct(t,n||[],UE(e).constructor):t.apply(e,n))}function Xdt(e,t){if(t&&(v0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jdt(e)}function Jdt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function upe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(upe=function(){return!!e})()}function UE(e){return UE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},UE(e)}function Zdt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YM(e,t)}function YM(e,t){return YM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YM(e,t)}function EG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EG(Object(n),!0).forEach(function(r){GQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GQ(e,t,n){return t=dpe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dpe(e){var t=eAt(e,"string");return v0(t)=="symbol"?t:t+""}function eAt(e,t){if(v0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(v0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tAt(e,t){return sAt(e)||iAt(e,t)||rAt(e,t)||nAt()}function nAt(){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 rAt(e,t){if(e){if(typeof e=="string")return jG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jG(e,t)}}function jG(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iAt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function sAt(e){if(Array.isArray(e))return e}function XM(){return XM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XM.apply(this,arguments)}var aAt=function(t,n){var r;return re.isValidElement(t)?r=re.cloneElement(t,n):un(t)?r=t(n):r=re.createElement("line",XM({},n,{className:"recharts-reference-line-line"})),r},oAt=function(t,n,r,i,s,a,o,l,u){var d=s.x,A=s.y,f=s.width,h=s.height;if(r){var p=u.y,m=t.y.apply(p,{position:a});if(eu(u,"discard")&&!t.y.isInRange(m))return null;var g=[{x:d+f,y:m},{x:d,y:m}];return l==="left"?g.reverse():g}if(n){var y=u.x,v=t.x.apply(y,{position:a});if(eu(u,"discard")&&!t.x.isInRange(v))return null;var x=[{x:v,y:A+h},{x:v,y:A}];return o==="top"?x.reverse():x}if(i){var b=u.segment,w=b.map(function(B){return t.apply(B,{position:a})});return eu(u,"discard")&&Tut(w,function(B){return!t.isInRange(B)})?null:w}return null};function lAt(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,s=e.yAxisId,a=e.shape,o=e.className,l=e.alwaysShow,u=Hdt(),d=lpe(i),A=cpe(s),f=Vdt();if(!u||!f)return null;td(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=zQ({x:d.scale,y:A.scale}),p=Li(t),m=Li(n),g=r&&r.length===2,y=oAt(h,p,m,g,f,e.position,d.orientation,A.orientation,e);if(!y)return null;var v=tAt(y,2),x=v[0],b=x.x,w=x.y,B=v[1],k=B.x,N=B.y,j=eu(e,"hidden")?"url(#".concat(u,")"):void 0,L=NG(NG({clipPath:j},yn(e,!0)),{},{x1:b,y1:w,x2:k,y2:N});return re.createElement(ui,{className:Sn("recharts-reference-line",o)},aAt(a,L),Us.renderCallByParent(e,vdt({x1:b,y1:w,x2:k,y2:N})))}var YQ=function(e){function t(){return Wdt(this,t),Ydt(this,t,arguments)}return Zdt(t,e),Gdt(t,[{key:"render",value:function(){return re.createElement(lAt,this.props)}}])}(re.Component);GQ(YQ,"displayName","ReferenceLine");GQ(YQ,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function JM(){return JM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JM.apply(this,arguments)}function x0(e){"@babel/helpers - typeof";return x0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x0(e)}function TG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function PG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TG(Object(n),!0).forEach(function(r){fj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cAt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uAt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hpe(r.key),r)}}function dAt(e,t,n){return t&&uAt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AAt(e,t,n){return t=DE(t),hAt(e,Ape()?Reflect.construct(t,n||[],DE(e).constructor):t.apply(e,n))}function hAt(e,t){if(t&&(x0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fAt(e)}function fAt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ape(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ape=function(){return!!e})()}function DE(e){return DE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},DE(e)}function pAt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ZM(e,t)}function ZM(e,t){return ZM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ZM(e,t)}function fj(e,t,n){return t=hpe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hpe(e){var t=mAt(e,"string");return x0(t)=="symbol"?t:t+""}function mAt(e,t){if(x0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(x0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gAt=function(t){var n=t.x,r=t.y,i=t.xAxis,s=t.yAxis,a=zQ({x:i.scale,y:s.scale}),o=a.apply({x:n,y:r},{bandAware:!0});return eu(t,"discard")&&!a.isInRange(o)?null:o},pj=function(e){function t(){return cAt(this,t),AAt(this,t,arguments)}return pAt(t,e),dAt(t,[{key:"render",value:function(){var r=this.props,i=r.x,s=r.y,a=r.r,o=r.alwaysShow,l=r.clipPathId,u=Li(i),d=Li(s);if(td(o===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var A=gAt(this.props);if(!A)return null;var f=A.x,h=A.y,p=this.props,m=p.shape,g=p.className,y=eu(this.props,"hidden")?"url(#".concat(l,")"):void 0,v=PG(PG({clipPath:y},yn(this.props,!0)),{},{cx:f,cy:h});return re.createElement(ui,{className:Sn("recharts-reference-dot",g)},t.renderDot(m,v),Us.renderCallByParent(this.props,{x:f-a,y:h-a,width:2*a,height:2*a}))}}])}(re.Component);fj(pj,"displayName","ReferenceDot");fj(pj,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});fj(pj,"renderDot",function(e,t){var n;return re.isValidElement(e)?n=re.cloneElement(e,t):un(e)?n=e(t):n=re.createElement($Q,JM({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function eL(){return eL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eL.apply(this,arguments)}function w0(e){"@babel/helpers - typeof";return w0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w0(e)}function IG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function OG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IG(Object(n),!0).forEach(function(r){mj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yAt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vAt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ppe(r.key),r)}}function xAt(e,t,n){return t&&vAt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wAt(e,t,n){return t=QE(t),bAt(e,fpe()?Reflect.construct(t,n||[],QE(e).constructor):t.apply(e,n))}function bAt(e,t){if(t&&(w0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CAt(e)}function CAt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fpe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fpe=function(){return!!e})()}function QE(e){return QE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},QE(e)}function SAt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tL(e,t)}function tL(e,t){return tL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tL(e,t)}function mj(e,t,n){return t=ppe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ppe(e){var t=BAt(e,"string");return w0(t)=="symbol"?t:t+""}function BAt(e,t){if(w0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(w0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _At=function(t,n,r,i,s){var a=s.x1,o=s.x2,l=s.y1,u=s.y2,d=s.xAxis,A=s.yAxis;if(!d||!A)return null;var f=zQ({x:d.scale,y:A.scale}),h={x:t?f.x.apply(a,{position:"start"}):f.x.rangeMin,y:r?f.y.apply(l,{position:"start"}):f.y.rangeMin},p={x:n?f.x.apply(o,{position:"end"}):f.x.rangeMax,y:i?f.y.apply(u,{position:"end"}):f.y.rangeMax};return eu(s,"discard")&&(!f.isInRange(h)||!f.isInRange(p))?null:tpe(h,p)},gj=function(e){function t(){return yAt(this,t),wAt(this,t,arguments)}return SAt(t,e),xAt(t,[{key:"render",value:function(){var r=this.props,i=r.x1,s=r.x2,a=r.y1,o=r.y2,l=r.className,u=r.alwaysShow,d=r.clipPathId;td(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var A=Li(i),f=Li(s),h=Li(a),p=Li(o),m=this.props.shape;if(!A&&!f&&!h&&!p&&!m)return null;var g=_At(A,f,h,p,this.props);if(!g&&!m)return null;var y=eu(this.props,"hidden")?"url(#".concat(d,")"):void 0;return re.createElement(ui,{className:Sn("recharts-reference-area",l)},t.renderRect(m,OG(OG({clipPath:y},yn(this.props,!0)),g)),Us.renderCallByParent(this.props,g))}}])}(re.Component);mj(gj,"displayName","ReferenceArea");mj(gj,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});mj(gj,"renderRect",function(e,t){var n;return re.isValidElement(e)?n=re.cloneElement(e,t):un(e)?n=e(t):n=re.createElement(HQ,eL({},t,{className:"recharts-reference-area-rect"})),n});function mpe(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function kAt(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return wdt(r,n)}function EAt(e,t,n){var r=n==="width",i=e.x,s=e.y,a=e.width,o=e.height;return t===1?{start:r?i:s,end:r?i+a:s+o}:{start:r?i+a:s+o,end:r?i:s}}function HE(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var s=n();return e*(t-e*s/2-r)>=0&&e*(t+e*s/2-i)<=0}function NAt(e,t){return mpe(e,t+1)}function jAt(e,t,n,r,i){for(var s=(r||[]).slice(),a=t.start,o=t.end,l=0,u=1,d=a,A=function(){var p=r==null?void 0:r[l];if(p===void 0)return{v:mpe(r,u)};var m=l,g,y=function(){return g===void 0&&(g=n(p,m)),g},v=p.coordinate,x=l===0||HE(e,v,y,d,o);x||(l=0,d=a,u+=1),x&&(d=v+e*(y()/2+i),l+=u)},f;u<=s.length;)if(f=A(),f)return f.v;return[]}function k1(e){"@babel/helpers - typeof";return k1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k1(e)}function FG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ms(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FG(Object(n),!0).forEach(function(r){TAt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TAt(e,t,n){return t=PAt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PAt(e){var t=IAt(e,"string");return k1(t)=="symbol"?t:t+""}function IAt(e,t){if(k1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(k1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OAt(e,t,n,r,i){for(var s=(r||[]).slice(),a=s.length,o=t.start,l=t.end,u=function(f){var h=s[f],p,m=function(){return p===void 0&&(p=n(h,f)),p};if(f===a-1){var g=e*(h.coordinate+e*m()/2-l);s[f]=h=Ms(Ms({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate})}else s[f]=h=Ms(Ms({},h),{},{tickCoord:h.coordinate});var y=HE(e,h.tickCoord,m,o,l);y&&(l=h.tickCoord-e*(m()/2+i),s[f]=Ms(Ms({},h),{},{isShow:!0}))},d=a-1;d>=0;d--)u(d);return s}function FAt(e,t,n,r,i,s){var a=(r||[]).slice(),o=a.length,l=t.start,u=t.end;if(s){var d=r[o-1],A=n(d,o-1),f=e*(d.coordinate+e*A/2-u);a[o-1]=d=Ms(Ms({},d),{},{tickCoord:f>0?d.coordinate-f*e:d.coordinate});var h=HE(e,d.tickCoord,function(){return A},l,u);h&&(u=d.tickCoord-e*(A/2+i),a[o-1]=Ms(Ms({},d),{},{isShow:!0}))}for(var p=s?o-1:o,m=function(v){var x=a[v],b,w=function(){return b===void 0&&(b=n(x,v)),b};if(v===0){var B=e*(x.coordinate-e*w()/2-l);a[v]=x=Ms(Ms({},x),{},{tickCoord:B<0?x.coordinate-B*e:x.coordinate})}else a[v]=x=Ms(Ms({},x),{},{tickCoord:x.coordinate});var k=HE(e,x.tickCoord,w,l,u);k&&(l=x.tickCoord+e*(w()/2+i),a[v]=Ms(Ms({},x),{},{isShow:!0}))},g=0;g<p;g++)m(g);return a}function XQ(e,t,n){var r=e.tick,i=e.ticks,s=e.viewBox,a=e.minTickGap,o=e.orientation,l=e.interval,u=e.tickFormatter,d=e.unit,A=e.angle;if(!i||!i.length||!r)return[];if(Je(l)||nd.isSsr)return NAt(i,typeof l=="number"&&Je(l)?l:0);var f=[],h=o==="top"||o==="bottom"?"width":"height",p=d&&h==="width"?Tw(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=function(x,b){var w=un(u)?u(x.value,b):x.value;return h==="width"?kAt(Tw(w,{fontSize:t,letterSpacing:n}),p,A):Tw(w,{fontSize:t,letterSpacing:n})[h]},g=i.length>=2?Zl(i[1].coordinate-i[0].coordinate):1,y=EAt(s,g,h);return l==="equidistantPreserveStart"?jAt(g,y,m,i,a):(l==="preserveStart"||l==="preserveStartEnd"?f=FAt(g,y,m,i,a,l==="preserveStartEnd"):f=OAt(g,y,m,i,a),f.filter(function(v){return v.isShow}))}var MAt=["viewBox"],LAt=["viewBox"],RAt=["ticks"];function b0(e){"@babel/helpers - typeof";return b0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b0(e)}function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hg.apply(this,arguments)}function MG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Js(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MG(Object(n),!0).forEach(function(r){JQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FI(e,t){if(e==null)return{};var n=UAt(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UAt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function DAt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ype(r.key),r)}}function QAt(e,t,n){return t&&LG(e.prototype,t),n&&LG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function HAt(e,t,n){return t=$E(t),$At(e,gpe()?Reflect.construct(t,n||[],$E(e).constructor):t.apply(e,n))}function $At(e,t){if(t&&(b0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zAt(e)}function zAt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gpe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gpe=function(){return!!e})()}function $E(e){return $E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$E(e)}function VAt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nL(e,t)}function nL(e,t){return nL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},nL(e,t)}function JQ(e,t,n){return t=ype(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ype(e){var t=KAt(e,"string");return b0(t)=="symbol"?t:t+""}function KAt(e,t){if(b0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(b0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uv=function(e){function t(n){var r;return DAt(this,t),r=HAt(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return VAt(t,e),QAt(t,[{key:"shouldComponentUpdate",value:function(r,i){var s=r.viewBox,a=FI(r,MAt),o=this.props,l=o.viewBox,u=FI(o,LAt);return!fy(s,l)||!fy(a,u)||!fy(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,s=i.x,a=i.y,o=i.width,l=i.height,u=i.orientation,d=i.tickSize,A=i.mirror,f=i.tickMargin,h,p,m,g,y,v,x=A?-1:1,b=r.tickSize||d,w=Je(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":h=p=r.coordinate,g=a+ +!A*l,m=g-x*b,v=m-x*f,y=w;break;case"left":m=g=r.coordinate,p=s+ +!A*o,h=p-x*b,y=h-x*f,v=w;break;case"right":m=g=r.coordinate,p=s+ +A*o,h=p+x*b,y=h+x*f,v=w;break;default:h=p=r.coordinate,g=a+ +A*l,m=g+x*b,v=m+x*f,y=w;break}return{line:{x1:h,y1:m,x2:p,y2:g},tick:{x:y,y:v}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,a;switch(i){case"left":a=s?"start":"end";break;case"right":a=s?"end":"start";break;default:a="middle";break}return a}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,a="end";switch(i){case"left":case"right":a="middle";break;case"top":a=s?"start":"end";break;default:a=s?"end":"start";break}return a}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,s=r.y,a=r.width,o=r.height,l=r.orientation,u=r.mirror,d=r.axisLine,A=Js(Js(Js({},yn(this.props,!1)),yn(d,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var f=+(l==="top"&&!u||l==="bottom"&&u);A=Js(Js({},A),{},{x1:i,y1:s+f*o,x2:i+a,y2:s+f*o})}else{var h=+(l==="left"&&!u||l==="right"&&u);A=Js(Js({},A),{},{x1:i+h*a,y1:s,x2:i+h*a,y2:s+o})}return re.createElement("line",Hg({},A,{className:Sn("recharts-cartesian-axis-line",cl(d,"className"))}))}},{key:"renderTicks",value:function(r,i,s){var a=this,o=this.props,l=o.tickLine,u=o.stroke,d=o.tick,A=o.tickFormatter,f=o.unit,h=XQ(Js(Js({},this.props),{},{ticks:r}),i,s),p=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),g=yn(this.props,!1),y=yn(d,!1),v=Js(Js({},g),{},{fill:"none"},yn(l,!1)),x=h.map(function(b,w){var B=a.getTickLineCoord(b),k=B.line,N=B.tick,j=Js(Js(Js(Js({textAnchor:p,verticalAnchor:m},g),{},{stroke:"none",fill:u},y),N),{},{index:w,payload:b,visibleTicksCount:h.length,tickFormatter:A});return re.createElement(ui,Hg({className:"recharts-cartesian-axis-tick",key:"tick-".concat(b.value,"-").concat(b.coordinate,"-").concat(b.tickCoord)},Xk(a.props,b,w)),l&&re.createElement("line",Hg({},v,k,{className:Sn("recharts-cartesian-axis-tick-line",cl(l,"className"))})),d&&t.renderTickItem(d,j,"".concat(un(A)?A(b.value,w):b.value).concat(f||"")))});return re.createElement("g",{className:"recharts-cartesian-axis-ticks"},x)}},{key:"render",value:function(){var r=this,i=this.props,s=i.axisLine,a=i.width,o=i.height,l=i.ticksGenerator,u=i.className,d=i.hide;if(d)return null;var A=this.props,f=A.ticks,h=FI(A,RAt),p=f;return un(l)&&(p=f&&f.length>0?l(this.props):l(h)),a<=0||o<=0||!p||!p.length?null:re.createElement(ui,{className:Sn("recharts-cartesian-axis",u),ref:function(g){r.layerReference=g}},s&&this.renderAxisLine(),this.renderTicks(p,this.state.fontSize,this.state.letterSpacing),Us.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,s){var a;return re.isValidElement(r)?a=re.cloneElement(r,i):un(r)?a=r(i):a=re.createElement(dE,Hg({},i,{className:"recharts-cartesian-axis-tick-value"}),s),a}}])}(S.Component);JQ(uv,"displayName","CartesianAxis");JQ(uv,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var WAt=["x1","y1","x2","y2","key"],qAt=["offset"];function qp(e){"@babel/helpers - typeof";return qp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qp(e)}function RG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ds(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RG(Object(n),!0).forEach(function(r){GAt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GAt(e,t,n){return t=YAt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YAt(e){var t=XAt(e,"string");return qp(t)=="symbol"?t:t+""}function XAt(e,t){if(qp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(qp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qf(){return qf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qf.apply(this,arguments)}function UG(e,t){if(e==null)return{};var n=JAt(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JAt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ZAt=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,s=t.y,a=t.width,o=t.height,l=t.ry;return re.createElement("rect",{x:i,y:s,ry:l,width:a,height:o,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function vpe(e,t){var n;if(re.isValidElement(e))n=re.cloneElement(e,t);else if(un(e))n=e(t);else{var r=t.x1,i=t.y1,s=t.x2,a=t.y2,o=t.key,l=UG(t,WAt),u=yn(l,!1);u.offset;var d=UG(u,qAt);n=re.createElement("line",qf({},d,{x1:r,y1:i,x2:s,y2:a,fill:"none",key:o}))}return n}function eht(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,s=e.horizontalPoints;if(!i||!s||!s.length)return null;var a=s.map(function(o,l){var u=Ds(Ds({},e),{},{x1:t,y1:o,x2:t+n,y2:o,key:"line-".concat(l),index:l});return vpe(i,u)});return re.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function tht(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,s=e.verticalPoints;if(!i||!s||!s.length)return null;var a=s.map(function(o,l){var u=Ds(Ds({},e),{},{x1:o,y1:t,x2:o,y2:t+n,key:"line-".concat(l),index:l});return vpe(i,u)});return re.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function nht(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,s=e.width,a=e.height,o=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var d=o.map(function(f){return Math.round(f+i-i)}).sort(function(f,h){return f-h});i!==d[0]&&d.unshift(0);var A=d.map(function(f,h){var p=!d[h+1],m=p?i+a-f:d[h+1]-f;if(m<=0)return null;var g=h%t.length;return re.createElement("rect",{key:"react-".concat(h),y:f,x:r,height:m,width:s,stroke:"none",fill:t[g],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return re.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},A)}function rht(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,s=e.x,a=e.y,o=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var d=u.map(function(f){return Math.round(f+s-s)}).sort(function(f,h){return f-h});s!==d[0]&&d.unshift(0);var A=d.map(function(f,h){var p=!d[h+1],m=p?s+o-f:d[h+1]-f;if(m<=0)return null;var g=h%r.length;return re.createElement("rect",{key:"react-".concat(h),x:f,y:a,width:m,height:l,stroke:"none",fill:r[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return re.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},A)}var iht=function(t,n){var r=t.xAxis,i=t.width,s=t.height,a=t.offset;return Nfe(XQ(Ds(Ds(Ds({},uv.defaultProps),r),{},{ticks:Yu(r,!0),viewBox:{x:0,y:0,width:i,height:s}})),a.left,a.left+a.width,n)},sht=function(t,n){var r=t.yAxis,i=t.width,s=t.height,a=t.offset;return Nfe(XQ(Ds(Ds(Ds({},uv.defaultProps),r),{},{ticks:Yu(r,!0),viewBox:{x:0,y:0,width:i,height:s}})),a.top,a.top+a.height,n)},Zm={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function yj(e){var t,n,r,i,s,a,o=WQ(),l=qQ(),u=Kdt(),d=Ds(Ds({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Zm.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Zm.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Zm.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Zm.horizontalFill,vertical:(s=e.vertical)!==null&&s!==void 0?s:Zm.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Zm.verticalFill,x:Je(e.x)?e.x:u.left,y:Je(e.y)?e.y:u.top,width:Je(e.width)?e.width:u.width,height:Je(e.height)?e.height:u.height}),A=d.x,f=d.y,h=d.width,p=d.height,m=d.syncWithTicks,g=d.horizontalValues,y=d.verticalValues,v=$dt(),x=zdt();if(!Je(h)||h<=0||!Je(p)||p<=0||!Je(A)||A!==+A||!Je(f)||f!==+f)return null;var b=d.verticalCoordinatesGenerator||iht,w=d.horizontalCoordinatesGenerator||sht,B=d.horizontalPoints,k=d.verticalPoints;if((!B||!B.length)&&un(w)){var N=g&&g.length,j=w({yAxis:x?Ds(Ds({},x),{},{ticks:N?g:x.ticks}):void 0,width:o,height:l,offset:u},N?!0:m);td(Array.isArray(j),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(qp(j),"]")),Array.isArray(j)&&(B=j)}if((!k||!k.length)&&un(b)){var L=y&&y.length,T=b({xAxis:v?Ds(Ds({},v),{},{ticks:L?y:v.ticks}):void 0,width:o,height:l,offset:u},L?!0:m);td(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(qp(T),"]")),Array.isArray(T)&&(k=T)}return re.createElement("g",{className:"recharts-cartesian-grid"},re.createElement(ZAt,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),re.createElement(eht,qf({},d,{offset:u,horizontalPoints:B,xAxis:v,yAxis:x})),re.createElement(tht,qf({},d,{offset:u,verticalPoints:k,xAxis:v,yAxis:x})),re.createElement(nht,qf({},d,{horizontalPoints:B})),re.createElement(rht,qf({},d,{verticalPoints:k})))}yj.displayName="CartesianGrid";var aht=["type","layout","connectNulls","ref"],oht=["key"];function C0(e){"@babel/helpers - typeof";return C0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C0(e)}function DG(e,t){if(e==null)return{};var n=lht(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lht(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Fw(){return Fw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fw.apply(this,arguments)}function QG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function no(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QG(Object(n),!0).forEach(function(r){Hl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eg(e){return Aht(e)||dht(e)||uht(e)||cht()}function cht(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uht(e,t){if(e){if(typeof e=="string")return rL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rL(e,t)}}function dht(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Aht(e){if(Array.isArray(e))return rL(e)}function rL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wpe(r.key),r)}}function fht(e,t,n){return t&&HG(e.prototype,t),n&&HG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pht(e,t,n){return t=zE(t),mht(e,xpe()?Reflect.construct(t,n||[],zE(e).constructor):t.apply(e,n))}function mht(e,t){if(t&&(C0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ght(e)}function ght(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xpe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xpe=function(){return!!e})()}function zE(e){return zE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zE(e)}function yht(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iL(e,t)}function iL(e,t){return iL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},iL(e,t)}function Hl(e,t,n){return t=wpe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wpe(e){var t=vht(e,"string");return C0(t)=="symbol"?t:t+""}function vht(e,t){if(C0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(C0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dv=function(e){function t(){var n;hht(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=pht(this,t,[].concat(i)),Hl(n,"state",{isAnimationFinished:!0,totalLength:0}),Hl(n,"generateSimpleStrokeDasharray",function(a,o){return"".concat(o,"px ").concat(a-o,"px")}),Hl(n,"getStrokeDasharray",function(a,o,l){var u=l.reduce(function(y,v){return y+v});if(!u)return n.generateSimpleStrokeDasharray(o,a);for(var d=Math.floor(a/u),A=a%u,f=o-a,h=[],p=0,m=0;p<l.length;m+=l[p],++p)if(m+l[p]>A){h=[].concat(eg(l.slice(0,p)),[A-m]);break}var g=h.length%2===0?[0,f]:[f];return[].concat(eg(t.repeat(l,d)),eg(h),g).map(function(y){return"".concat(y,"px")}).join(", ")}),Hl(n,"id",x2("recharts-line-")),Hl(n,"pathRef",function(a){n.mainCurve=a}),Hl(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Hl(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return yht(t,e),fht(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,a=s.points,o=s.xAxis,l=s.yAxis,u=s.layout,d=s.children,A=ul(d,_2);if(!A)return null;var f=function(m,g){return{x:m.x,y:m.y,value:m.value,errorVal:Co(m.payload,g)}},h={clipPath:r?"url(#clipPath-".concat(i,")"):null};return re.createElement(ui,h,A.map(function(p){return re.cloneElement(p,{key:"bar-".concat(p.props.dataKey),data:a,xAxis:o,yAxis:l,layout:u,dataPointFormatter:f})}))}},{key:"renderDots",value:function(r,i,s){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.dot,u=o.points,d=o.dataKey,A=yn(this.props,!1),f=yn(l,!0),h=u.map(function(m,g){var y=no(no(no({key:"dot-".concat(g),r:3},A),f),{},{value:m.value,dataKey:d,cx:m.x,cy:m.y,index:g,payload:m.payload});return t.renderDotItem(l,y)}),p={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(s,")"):null};return re.createElement(ui,Fw({className:"recharts-line-dots",key:"dots"},p),h)}},{key:"renderCurveStatically",value:function(r,i,s,a){var o=this.props,l=o.type,u=o.layout,d=o.connectNulls;o.ref;var A=DG(o,aht),f=no(no(no({},yn(A,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(s,")"):null,points:r},a),{},{type:l,layout:u,connectNulls:d});return re.createElement(FM,Fw({},f,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var s=this,a=this.props,o=a.points,l=a.strokeDasharray,u=a.isAnimationActive,d=a.animationBegin,A=a.animationDuration,f=a.animationEasing,h=a.animationId,p=a.animateNewValues,m=a.width,g=a.height,y=this.state,v=y.prevPoints,x=y.totalLength;return re.createElement(gd,{begin:d,duration:A,isActive:u,easing:f,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var w=b.t;if(v){var B=v.length/o.length,k=o.map(function(E,F){var M=Math.floor(F*B);if(v[M]){var D=v[M],H=zl(D.x,E.x),q=zl(D.y,E.y);return no(no({},E),{},{x:H(w),y:q(w)})}if(p){var $=zl(m*2,E.x),z=zl(g/2,E.y);return no(no({},E),{},{x:$(w),y:z(w)})}return no(no({},E),{},{x:E.x,y:E.y})});return s.renderCurveStatically(k,r,i)}var N=zl(0,x),j=N(w),L;if(l){var T="".concat(l).split(/[,\s]+/gim).map(function(E){return parseFloat(E)});L=s.getStrokeDasharray(j,x,T)}else L=s.generateSimpleStrokeDasharray(x,j);return s.renderCurveStatically(o,r,i,{strokeDasharray:L})})}},{key:"renderCurve",value:function(r,i){var s=this.props,a=s.points,o=s.isAnimationActive,l=this.state,u=l.prevPoints,d=l.totalLength;return o&&a&&a.length&&(!u&&d>0||!lj(u,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,s=i.hide,a=i.dot,o=i.points,l=i.className,u=i.xAxis,d=i.yAxis,A=i.top,f=i.left,h=i.width,p=i.height,m=i.isAnimationActive,g=i.id;if(s||!o||!o.length)return null;var y=this.state.isAnimationFinished,v=o.length===1,x=Sn("recharts-line",l),b=u&&u.allowDataOverflow,w=d&&d.allowDataOverflow,B=b||w,k=fn(g)?this.id:g,N=(r=yn(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},j=N.r,L=j===void 0?3:j,T=N.strokeWidth,E=T===void 0?2:T,F=h9e(a)?a:{},M=F.clipDot,D=M===void 0?!0:M,H=L*2+E;return re.createElement(ui,{className:x},b||w?re.createElement("defs",null,re.createElement("clipPath",{id:"clipPath-".concat(k)},re.createElement("rect",{x:b?f:f-h/2,y:w?A:A-p/2,width:b?h:h*2,height:w?p:p*2})),!D&&re.createElement("clipPath",{id:"clipPath-dots-".concat(k)},re.createElement("rect",{x:f-H/2,y:A-H/2,width:h+H,height:p+H}))):null,!v&&this.renderCurve(B,k),this.renderErrorBar(B,k),(v||a)&&this.renderDots(B,D,k),(!m||y)&&lh.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var s=r.length%2!==0?[].concat(eg(r),[0]):r,a=[],o=0;o<i;++o)a=[].concat(eg(a),eg(s));return a}},{key:"renderDotItem",value:function(r,i){var s;if(re.isValidElement(r))s=re.cloneElement(r,i);else if(un(r))s=r(i);else{var a=i.key,o=DG(i,oht),l=Sn("recharts-line-dot",typeof r!="boolean"?r.className:"");s=re.createElement($Q,Fw({key:a},o,{className:l}))}return s}}])}(S.PureComponent);Hl(dv,"displayName","Line");Hl(dv,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!nd.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Hl(dv,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,a=e.dataKey,o=e.bandSize,l=e.displayedData,u=e.offset,d=t.layout,A=l.map(function(f,h){var p=Co(f,a);return d==="horizontal"?{x:jq({axis:n,ticks:i,bandSize:o,entry:f,index:h}),y:fn(p)?null:r.scale(p),value:p,payload:f}:{x:fn(p)?null:n.scale(p),y:jq({axis:r,ticks:s,bandSize:o,entry:f,index:h}),value:p,payload:f}});return no({points:A,layout:d},u)});function S0(e){"@babel/helpers - typeof";return S0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S0(e)}function xht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Spe(r.key),r)}}function bht(e,t,n){return t&&wht(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cht(e,t,n){return t=VE(t),Sht(e,bpe()?Reflect.construct(t,n||[],VE(e).constructor):t.apply(e,n))}function Sht(e,t){if(t&&(S0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bht(e)}function Bht(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bpe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bpe=function(){return!!e})()}function VE(e){return VE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},VE(e)}function _ht(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sL(e,t)}function sL(e,t){return sL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sL(e,t)}function Cpe(e,t,n){return t=Spe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Spe(e){var t=kht(e,"string");return S0(t)=="symbol"?t:t+""}function kht(e,t){if(S0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(S0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aL(){return aL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aL.apply(this,arguments)}function Eht(e){var t=e.xAxisId,n=WQ(),r=qQ(),i=lpe(t);return i==null?null:re.createElement(uv,aL({},i,{className:Sn("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(a){return Yu(a,!0)}}))}var cm=function(e){function t(){return xht(this,t),Cht(this,t,arguments)}return _ht(t,e),bht(t,[{key:"render",value:function(){return re.createElement(Eht,this.props)}}])}(re.Component);Cpe(cm,"displayName","XAxis");Cpe(cm,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function B0(e){"@babel/helpers - typeof";return B0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B0(e)}function Nht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kpe(r.key),r)}}function Tht(e,t,n){return t&&jht(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pht(e,t,n){return t=KE(t),Iht(e,Bpe()?Reflect.construct(t,n||[],KE(e).constructor):t.apply(e,n))}function Iht(e,t){if(t&&(B0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oht(e)}function Oht(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bpe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bpe=function(){return!!e})()}function KE(e){return KE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},KE(e)}function Fht(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oL(e,t)}function oL(e,t){return oL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},oL(e,t)}function _pe(e,t,n){return t=kpe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kpe(e){var t=Mht(e,"string");return B0(t)=="symbol"?t:t+""}function Mht(e,t){if(B0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(B0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lL(){return lL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lL.apply(this,arguments)}var Lht=function(t){var n=t.yAxisId,r=WQ(),i=qQ(),s=cpe(n);return s==null?null:re.createElement(uv,lL({},s,{className:Sn("recharts-".concat(s.axisType," ").concat(s.axisType),s.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(o){return Yu(o,!0)}}))},um=function(e){function t(){return Nht(this,t),Pht(this,t,arguments)}return Fht(t,e),Tht(t,[{key:"render",value:function(){return re.createElement(Lht,this.props)}}])}(re.Component);_pe(um,"displayName","YAxis");_pe(um,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function $G(e){return Qht(e)||Dht(e)||Uht(e)||Rht()}function Rht(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uht(e,t){if(e){if(typeof e=="string")return cL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cL(e,t)}}function Dht(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qht(e){if(Array.isArray(e))return cL(e)}function cL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var uL=function(t,n,r,i,s){var a=ul(t,YQ),o=ul(t,pj),l=[].concat($G(a),$G(o)),u=ul(t,gj),d="".concat(i,"Id"),A=i[0],f=n;if(l.length&&(f=l.reduce(function(m,g){if(g.props[d]===r&&eu(g.props,"extendDomain")&&Je(g.props[A])){var y=g.props[A];return[Math.min(m[0],y),Math.max(m[1],y)]}return m},f)),u.length){var h="".concat(A,"1"),p="".concat(A,"2");f=u.reduce(function(m,g){if(g.props[d]===r&&eu(g.props,"extendDomain")&&Je(g.props[h])&&Je(g.props[p])){var y=g.props[h],v=g.props[p];return[Math.min(m[0],y,v),Math.max(m[1],y,v)]}return m},f)}return s&&s.length&&(f=s.reduce(function(m,g){return Je(g)?[Math.min(m[0],g),Math.max(m[1],g)]:m},f)),f},Epe={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,u,d){this.fn=l,this.context=u,this.once=d||!1}function s(l,u,d,A,f){if(typeof d!="function")throw new TypeError("The listener must be a function");var h=new i(d,A||l,f),p=n?n+u:u;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],h]:l._events[p].push(h):(l._events[p]=h,l._eventsCount++),l}function a(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],d,A;if(this._eventsCount===0)return u;for(A in d=this._events)t.call(d,A)&&u.push(n?A.slice(1):A);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},o.prototype.listeners=function(u){var d=n?n+u:u,A=this._events[d];if(!A)return[];if(A.fn)return[A.fn];for(var f=0,h=A.length,p=new Array(h);f<h;f++)p[f]=A[f].fn;return p},o.prototype.listenerCount=function(u){var d=n?n+u:u,A=this._events[d];return A?A.fn?1:A.length:0},o.prototype.emit=function(u,d,A,f,h,p){var m=n?n+u:u;if(!this._events[m])return!1;var g=this._events[m],y=arguments.length,v,x;if(g.fn){switch(g.once&&this.removeListener(u,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,d),!0;case 3:return g.fn.call(g.context,d,A),!0;case 4:return g.fn.call(g.context,d,A,f),!0;case 5:return g.fn.call(g.context,d,A,f,h),!0;case 6:return g.fn.call(g.context,d,A,f,h,p),!0}for(x=1,v=new Array(y-1);x<y;x++)v[x-1]=arguments[x];g.fn.apply(g.context,v)}else{var b=g.length,w;for(x=0;x<b;x++)switch(g[x].once&&this.removeListener(u,g[x].fn,void 0,!0),y){case 1:g[x].fn.call(g[x].context);break;case 2:g[x].fn.call(g[x].context,d);break;case 3:g[x].fn.call(g[x].context,d,A);break;case 4:g[x].fn.call(g[x].context,d,A,f);break;default:if(!v)for(w=1,v=new Array(y-1);w<y;w++)v[w-1]=arguments[w];g[x].fn.apply(g[x].context,v)}}return!0},o.prototype.on=function(u,d,A){return s(this,u,d,A,!1)},o.prototype.once=function(u,d,A){return s(this,u,d,A,!0)},o.prototype.removeListener=function(u,d,A,f){var h=n?n+u:u;if(!this._events[h])return this;if(!d)return a(this,h),this;var p=this._events[h];if(p.fn)p.fn===d&&(!f||p.once)&&(!A||p.context===A)&&a(this,h);else{for(var m=0,g=[],y=p.length;m<y;m++)(p[m].fn!==d||f&&!p[m].once||A&&p[m].context!==A)&&g.push(p[m]);g.length?this._events[h]=g.length===1?g[0]:g:a(this,h)}return this},o.prototype.removeAllListeners=function(u){var d;return u?(d=n?n+u:u,this._events[d]&&a(this,d)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o})(Epe);var Hht=Epe.exports;const $ht=Bn(Hht);var MI=new $ht,LI="recharts.syncMouseEvents";function E1(e){"@babel/helpers - typeof";return E1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E1(e)}function zht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Npe(r.key),r)}}function Kht(e,t,n){return t&&Vht(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function RI(e,t,n){return t=Npe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Npe(e){var t=Wht(e,"string");return E1(t)=="symbol"?t:t+""}function Wht(e,t){if(E1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(E1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qht=function(){function e(){zht(this,e),RI(this,"activeIndex",0),RI(this,"coordinateList",[]),RI(this,"layout","horizontal")}return Kht(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,s=i===void 0?null:i,a=n.container,o=a===void 0?null:a,l=n.layout,u=l===void 0?null:l,d=n.offset,A=d===void 0?null:d,f=n.mouseHandlerCallback,h=f===void 0?null:f;this.coordinateList=(r=s??this.coordinateList)!==null&&r!==void 0?r:[],this.container=o??this.container,this.layout=u??this.layout,this.offset=A??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),s=i.x,a=i.y,o=i.height,l=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,d=((r=window)===null||r===void 0?void 0:r.scrollY)||0,A=s+l+u,f=a+this.offset.top+o/2+d;this.mouseHandlerCallback({pageX:A,pageY:f})}}}])}();function Ght(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&Je(r)&&Je(i))return!0}return!1}function Yht(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function jpe(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,s=e.endAngle,a=ys(t,n,r,i),o=ys(t,n,r,s);return{points:[a,o],cx:t,cy:n,radius:r,startAngle:i,endAngle:s}}function Xht(e,t,n){var r,i,s,a;if(e==="horizontal")r=t.x,s=r,i=n.top,a=n.top+n.height;else if(e==="vertical")i=t.y,a=i,r=n.left,s=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var o=t.cx,l=t.cy,u=t.innerRadius,d=t.outerRadius,A=t.angle,f=ys(o,l,u,A),h=ys(o,l,d,A);r=f.x,i=f.y,s=h.x,a=h.y}else return jpe(t);return[{x:r,y:i},{x:s,y:a}]}function N1(e){"@babel/helpers - typeof";return N1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N1(e)}function zG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _S(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zG(Object(n),!0).forEach(function(r){Jht(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jht(e,t,n){return t=Zht(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zht(e){var t=eft(e,"string");return N1(t)=="symbol"?t:t+""}function eft(e,t){if(N1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(N1(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tft(e){var t,n,r=e.element,i=e.tooltipEventType,s=e.isActive,a=e.activeCoordinate,o=e.activePayload,l=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,A=e.layout,f=e.chartName,h=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!h||!s||!a||f!=="ScatterChart"&&i!=="axis")return null;var p,m=FM;if(f==="ScatterChart")p=a,m=tct;else if(f==="BarChart")p=Yht(A,a,l,d),m=HQ;else if(A==="radial"){var g=jpe(a),y=g.cx,v=g.cy,x=g.radius,b=g.startAngle,w=g.endAngle;p={cx:y,cy:v,startAngle:b,endAngle:w,innerRadius:x,outerRadius:x},m=Ofe}else p={points:Xht(A,a,l)},m=FM;var B=_S(_S(_S(_S({stroke:"#ccc",pointerEvents:"none"},l),p),yn(h,!1)),{},{payload:o,payloadIndex:u,className:Sn("recharts-tooltip-cursor",h.className)});return S.isValidElement(h)?S.cloneElement(h,B):S.createElement(m,B)}var nft=["item"],rft=["children","className","width","height","style","compact","title","desc"];function _0(e){"@babel/helpers - typeof";return _0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_0(e)}function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$g.apply(this,arguments)}function VG(e,t){return aft(e)||sft(e,t)||Ppe(e,t)||ift()}function ift(){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 sft(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function aft(e){if(Array.isArray(e))return e}function KG(e,t){if(e==null)return{};var n=oft(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oft(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ipe(r.key),r)}}function uft(e,t,n){return t&&cft(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dft(e,t,n){return t=WE(t),Aft(e,Tpe()?Reflect.construct(t,n||[],WE(e).constructor):t.apply(e,n))}function Aft(e,t){if(t&&(_0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hft(e)}function hft(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tpe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Tpe=function(){return!!e})()}function WE(e){return WE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},WE(e)}function fft(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dL(e,t)}function dL(e,t){return dL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dL(e,t)}function k0(e){return gft(e)||mft(e)||Ppe(e)||pft()}function pft(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ppe(e,t){if(e){if(typeof e=="string")return AL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AL(e,t)}}function mft(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gft(e){if(Array.isArray(e))return AL(e)}function AL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WG(Object(n),!0).forEach(function(r){Ut(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ut(e,t,n){return t=Ipe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ipe(e){var t=yft(e,"string");return _0(t)=="symbol"?t:t+""}function yft(e,t){if(_0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(_0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vft={xAxis:["bottom","top"],yAxis:["left","right"]},xft={width:"100%",height:"100%"},Ope={x:0,y:0};function kS(e){return e}var wft=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},bft=function(t,n,r,i){var s=n.find(function(d){return d&&d.index===r});if(s){if(t==="horizontal")return{x:s.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:s.coordinate};if(t==="centric"){var a=s.coordinate,o=i.radius;return Pe(Pe(Pe({},i),ys(i.cx,i.cy,o,a)),{},{angle:a,radius:o})}var l=s.coordinate,u=i.angle;return Pe(Pe(Pe({},i),ys(i.cx,i.cy,l,u)),{},{angle:u,radius:l})}return Ope},vj=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,s=n.dataEndIndex,a=(r??[]).reduce(function(o,l){var u=l.props.data;return u&&u.length?[].concat(k0(o),k0(u)):o},[]);return a.length>0?a:t&&t.length&&Je(i)&&Je(s)?t.slice(i,s+1):[]};function Fpe(e){return e==="number"?[0,"auto"]:void 0}var hL=function(t,n,r,i){var s=t.graphicalItems,a=t.tooltipAxis,o=vj(n,t);return r<0||!s||!s.length||r>=o.length?null:s.reduce(function(l,u){var d,A=(d=u.props.data)!==null&&d!==void 0?d:n;A&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(A=A.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(a.dataKey&&!a.allowDuplicatedCategory){var h=A===void 0?o:A;f=Gk(h,a.dataKey,i)}else f=A&&A[r]||o[r];return f?[].concat(k0(l),[Tfe(u,f)]):l},[])},qG=function(t,n,r,i){var s=i||{x:t.chartX,y:t.chartY},a=wft(s,r),o=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,d=yat(a,o,u,l);if(d>=0&&u){var A=u[d]&&u[d].value,f=hL(t,n,d,A),h=bft(r,o,d,s);return{activeTooltipIndex:d,activeLabel:A,activePayload:f,activeCoordinate:h}}return null},Cft=function(t,n){var r=n.axes,i=n.graphicalItems,s=n.axisType,a=n.axisIdKey,o=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,A=t.children,f=t.stackOffset,h=Efe(d,s);return r.reduce(function(p,m){var g,y=m.type.defaultProps!==void 0?Pe(Pe({},m.type.defaultProps),m.props):m.props,v=y.type,x=y.dataKey,b=y.allowDataOverflow,w=y.allowDuplicatedCategory,B=y.scale,k=y.ticks,N=y.includeHidden,j=y[a];if(p[j])return p;var L=vj(t.data,{graphicalItems:i.filter(function(R){var O,Y=a in R.props?R.props[a]:(O=R.type.defaultProps)===null||O===void 0?void 0:O[a];return Y===j}),dataStartIndex:l,dataEndIndex:u}),T=L.length,E,F,M;Ght(y.domain,b,v)&&(E=jM(y.domain,null,b),h&&(v==="number"||B!=="auto")&&(M=Iw(L,x,"category")));var D=Fpe(v);if(!E||E.length===0){var H,q=(H=y.domain)!==null&&H!==void 0?H:D;if(x){if(E=Iw(L,x,v),v==="category"&&h){var $=i9e(E);w&&$?(F=E,E=OE(0,T)):w||(E=Oq(q,E,m).reduce(function(R,O){return R.indexOf(O)>=0?R:[].concat(k0(R),[O])},[]))}else if(v==="category")w?E=E.filter(function(R){return R!==""&&!fn(R)}):E=Oq(q,E,m).reduce(function(R,O){return R.indexOf(O)>=0||O===""||fn(O)?R:[].concat(k0(R),[O])},[]);else if(v==="number"){var z=Cat(L,i.filter(function(R){var O,Y,X=a in R.props?R.props[a]:(O=R.type.defaultProps)===null||O===void 0?void 0:O[a],K="hide"in R.props?R.props.hide:(Y=R.type.defaultProps)===null||Y===void 0?void 0:Y.hide;return X===j&&(N||!K)}),x,s,d);z&&(E=z)}h&&(v==="number"||B!=="auto")&&(M=Iw(L,x,"category"))}else h?E=OE(0,T):o&&o[j]&&o[j].hasStack&&v==="number"?E=f==="expand"?[0,1]:jfe(o[j].stackGroups,l,u):E=kfe(L,i.filter(function(R){var O=a in R.props?R.props[a]:R.type.defaultProps[a],Y="hide"in R.props?R.props.hide:R.type.defaultProps.hide;return O===j&&(N||!Y)}),v,d,!0);if(v==="number")E=uL(A,E,j,s,k),q&&(E=jM(q,E,b));else if(v==="category"&&q){var Q=q,ce=E.every(function(R){return Q.indexOf(R)>=0});ce&&(E=Q)}}return Pe(Pe({},p),{},Ut({},j,Pe(Pe({},y),{},{axisType:s,domain:E,categoricalDomain:M,duplicateDomain:F,originalDomain:(g=y.domain)!==null&&g!==void 0?g:D,isCategorical:h,layout:d})))},{})},Sft=function(t,n){var r=n.graphicalItems,i=n.Axis,s=n.axisType,a=n.axisIdKey,o=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,A=t.children,f=vj(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),h=f.length,p=Efe(d,s),m=-1;return r.reduce(function(g,y){var v=y.type.defaultProps!==void 0?Pe(Pe({},y.type.defaultProps),y.props):y.props,x=v[a],b=Fpe("number");if(!g[x]){m++;var w;return p?w=OE(0,h):o&&o[x]&&o[x].hasStack?(w=jfe(o[x].stackGroups,l,u),w=uL(A,w,x,s)):(w=jM(b,kfe(f,r.filter(function(B){var k,N,j=a in B.props?B.props[a]:(k=B.type.defaultProps)===null||k===void 0?void 0:k[a],L="hide"in B.props?B.props.hide:(N=B.type.defaultProps)===null||N===void 0?void 0:N.hide;return j===x&&!L}),"number",d),i.defaultProps.allowDataOverflow),w=uL(A,w,x,s)),Pe(Pe({},g),{},Ut({},x,Pe(Pe({axisType:s},i.defaultProps),{},{hide:!0,orientation:cl(vft,"".concat(s,".").concat(m%2),null),domain:w,originalDomain:b,isCategorical:p,layout:d})))}return g},{})},Bft=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,s=n.AxisComp,a=n.graphicalItems,o=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,d=t.children,A="".concat(i,"Id"),f=ul(d,s),h={};return f&&f.length?h=Cft(t,{axes:f,graphicalItems:a,axisType:i,axisIdKey:A,stackGroups:o,dataStartIndex:l,dataEndIndex:u}):a&&a.length&&(h=Sft(t,{Axis:s,graphicalItems:a,axisType:i,axisIdKey:A,stackGroups:o,dataStartIndex:l,dataEndIndex:u})),h},_ft=function(t){var n=vA(t),r=Yu(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:fQ(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:BE(n,r)}},GG=function(t){var n=t.children,r=t.defaultShowTooltip,i=lo(n,g0),s=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(s=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:s,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},kft=function(t){return!t||!t.length?!1:t.some(function(n){var r=ed(n&&n.type);return r&&r.indexOf("Bar")>=0})},YG=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Eft=function(t,n){var r=t.props,i=t.graphicalItems,s=t.xAxisMap,a=s===void 0?{}:s,o=t.yAxisMap,l=o===void 0?{}:o,u=r.width,d=r.height,A=r.children,f=r.margin||{},h=lo(A,g0),p=lo(A,vp),m=Object.keys(l).reduce(function(w,B){var k=l[B],N=k.orientation;return!k.mirror&&!k.hide?Pe(Pe({},w),{},Ut({},N,w[N]+k.width)):w},{left:f.left||0,right:f.right||0}),g=Object.keys(a).reduce(function(w,B){var k=a[B],N=k.orientation;return!k.mirror&&!k.hide?Pe(Pe({},w),{},Ut({},N,cl(w,"".concat(N))+k.height)):w},{top:f.top||0,bottom:f.bottom||0}),y=Pe(Pe({},g),m),v=y.bottom;h&&(y.bottom+=h.props.height||g0.defaultProps.height),p&&n&&(y=wat(y,i,r,n));var x=u-y.left-y.right,b=d-y.top-y.bottom;return Pe(Pe({brushBottom:v},y),{},{width:Math.max(x,0),height:Math.max(b,0)})},Nft=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Mpe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,s=i===void 0?"axis":i,a=t.validateTooltipEventTypes,o=a===void 0?["axis"]:a,l=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,A=t.defaultProps,f=function(y,v){var x=v.graphicalItems,b=v.stackGroups,w=v.offset,B=v.updateId,k=v.dataStartIndex,N=v.dataEndIndex,j=y.barSize,L=y.layout,T=y.barGap,E=y.barCategoryGap,F=y.maxBarSize,M=YG(L),D=M.numericAxisName,H=M.cateAxisName,q=kft(x),$=[];return x.forEach(function(z,Q){var ce=vj(y.data,{graphicalItems:[z],dataStartIndex:k,dataEndIndex:N}),R=z.type.defaultProps!==void 0?Pe(Pe({},z.type.defaultProps),z.props):z.props,O=R.dataKey,Y=R.maxBarSize,X=R["".concat(D,"Id")],K=R["".concat(H,"Id")],Z={},ae=l.reduce(function(xe,Qe){var ze=v["".concat(Qe.axisType,"Map")],Rt=R["".concat(Qe.axisType,"Id")];ze&&ze[Rt]||Qe.axisType==="zAxis"||Wp();var dt=ze[Rt];return Pe(Pe({},xe),{},Ut(Ut({},Qe.axisType,dt),"".concat(Qe.axisType,"Ticks"),Yu(dt)))},Z),ue=ae[H],se=ae["".concat(H,"Ticks")],Ae=b&&b[X]&&b[X].hasStack&&Fat(z,b[X].stackGroups),de=ed(z.type).indexOf("Bar")>=0,Se=BE(ue,se),Fe=[],te=q&&vat({barSize:j,stackGroups:b,totalSize:Nft(ae,H)});if(de){var ke,Ze,et=fn(Y)?F:Y,Te=(ke=(Ze=BE(ue,se,!0))!==null&&Ze!==void 0?Ze:et)!==null&&ke!==void 0?ke:0;Fe=xat({barGap:T,barCategoryGap:E,bandSize:Te!==Se?Te:Se,sizeList:te[K],maxBarSize:et}),Te!==Se&&(Fe=Fe.map(function(xe){return Pe(Pe({},xe),{},{position:Pe(Pe({},xe.position),{},{offset:xe.position.offset-Te/2})})}))}var st=z&&z.type&&z.type.getComposedData;st&&$.push({props:Pe(Pe({},st(Pe(Pe({},ae),{},{displayedData:ce,props:y,dataKey:O,item:z,bandSize:Se,barPosition:Fe,offset:w,stackedData:Ae,layout:L,dataStartIndex:k,dataEndIndex:N}))),{},Ut(Ut(Ut({key:z.key||"item-".concat(Q)},D,ae[D]),H,ae[H]),"animationId",B)),childIndex:m9e(z,y.children),item:z})}),$},h=function(y,v){var x=y.props,b=y.dataStartIndex,w=y.dataEndIndex,B=y.updateId;if(!kK({props:x}))return null;var k=x.children,N=x.layout,j=x.stackOffset,L=x.data,T=x.reverseStackOrder,E=YG(N),F=E.numericAxisName,M=E.cateAxisName,D=ul(k,r),H=Pat(L,D,"".concat(F,"Id"),"".concat(M,"Id"),j,T),q=l.reduce(function(R,O){var Y="".concat(O.axisType,"Map");return Pe(Pe({},R),{},Ut({},Y,Bft(x,Pe(Pe({},O),{},{graphicalItems:D,stackGroups:O.axisType===F&&H,dataStartIndex:b,dataEndIndex:w}))))},{}),$=Eft(Pe(Pe({},q),{},{props:x,graphicalItems:D}),v==null?void 0:v.legendBBox);Object.keys(q).forEach(function(R){q[R]=d(x,q[R],$,R.replace("Map",""),n)});var z=q["".concat(M,"Map")],Q=_ft(z),ce=f(x,Pe(Pe({},q),{},{dataStartIndex:b,dataEndIndex:w,updateId:B,graphicalItems:D,stackGroups:H,offset:$}));return Pe(Pe({formattedGraphicalItems:ce,graphicalItems:D,offset:$,stackGroups:H},Q),q)},p=function(g){function y(v){var x,b,w;return lft(this,y),w=dft(this,y,[v]),Ut(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ut(w,"accessibilityManager",new qht),Ut(w,"handleLegendBBoxUpdate",function(B){if(B){var k=w.state,N=k.dataStartIndex,j=k.dataEndIndex,L=k.updateId;w.setState(Pe({legendBBox:B},h({props:w.props,dataStartIndex:N,dataEndIndex:j,updateId:L},Pe(Pe({},w.state),{},{legendBBox:B}))))}}),Ut(w,"handleReceiveSyncEvent",function(B,k,N){if(w.props.syncId===B){if(N===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(k)}}),Ut(w,"handleBrushChange",function(B){var k=B.startIndex,N=B.endIndex;if(k!==w.state.dataStartIndex||N!==w.state.dataEndIndex){var j=w.state.updateId;w.setState(function(){return Pe({dataStartIndex:k,dataEndIndex:N},h({props:w.props,dataStartIndex:k,dataEndIndex:N,updateId:j},w.state))}),w.triggerSyncEvent({dataStartIndex:k,dataEndIndex:N})}}),Ut(w,"handleMouseEnter",function(B){var k=w.getMouseInfo(B);if(k){var N=Pe(Pe({},k),{},{isTooltipActive:!0});w.setState(N),w.triggerSyncEvent(N);var j=w.props.onMouseEnter;un(j)&&j(N,B)}}),Ut(w,"triggeredAfterMouseMove",function(B){var k=w.getMouseInfo(B),N=k?Pe(Pe({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(N),w.triggerSyncEvent(N);var j=w.props.onMouseMove;un(j)&&j(N,B)}),Ut(w,"handleItemMouseEnter",function(B){w.setState(function(){return{isTooltipActive:!0,activeItem:B,activePayload:B.tooltipPayload,activeCoordinate:B.tooltipPosition||{x:B.cx,y:B.cy}}})}),Ut(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),Ut(w,"handleMouseMove",function(B){B.persist(),w.throttleTriggeredAfterMouseMove(B)}),Ut(w,"handleMouseLeave",function(B){w.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};w.setState(k),w.triggerSyncEvent(k);var N=w.props.onMouseLeave;un(N)&&N(k,B)}),Ut(w,"handleOuterEvent",function(B){var k=p9e(B),N=cl(w.props,"".concat(k));if(k&&un(N)){var j,L;/.*touch.*/i.test(k)?L=w.getMouseInfo(B.changedTouches[0]):L=w.getMouseInfo(B),N((j=L)!==null&&j!==void 0?j:{},B)}}),Ut(w,"handleClick",function(B){var k=w.getMouseInfo(B);if(k){var N=Pe(Pe({},k),{},{isTooltipActive:!0});w.setState(N),w.triggerSyncEvent(N);var j=w.props.onClick;un(j)&&j(N,B)}}),Ut(w,"handleMouseDown",function(B){var k=w.props.onMouseDown;if(un(k)){var N=w.getMouseInfo(B);k(N,B)}}),Ut(w,"handleMouseUp",function(B){var k=w.props.onMouseUp;if(un(k)){var N=w.getMouseInfo(B);k(N,B)}}),Ut(w,"handleTouchMove",function(B){B.changedTouches!=null&&B.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(B.changedTouches[0])}),Ut(w,"handleTouchStart",function(B){B.changedTouches!=null&&B.changedTouches.length>0&&w.handleMouseDown(B.changedTouches[0])}),Ut(w,"handleTouchEnd",function(B){B.changedTouches!=null&&B.changedTouches.length>0&&w.handleMouseUp(B.changedTouches[0])}),Ut(w,"handleDoubleClick",function(B){var k=w.props.onDoubleClick;if(un(k)){var N=w.getMouseInfo(B);k(N,B)}}),Ut(w,"handleContextMenu",function(B){var k=w.props.onContextMenu;if(un(k)){var N=w.getMouseInfo(B);k(N,B)}}),Ut(w,"triggerSyncEvent",function(B){w.props.syncId!==void 0&&MI.emit(LI,w.props.syncId,B,w.eventEmitterSymbol)}),Ut(w,"applySyncEvent",function(B){var k=w.props,N=k.layout,j=k.syncMethod,L=w.state.updateId,T=B.dataStartIndex,E=B.dataEndIndex;if(B.dataStartIndex!==void 0||B.dataEndIndex!==void 0)w.setState(Pe({dataStartIndex:T,dataEndIndex:E},h({props:w.props,dataStartIndex:T,dataEndIndex:E,updateId:L},w.state)));else if(B.activeTooltipIndex!==void 0){var F=B.chartX,M=B.chartY,D=B.activeTooltipIndex,H=w.state,q=H.offset,$=H.tooltipTicks;if(!q)return;if(typeof j=="function")D=j($,B);else if(j==="value"){D=-1;for(var z=0;z<$.length;z++)if($[z].value===B.activeLabel){D=z;break}}var Q=Pe(Pe({},q),{},{x:q.left,y:q.top}),ce=Math.min(F,Q.x+Q.width),R=Math.min(M,Q.y+Q.height),O=$[D]&&$[D].value,Y=hL(w.state,w.props.data,D),X=$[D]?{x:N==="horizontal"?$[D].coordinate:ce,y:N==="horizontal"?R:$[D].coordinate}:Ope;w.setState(Pe(Pe({},B),{},{activeLabel:O,activeCoordinate:X,activePayload:Y,activeTooltipIndex:D}))}else w.setState(B)}),Ut(w,"renderCursor",function(B){var k,N=w.state,j=N.isTooltipActive,L=N.activeCoordinate,T=N.activePayload,E=N.offset,F=N.activeTooltipIndex,M=N.tooltipAxisBandSize,D=w.getTooltipEventType(),H=(k=B.props.active)!==null&&k!==void 0?k:j,q=w.props.layout,$=B.key||"_recharts-cursor";return re.createElement(tft,{key:$,activeCoordinate:L,activePayload:T,activeTooltipIndex:F,chartName:n,element:B,isActive:H,layout:q,offset:E,tooltipAxisBandSize:M,tooltipEventType:D})}),Ut(w,"renderPolarAxis",function(B,k,N){var j=cl(B,"type.axisType"),L=cl(w.state,"".concat(j,"Map")),T=B.type.defaultProps,E=T!==void 0?Pe(Pe({},T),B.props):B.props,F=L&&L[E["".concat(j,"Id")]];return S.cloneElement(B,Pe(Pe({},F),{},{className:Sn(j,F.className),key:B.key||"".concat(k,"-").concat(N),ticks:Yu(F,!0)}))}),Ut(w,"renderPolarGrid",function(B){var k=B.props,N=k.radialLines,j=k.polarAngles,L=k.polarRadius,T=w.state,E=T.radiusAxisMap,F=T.angleAxisMap,M=vA(E),D=vA(F),H=D.cx,q=D.cy,$=D.innerRadius,z=D.outerRadius;return S.cloneElement(B,{polarAngles:Array.isArray(j)?j:Yu(D,!0).map(function(Q){return Q.coordinate}),polarRadius:Array.isArray(L)?L:Yu(M,!0).map(function(Q){return Q.coordinate}),cx:H,cy:q,innerRadius:$,outerRadius:z,key:B.key||"polar-grid",radialLines:N})}),Ut(w,"renderLegend",function(){var B=w.state.formattedGraphicalItems,k=w.props,N=k.children,j=k.width,L=k.height,T=w.props.margin||{},E=j-(T.left||0)-(T.right||0),F=Bfe({children:N,formattedGraphicalItems:B,legendWidth:E,legendContent:u});if(!F)return null;var M=F.item,D=KG(F,nft);return S.cloneElement(M,Pe(Pe({},D),{},{chartWidth:j,chartHeight:L,margin:T,onBBoxUpdate:w.handleLegendBBoxUpdate}))}),Ut(w,"renderTooltip",function(){var B,k=w.props,N=k.children,j=k.accessibilityLayer,L=lo(N,zo);if(!L)return null;var T=w.state,E=T.isTooltipActive,F=T.activeCoordinate,M=T.activePayload,D=T.activeLabel,H=T.offset,q=(B=L.props.active)!==null&&B!==void 0?B:E;return S.cloneElement(L,{viewBox:Pe(Pe({},H),{},{x:H.left,y:H.top}),active:q,label:D,payload:q?M:[],coordinate:F,accessibilityLayer:j})}),Ut(w,"renderBrush",function(B){var k=w.props,N=k.margin,j=k.data,L=w.state,T=L.offset,E=L.dataStartIndex,F=L.dataEndIndex,M=L.updateId;return S.cloneElement(B,{key:B.key||"_recharts-brush",onChange:CS(w.handleBrushChange,B.props.onChange),data:j,x:Je(B.props.x)?B.props.x:T.left,y:Je(B.props.y)?B.props.y:T.top+T.height+T.brushBottom-(N.bottom||0),width:Je(B.props.width)?B.props.width:T.width,startIndex:E,endIndex:F,updateId:"brush-".concat(M)})}),Ut(w,"renderReferenceElement",function(B,k,N){if(!B)return null;var j=w,L=j.clipPathId,T=w.state,E=T.xAxisMap,F=T.yAxisMap,M=T.offset,D=B.type.defaultProps||{},H=B.props,q=H.xAxisId,$=q===void 0?D.xAxisId:q,z=H.yAxisId,Q=z===void 0?D.yAxisId:z;return S.cloneElement(B,{key:B.key||"".concat(k,"-").concat(N),xAxis:E[$],yAxis:F[Q],viewBox:{x:M.left,y:M.top,width:M.width,height:M.height},clipPathId:L})}),Ut(w,"renderActivePoints",function(B){var k=B.item,N=B.activePoint,j=B.basePoint,L=B.childIndex,T=B.isRange,E=[],F=k.props.key,M=k.item.type.defaultProps!==void 0?Pe(Pe({},k.item.type.defaultProps),k.item.props):k.item.props,D=M.activeDot,H=M.dataKey,q=Pe(Pe({index:L,dataKey:H,cx:N.x,cy:N.y,r:4,fill:QQ(k.item),strokeWidth:2,stroke:"#fff",payload:N.payload,value:N.value},yn(D,!1)),Yk(D));return E.push(y.renderActiveDot(D,q,"".concat(F,"-activePoint-").concat(L))),j?E.push(y.renderActiveDot(D,Pe(Pe({},q),{},{cx:j.x,cy:j.y}),"".concat(F,"-basePoint-").concat(L))):T&&E.push(null),E}),Ut(w,"renderGraphicChild",function(B,k,N){var j=w.filterFormatItem(B,k,N);if(!j)return null;var L=w.getTooltipEventType(),T=w.state,E=T.isTooltipActive,F=T.tooltipAxis,M=T.activeTooltipIndex,D=T.activeLabel,H=w.props.children,q=lo(H,zo),$=j.props,z=$.points,Q=$.isRange,ce=$.baseLine,R=j.item.type.defaultProps!==void 0?Pe(Pe({},j.item.type.defaultProps),j.item.props):j.item.props,O=R.activeDot,Y=R.hide,X=R.activeBar,K=R.activeShape,Z=!!(!Y&&E&&q&&(O||X||K)),ae={};L!=="axis"&&q&&q.props.trigger==="click"?ae={onClick:CS(w.handleItemMouseEnter,B.props.onClick)}:L!=="axis"&&(ae={onMouseLeave:CS(w.handleItemMouseLeave,B.props.onMouseLeave),onMouseEnter:CS(w.handleItemMouseEnter,B.props.onMouseEnter)});var ue=S.cloneElement(B,Pe(Pe({},j.props),ae));function se(Qe){return typeof F.dataKey=="function"?F.dataKey(Qe.payload):null}if(Z)if(M>=0){var Ae,de;if(F.dataKey&&!F.allowDuplicatedCategory){var Se=typeof F.dataKey=="function"?se:"payload.".concat(F.dataKey.toString());Ae=Gk(z,Se,D),de=Q&&ce&&Gk(ce,Se,D)}else Ae=z==null?void 0:z[M],de=Q&&ce&&ce[M];if(K||X){var Fe=B.props.activeIndex!==void 0?B.props.activeIndex:M;return[S.cloneElement(B,Pe(Pe(Pe({},j.props),ae),{},{activeIndex:Fe})),null,null]}if(!fn(Ae))return[ue].concat(k0(w.renderActivePoints({item:j,activePoint:Ae,basePoint:de,childIndex:M,isRange:Q})))}else{var te,ke=(te=w.getItemByXY(w.state.activeCoordinate))!==null&&te!==void 0?te:{graphicalItem:ue},Ze=ke.graphicalItem,et=Ze.item,Te=et===void 0?B:et,st=Ze.childIndex,xe=Pe(Pe(Pe({},j.props),ae),{},{activeIndex:st});return[S.cloneElement(Te,xe),null,null]}return Q?[ue,null,null]:[ue,null]}),Ut(w,"renderCustomized",function(B,k,N){return S.cloneElement(B,Pe(Pe({key:"recharts-customized-".concat(N)},w.props),w.state))}),Ut(w,"renderMap",{CartesianGrid:{handler:kS,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:kS},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:kS},YAxis:{handler:kS},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((x=v.id)!==null&&x!==void 0?x:x2("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=She(w.triggeredAfterMouseMove,(b=v.throttleDelay)!==null&&b!==void 0?b:1e3/60),w.state={},w}return fft(y,g),uft(y,[{key:"componentDidMount",value:function(){var x,b;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(b=this.props.margin.top)!==null&&b!==void 0?b:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,b=x.children,w=x.data,B=x.height,k=x.layout,N=lo(b,zo);if(N){var j=N.props.defaultIndex;if(!(typeof j!="number"||j<0||j>this.state.tooltipTicks.length-1)){var L=this.state.tooltipTicks[j]&&this.state.tooltipTicks[j].value,T=hL(this.state,w,j,L),E=this.state.tooltipTicks[j].coordinate,F=(this.state.offset.top+B)/2,M=k==="horizontal",D=M?{x:E,y:F}:{y:E,x:F},H=this.state.formattedGraphicalItems.find(function($){var z=$.item;return z.type.name==="Scatter"});H&&(D=Pe(Pe({},D),H.props.points[j].tooltipPosition),T=H.props.points[j].tooltipPayload);var q={activeTooltipIndex:j,isTooltipActive:!0,activeLabel:L,activePayload:T,activeCoordinate:D};this.setState(q),this.renderCursor(N),this.accessibilityManager.setIndex(j)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,b){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==b.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var w,B;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(B=this.props.margin.top)!==null&&B!==void 0?B:0}})}return null}},{key:"componentDidUpdate",value:function(x){VF([lo(x.children,zo)],[lo(this.props.children,zo)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=lo(this.props.children,zo);if(x&&typeof x.props.shared=="boolean"){var b=x.props.shared?"axis":"item";return o.indexOf(b)>=0?b:s}return s}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var b=this.container,w=b.getBoundingClientRect(),B=ztt(w),k={chartX:Math.round(x.pageX-B.left),chartY:Math.round(x.pageY-B.top)},N=w.width/b.offsetWidth||1,j=this.inRange(k.chartX,k.chartY,N);if(!j)return null;var L=this.state,T=L.xAxisMap,E=L.yAxisMap,F=this.getTooltipEventType();if(F!=="axis"&&T&&E){var M=vA(T).scale,D=vA(E).scale,H=M&&M.invert?M.invert(k.chartX):null,q=D&&D.invert?D.invert(k.chartY):null;return Pe(Pe({},k),{},{xValue:H,yValue:q})}var $=qG(this.state,this.props.data,this.props.layout,j);return $?Pe(Pe({},k),$):null}},{key:"inRange",value:function(x,b){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,B=this.props.layout,k=x/w,N=b/w;if(B==="horizontal"||B==="vertical"){var j=this.state.offset,L=k>=j.left&&k<=j.left+j.width&&N>=j.top&&N<=j.top+j.height;return L?{x:k,y:N}:null}var T=this.state,E=T.angleAxisMap,F=T.radiusAxisMap;if(E&&F){var M=vA(E);return Lq({x:k,y:N},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,b=this.getTooltipEventType(),w=lo(x,zo),B={};w&&b==="axis"&&(w.props.trigger==="click"?B={onClick:this.handleClick}:B={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var k=Yk(this.props,this.handleOuterEvent);return Pe(Pe({},k),B)}},{key:"addListener",value:function(){MI.on(LI,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){MI.removeListener(LI,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,b,w){for(var B=this.state.formattedGraphicalItems,k=0,N=B.length;k<N;k++){var j=B[k];if(j.item===x||j.props.key===x.key||b===ed(j.item.type)&&w===j.childIndex)return j}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,b=this.state.offset,w=b.left,B=b.top,k=b.height,N=b.width;return re.createElement("defs",null,re.createElement("clipPath",{id:x},re.createElement("rect",{x:w,y:B,height:k,width:N})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(b,w){var B=VG(w,2),k=B[0],N=B[1];return Pe(Pe({},b),{},Ut({},k,N.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(b,w){var B=VG(w,2),k=B[0],N=B[1];return Pe(Pe({},b),{},Ut({},k,N.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var b;return(b=this.state.xAxisMap)===null||b===void 0||(b=b[x])===null||b===void 0?void 0:b.scale}},{key:"getYScaleByAxisId",value:function(x){var b;return(b=this.state.yAxisMap)===null||b===void 0||(b=b[x])===null||b===void 0?void 0:b.scale}},{key:"getItemByXY",value:function(x){var b=this.state,w=b.formattedGraphicalItems,B=b.activeItem;if(w&&w.length)for(var k=0,N=w.length;k<N;k++){var j=w[k],L=j.props,T=j.item,E=T.type.defaultProps!==void 0?Pe(Pe({},T.type.defaultProps),T.props):T.props,F=ed(T.type);if(F==="Bar"){var M=(L.data||[]).find(function($){return Vlt(x,$)});if(M)return{graphicalItem:j,payload:M}}else if(F==="RadialBar"){var D=(L.data||[]).find(function($){return Lq(x,$)});if(D)return{graphicalItem:j,payload:D}}else if(dj(j,B)||Aj(j,B)||C1(j,B)){var H=qct({graphicalItem:j,activeTooltipItem:B,itemData:E.data}),q=E.activeIndex===void 0?H:E.activeIndex;return{graphicalItem:Pe(Pe({},j),{},{childIndex:q}),payload:C1(j,B)?E.data[H]:j.props.data[H]}}}return null}},{key:"render",value:function(){var x=this;if(!kK(this))return null;var b=this.props,w=b.children,B=b.className,k=b.width,N=b.height,j=b.style,L=b.compact,T=b.title,E=b.desc,F=KG(b,rft),M=yn(F,!1);if(L)return re.createElement(kG,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},re.createElement(WF,$g({},M,{width:k,height:N,title:T,desc:E}),this.renderClipPath(),NK(w,this.renderMap)));if(this.props.accessibilityLayer){var D,H;M.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,M.role=(H=this.props.role)!==null&&H!==void 0?H:"application",M.onKeyDown=function($){x.accessibilityManager.keyboardEvent($)},M.onFocus=function(){x.accessibilityManager.focus()}}var q=this.parseEventsOfWrapper();return re.createElement(kG,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},re.createElement("div",$g({className:Sn("recharts-wrapper",B),style:Pe({position:"relative",cursor:"default",width:k,height:N},j)},q,{ref:function(z){x.container=z}}),re.createElement(WF,$g({},M,{width:k,height:N,title:T,desc:E,style:xft}),this.renderClipPath(),NK(w,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(S.Component);Ut(p,"displayName",n),Ut(p,"defaultProps",Pe({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},A)),Ut(p,"getDerivedStateFromProps",function(g,y){var v=g.dataKey,x=g.data,b=g.children,w=g.width,B=g.height,k=g.layout,N=g.stackOffset,j=g.margin,L=y.dataStartIndex,T=y.dataEndIndex;if(y.updateId===void 0){var E=GG(g);return Pe(Pe(Pe({},E),{},{updateId:0},h(Pe(Pe({props:g},E),{},{updateId:0}),y)),{},{prevDataKey:v,prevData:x,prevWidth:w,prevHeight:B,prevLayout:k,prevStackOffset:N,prevMargin:j,prevChildren:b})}if(v!==y.prevDataKey||x!==y.prevData||w!==y.prevWidth||B!==y.prevHeight||k!==y.prevLayout||N!==y.prevStackOffset||!fy(j,y.prevMargin)){var F=GG(g),M={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},D=Pe(Pe({},qG(y,x,k)),{},{updateId:y.updateId+1}),H=Pe(Pe(Pe({},F),M),D);return Pe(Pe(Pe({},H),h(Pe({props:g},H),y)),{},{prevDataKey:v,prevData:x,prevWidth:w,prevHeight:B,prevLayout:k,prevStackOffset:N,prevMargin:j,prevChildren:b})}if(!VF(b,y.prevChildren)){var q,$,z,Q,ce=lo(b,g0),R=ce&&(q=($=ce.props)===null||$===void 0?void 0:$.startIndex)!==null&&q!==void 0?q:L,O=ce&&(z=(Q=ce.props)===null||Q===void 0?void 0:Q.endIndex)!==null&&z!==void 0?z:T,Y=R!==L||O!==T,X=!fn(x),K=X&&!Y?y.updateId:y.updateId+1;return Pe(Pe({updateId:K},h(Pe(Pe({props:g},y),{},{updateId:K,dataStartIndex:R,dataEndIndex:O}),y)),{},{prevChildren:b,dataStartIndex:R,dataEndIndex:O})}return null}),Ut(p,"renderActiveDot",function(g,y,v){var x;return S.isValidElement(g)?x=S.cloneElement(g,y):un(g)?x=g(y):x=re.createElement($Q,y),re.createElement(ui,{className:"recharts-active-dot",key:v},x)});var m=S.forwardRef(function(y,v){return re.createElement(p,$g({},y,{ref:v}))});return m.displayName=p.displayName,m},Lpe=Mpe({chartName:"LineChart",GraphicalChild:dv,axisComponents:[{axisType:"xAxis",AxisComp:cm},{axisType:"yAxis",AxisComp:um}],formatAxisMap:epe}),jft=Mpe({chartName:"BarChart",GraphicalChild:lm,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:cm},{axisType:"yAxis",AxisComp:um}],formatAxisMap:epe});const XG={GPTBot:"#22c55e","ChatGPT-User":"#16a34a","OAI-SearchBot":"#15803d",ClaudeBot:"#f97316","Claude-Web":"#ea580c",PerplexityBot:"#3b82f6",Googlebot:"#ef4444","Google-Extended":"#dc2626",Bingbot:"#14b8a6",Bytespider:"#8b5cf6",CCBot:"#6b7280",Amazonbot:"#f59e0b",FacebookBot:"#2563eb","Meta-ExternalAgent":"#1d4ed8",AppleBot:"#a3a3a3",DuckDuckBot:"#f97316",YandexBot:"#ef4444","Cohere-AI":"#ec4899"},Tft=()=>{const[e,t]=S.useState([]),[n,r]=S.useState(!0),[i,s]=S.useState([]),[a,o]=S.useState(!0);S.useEffect(()=>{(async()=>{const B=new Date(Date.now()-2592e6).toISOString(),{data:k}=await Re.from("crawl_events").select("id, crawler_name, crawler_company, page_path, status_code, created_at").gte("created_at",B).order("created_at",{ascending:!1}).limit(1e3);t(k||[]),r(!1)})()},[]),S.useEffect(()=>{(async()=>{const[{data:B},{data:k}]=await Promise.all([Re.from("aeo_pages").select("slug").eq("status","published"),Re.from("crawl_events").select("page_path")]);if(B&&k){const N=new Set((k||[]).map(L=>L.page_path)),j=B.map(L=>`/${L.slug}`).filter(L=>!N.has(L));s(j)}o(!1)})()},[]);const l=Date.now(),u=l-7*864e5,d=l-14*864e5,A=S.useMemo(()=>e.filter(w=>new Date(w.created_at).getTime()>=u),[e,u]),f=S.useMemo(()=>e.filter(w=>{const B=new Date(w.created_at).getTime();return B>=d&&B<u}),[e,u,d]),h=S.useMemo(()=>new Set(A.map(w=>w.crawler_name)).size,[A]),p=S.useMemo(()=>{const w={};A.forEach(k=>{w[k.crawler_name]=(w[k.crawler_name]||0)+1});const B=Object.entries(w).sort((k,N)=>N[1]-k[1])[0];return B?{name:B[0],count:B[1]}:null},[A]),m=S.useMemo(()=>new Set(A.map(w=>w.page_path)).size,[A]),g=A.length>f.length?"up":A.length<f.length?"down":"flat",y=g==="up"?_ne:g==="down"?jbe:Cne,v=S.useMemo(()=>{const w={},B=new Set;return e.forEach(N=>{const j=N.created_at.substring(0,10);w[j]||(w[j]={}),w[j][N.crawler_name]=(w[j][N.crawler_name]||0)+1,B.add(N.crawler_name)}),{data:Object.entries(w).sort((N,j)=>N[0].localeCompare(j[0])).map(([N,j])=>({date:N.slice(5),...j})),crawlers:Array.from(B)}},[e]),x=S.useMemo(()=>{const w={};return A.forEach(B=>{w[B.crawler_name]||(w[B.crawler_name]={company:B.crawler_company,count:0,lastVisit:B.created_at,pageCounts:{}}),w[B.crawler_name].count++,w[B.crawler_name].pageCounts[B.page_path]=(w[B.crawler_name].pageCounts[B.page_path]||0)+1,B.created_at>w[B.crawler_name].lastVisit&&(w[B.crawler_name].lastVisit=B.created_at)}),Object.entries(w).map(([B,k])=>{var N;return{name:B,company:k.company,count:k.count,lastVisit:k.lastVisit,topPage:((N=Object.entries(k.pageCounts).sort((j,L)=>L[1]-j[1])[0])==null?void 0:N[0])||"-"}}).sort((B,k)=>k.count-B.count)},[A]),b=e.slice(0,50);return n?c.jsxs("div",{className:"space-y-4",children:[c.jsx(jt,{className:"h-32 w-full"}),c.jsx(jt,{className:"h-64 w-full"})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[c.jsx(mr,{children:c.jsx(gr,{className:"pt-6",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Visits (7d)"}),c.jsx("p",{className:"text-2xl font-bold",children:A.length})]}),c.jsx(y,{className:`w-5 h-5 ${g==="up"?"text-green-500":g==="down"?"text-red-500":"text-muted-foreground"}`})]})})}),c.jsx(mr,{children:c.jsxs(gr,{className:"pt-6",children:[c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(Wwe,{className:"w-5 h-5 text-muted-foreground"})}),c.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Unique Crawlers"}),c.jsx("p",{className:"text-2xl font-bold",children:h})]})}),c.jsx(mr,{children:c.jsxs(gr,{className:"pt-6",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Most Active Crawler"}),c.jsx("p",{className:"text-2xl font-bold",children:(p==null?void 0:p.name)||"—"}),p&&c.jsxs("p",{className:"text-xs text-muted-foreground",children:[p.count," visits"]})]})}),c.jsx(mr,{children:c.jsxs(gr,{className:"pt-6",children:[c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(zy,{className:"w-5 h-5 text-muted-foreground"})}),c.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Pages Crawled"}),c.jsx("p",{className:"text-2xl font-bold",children:m})]})})]}),c.jsxs(mr,{children:[c.jsx(Ta,{children:c.jsx(Pa,{className:"text-base",children:"Crawler Activity — Last 30 Days"})}),c.jsx(gr,{children:v.data.length===0?c.jsx("p",{className:"text-sm text-muted-foreground py-8 text-center",children:"No crawler activity recorded yet."}):c.jsx(mQ,{width:"100%",height:300,children:c.jsxs(Lpe,{data:v.data,children:[c.jsx(yj,{strokeDasharray:"3 3",className:"stroke-border"}),c.jsx(cm,{dataKey:"date",className:"text-xs"}),c.jsx(um,{className:"text-xs"}),c.jsx(zo,{contentStyle:{backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))",color:"hsl(var(--foreground))"}}),c.jsx(vp,{}),v.crawlers.map(w=>c.jsx(dv,{type:"monotone",dataKey:w,stroke:XG[w]||"#888",strokeWidth:2,dot:!1},w))]})})})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[c.jsxs(mr,{children:[c.jsx(Ta,{children:c.jsx(Pa,{className:"text-base",children:"Crawler Breakdown (7d)"})}),c.jsx(gr,{children:x.length===0?c.jsx("p",{className:"text-sm text-muted-foreground",children:"No crawler visits in the last 7 days."}):c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-border text-muted-foreground",children:[c.jsx("th",{className:"text-left py-2 font-medium",children:"Crawler"}),c.jsx("th",{className:"text-left py-2 font-medium",children:"Company"}),c.jsx("th",{className:"text-right py-2 font-medium",children:"Visits"}),c.jsx("th",{className:"text-left py-2 font-medium",children:"Last Visit"}),c.jsx("th",{className:"text-left py-2 font-medium",children:"Top Page"})]})}),c.jsx("tbody",{children:x.map(w=>c.jsxs("tr",{className:"border-b border-border/50",children:[c.jsx("td",{className:"py-2 font-medium",children:w.name}),c.jsx("td",{className:"py-2 text-muted-foreground",children:w.company}),c.jsx("td",{className:"py-2 text-right",children:w.count}),c.jsx("td",{className:"py-2 text-muted-foreground",children:hy(new Date(w.lastVisit),{addSuffix:!0})}),c.jsx("td",{className:"py-2 text-xs text-muted-foreground truncate max-w-[150px]",children:w.topPage})]},w.name))})]})})})]}),c.jsxs(mr,{children:[c.jsx(Ta,{children:c.jsx(Pa,{className:"text-base",children:"Pages Never Crawled"})}),c.jsx(gr,{children:a?c.jsx(jt,{className:"h-20 w-full"}):i.length===0?c.jsxs("div",{className:"flex items-center gap-2 text-green-600",children:[c.jsx(AU,{className:"w-4 h-4"}),c.jsx("span",{className:"text-sm",children:"All AEO pages have been crawled by at least one AI bot."})]}):c.jsx("ul",{className:"space-y-2 max-h-[300px] overflow-y-auto",children:i.map(w=>c.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[c.jsx(Pp,{className:"w-4 h-4 text-yellow-500 shrink-0"}),c.jsx("span",{className:"text-muted-foreground truncate",children:w})]},w))})})]})]}),c.jsxs(mr,{children:[c.jsx(Ta,{children:c.jsx(Pa,{className:"text-base",children:"Recent Activity"})}),c.jsx(gr,{children:b.length===0?c.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No crawler activity recorded yet. Bot visits will appear here once detected."}):c.jsx("div",{className:"max-h-[400px] overflow-y-auto space-y-2",children:b.map(w=>c.jsxs("div",{className:"flex items-center gap-3 text-sm py-1.5 border-b border-border/30 last:border-0",children:[c.jsx("span",{className:"text-xs text-muted-foreground w-24 shrink-0",children:hy(new Date(w.created_at),{addSuffix:!0})}),c.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:XG[w.crawler_name]||"#888"}}),c.jsx("span",{className:"font-medium w-32 shrink-0",children:w.crawler_name}),c.jsx("span",{className:"text-muted-foreground truncate flex-1",children:w.page_path}),c.jsx(or,{variant:w.status_code===200?"default":"destructive",className:"text-xs shrink-0",children:w.status_code||200})]},w.id))})})]})]})},yx=["perplexity","openai","gemini"],ES={perplexity:{label:"Perplexity",color:"#3b82f6",bgClass:"bg-blue-100 text-blue-800"},openai:{label:"ChatGPT",color:"#22c55e",bgClass:"bg-green-100 text-green-800"},gemini:{label:"Gemini",color:"#a855f7",bgClass:"bg-purple-100 text-purple-800"}},JG={buying:"bg-blue-100 text-blue-800",selling:"bg-green-100 text-green-800",neighborhoods:"bg-purple-100 text-purple-800","market-insights":"bg-orange-100 text-orange-800",guides:"bg-teal-100 text-teal-800",luxury:"bg-amber-100 text-amber-800",general:"bg-gray-100 text-gray-800"},Pft=["buying","selling","neighborhoods","market-insights","guides","luxury","general"],Ift=({siteDomain:e})=>{const[t,n]=S.useState([]),[r,i]=S.useState([]),[s,a]=S.useState(!0),[o,l]=S.useState(!1),[u,d]=S.useState({current:0,total:0}),[A,f]=S.useState(new Set),[h,p]=S.useState(new Set),[m,g]=S.useState("all"),[y,v]=S.useState("all"),[x,b]=S.useState("last-checked"),w="khmmwvmdbhaplcfcndjx",B="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtobW13dm1kYmhhcGxjZmNuZGp4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzcwNTQ1MDcsImV4cCI6MjA5MjYzMDUwN30.c5aUVQ4shbnMOIIkDZRP7geMUb64HPKYg4jQFuBH52Q",k=S.useCallback(async()=>{const K=new Date(Date.now()-2592e6).toISOString(),[{data:Z},{data:ae}]=await Promise.all([Re.from("citation_checks").select("*").eq("site_domain",e).gte("checked_at",K).order("checked_at",{ascending:!1}).limit(1e3),Re.from("monitor_prompts").select("*").eq("site_domain",e).eq("is_active",!0).order("created_at",{ascending:!0})]);n(Z||[]),i(ae||[]),a(!1)},[e]);S.useEffect(()=>{k()},[k]);const N=t.length,j=t.filter(K=>K.was_cited).length,L=N>0?Math.round(j/N*100):0,T=S.useMemo(()=>{const K=new Set(t.filter(Z=>Z.was_cited).map(Z=>Z.ai_platform));return yx.map(Z=>({platform:Z,citing:K.has(Z)}))},[t]),E=S.useMemo(()=>{const K=t.filter(Z=>{const ae=Z.competitor_mentions;return Array.isArray(ae)&&ae.length>0}).length;return N>0?Math.round(K/N*100):0},[t,N]),F=S.useMemo(()=>yx.map(K=>{var de;const Z=t.filter(Se=>Se.ai_platform===K),ae=Z.filter(Se=>Se.was_cited).length,ue=Z.length>0?Math.round(ae/Z.length*100):0,se=Z[0],Ae=((de=Z.find(Se=>Se.was_cited&&Se.citation_url))==null?void 0:de.citation_url)||null;return{platform:K,total:Z.length,cited:ae,rate:ue,lastCheck:se,lastCitedUrl:Ae,hasData:Z.length>0}}),[t]),M=S.useMemo(()=>r.map(K=>{const Z=t.filter(Ae=>Ae.prompt_text===K.prompt_text),ae={};yx.forEach(Ae=>{ae[Ae]=Z.find(de=>de.ai_platform===Ae)||null});const ue=Z.length>0?Z[0].checked_at:null,se=yx.filter(Ae=>{var de;return(de=ae[Ae])==null?void 0:de.was_cited}).length;return{...K,byPlatform:ae,lastChecked:ue,citedCount:se}}),[r,t]),D=S.useMemo(()=>{let K=M;return m!=="all"&&(K=K.filter(Z=>Z.category===m)),y==="cited"&&(K=K.filter(Z=>Z.citedCount>0)),y==="not-cited"&&(K=K.filter(Z=>Z.citedCount===0)),x==="citation-rate"?K=[...K].sort((Z,ae)=>ae.citedCount-Z.citedCount):x==="category"?K=[...K].sort((Z,ae)=>Z.category.localeCompare(ae.category)):K=[...K].sort((Z,ae)=>!Z.lastChecked&&!ae.lastChecked?0:Z.lastChecked?ae.lastChecked?new Date(ae.lastChecked).getTime()-new Date(Z.lastChecked).getTime():-1:1),K},[M,m,y,x]),H=async K=>{l(!0),d({current:0,total:K.length});let Z=0;for(const ue of K){d({current:Z+1,total:K.length});try{await fetch(`https://${w}.supabase.co/functions/v1/check-citations`,{method:"POST",headers:{"Content-Type":"application/json",apikey:B},body:JSON.stringify({prompt_text:ue.prompt_text,site_domain:ue.site_domain,prompt_category:ue.category,prompt_id:ue.id})})}catch(se){console.error("Check failed for prompt:",ue.prompt_text,se)}Z++,Z<K.length&&await new Promise(se=>setTimeout(se,2e3))}l(!1),await k();const ae=F.filter(ue=>ue.hasData||!0).length;Xe({title:`Checked ${Z} prompts across ${ae} platforms`})},q=()=>H(r),$=()=>{const K=r.filter(Z=>A.has(Z.id));K.length>0&&H(K)},z=K=>{p(Z=>{const ae=new Set(Z);return ae.has(K)?ae.delete(K):ae.add(K),ae})},Q=K=>{f(Z=>{const ae=new Set(Z);return ae.has(K)?ae.delete(K):ae.add(K),ae})},ce=()=>{A.size===D.length?f(new Set):f(new Set(D.map(K=>K.id)))},R=t.length>0?t[0].checked_at:null,O=R?r$e(new Date(R),7):null,Y=L>30?"text-green-600":L>=10?"text-yellow-600":"text-red-500",X=K=>K?K.was_cited&&K.citation_position!=null?c.jsxs("span",{className:"text-green-600 font-medium text-xs",children:["✅ Cited (#",K.citation_position,")"]}):K.was_cited||K.brand_mentioned?c.jsx("span",{className:"text-green-500 text-xs",children:"✅ Mentioned"}):c.jsx("span",{className:"text-muted-foreground text-xs",children:"❌ Not found"}):c.jsx("span",{className:"text-muted-foreground",children:"—"});return s?c.jsxs("div",{className:"space-y-4",children:[c.jsx(jt,{className:"h-32 w-full"}),c.jsx(jt,{className:"h-64 w-full"})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[c.jsx(mr,{children:c.jsxs(gr,{className:"pt-6",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Citation Rate (30d)"}),c.jsxs("p",{className:`text-3xl font-bold ${Y}`,children:[L,"%"]}),c.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[j," of ",N," checks cited"]})]})}),c.jsx(mr,{children:c.jsxs(gr,{className:"pt-6",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Platforms Citing You"}),c.jsx("div",{className:"flex gap-2 mt-2",children:T.map(({platform:K,citing:Z})=>c.jsx("span",{className:`inline-flex px-2 py-1 rounded-full text-xs font-medium ${Z?ES[K].bgClass:"bg-muted text-muted-foreground"}`,children:ES[K].label},K))})]})}),c.jsx(mr,{children:c.jsxs(gr,{className:"pt-6",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Checks Run"}),c.jsx("p",{className:"text-3xl font-bold",children:N})]})}),c.jsx(mr,{children:c.jsxs(gr,{className:"pt-6",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Competitors Cited Instead"}),c.jsxs("p",{className:`text-3xl font-bold ${E>20?"text-red-500":"text-muted-foreground"}`,children:[E,"%"]})]})})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:F.map(K=>{var Z;return c.jsxs(mr,{children:[c.jsx(Ta,{className:"pb-3",children:c.jsxs(Pa,{className:"text-sm flex items-center justify-between",children:[c.jsxs("span",{className:"flex items-center gap-2",children:[c.jsx("span",{className:`w-2 h-2 rounded-full ${K.hasData?"bg-green-500":"bg-muted-foreground"}`}),ES[K.platform].label]}),!K.hasData&&c.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"No data yet"})]})}),c.jsxs(gr,{className:"space-y-3",children:[c.jsx("p",{className:`text-2xl font-bold ${K.rate>30?"text-green-600":K.rate>=10?"text-yellow-600":"text-muted-foreground"}`,children:K.hasData?`${K.rate}%`:"—"}),K.hasData&&c.jsx("div",{className:"w-full bg-muted rounded-full h-2",children:c.jsx("div",{className:"bg-green-500 h-2 rounded-full transition-all",style:{width:`${K.rate}%`}})}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[c.jsxs("p",{children:["Last checked: ",(Z=K.lastCheck)!=null&&Z.checked_at?hy(new Date(K.lastCheck.checked_at),{addSuffix:!0}):"Never"]}),K.lastCitedUrl&&c.jsxs("p",{className:"truncate",children:["Last citation: ",c.jsx("a",{href:`https://${K.lastCitedUrl}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:K.lastCitedUrl})]})]})]})]},K.platform)})}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs(Ia,{value:m,onValueChange:g,children:[c.jsx(la,{className:"w-[160px]",children:c.jsx(Oa,{placeholder:"Category"})}),c.jsxs(ca,{children:[c.jsx(Cn,{value:"all",children:"All Categories"}),Pft.map(K=>c.jsx(Cn,{value:K,children:K},K))]})]}),c.jsxs(Ia,{value:y,onValueChange:v,children:[c.jsx(la,{className:"w-[150px]",children:c.jsx(Oa,{})}),c.jsxs(ca,{children:[c.jsx(Cn,{value:"all",children:"Show All"}),c.jsx(Cn,{value:"cited",children:"Cited Only"}),c.jsx(Cn,{value:"not-cited",children:"Not Cited Only"})]})]}),c.jsxs(Ia,{value:x,onValueChange:b,children:[c.jsx(la,{className:"w-[150px]",children:c.jsx(Oa,{})}),c.jsxs(ca,{children:[c.jsx(Cn,{value:"last-checked",children:"Last Checked"}),c.jsx(Cn,{value:"citation-rate",children:"Citation Rate"}),c.jsx(Cn,{value:"category",children:"Category"})]})]})]}),c.jsx(mr,{children:c.jsx(gr,{className:"pt-6",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-border text-muted-foreground",children:[c.jsx("th",{className:"text-left py-2 w-8",children:c.jsx(_h,{checked:A.size===D.length&&D.length>0,onCheckedChange:ce})}),c.jsx("th",{className:"text-left py-2 w-6"}),c.jsx("th",{className:"text-left py-2 font-medium",children:"Prompt"}),c.jsx("th",{className:"text-left py-2 font-medium w-28",children:"Category"}),c.jsx("th",{className:"text-center py-2 font-medium w-28",children:"Perplexity"}),c.jsx("th",{className:"text-center py-2 font-medium w-28",children:"ChatGPT"}),c.jsx("th",{className:"text-center py-2 font-medium w-28",children:"Gemini"}),c.jsx("th",{className:"text-left py-2 font-medium w-28",children:"Last Checked"})]})}),c.jsxs("tbody",{children:[D.map(K=>c.jsxs(c.Fragment,{children:[c.jsxs("tr",{className:"border-b border-border/50 hover:bg-muted/30 cursor-pointer",onClick:()=>z(K.id),children:[c.jsx("td",{className:"py-2.5",onClick:Z=>Z.stopPropagation(),children:c.jsx(_h,{checked:A.has(K.id),onCheckedChange:()=>Q(K.id)})}),c.jsx("td",{className:"py-2.5",children:h.has(K.id)?c.jsx(Gc,{className:"w-4 h-4 text-muted-foreground"}):c.jsx(Ju,{className:"w-4 h-4 text-muted-foreground"})}),c.jsx("td",{className:"py-2.5",children:c.jsxs(OU,{children:[c.jsx(FU,{asChild:!0,children:c.jsx("span",{className:"block max-w-[300px] truncate",children:K.prompt_text})}),c.jsx(UN,{side:"top",className:"max-w-sm",children:c.jsx("p",{children:K.prompt_text})})]})}),c.jsx("td",{className:"py-2.5",children:c.jsx("span",{className:`inline-block px-2 py-0.5 rounded-full text-xs font-medium ${JG[K.category]||JG.general}`,children:K.category})}),c.jsx("td",{className:"py-2.5 text-center",children:X(K.byPlatform.perplexity)}),c.jsx("td",{className:"py-2.5 text-center",children:X(K.byPlatform.openai)}),c.jsx("td",{className:"py-2.5 text-center",children:X(K.byPlatform.gemini)}),c.jsx("td",{className:"py-2.5 text-xs text-muted-foreground",children:K.lastChecked?hy(new Date(K.lastChecked),{addSuffix:!0}):"Never"})]},K.id),h.has(K.id)&&c.jsx("tr",{className:"bg-muted/20",children:c.jsx("td",{colSpan:8,className:"p-4",children:c.jsxs("div",{className:"space-y-3",children:[yx.map(Z=>{const ae=K.byPlatform[Z];return ae?c.jsxs("div",{className:"text-xs space-y-1",children:[c.jsx("p",{className:"font-medium",children:ES[Z].label}),ae.response_snippet&&c.jsx("p",{className:"text-muted-foreground bg-muted p-2 rounded text-xs leading-relaxed line-clamp-4",children:ae.response_snippet}),ae.citation_url&&c.jsxs("p",{children:["Citation: ",c.jsxs("a",{href:ae.citation_url.startsWith("http")?ae.citation_url:`https://${ae.citation_url}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline inline-flex items-center gap-1",children:[ae.citation_url," ",c.jsx(rl,{className:"w-3 h-3"})]})]}),Array.isArray(ae.competitor_mentions)&&ae.competitor_mentions.length>0&&c.jsxs("p",{className:"text-red-500",children:["Competitors mentioned: ",ae.competitor_mentions.join(", ")]})]},Z):null}),c.jsxs(Be,{size:"sm",variant:"outline",disabled:o,onClick:Z=>{Z.stopPropagation(),H([K])},children:[c.jsx(KO,{className:"w-3 h-3 mr-1"})," Run This Prompt"]})]})})},`${K.id}-detail`)]})),D.length===0&&c.jsx("tr",{children:c.jsx("td",{colSpan:8,className:"py-8 text-center text-muted-foreground",children:"No prompts match the current filters."})})]})]})})})}),c.jsx(mr,{children:c.jsxs(gr,{className:"pt-6 space-y-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs(Be,{onClick:q,disabled:o||r.length===0,children:[o?c.jsx(bo,{className:"w-4 h-4 mr-2 animate-spin"}):c.jsx(KO,{className:"w-4 h-4 mr-2"}),o?`Checking prompt ${u.current} of ${u.total}...`:"Run All Checks Now"]}),c.jsxs(Be,{variant:"outline",onClick:$,disabled:o||A.size===0,children:["Run Selected (",A.size,")"]})]}),o&&c.jsx(s0,{value:u.current/u.total*100,className:"h-2"}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[c.jsxs("p",{children:["Last full run: ",R?hy(new Date(R),{addSuffix:!0}):"Never"]}),O&&c.jsxs("p",{children:["Next suggested run: ",O.toLocaleDateString()]}),c.jsx("p",{className:"text-muted-foreground/60",children:"Estimated cost: ~$0.01–0.03 per prompt across all platforms"})]})]})})]})},Oft=[{id:"buying",label:"Buying"},{id:"selling",label:"Selling"},{id:"neighborhoods",label:"Neighborhoods & Area Guides"},{id:"market-insights",label:"Market Reports & Trends"}],Fft=[{name:"Buyer Personas",items:[{id:"first-time-buyers",label:"First-Time Buyers",description:"First-time homebuyer guidance, programs, and local advice"},{id:"move-up-buyers",label:"Move-Up Buyers",description:"Current owners upgrading to a bigger or nicer home"},{id:"downsizers",label:"Downsizers / Empty Nesters",description:"Selling the family home, moving to something smaller"},{id:"relocation",label:"Relocation / Out-of-State",description:"People moving to the area from another city or state"},{id:"military-va",label:"Military / VA Buyers",description:"VA loans, base proximity, military-friendly agents"},{id:"investors",label:"Investors / Rental Properties",description:"Investment properties, cap rates, landlord guidance"},{id:"retirees",label:"Retirees",description:"Retirement communities, 55+, lifestyle transitions"},{id:"divorce-buyers",label:"Divorce Buyers",description:"Buying after a divorce, sensitive situations"},{id:"multi-generational",label:"Multi-Generational Buyers",description:"Homes for extended families, in-law suites"}]},{name:"Seller Personas",items:[{id:"fsbo-converts",label:"FSBO Converts",description:"For Sale By Owner sellers considering hiring an agent"},{id:"estate-probate",label:"Estate / Probate Sales",description:"Inherited property, estate settlement"},{id:"divorce-sellers",label:"Divorce Sellers",description:"Selling during or after a divorce"},{id:"landlords-exiting",label:"Landlords Exiting Rentals",description:"Selling investment/rental properties"},{id:"distressed-sellers",label:"Pre-Foreclosure / Distressed Sellers",description:"Short sales, financial distress situations"}]},{name:"Property Types",items:[{id:"luxury",label:"Luxury / High-End",description:"Premium properties, estates, high-end market"},{id:"waterfront",label:"Waterfront / Lakefront",description:"Waterfront homes, lake properties, coastal"},{id:"condos-townhomes",label:"Condos / Townhomes",description:"Condo and townhome market, HOA considerations"},{id:"new-construction",label:"New Construction",description:"New builds, builder relationships, custom homes"},{id:"historic-homes",label:"Historic / Older Homes",description:"Historic properties, renovation considerations"},{id:"land-lots",label:"Land / Lots",description:"Vacant land, building lots, acreage"},{id:"multi-family",label:"Multi-Family / Duplexes",description:"Duplexes, triplexes, small multi-family"},{id:"farms-rural",label:"Farms / Rural Property",description:"Agricultural, rural, hobby farms"},{id:"senior-living",label:"55+ Communities / Senior Living",description:"Age-restricted communities"}]},{name:"Local Knowledge",items:[{id:"school-districts",label:"School Districts",description:"School quality, district boundaries, family decisions"},{id:"commuter-guides",label:"Commuter Guides",description:"Commute times, transit access, highway proximity"}]},{name:"Specialty Topics",items:[{id:"financing",label:"FHA / VA / USDA Financing",description:"Government-backed loan programs and eligibility"},{id:"fixer-uppers",label:"Home Renovation / Fixer-Uppers",description:"Homes needing work, renovation potential"},{id:"second-homes",label:"Second Homes / Vacation Properties",description:"Vacation homes, short-term rental potential"}]}],ZG=3,Mft=({selectedCategories:e,onCategoriesChange:t,onContinue:n})=>{const r=s=>{e.includes(s)?t(e.filter(a=>a!==s)):t([...e,s])},i=e.length>=ZG;return c.jsxs("div",{className:"space-y-6 max-w-3xl mx-auto py-4",children:[c.jsxs("div",{className:"text-center space-y-2",children:[c.jsx("h2",{className:"text-lg font-semibold",children:"What do you specialize in?"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Select the niches you serve. The discovery engine will find high-intent questions in these categories. Buying, Selling, Neighborhoods, and Market Insights are always included."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Always Included"}),c.jsx("div",{className:"grid grid-cols-2 gap-2",children:Oft.map(s=>c.jsxs("div",{className:"flex items-center gap-2.5 rounded-md border bg-muted/40 px-3 py-2.5 opacity-80",children:[c.jsx(_h,{checked:!0,disabled:!0,className:"opacity-60"}),c.jsx(xbe,{className:"w-3.5 h-3.5 text-muted-foreground"}),c.jsx("span",{className:"text-sm font-medium",children:s.label})]},s.id))})]}),Fft.map(s=>c.jsxs("div",{className:"space-y-2",children:[c.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:s.name}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:s.items.map(a=>{const o=e.includes(a.id);return c.jsxs("button",{type:"button",onClick:()=>r(a.id),className:`flex items-start gap-2.5 rounded-md border px-3 py-2.5 text-left transition-colors hover:bg-muted/50 ${o?"border-primary bg-primary/5":"border-border"}`,children:[c.jsx(_h,{checked:o,className:"mt-0.5 pointer-events-none"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("span",{className:"text-sm font-medium block",children:a.label}),c.jsx("span",{className:"text-xs text-muted-foreground block",children:a.description})]})]},a.id)})})]},s.name)),c.jsxs("div",{className:"flex items-center justify-between pt-2 border-t",children:[c.jsxs("p",{className:"text-sm text-muted-foreground",children:[c.jsxs(or,{variant:i?"default":"secondary",className:"mr-2",children:[e.length," of ",ZG," minimum"]}),"selected"]}),c.jsxs(Be,{onClick:n,disabled:!i,children:["Continue ",c.jsx(Ju,{className:"w-4 h-4 ml-1"})]})]})]})},eY={buying:"bg-blue-100 text-blue-800",selling:"bg-green-100 text-green-800",neighborhoods:"bg-purple-100 text-purple-800","market-insights":"bg-orange-100 text-orange-800",guides:"bg-teal-100 text-teal-800",luxury:"bg-amber-100 text-amber-800",general:"bg-gray-100 text-gray-800"},Lft={perplexity:"bg-blue-500",openai:"bg-green-500",gemini:"bg-purple-500"},Rft=({open:e,onOpenChange:t,siteDomain:n,onImported:r})=>{const[i,s]=S.useState("categories"),[a,o]=S.useState(""),[l,u]=S.useState(""),[d,A]=S.useState([]),[f,h]=S.useState(null),[p,m]=S.useState(new Set),[g,y]=S.useState({}),[v,x]=S.useState(!0),[b,w]=S.useState("all"),[B,k]=S.useState("score"),[N,j]=S.useState(!1),[L,T]=S.useState(!1),[E,F]=S.useState(1),[M,D]=S.useState(""),[H,q]=S.useState(0),[$,z]=S.useState(0),[Q,ce]=S.useState([]),[R,O]=S.useState(0),Y="khmmwvmdbhaplcfcndjx",X="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtobW13dm1kYmhhcGxjZmNuZGp4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzcwNTQ1MDcsImV4cCI6MjA5MjYzMDUwN30.c5aUVQ4shbnMOIIkDZRP7geMUb64HPKYg4jQFuBH52Q";S.useEffect(()=>{!e||!n||(async()=>{const{data:xe}=await Re.from("monitored_sites").select("selected_categories").eq("domain",n).limit(1).single();xe!=null&&xe.selected_categories&&Array.isArray(xe.selected_categories)&&xe.selected_categories.length>0&&A(xe.selected_categories)})()},[e,n]);const K=async()=>{await Re.from("monitored_sites").update({selected_categories:d}).eq("domain",n),s("input")},Z=async()=>{if(!(!a.trim()||!l.trim())){s("loading"),F(1),D(`Starting discovery for ${a.trim()}, ${l.trim()}...`),q(0),z(0),ce([]),O(0);try{const xe=await fetch(`https://${Y}.supabase.co/functions/v1/discover-prompts`,{method:"POST",headers:{"Content-Type":"application/json",apikey:X},body:JSON.stringify({metro:a.trim(),state:l.trim(),categories:d})});if(!xe.ok||!xe.body){const ye=await xe.text();throw new Error(ye||"Failed to start discovery")}const Qe=xe.body.getReader(),ze=new TextDecoder;let Rt="",dt=null;for(;;){const{done:ye,value:Ee}=await Qe.read();if(ye)break;Rt+=ze.decode(Ee,{stream:!0});let qe;for(;(qe=Rt.indexOf(`
`))!==-1;){const Ue=Rt.slice(0,qe).trim();if(Rt=Rt.slice(qe+2),!Ue.startsWith("data: "))continue;const Ge=Ue.slice(6).trim();if(Ge!=="[DONE]")try{const pe=JSON.parse(Ge);switch(pe.type){case"status":D(pe.message),pe.phase&&F(pe.phase),ae(pe.message);break;case"progress":D(pe.message),q(pe.completed),z(pe.total),pe.phase&&F(pe.phase),ae(pe.message);break;case"phase_complete":D(pe.message),pe.uniqueQuestions&&O(pe.uniqueQuestions),ae(pe.message);break;case"error":throw new Error(pe.message);case"result":dt=pe;break}}catch(pe){if(pe.message&&!pe.message.includes("JSON"))throw pe}}}if(dt){h(dt);const ye=new Set;dt.questions.forEach(Ee=>{Ee.citability_score>=3&&ye.add(Ee.normalized)}),m(ye),s("results")}else throw new Error("No results received from discovery")}catch(xe){Xe({title:"Discovery failed",description:xe.message,variant:"destructive"}),s("input")}}},ae=xe=>{ce(Qe=>[...Qe,`[${new Date().toLocaleTimeString()}] ${xe}`].slice(-30))},ue=S.useMemo(()=>{if(!f)return[];let xe=[...f.questions];return v&&(xe=xe.filter(Qe=>Qe.citability_score>=4)),b!=="all"&&(xe=xe.filter(Qe=>Qe.category===b)),B==="score"?xe.sort((Qe,ze)=>ze.citability_score-Qe.citability_score):B==="category"?xe.sort((Qe,ze)=>Qe.category.localeCompare(ze.category)):B==="platforms"&&xe.sort((Qe,ze)=>ze.source_count-Qe.source_count),xe},[f,v,b,B]),se=p.size,Ae=(f==null?void 0:f.questions.filter(xe=>p.has(xe.normalized)&&xe.citability_score>=4).length)||0,de=(f==null?void 0:f.questions.filter(xe=>p.has(xe.normalized)&&xe.citability_score>=3&&xe.citability_score<4).length)||0,Se=xe=>{m(Qe=>{const ze=new Set(Qe);return ze.has(xe)?ze.delete(xe):ze.add(xe),ze})},Fe=()=>{const xe=new Set(p);ue.forEach(Qe=>xe.add(Qe.normalized)),m(xe)},te=()=>m(new Set),ke=async()=>{if(!(!f||se===0)){j(!0);try{const{data:xe}=await Re.from("monitor_prompts").select("prompt_text").eq("site_domain",n),Qe=new Set((xe||[]).map(dt=>dt.prompt_text.toLowerCase().replace(/[?!.,]+$/,"").trim())),ze=f.questions.filter(dt=>p.has(dt.normalized)).filter(dt=>!Qe.has(dt.normalized)).map(dt=>({site_domain:n,prompt_text:g[dt.normalized]||dt.question,category:dt.category,citability_score:dt.citability_score})),Rt=se-ze.length;if(ze.length>0){const{error:dt}=await Re.from("monitor_prompts").insert(ze);if(dt)throw dt}Xe({title:`Added ${ze.length} new prompts to your prompt bank`,description:Rt>0?`${Rt} duplicates skipped`:void 0}),r(),t(!1),Ze()}catch(xe){Xe({title:"Import failed",description:xe.message,variant:"destructive"})}finally{j(!1)}}},Ze=()=>{s("categories"),h(null),m(new Set),y({}),ce([]),F(1),D(""),q(0),z(0),O(0)},et=xe=>{xe||Ze(),t(xe)},Te=xe=>{const Qe=xe/5*100,ze=xe>=4?"bg-green-500":xe>=3?"bg-yellow-500":xe>=2?"bg-orange-500":"bg-red-500",Rt=xe>=4?"High":xe>=3?"Medium":xe>=2?"Low":"Unlikely";return c.jsxs("div",{className:"flex items-center gap-2 min-w-[140px]",children:[c.jsx("div",{className:"flex-1 h-2 rounded-full bg-muted overflow-hidden",children:c.jsx("div",{className:`h-full rounded-full ${ze}`,style:{width:`${Qe}%`}})}),c.jsx("span",{className:"text-xs font-medium w-8 text-right",children:xe.toFixed(1)}),c.jsx("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded ${xe>=4?"bg-green-100 text-green-800":xe>=3?"bg-yellow-100 text-yellow-800":xe>=2?"bg-orange-100 text-orange-800":"bg-red-100 text-red-800"}`,children:Rt})]})},st=$>0?Math.round(H/$*100):0;return c.jsx($c,{open:e,onOpenChange:et,children:c.jsxs(Gl,{className:"max-w-6xl max-h-[90vh] flex flex-col p-0",children:[c.jsx(Yl,{className:"px-6 pt-6 pb-4 border-b",children:c.jsxs(Xl,{className:"flex items-center gap-2",children:[c.jsx(yo,{className:"w-5 h-5 text-primary"})," Prompt Discovery Engine"]})}),c.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:[i==="categories"&&c.jsx(Mft,{selectedCategories:d,onCategoriesChange:A,onContinue:K}),i==="input"&&c.jsxs("div",{className:"max-w-md mx-auto py-12 space-y-6",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-sm font-medium",children:"Metro Area"}),c.jsx(Ct,{placeholder:"e.g., Grand Rapids, Phoenix, Dallas-Fort Worth",value:a,onChange:xe=>o(xe.target.value),className:"mt-1"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-sm font-medium",children:"State"}),c.jsx(Ct,{placeholder:"e.g., MI, AZ, TX",value:l,onChange:xe=>u(xe.target.value),className:"mt-1"})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Be,{variant:"outline",onClick:()=>s("categories"),children:"Back"}),c.jsxs(Be,{onClick:Z,disabled:!a.trim()||!l.trim(),className:"flex-1",children:[c.jsx(yo,{className:"w-4 h-4 mr-2"})," Discover Questions"]})]})]}),c.jsxs("div",{className:"text-center space-y-2",children:[c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Querying ",4+d.length," prompt categories across AI platforms. Takes 2-4 minutes."]}),d.length>0&&c.jsx("div",{className:"flex flex-wrap justify-center gap-1",children:d.map(xe=>c.jsx(or,{variant:"secondary",className:"text-[10px]",children:xe},xe))})]})]}),i==="loading"&&c.jsxs("div",{className:"flex flex-col items-center justify-center py-10 space-y-6 max-w-2xl mx-auto",children:[c.jsx(bo,{className:"w-10 h-10 animate-spin text-primary"}),c.jsxs("div",{className:"text-center space-y-2 w-full",children:[c.jsx("p",{className:"font-medium",children:M}),c.jsx("div",{className:"flex items-center justify-center gap-2",children:["perplexity","openai","gemini"].map(xe=>c.jsx(or,{variant:"secondary",className:"text-xs capitalize",children:xe==="openai"?"ChatGPT":xe.charAt(0).toUpperCase()+xe.slice(1)},xe))}),$>0&&c.jsxs("div",{className:"w-full space-y-1 pt-2",children:[c.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[c.jsxs("span",{children:["Phase ",E,": ",H,"/",$]}),c.jsxs("span",{children:[st,"%"]})]}),c.jsx("div",{className:"w-full h-3 rounded-full bg-muted overflow-hidden",children:c.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${st}%`}})})]}),R>0&&c.jsxs("p",{className:"text-sm text-muted-foreground pt-1",children:["✅ ",R," unique questions discovered — now scoring citability..."]})]}),c.jsxs("div",{className:"w-full border rounded-lg bg-muted/30 p-3 max-h-48 overflow-y-auto",children:[c.jsx("p",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Live Activity Log"}),c.jsxs("div",{className:"space-y-0.5 font-mono text-[11px] text-muted-foreground",children:[Q.length===0&&c.jsx("p",{children:"Waiting for events..."}),Q.map((xe,Qe)=>c.jsx("p",{className:Qe===Q.length-1?"text-foreground font-medium":"",children:xe},Qe))]})]})]}),i==="results"&&f&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"rounded-lg border bg-muted/30 p-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("p",{className:"font-medium",children:["Total questions found: ",f.total_questions]}),c.jsxs("p",{className:"text-sm font-medium text-green-700",children:[f.high_citability_count," questions scored 4+ (high citability) — these are your priority targets"]})]}),c.jsxs("div",{className:"flex h-3 rounded-full overflow-hidden bg-muted",children:[f.high_citability_count>0&&c.jsx("div",{className:"bg-green-500 transition-all",style:{width:`${f.high_citability_count/f.total_questions*100}%`}}),f.medium_citability_count>0&&c.jsx("div",{className:"bg-yellow-500 transition-all",style:{width:`${f.medium_citability_count/f.total_questions*100}%`}}),f.low_citability_count>0&&c.jsx("div",{className:"bg-red-500 transition-all",style:{width:`${f.low_citability_count/f.total_questions*100}%`}})]}),c.jsxs("div",{className:"flex gap-4 text-xs text-muted-foreground",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-green-500"})," High (",f.high_citability_count,")"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-yellow-500"})," Medium (",f.medium_citability_count,")"]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-red-500"})," Low (",f.low_citability_count,")"]})]}),c.jsx("p",{className:"text-[10px] text-muted-foreground",children:f.accuracy_note})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(rc,{checked:v,onCheckedChange:x}),c.jsx("span",{className:"text-sm font-medium",children:"High Citability Only"})]}),c.jsxs(Ia,{value:b,onValueChange:w,children:[c.jsx(la,{className:"w-[160px]",children:c.jsx(Oa,{})}),c.jsxs(ca,{children:[c.jsx(Cn,{value:"all",children:"All Categories"}),["buying","selling","neighborhoods","market-insights","luxury","guides","general"].map(xe=>c.jsx(Cn,{value:xe,children:xe},xe))]})]}),c.jsxs(Ia,{value:B,onValueChange:k,children:[c.jsx(la,{className:"w-[160px]",children:c.jsx(Oa,{})}),c.jsxs(ca,{children:[c.jsx(Cn,{value:"score",children:"Citability Score"}),c.jsx(Cn,{value:"category",children:"Category"}),c.jsx(Cn,{value:"platforms",children:"Number of Platforms"})]})]}),c.jsxs("div",{className:"flex gap-2 ml-auto",children:[c.jsx(Be,{size:"sm",variant:"outline",onClick:Fe,children:"Select All Visible"}),c.jsx(Be,{size:"sm",variant:"outline",onClick:te,children:"Deselect All"})]})]}),c.jsx("div",{className:"border rounded-lg overflow-hidden",children:c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b bg-muted/50 text-muted-foreground",children:[c.jsx("th",{className:"w-10 p-2"}),c.jsx("th",{className:"text-left p-2 font-medium",children:"Question"}),c.jsx("th",{className:"text-left p-2 font-medium w-32",children:"Category"}),c.jsx("th",{className:"text-left p-2 font-medium w-44",children:"Citability"}),c.jsx("th",{className:"text-center p-2 font-medium w-24",children:"Platforms"})]})}),c.jsxs("tbody",{children:[ue.map(xe=>c.jsxs("tr",{className:"border-b border-border/50 hover:bg-muted/30",children:[c.jsx("td",{className:"p-2 text-center",children:c.jsx(_h,{checked:p.has(xe.normalized),onCheckedChange:()=>Se(xe.normalized)})}),c.jsx("td",{className:"p-2",children:c.jsx("input",{className:"w-full bg-transparent border-none outline-none text-sm focus:ring-1 focus:ring-primary rounded px-1 py-0.5",value:g[xe.normalized]??xe.question,onChange:Qe=>y(ze=>({...ze,[xe.normalized]:Qe.target.value}))})}),c.jsx("td",{className:"p-2",children:c.jsx("span",{className:`inline-block px-2 py-0.5 rounded-full text-xs font-medium ${eY[xe.category]||eY.general}`,children:xe.category})}),c.jsx("td",{className:"p-2",children:Te(xe.citability_score)}),c.jsx("td",{className:"p-2",children:c.jsx("div",{className:"flex items-center justify-center gap-1.5",children:xe.sources.map(Qe=>c.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${Lft[Qe]||"bg-gray-400"}`,title:Qe},Qe))})})]},xe.normalized)),ue.length===0&&c.jsx("tr",{children:c.jsx("td",{colSpan:5,className:"py-8 text-center text-muted-foreground",children:"No questions match the current filters."})})]})]})})]})]}),i==="results"&&c.jsxs("div",{className:"border-t bg-background px-6 py-4 flex items-center justify-between",children:[c.jsxs("p",{className:"text-sm text-muted-foreground",children:[se," questions selected (",Ae," high, ",de," medium)"]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs(Be,{variant:"outline",onClick:()=>T(!0),disabled:se===0||N,children:[c.jsx(zy,{className:"w-4 h-4 mr-2"})," Generate Blueprint from Selected"]}),c.jsxs(Be,{onClick:ke,disabled:se===0||N,children:[N?c.jsx(bo,{className:"w-4 h-4 mr-2 animate-spin"}):c.jsx(qc,{className:"w-4 h-4 mr-2"}),"Add Selected to Prompt Bank"]})]})]}),f&&c.jsx(nAe,{open:L,onOpenChange:T,siteDomain:n,questions:f.questions.filter(xe=>p.has(xe.normalized)),metro:f.metro||a,state:f.state||l,onImported:r})]})})},UI=["buying","selling","neighborhoods","market-insights","guides","luxury","general"],tY={buying:"bg-blue-100 text-blue-800",selling:"bg-green-100 text-green-800",neighborhoods:"bg-purple-100 text-purple-800","market-insights":"bg-orange-100 text-orange-800",guides:"bg-teal-100 text-teal-800",luxury:"bg-amber-100 text-amber-800",general:"bg-gray-100 text-gray-800"},Uft=({score:e})=>{if(e==null)return c.jsx("span",{className:"text-xs text-muted-foreground",children:"—"});const t=e/5*100,n=e>=4?"bg-green-500":e>=3?"bg-yellow-500":e>=2?"bg-orange-500":"bg-red-500",r=e>=4?"High":e>=3?"Medium":e>=2?"Low":"Unlikely",i=e>=4?"bg-green-100 text-green-800":e>=3?"bg-yellow-100 text-yellow-800":e>=2?"bg-orange-100 text-orange-800":"bg-red-100 text-red-800";return c.jsxs("div",{className:"flex items-center gap-1.5 min-w-[110px]",children:[c.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-muted overflow-hidden",children:c.jsx("div",{className:`h-full rounded-full ${n}`,style:{width:`${t}%`}})}),c.jsx("span",{className:"text-[10px] font-medium w-6 text-right",children:e.toFixed(1)}),c.jsx("span",{className:`text-[9px] font-medium px-1 py-0.5 rounded ${i}`,children:r})]})},Dft=()=>{const[e,t]=S.useState([]),[n,r]=S.useState(null),[i,s]=S.useState(!0),[a,o]=S.useState(""),[l,u]=S.useState("all"),[d,A]=S.useState(!1),[f,h]=S.useState(!1),[p,m]=S.useState(!1),[g,y]=S.useState(""),[v,x]=S.useState("general"),[b,w]=S.useState(""),[B,k]=S.useState("general"),[N,j]=S.useState(null),[L,T]=S.useState(""),[E,F]=S.useState(!1),[M,D]=S.useState(""),[H,q]=S.useState(""),[$,z]=S.useState(!1),[Q,ce]=S.useState(!1),[R,O]=S.useState(""),[Y,X]=S.useState(""),[K,Z]=S.useState("default"),[ae,ue]=S.useState(!1),[se,Ae]=S.useState(!1),[de,Se]=S.useState(!1),[Fe,te]=S.useState(""),[ke,Ze]=S.useState(""),et="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtobW13dm1kYmhhcGxjZmNuZGp4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzcwNTQ1MDcsImV4cCI6MjA5MjYzMDUwN30.c5aUVQ4shbnMOIIkDZRP7geMUb64HPKYg4jQFuBH52Q",Te=async()=>{const[{data:pe},{data:mt}]=await Promise.all([Re.from("monitored_sites").select("*").limit(1).single(),Re.from("monitor_prompts").select("*").order("created_at",{ascending:!0})]);pe&&r({id:pe.id,domain:pe.domain,brand_keywords:pe.brand_keywords||[],competitor_domains:pe.competitor_domains||[]}),t(mt||[]),s(!1)};S.useEffect(()=>{Te()},[]);const st=S.useMemo(()=>{let pe=e.filter(mt=>!(l!=="all"&&mt.category!==l||a&&!mt.prompt_text.toLowerCase().includes(a.toLowerCase())||ae&&(mt.citability_score==null||mt.citability_score<4)));return K==="citability"&&(pe=[...pe].sort((mt,ct)=>(ct.citability_score??0)-(mt.citability_score??0))),pe},[e,l,a,K,ae]),xe=async()=>{if(!g.trim()||!n)return;const{error:pe}=await Re.from("monitor_prompts").insert({site_domain:n.domain,prompt_text:g.trim(),category:v});if(pe){Xe({title:"Failed to add prompt",variant:"destructive"});return}Xe({title:"Prompt added"}),y(""),A(!1),Te()},Qe=async()=>{if(!b.trim()||!n)return;const pe=b.split(`
`).map(xt=>xt.trim()).filter(Boolean);if(pe.length===0)return;const mt=pe.map(xt=>({site_domain:n.domain,prompt_text:xt,category:B})),{error:ct}=await Re.from("monitor_prompts").insert(mt);if(ct){Xe({title:"Bulk add failed",variant:"destructive"});return}Xe({title:`${pe.length} prompts added`}),w(""),h(!1),Te()},ze=async(pe,mt)=>{await Re.from("monitor_prompts").update({is_active:mt}).eq("id",pe),t(ct=>ct.map(xt=>xt.id===pe?{...xt,is_active:mt}:xt))},Rt=async pe=>{confirm("Delete this prompt?")&&(await Re.from("monitor_prompts").delete().eq("id",pe),t(mt=>mt.filter(ct=>ct.id!==pe)),Xe({title:"Prompt deleted"}))},dt=async pe=>{await Re.from("monitor_prompts").update({prompt_text:L}).eq("id",pe),t(mt=>mt.map(ct=>ct.id===pe?{...ct,prompt_text:L}:ct)),j(null),Xe({title:"Prompt updated"})},ye=async()=>{if(!M.trim()||!n)return;const pe=[...n.brand_keywords,M.trim()];await Re.from("monitored_sites").update({brand_keywords:pe}).eq("id",n.id),r({...n,brand_keywords:pe}),D("")},Ee=async pe=>{if(!n)return;const mt=n.brand_keywords.filter(ct=>ct!==pe);await Re.from("monitored_sites").update({brand_keywords:mt}).eq("id",n.id),r({...n,brand_keywords:mt})},qe=async()=>{if(!H.trim()||!n)return;const pe=[...n.competitor_domains,H.trim()];await Re.from("monitored_sites").update({competitor_domains:pe}).eq("id",n.id),r({...n,competitor_domains:pe}),q("")},Ue=async pe=>{if(!n)return;const mt=n.competitor_domains.filter(ct=>ct!==pe);await Re.from("monitored_sites").update({competitor_domains:mt}).eq("id",n.id),r({...n,competitor_domains:mt})},Ge=async()=>{if(!(!R.trim()||!Y.trim()||!n)){z(!0),ce(!1);try{const pe=e.filter(Mt=>Mt.is_active);if(pe.length===0){Xe({title:"No active prompts to score"}),z(!1);return}const mt=pe.map(Mt=>Mt.prompt_text),ct=Qft(mt,R.trim(),Y.trim()),Ft=await Hft(ct,mt.length,"https://khmmwvmdbhaplcfcndjx.supabase.co",et);for(let Mt=0;Mt<pe.length;Mt++){const Pt=Ft[Mt]??3;await Re.from("monitor_prompts").update({citability_score:Pt}).eq("id",pe[Mt].id)}const $t=Ft.filter(Mt=>Mt>=4).length,At=Ft.filter(Mt=>Mt>=3&&Mt<4).length;Xe({title:`Scored ${pe.length} prompts`,description:`${$t} scored high, ${At} scored medium.`}),Te()}catch(pe){Xe({title:"Scoring failed",description:pe.message,variant:"destructive"})}finally{z(!1)}}};return i?c.jsx(jt,{className:"h-64 w-full"}):c.jsxs("div",{className:"space-y-6",children:[c.jsx(Ew,{open:E,onOpenChange:F,children:c.jsxs(mr,{children:[c.jsx(Nw,{className:"w-full",children:c.jsxs(Ta,{className:"flex flex-row items-center justify-between cursor-pointer",children:[c.jsxs(Pa,{className:"text-base flex items-center gap-2",children:[c.jsx(pU,{className:"w-4 h-4"})," Site Settings"]}),c.jsx(Gc,{className:`w-4 h-4 transition-transform ${E?"rotate-180":""}`})]})}),c.jsx(jw,{children:c.jsxs(gr,{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"Site Domain"}),c.jsx("p",{className:"text-sm font-mono mt-1",children:n==null?void 0:n.domain})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"Brand Keywords"}),c.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:n==null?void 0:n.brand_keywords.map(pe=>c.jsxs(or,{variant:"secondary",className:"gap-1",children:[pe,c.jsx("button",{onClick:()=>Ee(pe),className:"ml-1 hover:text-destructive",children:c.jsx(Da,{className:"w-3 h-3"})})]},pe))}),c.jsxs("div",{className:"flex gap-2 mt-2",children:[c.jsx(Ct,{placeholder:"Add keyword...",value:M,onChange:pe=>D(pe.target.value),onKeyDown:pe=>pe.key==="Enter"&&ye(),className:"max-w-xs"}),c.jsx(Be,{size:"sm",variant:"outline",onClick:ye,children:"Add"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"Competitor Domains"}),c.jsxs("div",{className:"flex flex-wrap gap-2 mt-2",children:[n==null?void 0:n.competitor_domains.map(pe=>c.jsxs(or,{variant:"secondary",className:"gap-1",children:[pe,c.jsx("button",{onClick:()=>Ue(pe),className:"ml-1 hover:text-destructive",children:c.jsx(Da,{className:"w-3 h-3"})})]},pe)),(n==null?void 0:n.competitor_domains.length)===0&&c.jsx("span",{className:"text-sm text-muted-foreground",children:"None added yet"})]}),c.jsxs("div",{className:"flex gap-2 mt-2",children:[c.jsx(Ct,{placeholder:"Add competitor domain...",value:H,onChange:pe=>q(pe.target.value),onKeyDown:pe=>pe.key==="Enter"&&qe(),className:"max-w-xs"}),c.jsx(Be,{size:"sm",variant:"outline",onClick:qe,children:"Add"})]})]})]})})]})}),c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-sm",children:[c.jsx(fU,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),c.jsx(Ct,{placeholder:"Search prompts...",value:a,onChange:pe=>o(pe.target.value),className:"pl-9"})]}),c.jsxs(Ia,{value:l,onValueChange:u,children:[c.jsx(la,{className:"w-[180px]",children:c.jsx(Oa,{placeholder:"Category"})}),c.jsxs(ca,{children:[c.jsx(Cn,{value:"all",children:"All Categories"}),UI.map(pe=>c.jsx(Cn,{value:pe,children:pe},pe))]})]}),c.jsxs(Ia,{value:K,onValueChange:Z,children:[c.jsx(la,{className:"w-[160px]",children:c.jsx(Oa,{})}),c.jsxs(ca,{children:[c.jsx(Cn,{value:"default",children:"Date Added"}),c.jsx(Cn,{value:"citability",children:"Citability Score"})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(rc,{checked:ae,onCheckedChange:ue}),c.jsx("span",{className:"text-sm font-medium",children:"High Only"})]}),c.jsxs(Be,{size:"sm",onClick:()=>A(!0),children:[c.jsx(Tp,{className:"w-4 h-4 mr-1"})," Add Prompt"]}),c.jsxs(Be,{size:"sm",variant:"outline",onClick:()=>h(!0),children:[c.jsx(ybe,{className:"w-4 h-4 mr-1"})," Bulk Add"]}),c.jsxs(Be,{size:"sm",variant:"default",onClick:()=>m(!0),className:"bg-primary",children:[c.jsx(yo,{className:"w-4 h-4 mr-1"})," Discover Prompts"]}),c.jsxs(Be,{size:"sm",variant:"outline",onClick:()=>ce(!0),disabled:$,children:[$?c.jsx(bo,{className:"w-4 h-4 mr-1 animate-spin"}):c.jsx(Qc,{className:"w-4 h-4 mr-1"}),"Re-score Prompts"]}),c.jsxs(Be,{size:"sm",variant:"outline",onClick:()=>Se(!0),disabled:e.filter(pe=>pe.is_active).length===0,children:[c.jsx(zy,{className:"w-4 h-4 mr-1"})," Generate Blueprint from Bank"]})]}),c.jsx(mr,{children:c.jsx(gr,{className:"pt-6",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-border text-muted-foreground",children:[c.jsx("th",{className:"text-left py-2 font-medium",children:"Prompt Text"}),c.jsx("th",{className:"text-left py-2 font-medium w-32",children:"Category"}),c.jsx("th",{className:"text-left py-2 font-medium w-32",children:"Citability"}),c.jsx("th",{className:"text-center py-2 font-medium w-20",children:"Active"}),c.jsx("th",{className:"text-left py-2 font-medium w-28",children:"Last Checked"}),c.jsx("th",{className:"text-right py-2 font-medium w-24",children:"Actions"})]})}),c.jsxs("tbody",{children:[st.map(pe=>c.jsxs("tr",{className:"border-b border-border/50",children:[c.jsx("td",{className:"py-2.5",children:N===pe.id?c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Ct,{value:L,onChange:mt=>T(mt.target.value),className:"text-sm"}),c.jsx(Be,{size:"sm",onClick:()=>dt(pe.id),children:"Save"}),c.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>j(null),children:"Cancel"})]}):c.jsx("span",{children:pe.prompt_text})}),c.jsx("td",{className:"py-2.5",children:c.jsx("span",{className:`inline-block px-2 py-0.5 rounded-full text-xs font-medium ${tY[pe.category]||tY.general}`,children:pe.category})}),c.jsx("td",{className:"py-2.5",children:c.jsx(Uft,{score:pe.citability_score})}),c.jsx("td",{className:"py-2.5 text-center",children:c.jsx(rc,{checked:pe.is_active??!0,onCheckedChange:mt=>ze(pe.id,mt)})}),c.jsx("td",{className:"py-2.5 text-muted-foreground text-xs",children:pe.last_checked_at?hy(new Date(pe.last_checked_at),{addSuffix:!0}):"Never"}),c.jsx("td",{className:"py-2.5 text-right",children:c.jsxs("div",{className:"flex justify-end gap-1",children:[c.jsx(Be,{size:"icon",variant:"ghost",className:"h-7 w-7",onClick:()=>{j(pe.id),T(pe.prompt_text)},children:c.jsx(Sne,{className:"w-3.5 h-3.5"})}),c.jsx(Be,{size:"icon",variant:"ghost",className:"h-7 w-7 text-destructive",onClick:()=>Rt(pe.id),children:c.jsx(hl,{className:"w-3.5 h-3.5"})})]})})]},pe.id)),st.length===0&&c.jsx("tr",{children:c.jsx("td",{colSpan:6,className:"py-8 text-center text-muted-foreground",children:"No prompts found."})})]})]})})})}),c.jsx($c,{open:d,onOpenChange:A,children:c.jsxs(Gl,{children:[c.jsx(Yl,{children:c.jsx(Xl,{children:"Add Prompt"})}),c.jsxs("div",{className:"space-y-4",children:[c.jsx(ql,{placeholder:"Enter your prompt question...",value:g,onChange:pe=>y(pe.target.value),rows:3}),c.jsxs(Ia,{value:v,onValueChange:x,children:[c.jsx(la,{children:c.jsx(Oa,{})}),c.jsx(ca,{children:UI.map(pe=>c.jsx(Cn,{value:pe,children:pe},pe))})]}),c.jsx(Be,{onClick:xe,disabled:!g.trim(),className:"w-full",children:"Save Prompt"})]})]})}),c.jsx($c,{open:f,onOpenChange:h,children:c.jsxs(Gl,{children:[c.jsx(Yl,{children:c.jsx(Xl,{children:"Bulk Add Prompts"})}),c.jsxs("div",{className:"space-y-4",children:[c.jsx(ql,{placeholder:"Paste one prompt per line...",value:b,onChange:pe=>w(pe.target.value),rows:8}),c.jsxs(Ia,{value:B,onValueChange:k,children:[c.jsx(la,{children:c.jsx(Oa,{})}),c.jsx(ca,{children:UI.map(pe=>c.jsx(Cn,{value:pe,children:pe},pe))})]}),c.jsxs(Be,{onClick:Qe,disabled:!b.trim(),className:"w-full",children:["Add ",b.split(`
`).filter(pe=>pe.trim()).length," Prompts"]})]})]})}),c.jsx($c,{open:Q,onOpenChange:ce,children:c.jsxs(Gl,{children:[c.jsx(Yl,{children:c.jsx(Xl,{children:"Re-score Prompts for Citability"})}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("p",{className:"text-sm text-muted-foreground",children:["This will score all ",e.filter(pe=>pe.is_active).length," active prompts for citability. Requires a metro area for context."]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-sm font-medium",children:"Metro Area"}),c.jsx(Ct,{placeholder:"e.g., Grand Rapids",value:R,onChange:pe=>O(pe.target.value),className:"mt-1"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-sm font-medium",children:"State"}),c.jsx(Ct,{placeholder:"e.g., MI",value:Y,onChange:pe=>X(pe.target.value),className:"mt-1"})]}),c.jsxs(Be,{onClick:Ge,disabled:!R.trim()||!Y.trim(),className:"w-full",children:["Score ",e.filter(pe=>pe.is_active).length," Prompts"]})]})]})}),n&&c.jsx(Rft,{open:p,onOpenChange:m,siteDomain:n.domain,onImported:Te}),c.jsx($c,{open:de,onOpenChange:Se,children:c.jsxs(Gl,{children:[c.jsx(Yl,{children:c.jsx(Xl,{children:"Generate Blueprint from Prompt Bank"})}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("p",{className:"text-sm text-muted-foreground",children:["This will cluster and rewrite ",e.filter(pe=>pe.is_active).length," active prompts into a structured content blueprint. Enter the metro area for context."]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-sm font-medium",children:"Metro Area"}),c.jsx(Ct,{placeholder:"e.g., Grand Rapids",value:Fe,onChange:pe=>te(pe.target.value),className:"mt-1"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-sm font-medium",children:"State"}),c.jsx(Ct,{placeholder:"e.g., MI",value:ke,onChange:pe=>Ze(pe.target.value),className:"mt-1"})]}),c.jsxs(Be,{onClick:()=>{Se(!1),Ae(!0)},disabled:!Fe.trim()||!ke.trim(),className:"w-full",children:[c.jsx(zy,{className:"w-4 h-4 mr-2"})," Generate Blueprint"]})]})]})}),n&&c.jsx(nAe,{open:se,onOpenChange:Ae,siteDomain:n.domain,questions:e.filter(pe=>pe.is_active&&pe.citability_score!=null&&pe.citability_score>=4).map(pe=>({question:pe.prompt_text,category:pe.category,citability_score:pe.citability_score??4})),metro:Fe,state:ke,onImported:Te})]})};function Qft(e,t,n){const r=e.map((i,s)=>`${s+1}. ${i}`).join(`
`);return`You are evaluating real estate questions for ${t}, ${n}. For each question below, rate on a scale of 1-5 how likely you would be to include a specific local real estate agent's name, cite an agent's website URL, or directly recommend contacting a local realtor in your response.
SCORING GUIDE:
5 = You would almost certainly name a specific agent or link to an agent's website
4 = You would very likely recommend a specific agent or cite agent content
3 = You might cite an agent's content if it was high quality and relevant
2 = You would mostly answer with general info but might mention an agent in passing
1 = You would answer entirely with general knowledge and would not cite a specific agent
For each question, respond with ONLY the number (1-5), one per line, in the same order. No explanations.
Questions:
${r}`}async function Hft(e,t,n,r){await fetch(`${n}/functions/v1/discover-prompts`,{method:"POST",headers:{"Content-Type":"application/json",apikey:r},body:JSON.stringify({score_only:!0,scoring_prompt:e,count:t})});const i=`${n}/functions/v1/generate-aeo-content`,s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",apikey:r},body:JSON.stringify({prompt:e,max_tokens:2e3})});if(!s.ok)throw new Error("Scoring request failed");const a=await s.json(),l=(a.content||a.text||"").trim().split(`
`).map(d=>d.trim()),u=[];for(const d of l){const A=d.match(/(\d)/);if(A){const f=parseInt(A[1]);f>=1&&f<=5&&u.push(f)}if(u.length>=t)break}for(;u.length<t;)u.push(3);return u}const $ft=()=>{const[e,t]=S.useState([]),[n,r]=S.useState("");return S.useEffect(()=>{(async()=>{const{data:s}=await Re.from("monitored_sites").select("id, domain, display_name").eq("is_active",!0).order("created_at",{ascending:!0});s&&s.length>0&&(t(s),r(s[0].domain))})()},[]),c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-semibold",children:"AEO Monitor"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Track AI crawler activity and monitor your brand's visibility across AI platforms."})]}),e.length>1&&c.jsxs(Ia,{value:n,onValueChange:r,children:[c.jsx(la,{className:"w-[220px]",children:c.jsx(Oa,{placeholder:"Select site"})}),c.jsx(ca,{children:e.map(i=>c.jsx(Cn,{value:i.domain,children:i.display_name},i.domain))})]})]}),n&&c.jsxs(u2,{defaultValue:"crawler-activity",children:[c.jsxs(G0,{className:"bg-muted/50 p-1",children:[c.jsx(ii,{value:"crawler-activity",className:"text-xs uppercase tracking-wider",children:"Crawler Activity"}),c.jsx(ii,{value:"citation-tracker",className:"text-xs uppercase tracking-wider",children:"Citation Tracker"}),c.jsx(ii,{value:"prompt-bank",className:"text-xs uppercase tracking-wider",children:"Prompt Bank"})]}),c.jsx(si,{value:"crawler-activity",className:"mt-6",children:c.jsx(Tft,{})}),c.jsx(si,{value:"citation-tracker",className:"mt-6",children:c.jsx(Ift,{siteDomain:n})}),c.jsx(si,{value:"prompt-bank",className:"mt-6",children:c.jsx(Dft,{})})]})]})},zft=()=>{const{isAdmin:e,isLoading:t}=n5(),{tier:n,isAeo:r,setTier:i,isLoading:s}=Due(),{configMap:a}=_o(),o=wd(),[l,u]=S.useState(!1),[d,A]=S.useState("index"),[f,h]=S.useState(""),[p,m]=S.useState(!1),[g,y]=S.useState(!1),[v,x]=S.useState(!1),[b,w]=S.useState(null),[B,k]=S.useState(!1),[N,j]=S.useState(!1),L="khmmwvmdbhaplcfcndjx",T="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtobW13dm1kYmhhcGxjZmNuZGp4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzcwNTQ1MDcsImV4cCI6MjA5MjYzMDUwN30.c5aUVQ4shbnMOIIkDZRP7geMUb64HPKYg4jQFuBH52Q",E=async()=>{x(!0),k(!0),w(null);try{const[H,q]=await Promise.all([fetch(`https://${L}.supabase.co/functions/v1/sync-site-content`,{headers:{apikey:T}}),fetch("/sitemap-aeo.xml").then(Q=>Q.ok?Q.text():"").catch(()=>"")]);if(!H.ok)throw new Error(await H.text());const $=await H.json(),z=a.site_base_url||"https://www.holdengr.com";q&&$.audit&&($.audit=$.audit.map(Q=>{const R=Q.path==="/"&&Q.htmlFile==="index.html"?q.includes(`<loc>${z}/</loc>`)||q.includes(`<loc>${z}</loc>`):q.includes(`<loc>${z}/${Q.htmlFile}</loc>`);return{...Q,sitemapAeo:R?"✅":"❌"}})),w($),Xe({title:"Site content synchronized successfully"})}catch(H){Xe({title:"Sync failed",description:H.message,variant:"destructive"}),k(!1)}finally{x(!1)}},F=async()=>{j(!0);try{const H=await fetch(`https://${L}.supabase.co/functions/v1/sitemap`,{headers:{apikey:T}});if(!H.ok)throw new Error(await H.text());Xe({title:"Sitemaps regenerated",description:"sitemap.xml has been rebuilt from the database."})}catch(H){Xe({title:"Sitemap rebuild failed",description:H.message,variant:"destructive"})}finally{j(!1)}},M=async H=>{A(H),m(!0),u(!0),h("");try{const $=await(await fetch(`https://${L}.supabase.co/functions/v1/generate-llms-txt?type=${H}&rebuild=true`,{headers:{apikey:T}})).text();h($)}catch(q){Xe({title:"Rebuild failed",description:q.message,variant:"destructive"}),u(!1)}finally{m(!1)}},D=()=>{navigator.clipboard.writeText(f),y(!0),setTimeout(()=>y(!1),2e3)};return S.useEffect(()=>{!t&&!e&&o("/auth")},[e,t,o]),t||s?c.jsx(En,{children:c.jsxs("div",{className:"container-page section-padding",children:[c.jsx(jt,{className:"h-10 w-64 mb-8"}),c.jsx(jt,{className:"h-64 w-full"})]})}):e?c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Site Factory | Holden Richardson"}),c.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),c.jsxs("div",{className:"container-page py-12 md:py-20",children:[c.jsxs("div",{className:"flex items-center justify-between mb-6",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("h1",{className:"heading-section mb-0",children:"Site Factory"}),c.jsx(or,{variant:r?"default":"outline",className:"text-xs uppercase tracking-wider",children:n==="aeo"?"AEO":"Core"})]}),c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[c.jsx("span",{className:`font-medium ${r?"text-muted-foreground":"text-foreground"}`,children:"Core"}),c.jsx(rc,{checked:r,onCheckedChange:H=>i(H?"aeo":"core")}),c.jsx("span",{className:`font-medium ${r?"text-foreground":"text-muted-foreground"}`,children:"AEO"})]}),c.jsxs(Tt,{to:"/",className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[c.jsx(Z1,{className:"w-4 h-4"}),"Back to Site"]})]})]}),c.jsxs("div",{className:"mb-8 flex flex-wrap items-center gap-3",children:[c.jsxs(Be,{size:"sm",variant:"default",onClick:E,disabled:v,children:[c.jsx(Ebe,{className:"w-3.5 h-3.5 mr-1.5"})," Full Site Sync & Audit"]}),c.jsxs(Be,{size:"sm",variant:"outline",onClick:F,disabled:N,children:[c.jsx(t2,{className:`w-3.5 h-3.5 mr-1.5 ${N?"animate-spin":""}`}),N?"Rebuilding...":"Regenerate Sitemaps"]}),c.jsxs(Be,{size:"sm",variant:"outline",onClick:()=>M("index"),disabled:p,children:[c.jsx(Qc,{className:"w-3.5 h-3.5 mr-1.5"})," Rebuild llms.txt"]}),c.jsxs(Be,{size:"sm",variant:"outline",onClick:()=>M("full"),disabled:p,children:[c.jsx(Qc,{className:"w-3.5 h-3.5 mr-1.5"})," Rebuild llms-full.txt"]})]}),c.jsx("div",{className:"mb-8",children:c.jsx(C8e,{})}),c.jsxs(u2,{defaultValue:"agent-config",className:"space-y-8",children:[c.jsxs(G0,{className:"bg-muted/50 p-1",children:[c.jsx(ii,{value:"agent-config",className:"text-xs uppercase tracking-wider",children:"Agent Config"}),c.jsx(ii,{value:"blueprint",className:"text-xs uppercase tracking-wider",children:"Blueprint"}),c.jsx(ii,{value:"media",className:"text-xs uppercase tracking-wider",children:"Media Library"}),r&&c.jsx(ii,{value:"generator",className:"text-xs uppercase tracking-wider",children:"Page Generator"}),r&&c.jsx(ii,{value:"cannibalization",className:"text-xs uppercase tracking-wider",children:"Cannibalization"}),c.jsx(ii,{value:"monitor",className:"text-xs uppercase tracking-wider",children:"Monitor"}),c.jsx(ii,{value:"backups",className:"text-xs uppercase tracking-wider",children:"Backups"}),c.jsx(ii,{value:"crawlability",className:"text-xs uppercase tracking-wider",children:"Crawlability"}),c.jsx(ii,{value:"readiness",className:"text-xs uppercase tracking-wider",children:"Readiness"})]}),c.jsx(si,{value:"agent-config",children:c.jsx(SQe,{})}),c.jsx(si,{value:"blueprint",children:c.jsx(LHe,{})}),c.jsx(si,{value:"media",children:c.jsx(qHe,{})}),r&&c.jsx(si,{value:"generator",children:c.jsx(UHe,{})}),r&&c.jsx(si,{value:"cannibalization",children:c.jsx(DHe,{})}),c.jsx(si,{value:"monitor",children:c.jsx($ft,{})}),c.jsx(si,{value:"backups",children:c.jsx(QHe,{})}),c.jsx(si,{value:"crawlability",children:c.jsx(b8e,{})}),c.jsx(si,{value:"readiness",children:c.jsx(w8e,{})})]}),c.jsx($c,{open:l,onOpenChange:u,children:c.jsxs(Gl,{className:"max-w-3xl max-h-[80vh] overflow-y-auto",children:[c.jsx(Yl,{children:c.jsxs(Xl,{children:[d==="full"?"llms-full.txt":"llms.txt"," — Generated Content"]})}),p?c.jsx("div",{className:"py-12 text-center text-muted-foreground",children:"Generating..."}):c.jsxs(c.Fragment,{children:[c.jsxs(Be,{size:"sm",variant:"outline",onClick:D,className:"mb-2 w-fit",children:[g?c.jsx(qc,{className:"w-3.5 h-3.5 mr-1.5"}):c.jsx(tbe,{className:"w-3.5 h-3.5 mr-1.5"}),g?"Copied!":"Copy to Clipboard"]}),c.jsx("pre",{className:"text-xs bg-muted p-4 rounded overflow-auto max-h-[50vh] whitespace-pre-wrap",children:f})]})]})}),c.jsx(S8e,{open:B,onOpenChange:k,syncReport:b,setSyncReport:w,isSyncing:v})]})]}):null},Vft=()=>{const e=wd(),{toast:t}=Ih(),[n,r]=S.useState(!1),[i,s]=S.useState(""),[a,o]=S.useState(""),[l,u]=S.useState(!1),[d,A]=S.useState(!1),[f,h]=S.useState(!0);S.useEffect(()=>{const{data:{subscription:m}}=Re.auth.onAuthStateChange(g=>{g==="PASSWORD_RECOVERY"&&(r(!0),h(!1))});return Re.auth.getSession().then(({data:{session:g}})=>{g&&r(!0),h(!1)}),()=>m.unsubscribe()},[]);const p=async m=>{if(m.preventDefault(),i!==a){t({variant:"destructive",title:"Passwords don't match",description:"Please make sure your passwords match."});return}if(i.length<6){t({variant:"destructive",title:"Password too short",description:"Password must be at least 6 characters."});return}u(!0);const{error:g}=await Re.auth.updateUser({password:i});g?t({variant:"destructive",title:"Failed to reset password",description:g.message}):(A(!0),t({title:"Password updated!",description:"Your password has been changed. Redirecting…"}),setTimeout(()=>e("/auth"),2e3)),u(!1)};return f?c.jsx(En,{children:c.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:c.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Verifying reset link…"})})}):c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Reset Password | Holden Richardson — Grand Rapids Real Estate"}),c.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),c.jsx("div",{className:"section-padding",children:c.jsx("div",{className:"container-page max-w-md",children:c.jsxs(mr,{className:"border-border",children:[c.jsxs(Ta,{className:"text-center",children:[c.jsx(Pa,{className:"heading-card",children:"Reset Password"}),c.jsx(sy,{children:n?"Enter your new password below.":"This link is invalid or has expired."})]}),c.jsx(gr,{children:d?c.jsx("div",{className:"text-center space-y-4",children:c.jsx("p",{className:"text-muted-foreground",children:"Password updated successfully! Redirecting to sign in…"})}):n?c.jsxs("form",{onSubmit:p,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"new-password",children:"New Password"}),c.jsx(Ct,{id:"new-password",type:"password",placeholder:"••••••••",value:i,onChange:m=>s(m.target.value),required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(bn,{htmlFor:"confirm-password",children:"Confirm Password"}),c.jsx(Ct,{id:"confirm-password",type:"password",placeholder:"••••••••",value:a,onChange:m=>o(m.target.value),required:!0})]}),c.jsx(Be,{type:"submit",className:"w-full",disabled:l,children:l?"Updating…":"Set New Password"})]}):c.jsxs("div",{className:"text-center space-y-4",children:[c.jsx("p",{className:"text-muted-foreground",children:"The password reset link is invalid or has expired. Please request a new one."}),c.jsx(Tt,{to:"/auth",children:c.jsx(Be,{variant:"outline",children:"Back to Sign In"})})]})})]})})})]})},Kft=()=>c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Privacy Policy | Holden Richardson"}),c.jsx("meta",{name:"description",content:"Privacy policy for HoldenGR.com — how we collect, use, and protect your personal information."}),c.jsx("link",{rel:"canonical",href:"https://www.holdengr.com/privacy-policy"}),c.jsx("meta",{property:"og:title",content:"Privacy Policy | Holden Richardson"}),c.jsx("meta",{property:"og:description",content:"Privacy policy for HoldenGR.com — how we collect, use, and protect your personal information."}),c.jsx("meta",{property:"og:url",content:"https://www.holdengr.com/privacy-policy"}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{name:"twitter:card",content:"summary"}),c.jsx("meta",{name:"twitter:title",content:"Privacy Policy | Holden Richardson"}),c.jsx("meta",{name:"twitter:description",content:"Privacy policy for HoldenGR.com."}),c.jsx("meta",{name:"twitter:image",content:"https://www.holdengr.com/og-image.jpg"})]}),c.jsx("section",{className:"py-14 md:py-20 bg-secondary -mt-20 pt-32 md:pt-36",children:c.jsx("div",{className:"container-page",children:c.jsxs(_e,{variant:"blur",children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:"Legal"}),c.jsx("h1",{className:"font-serif text-3xl md:text-5xl font-light mb-3",children:"Privacy Policy"}),c.jsx("div",{className:"w-16 h-[2px] bg-accent mb-4"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Last updated: ",new Date().toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})]})]})})}),c.jsx("section",{className:"py-14 md:py-20 bg-background",children:c.jsx("div",{className:"container-page max-w-3xl mx-auto prose prose-neutral prose-headings:font-serif prose-headings:font-light",children:c.jsxs(_e,{children:[c.jsx("h2",{children:"Information We Collect"}),c.jsx("p",{children:"When you use our website, we may collect the following personal information:"}),c.jsxs("ul",{children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Contact Information:"})," Name, email address, phone number, and any message you provide through our contact form."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Usage Data:"})," Information about how you access and use our website, including your IP address, browser type, pages visited, and time spent on the site."]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Cookies:"})," We use cookies and similar technologies to improve your experience and analyze site traffic."]})]}),c.jsx("h2",{children:"How We Use Your Information"}),c.jsx("p",{children:"We use the information we collect to:"}),c.jsxs("ul",{children:[c.jsx("li",{children:"Respond to your inquiries and provide real estate services"}),c.jsx("li",{children:"Send you relevant property information and market updates (only with your consent)"}),c.jsx("li",{children:"Improve our website and user experience"}),c.jsx("li",{children:"Comply with legal obligations"})]}),c.jsx("h2",{children:"Information Sharing"}),c.jsx("p",{children:"We do not sell, trade, or rent your personal information to third parties. We may share your information with:"}),c.jsxs("ul",{children:[c.jsxs("li",{children:[c.jsx("strong",{children:"616 Realty LLC:"})," Our brokerage, as necessary to facilitate real estate transactions"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Service Providers:"})," Third-party services that help us operate our website and CRM systems"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Legal Requirements:"})," When required by law or to protect our rights"]})]}),c.jsx("h2",{children:"Data Security"}),c.jsx("p",{children:"We implement reasonable security measures to protect your personal information. However, no method of transmission over the internet is 100% secure, and we cannot guarantee absolute security."}),c.jsx("h2",{children:"Your Rights"}),c.jsx("p",{children:"You have the right to:"}),c.jsxs("ul",{children:[c.jsx("li",{children:"Request access to the personal information we hold about you"}),c.jsx("li",{children:"Request correction or deletion of your personal information"}),c.jsx("li",{children:"Opt out of marketing communications at any time"})]}),c.jsx("h2",{children:"Contact Us"}),c.jsx("p",{children:"If you have questions about this privacy policy, please contact us at:"}),c.jsxs("p",{children:["Holden Richardson — 616 Realty LLC",c.jsx("br",{}),"1171 Plainfield Ave NE, Grand Rapids, MI 49503",c.jsx("br",{}),c.jsx("a",{href:"mailto:holden@holdengr.com",children:"holden@holdengr.com"}),c.jsx("br",{}),"(616) 403-6393"]})]})})})]}),Wft=()=>c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Terms of Service | Holden Richardson"}),c.jsx("meta",{name:"description",content:"Terms of service for HoldenGR.com — conditions governing the use of this website."}),c.jsx("link",{rel:"canonical",href:"https://www.holdengr.com/terms-of-service"}),c.jsx("meta",{property:"og:title",content:"Terms of Service | Holden Richardson"}),c.jsx("meta",{property:"og:description",content:"Terms of service for HoldenGR.com — conditions governing the use of this website."}),c.jsx("meta",{property:"og:url",content:"https://www.holdengr.com/terms-of-service"}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{name:"twitter:card",content:"summary"}),c.jsx("meta",{name:"twitter:title",content:"Terms of Service | Holden Richardson"}),c.jsx("meta",{name:"twitter:description",content:"Terms of service for HoldenGR.com."}),c.jsx("meta",{name:"twitter:image",content:"https://www.holdengr.com/og-image.jpg"})]}),c.jsx("section",{className:"py-14 md:py-20 bg-secondary -mt-20 pt-32 md:pt-36",children:c.jsx("div",{className:"container-page",children:c.jsxs(_e,{variant:"blur",children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:"Legal"}),c.jsx("h1",{className:"font-serif text-3xl md:text-5xl font-light mb-3",children:"Terms of Service"}),c.jsx("div",{className:"w-16 h-[2px] bg-accent mb-4"}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:["Last updated: ",new Date().toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})]})]})})}),c.jsx("section",{className:"py-14 md:py-20 bg-background",children:c.jsx("div",{className:"container-page max-w-3xl mx-auto prose prose-neutral prose-headings:font-serif prose-headings:font-light",children:c.jsxs(_e,{children:[c.jsx("h2",{children:"Agreement to Terms"}),c.jsx("p",{children:'By accessing and using HoldenGR.com ("the Website"), you agree to be bound by these Terms of Service. If you do not agree to these terms, please do not use the Website.'}),c.jsx("h2",{children:"Use of Website"}),c.jsx("p",{children:"This Website is operated by Holden Richardson, a licensed real estate agent with 616 Realty LLC (License #6501392389). The Website is intended to provide general information about real estate services in the Grand Rapids, Michigan area."}),c.jsx("p",{children:"You agree to use the Website only for lawful purposes and in a manner that does not infringe upon the rights of others."}),c.jsx("h2",{children:"Property Listings & Information"}),c.jsx("p",{children:"Property listing information displayed on this Website is sourced from various third-party providers, including Multiple Listing Services (MLS). While we strive for accuracy:"}),c.jsxs("ul",{children:[c.jsx("li",{children:"Listings may not reflect real-time availability, pricing, or property conditions"}),c.jsx("li",{children:"All information should be independently verified before making any decisions"}),c.jsx("li",{children:"Photos and descriptions may not represent current property conditions"}),c.jsx("li",{children:"We are not responsible for errors or omissions in listing data"})]}),c.jsx("h2",{children:"No Professional Advice"}),c.jsx("p",{children:"The content on this Website is for informational purposes only and does not constitute professional real estate, legal, financial, or tax advice. Always consult with appropriate professionals before making real estate decisions."}),c.jsx("h2",{children:"Intellectual Property"}),c.jsx("p",{children:"All content on this Website, including text, images, logos, and design elements, is the property of Holden Richardson and 616 Realty LLC or their respective owners and is protected by copyright and trademark laws."}),c.jsx("h2",{children:"Limitation of Liability"}),c.jsx("p",{children:"To the fullest extent permitted by law, Holden Richardson and 616 Realty LLC shall not be liable for any direct, indirect, incidental, or consequential damages arising from your use of or inability to use this Website."}),c.jsx("h2",{children:"Governing Law"}),c.jsx("p",{children:"These terms are governed by the laws of the State of Michigan. Any disputes shall be resolved in the courts of Kent County, Michigan."}),c.jsx("h2",{children:"Changes to Terms"}),c.jsx("p",{children:"We reserve the right to modify these terms at any time. Continued use of the Website after changes constitutes acceptance of the updated terms."}),c.jsx("h2",{children:"Contact"}),c.jsxs("p",{children:["Holden Richardson — 616 Realty LLC",c.jsx("br",{}),"1171 Plainfield Ave NE, Grand Rapids, MI 49503",c.jsx("br",{}),c.jsx("a",{href:"mailto:holden@holdengr.com",children:"holden@holdengr.com"}),c.jsx("br",{}),"(616) 403-6393"]})]})})})]}),qft=()=>c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Accessibility | Holden Richardson"}),c.jsx("meta",{name:"description",content:"Accessibility statement for HoldenGR.com — our commitment to digital accessibility."}),c.jsx("link",{rel:"canonical",href:"https://www.holdengr.com/accessibility"}),c.jsx("meta",{property:"og:title",content:"Accessibility | Holden Richardson"}),c.jsx("meta",{property:"og:description",content:"Accessibility statement for HoldenGR.com — our commitment to digital accessibility."}),c.jsx("meta",{property:"og:url",content:"https://www.holdengr.com/accessibility"}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{name:"twitter:card",content:"summary"}),c.jsx("meta",{name:"twitter:title",content:"Accessibility | Holden Richardson"}),c.jsx("meta",{name:"twitter:description",content:"Accessibility statement for HoldenGR.com."}),c.jsx("meta",{name:"twitter:image",content:"https://www.holdengr.com/og-image.jpg"})]}),c.jsx("section",{className:"py-14 md:py-20 bg-secondary -mt-20 pt-32 md:pt-36",children:c.jsx("div",{className:"container-page",children:c.jsxs(_e,{variant:"blur",children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:"Legal"}),c.jsx("h1",{className:"font-serif text-3xl md:text-5xl font-light mb-3",children:"Accessibility"}),c.jsx("div",{className:"w-16 h-[2px] bg-accent mb-4"})]})})}),c.jsx("section",{className:"py-14 md:py-20 bg-background",children:c.jsx("div",{className:"container-page max-w-3xl mx-auto prose prose-neutral prose-headings:font-serif prose-headings:font-light",children:c.jsxs(_e,{children:[c.jsx("h2",{children:"Our Commitment"}),c.jsx("p",{children:"Holden Richardson and 616 Realty LLC are committed to ensuring digital accessibility for people with disabilities. We continually improve the user experience for everyone and apply the relevant accessibility standards."}),c.jsx("h2",{children:"Standards"}),c.jsx("p",{children:"We aim to conform to the Web Content Accessibility Guidelines (WCAG) 2.1 at the AA level. These guidelines explain how to make web content more accessible to people with a wide range of disabilities, including:"}),c.jsxs("ul",{children:[c.jsx("li",{children:"Visual impairments (blindness, low vision, color blindness)"}),c.jsx("li",{children:"Hearing impairments"}),c.jsx("li",{children:"Motor impairments"}),c.jsx("li",{children:"Cognitive disabilities"})]}),c.jsx("h2",{children:"Measures Taken"}),c.jsx("p",{children:"We have taken the following measures to ensure accessibility:"}),c.jsxs("ul",{children:[c.jsx("li",{children:"Semantic HTML structure throughout the website"}),c.jsx("li",{children:"Descriptive alt text for all meaningful images"}),c.jsx("li",{children:"Sufficient color contrast ratios for text and interactive elements"}),c.jsx("li",{children:"Keyboard navigation support"}),c.jsx("li",{children:"Responsive design that works across devices and screen sizes"}),c.jsx("li",{children:"Clear and consistent navigation"}),c.jsx("li",{children:"Form labels and error messages for all input fields"})]}),c.jsx("h2",{children:"Known Limitations"}),c.jsx("p",{children:"While we strive for full accessibility, some third-party content (such as embedded property listing tools, video players, or map widgets) may not be fully accessible. We are actively working with our vendors to improve these areas."}),c.jsx("h2",{children:"Feedback"}),c.jsx("p",{children:"We welcome your feedback on the accessibility of this website. If you encounter any barriers or have suggestions for improvement, please contact us:"}),c.jsxs("p",{children:["Holden Richardson — 616 Realty LLC",c.jsx("br",{}),c.jsx("a",{href:"mailto:holden@holdengr.com",children:"holden@holdengr.com"}),c.jsx("br",{}),"(616) 403-6393"]}),c.jsx("p",{children:"We will make reasonable efforts to address any accessibility concerns and respond within 5 business days."}),c.jsx("h2",{children:"Fair Housing"}),c.jsx("p",{children:"In accordance with the Fair Housing Act, we do not discriminate on the basis of race, color, religion, sex, handicap, familial status, or national origin. We are committed to providing equal housing opportunities for all."})]})})})]}),Gft=()=>{const e=ml();return S.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:"Page Not Found | Holden Richardson — Grand Rapids Real Estate"}),c.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),c.jsx("section",{className:"section-padding bg-background min-h-[60vh] flex items-center",children:c.jsxs("div",{className:"container-page text-center",children:[c.jsx("h1",{className:"text-8xl md:text-9xl font-serif text-gold mb-6",children:"404"}),c.jsx("h2",{className:"heading-section mb-4",children:"Page Not Found"}),c.jsx("p",{className:"text-body text-muted-foreground mb-10 max-w-md mx-auto",children:"The page you're looking for doesn't exist or has been moved."}),c.jsx(Tt,{to:"/",className:"btn-outline-primary",children:"Return Home"})]})})]})},Yft=e=>/<(p|div|h[1-6]|ul|ol|blockquote|table|section|article)\b/i.test(e)?e:e.split(/\n{2,}/).map(t=>t.trim()).filter(Boolean).map(t=>`<p>${t.replace(/\n/g,"<br />")}</p>`).join(`
`),fL=()=>{var Y,X,K,Z;const{category:e,slug:t,subcategory:n}=tm(),r=t||"",{data:i,isLoading:s}=_Qe(e||"",r,n),{data:a}=kQe(i==null?void 0:i.id),{data:o}=EQe(i==null?void 0:i.category_id,i==null?void 0:i.id),{configMap:l}=_o(),{data:u}=Y0(),d=S.useMemo(()=>!u||!(i!=null&&i.cover_image_id)?null:u.find(ae=>ae.id===i.cover_image_id)||null,[u,i==null?void 0:i.cover_image_id]),A=l.agent_phone,f=l.agent_email,h=l.booking_url,p=l.agent_name,m=((Y=l.site_base_url)==null?void 0:Y.replace(/\/$/,""))||"",g=e==="about"?"About":e==null?void 0:e.replace(/-/g," "),y=`/${e}`,v=n?`/${e}/${n}`:null,x=n?`/${e}/${n}/${r}`:`/${e}/${r}`,b=m?`${m}${x}`:"",w=ae=>m?`${m}${ae}`:ae;if(s)return c.jsx(En,{children:c.jsxs("div",{className:"container-page section-padding",children:[c.jsx(jt,{className:"h-12 w-3/4 mb-6"}),c.jsx(jt,{className:"h-6 w-full mb-4"}),c.jsx(jt,{className:"h-64 w-full"})]})});if(!i)return c.jsx(En,{children:c.jsxs("div",{className:"container-page section-padding text-center",children:[c.jsx("h1",{className:"heading-section mb-4",children:"Page Not Found"}),c.jsx("p",{className:"text-body text-muted-foreground",children:"The page you're looking for doesn't exist."})]})});const B=((X=i.category)==null?void 0:X.slug)==="news",k=i.press_links,N=[l.about_website,l.about_google_business,l.about_facebook,l.about_instagram,l.about_linkedin,l.about_youtube,l.about_x,l.about_tiktok,l.about_zillow,l.about_realtor].filter(Boolean),j=(K=i.faq_json)!=null&&K.length?{"@context":"https://schema.org","@type":"FAQPage",...b&&{mainEntityOfPage:{"@type":"WebPage","@id":b}},about:{"@id":"https://www.holdengr.com/#agent"},mainEntity:i.faq_json.map(ae=>({"@type":"Question",name:ae.question,acceptedAnswer:{"@type":"Answer",text:ae.answer}}))}:null,L=B?{"@context":"https://schema.org","@type":"NewsArticle",headline:i.h1,description:i.meta_description||i.intro_text||i.title,...b&&{mainEntityOfPage:{"@type":"WebPage","@id":b},url:b},...i.published_at&&{datePublished:i.published_at},...i.updated_at&&{dateModified:i.updated_at},author:{"@type":"Person",name:p||"Holden Richardson",url:"https://www.holdengr.com/about",...A&&{telephone:A},...f&&{email:f}},...d&&{image:[lc(d.file_path)]},publisher:{"@id":"https://www.holdengr.com/#agent"},inLanguage:"en-US"}:null,T=!B&&p?{"@context":"https://schema.org","@type":"RealEstateAgent","@id":"https://www.holdengr.com/#agent",name:p,...l.agent_brokerage&&{worksFor:{"@type":"RealEstateOrganization",name:l.agent_brokerage}},...l.agent_market&&{areaServed:l.agent_market},...A&&{telephone:A},...f&&{email:f},...N.length>0&&{sameAs:N}}:null,E=[{"@type":"ListItem",position:1,name:"Home",item:m?`${m}/`:"https://www.holdengr.com/"},{"@type":"ListItem",position:2,name:g||"",item:w(y)}];n?(E.push({"@type":"ListItem",position:3,name:n.replace(/-/g," "),item:w(v)}),E.push({"@type":"ListItem",position:4,name:i.title,item:b||w(x)})):E.push({"@type":"ListItem",position:3,name:i.title,item:b||w(x)});const F={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:E},M=i.video_url,D=i.video_transcript,q=(i.video_orientation||"horizontal")==="vertical",$=M==null?void 0:M.match(/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|shorts\/|watch\?v=|watch\?.+&v=))([^&?\s]+)/),z=$==null?void 0:$[1],Q=M&&z?{"@context":"https://schema.org","@type":"VideoObject",name:i.h1,description:i.meta_description||i.subheadline||i.title,thumbnailUrl:`https://i.ytimg.com/vi/${z}/hqdefault.jpg`,embedUrl:`https://www.youtube.com/embed/${z}`,contentUrl:`https://www.youtube.com/watch?v=${z}`,...i.published_at&&{uploadDate:i.published_at},publisher:{"@id":"https://www.holdengr.com/#agent"},inLanguage:"en-US",isAccessibleForFree:!0,...D&&{transcript:D}}:null,ce=i.subheadline,R=d?lc(d.file_path):null,O=i.schema_markup&&typeof i.schema_markup=="object"?i.schema_markup:null;return c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsx("title",{children:i.meta_title||i.title}),i.meta_description&&c.jsx("meta",{name:"description",content:i.meta_description}),c.jsx("meta",{property:"og:title",content:i.meta_title||i.title}),i.meta_description&&c.jsx("meta",{property:"og:description",content:i.meta_description}),c.jsx("meta",{property:"og:type",content:"article"}),b&&c.jsx("meta",{property:"og:url",content:b}),b&&c.jsx("link",{rel:"canonical",href:b}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:i.meta_title||i.title}),i.meta_description&&c.jsx("meta",{name:"twitter:description",content:i.meta_description}),O&&c.jsx("script",{type:"application/ld+json",children:JSON.stringify(O)}),j&&c.jsx("script",{type:"application/ld+json",children:JSON.stringify(j)}),L&&c.jsx("script",{type:"application/ld+json",children:JSON.stringify(L)}),T&&c.jsx("script",{type:"application/ld+json",children:JSON.stringify(T)}),c.jsx("script",{type:"application/ld+json",children:JSON.stringify(F)}),Q&&c.jsx("script",{type:"application/ld+json",children:JSON.stringify(Q)})]}),c.jsxs("section",{className:"relative text-background py-20 md:py-28 -mt-20 pt-32 md:pt-40 overflow-hidden min-h-[50vh] flex items-end",children:[R?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${R})`}}),c.jsx("div",{className:"absolute inset-0 bg-black/40"})]}):c.jsx("div",{className:"absolute inset-0 bg-black"}),c.jsxs("div",{className:"container-page relative z-10 w-full",children:[c.jsx(_e,{variant:"blur",children:c.jsxs("nav",{className:"text-sm text-background/50 mb-6 uppercase tracking-wider",children:[c.jsx(Tt,{to:"/",className:"text-accent/70 hover:text-accent transition-colors",children:"Home"}),c.jsx("span",{className:"mx-2",children:"/"}),c.jsx(Tt,{to:y,className:"text-accent/70 hover:text-accent transition-colors capitalize",children:g}),n&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"mx-2",children:"/"}),c.jsx(Tt,{to:v,className:"text-accent/70 hover:text-accent transition-colors capitalize",children:n.replace(/-/g," ")})]}),c.jsx("span",{className:"mx-2",children:"/"}),c.jsx("span",{className:"text-background/80",children:i.title})]})}),c.jsxs(_e,{delay:.1,children:[c.jsx("h1",{className:"font-serif text-3xl md:text-5xl lg:text-6xl font-light leading-tight mb-4 max-w-4xl",children:i.h1}),c.jsx("div",{className:"w-16 h-[2px] bg-accent mt-4 mb-6"})]}),ce&&c.jsx(_e,{delay:.2,children:c.jsx("p",{className:"text-lg md:text-xl text-background/65 max-w-3xl font-light",children:ce})})]})]}),c.jsx("section",{className:"py-16 md:py-24 bg-background",children:c.jsxs("div",{className:"container-page max-w-4xl mx-auto",children:[i.intro_text&&c.jsx(_e,{children:c.jsx("p",{className:"text-body text-foreground/75 text-lg leading-relaxed max-w-3xl mx-auto text-left",children:i.intro_text})}),B&&i.body_content&&c.jsx(_e,{children:c.jsxs("div",{className:"mt-10 md:mt-14",children:[k&&(k.national||k.local||k.source)&&c.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-8 p-4 border border-border/50 rounded bg-muted/30",children:[c.jsx("span",{className:"text-xs uppercase tracking-wider text-muted-foreground font-medium",children:"As seen in:"}),k.national&&c.jsxs("a",{href:k.national,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm text-accent hover:text-accent/80 transition-colors font-medium",children:[c.jsx(rl,{className:"w-3.5 h-3.5"})," National"]}),k.local&&c.jsxs("a",{href:k.local,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm text-accent hover:text-accent/80 transition-colors font-medium",children:[c.jsx(rl,{className:"w-3.5 h-3.5"})," Local"]}),k.source&&c.jsxs("a",{href:k.source,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm text-accent hover:text-accent/80 transition-colors font-medium",children:[c.jsx(rl,{className:"w-3.5 h-3.5"})," Source"]})]}),c.jsx("div",{className:"prose prose-sm md:prose-base max-w-none prose-headings:font-serif prose-a:text-accent",dangerouslySetInnerHTML:{__html:Yft(i.body_content)}})]})}),i.intro_text&&i.faq_json&&i.faq_json.length>0&&c.jsxs("div",{className:"flex items-center justify-center my-10 md:my-14",children:[c.jsx("div",{className:"h-px bg-border flex-1 max-w-16"}),c.jsx("div",{className:"w-2 h-2 rotate-45 border border-accent/50 mx-4"}),c.jsx("div",{className:"h-px bg-border flex-1 max-w-16"})]}),i.faq_json&&i.faq_json.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(_e,{children:c.jsxs("div",{className:"text-center mb-10",children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:"Common Questions"}),c.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-light text-foreground",children:"What You Need to Know"})]})}),c.jsx(_e,{delay:.1,children:c.jsx(Mp,{type:"single",collapsible:!0,className:"space-y-4",children:i.faq_json.map((ae,ue)=>c.jsxs(xh,{value:`faq-${ue}`,className:"border border-border/60 px-6 md:px-8 transition-all duration-300 bg-background shadow-md shadow-foreground/[0.06] hover:shadow-lg hover:shadow-foreground/[0.08]",children:[c.jsx(wh,{className:"text-left text-sm md:text-base font-medium hover:no-underline py-4 text-foreground/85 hover:text-foreground",children:ae.question}),c.jsx(bh,{className:"text-sm text-muted-foreground leading-relaxed pb-5 px-1",children:ae.answer})]},ue))})})]})]})}),i.faq_json&&i.faq_json.length>0&&M&&z&&c.jsxs("div",{className:"flex items-center justify-center py-2 bg-background",children:[c.jsx("div",{className:"h-px bg-border flex-1 max-w-16"}),c.jsx("div",{className:"w-2 h-2 rotate-45 border border-accent/50 mx-4"}),c.jsx("div",{className:"h-px bg-border flex-1 max-w-16"})]}),M&&z&&c.jsx("section",{className:"py-16 md:py-24 bg-secondary/15",children:c.jsxs("div",{className:"container-page max-w-4xl mx-auto",children:[c.jsxs(_e,{children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:"Watch"}),c.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-light mb-6",children:"Video Overview"})]}),c.jsx(_e,{delay:.1,children:c.jsx("div",{className:`relative overflow-hidden rounded-lg mx-auto ${q?"max-w-sm aspect-[9/16]":"w-full aspect-video"}`,children:c.jsx("iframe",{src:`https://www.youtube.com/embed/${z}`,title:i.h1,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"absolute inset-0 w-full h-full border border-border",loading:"lazy"})})}),D&&c.jsx(Mp,{type:"single",collapsible:!0,className:"mt-6",children:c.jsxs(xh,{value:"transcript",className:"border border-border/60 px-6 md:px-8 transition-all duration-200 bg-background shadow-md shadow-foreground/[0.04] hover:shadow-lg",children:[c.jsx(wh,{className:"text-left text-sm font-medium hover:no-underline py-4 text-foreground/75 hover:text-foreground",children:"View Video Transcript"}),c.jsx(bh,{className:"text-sm text-muted-foreground leading-relaxed pb-5 px-1 whitespace-pre-line",children:D})]})})]})}),o&&o.length>0&&c.jsx("section",{className:"py-12 md:py-16 bg-background",children:c.jsxs("div",{className:"container-page",children:[c.jsxs(_e,{children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:"Related Topics"}),c.jsxs("h2",{className:"font-serif text-2xl md:text-3xl font-light mb-2",children:["Explore More ",g," Topics"]}),c.jsx("div",{className:"w-12 h-px bg-accent mb-8"})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:o.map((ae,ue)=>c.jsx(_e,{delay:ue*.06,children:c.jsxs(Tt,{to:n?`/${e}/${n}/${ae.slug}`:`/${e}/${ae.slug}`,className:"group flex items-center gap-4 px-5 py-4 border-l-4 border-l-accent bg-accent/[0.07] hover:bg-accent/[0.13] border border-accent/20 hover:border-accent/40 transition-all duration-300 rounded-r-lg shadow-sm hover:shadow-md",children:[c.jsx("div",{className:"flex-1 min-w-0",children:c.jsx("h3",{className:"font-serif text-sm md:text-base group-hover:text-accent transition-colors leading-snug",children:ae.h1||ae.title})}),c.jsx(sc,{size:16,className:"shrink-0 text-accent/60 group-hover:text-accent transition-all group-hover:translate-x-1"})]})},ae.id))})]})}),a&&a.length>0&&c.jsx("section",{className:"py-16 md:py-24 bg-secondary/15",children:c.jsxs("div",{className:"container-page",children:[c.jsxs(_e,{children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:"Sub-Topics"}),c.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-light mb-2",children:"Explore More Topics"}),c.jsx("div",{className:"w-12 h-px bg-accent mb-12"})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map((ae,ue)=>c.jsx(_e,{delay:ue*.08,variant:"lift",children:c.jsxs(Tt,{to:`/${e}/${ae.slug}`,className:"group block p-8 border border-border/60 hover:border-accent/50 bg-background hover:bg-secondary/20 transition-all duration-300",children:[c.jsx("h3",{className:"font-serif text-lg mb-2 group-hover:text-accent transition-colors",children:ae.title}),ae.intro_text&&c.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-4",children:ae.intro_text}),c.jsxs("span",{className:"inline-flex items-center gap-2 text-caption text-foreground/60 group-hover:text-accent transition-colors uppercase tracking-wider",children:["Read More ",c.jsx(sc,{size:14,className:"transition-transform group-hover:translate-x-1"})]})]})},ae.id))})]})}),c.jsx("section",{className:"py-20 md:py-28 bg-foreground text-background",children:c.jsx("div",{className:"container-page text-center",children:c.jsxs(_e,{children:[c.jsx("p",{className:"text-caption text-gold uppercase tracking-widest mb-3 font-semibold",children:"Let's Connect"}),c.jsx("h2",{className:"font-serif text-2xl md:text-4xl font-semibold mb-3",children:"Reach Out Your Way"}),c.jsx("p",{className:"text-background/80 max-w-lg mx-auto font-medium mb-10",children:p?`${p} is here to help — pick whichever works best for you.`:"We're here to help — pick whichever works best for you."}),c.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-4",children:[h&&c.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",children:c.jsxs(Be,{size:"lg",className:"bg-background text-foreground hover:bg-background/90 rounded-none transition-colors font-semibold",children:[c.jsx(nc,{className:"w-4 h-4 mr-2"}),"Book Virtual Meeting With Holden"]})}),f&&c.jsx("a",{href:`mailto:${f}`,children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(SB,{className:"w-4 h-4 mr-2"}),"Email"]})}),A&&c.jsx("a",{href:`tel:${A}`,children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(Ap,{className:"w-4 h-4 mr-2"}),"Call"]})}),c.jsx(Tt,{to:"/contact",children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(dp,{className:"w-4 h-4 mr-2"}),"Send a Message"]})})]})]})})}),c.jsx("noscript",{children:c.jsxs("div",{style:{padding:"2rem"},children:[c.jsx("h1",{children:i.h1}),i.intro_text&&c.jsx("p",{children:i.intro_text}),(Z=i.faq_json)==null?void 0:Z.map((ae,ue)=>c.jsxs("div",{children:[c.jsx("h3",{children:ae.question}),c.jsx("p",{children:ae.answer})]},ue))]})})]})},Xft={car:Ywe,trees:Nbe,building:qwe,heart:wne,users:Pbe,school:lbe,pin:Ab},Rpe=({stats:e})=>{if(!e||e.length===0)return null;const t=e.length,n=t<=3?t:Math.ceil(t/2),r=t<=6?t:Math.ceil(t/2),i=`nbs-${S.useId().replace(/:/g,"")}`;return c.jsxs("section",{className:"relative py-10 md:py-14 overflow-hidden",children:[c.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-foreground via-foreground/95 to-foreground"}),c.jsx("div",{className:"absolute inset-0 backdrop-blur-sm"}),c.jsx("div",{className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-accent/30 to-transparent"}),c.jsx("style",{children:`
#${i} { grid-template-columns: repeat(${n}, minmax(0, 1fr)); }
@media (min-width: 768px) {
#${i} { grid-template-columns: repeat(${r}, minmax(0, 1fr)); }
}
`}),c.jsx("div",{className:"relative container-page",children:c.jsx("div",{id:i,className:"grid gap-6 md:gap-8",children:e.map((s,a)=>{const o=s.icon&&Xft[s.icon]||Ab;return c.jsx(_e,{delay:a*.08,children:c.jsxs("div",{className:"text-center group",children:[c.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-xl bg-background/10 backdrop-blur-md border border-background/20 shadow-lg shadow-black/10 mb-3 group-hover:bg-background/15 group-hover:scale-105 transition-all duration-300",children:c.jsx(o,{className:"w-5 h-5 text-accent"})}),c.jsx("p",{className:"text-lg md:text-xl font-semibold text-background",children:s.value}),c.jsx("p",{className:"text-xs text-background/50 uppercase tracking-widest mt-1",children:s.label})]})},a)})})}),c.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-background/10 to-transparent"})]})},Jft=({category:e,subcategories:t,faqs:n})=>{const{data:r}=Y0(),i=(r||[]).filter(a=>a.media_type==="stock_photo"),s=e.stats_json||[];return c.jsxs(c.Fragment,{children:[e.intro_text&&c.jsx("section",{className:"py-16 md:py-20 bg-background",children:c.jsx("div",{className:"container-page max-w-4xl",children:c.jsx(_e,{children:c.jsx("p",{className:"text-body text-foreground/75 text-lg leading-relaxed text-left",children:e.intro_text.split(`
`)[0]})})})}),c.jsx(Rpe,{stats:s}),c.jsx("section",{className:"py-12 md:py-20 bg-secondary/20",children:c.jsxs("div",{className:"container-page",children:[c.jsx(_e,{children:c.jsxs("div",{className:"text-center mb-12",children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:"Explore Communities"}),c.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-light",children:"Grand Rapids Area Neighborhoods"}),c.jsx("div",{className:"w-12 h-px bg-accent mx-auto mt-4"})]})}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 lg:gap-8",children:t.map((a,o)=>{const l=a.cover_image_id?i.find(A=>A.id===a.cover_image_id):null,u=l?lc(l.file_path):null,d=a.stats_json||[];return c.jsx(_e,{delay:o*.06,variant:"lift",children:c.jsxs(Tt,{to:`/neighborhoods/${a.slug}`,className:"group block bg-card border border-border/40 rounded-lg overflow-hidden shadow-sm hover:shadow-lg transition-all duration-300 hover:border-accent/40",children:[c.jsxs("div",{className:"relative aspect-[16/9] overflow-hidden",children:[u?c.jsx("img",{src:u,alt:`${a.name} neighborhood`,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"}):c.jsx("div",{className:"w-full h-full bg-gradient-to-br from-secondary/60 to-secondary/30 flex items-center justify-center",children:c.jsx("span",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Add cover image"})}),c.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-5",children:c.jsxs("h3",{className:"font-serif text-xl md:text-2xl text-white font-light flex items-center gap-2",children:[a.icon&&c.jsx("span",{children:a.icon}),a.name]})})]}),c.jsxs("div",{className:"p-5 md:p-6",children:[a.description&&c.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mb-4 line-clamp-3",children:a.description}),d.length>0&&c.jsx("div",{className:"flex flex-wrap gap-3 mb-4",children:d.slice(0,3).map((A,f)=>c.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 bg-secondary/60 border border-border/60 text-xs text-foreground/70",children:[c.jsx("span",{className:"font-medium",children:A.value}),c.jsx("span",{className:"text-muted-foreground",children:"·"}),c.jsx("span",{children:A.label})]},f))}),c.jsxs("span",{className:"inline-flex items-center gap-2 text-caption text-accent uppercase tracking-wider font-medium group-hover:gap-3 transition-all",children:["Explore ",a.name,c.jsx(sc,{size:14,className:"transition-transform group-hover:translate-x-1"})]})]})]})},a.id)})})]})}),n.length>0&&c.jsx("section",{className:"py-16 md:py-24 bg-background",children:c.jsxs("div",{className:"container-page max-w-4xl mx-auto",children:[c.jsx(_e,{children:c.jsx("div",{className:"text-center mb-12",children:c.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-light mb-3 text-foreground",children:e.faq_title||"Common Questions About Grand Rapids Neighborhoods"})})}),c.jsx(_e,{delay:.1,children:c.jsx(Mp,{type:"single",collapsible:!0,className:"space-y-4",children:n.map((a,o)=>c.jsxs(xh,{value:`faq-${o}`,className:"border border-border/60 px-6 md:px-8 transition-all duration-300 bg-background shadow-md shadow-foreground/[0.06] hover:shadow-lg hover:shadow-foreground/[0.08]",children:[c.jsx(wh,{className:"text-left text-sm md:text-base font-medium hover:no-underline py-4 text-foreground/85 hover:text-foreground",children:a.question}),c.jsx(bh,{className:"text-sm text-muted-foreground leading-relaxed pb-5 px-1",children:a.answer})]},o))})})]})})]})},DI=10,Zft=({categoryId:e,parentCategorySlug:t})=>{const[n,r]=S.useState(1),{data:i,isLoading:s}=Lr({queryKey:["news-releases",e],queryFn:async()=>{const{data:A,error:f}=await Re.from("aeo_pages").select("id, title, slug, h1, subheadline, intro_text, body_content, created_at, published_at, press_links, status").eq("category_id",e).eq("status","published").order("published_at",{ascending:!1});if(f)throw f;return A}}),a=i||[],o=Math.max(1,Math.ceil(a.length/DI)),l=a.slice((n-1)*DI,n*DI),u=A=>{const h=(A.intro_text||A.body_content||"").replace(/<[^>]*>/g,"").trim();return h.length<=200?h:h.slice(0,200).replace(/\s+\S*$/,"")+"…"},d=A=>A?new Date(A).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):"";return c.jsxs("div",{className:"bg-background",children:[c.jsx("section",{className:"py-16 md:py-20",children:c.jsx("div",{className:"container-page max-w-4xl mx-auto",children:c.jsxs(_e,{children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-4 font-semibold",children:"Press & Media"}),c.jsx("h2",{className:"font-serif text-3xl md:text-4xl font-light mb-4 text-foreground",children:"News & Press Releases"}),c.jsx("div",{className:"w-16 h-px bg-accent mb-6"}),c.jsx("p",{className:"text-foreground/70 max-w-2xl text-lg leading-relaxed",children:"Stay up to date with the latest announcements, market insights, and press coverage. Each release reflects our commitment to transparency and leadership in the Grand Rapids real estate market."})]})})}),c.jsx("div",{className:"container-page max-w-4xl mx-auto",children:c.jsx("div",{className:"h-px bg-gradient-to-r from-accent/40 via-border/60 to-transparent"})}),c.jsx("section",{className:"py-12 md:py-16",children:c.jsx("div",{className:"container-page max-w-4xl mx-auto",children:s?c.jsx("div",{className:"space-y-6",children:[1,2,3].map(A=>c.jsx("div",{className:"h-40 bg-secondary/30 animate-pulse rounded"},A))}):a.length===0?c.jsx("div",{className:"text-center py-16",children:c.jsx("p",{className:"text-muted-foreground text-lg",children:"No press releases published yet."})}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"space-y-6",children:l.map((A,f)=>{const h=A.press_links,p=[h==null?void 0:h.national,h==null?void 0:h.local,h==null?void 0:h.source].filter(Boolean).length;return c.jsx(_e,{delay:f*.05,children:c.jsx("article",{className:"group border border-border/50 hover:border-accent/30 transition-all duration-300 bg-background",children:c.jsxs("div",{className:"p-6 md:p-8",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-3",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[c.jsx(nc,{className:"w-3.5 h-3.5"}),d(A.published_at||A.created_at)]}),p>0&&c.jsxs(or,{variant:"secondary",className:"text-xs font-normal",children:["Featured in ",p," outlet",p>1?"s":""]})]}),c.jsx(Tt,{to:`/${t}/news/${A.slug}`,className:"block group-hover:text-accent transition-colors",children:c.jsx("h3",{className:"font-serif text-xl md:text-2xl font-medium leading-snug mb-3",children:A.h1||A.title})}),A.subheadline&&c.jsx("p",{className:"text-accent/80 text-sm font-medium mb-2",children:A.subheadline}),c.jsx("p",{className:"text-foreground/65 leading-relaxed mb-4 text-[0.95rem]",children:u(A)}),c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[h&&c.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.jsx("span",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"As seen in:"}),h.national&&c.jsxs("a",{href:h.national,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-accent hover:underline",children:["National ",c.jsx(rl,{className:"w-3 h-3"})]}),h.local&&c.jsxs("a",{href:h.local,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-accent hover:underline",children:["Local ",c.jsx(rl,{className:"w-3 h-3"})]}),h.source&&c.jsxs("a",{href:h.source,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-accent hover:underline",children:["Source ",c.jsx(rl,{className:"w-3 h-3"})]})]}),c.jsxs(Tt,{to:`/${t}/news/${A.slug}`,className:"inline-flex items-center gap-1.5 text-sm text-accent font-medium hover:gap-2.5 transition-all",children:["Read Full Release ",c.jsx(sc,{className:"w-4 h-4"})]})]})]})})},A.id)})}),o>1&&c.jsxs("div",{className:"flex items-center justify-center gap-4 mt-12",children:[c.jsxs(Be,{variant:"outline",size:"sm",disabled:n===1,onClick:()=>r(A=>Math.max(1,A-1)),children:[c.jsx(yne,{className:"w-4 h-4 mr-1"})," Previous"]}),c.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",n," of ",o]}),c.jsxs(Be,{variant:"outline",size:"sm",disabled:n===o,onClick:()=>r(A=>Math.min(o,A+1)),children:["Next ",c.jsx(Ju,{className:"w-4 h-4 ml-1"})]})]})]})})})]})};function ept(e){var r;const t=((r=e.split(/[.!?]/)[0])==null?void 0:r.trim())||"",n=t.split(/\s+/);return n.length<=8?t:n.slice(0,6).join(" ")+"…"}const tpt=({category:e,parentCategory:t,pages:n,faqs:r})=>{var A;const i=e.stats_json||[],s=((A=e.intro_text)==null?void 0:A.split(`
`).filter(Boolean))||[],a=e.section_headings||[],{data:o}=Y0(),l=(o||[]).filter(f=>f.media_type==="stock_photo"),u=e.content_image_ids||[],d=l.filter(f=>{var h,p;return((h=f.tags)==null?void 0:h.includes(e.slug))||((p=f.tags)==null?void 0:p.includes("content"))});return c.jsxs(c.Fragment,{children:[c.jsx(Rpe,{stats:i}),s.length>0&&c.jsx("div",{className:"bg-background",children:s.map((f,h)=>{const p=h%2===1,m=u[h],y=(m?l.find(x=>x.id===m):null)||d[h],v=y?lc(y.file_path):null;return c.jsx("section",{className:`py-16 md:py-24 ${h%2===0?"bg-background":"bg-secondary/20"}`,children:c.jsx("div",{className:"container-page",children:c.jsxs("div",{className:`grid grid-cols-1 lg:grid-cols-2 gap-10 lg:gap-16 items-center ${p?"lg:[direction:rtl]":""}`,children:[c.jsxs(_e,{className:p?"lg:[direction:ltr]":"",children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:e.name}),c.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-light mb-4 leading-snug",children:a[h]||ept(f)}),c.jsx("div",{className:"w-10 h-px bg-accent mb-6"}),c.jsx("p",{className:"text-body text-foreground/75 leading-relaxed text-lg",children:f})]}),c.jsx(_e,{delay:.15,className:p?"lg:[direction:ltr]":"",children:v?c.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:c.jsx("img",{src:v,alt:(y==null?void 0:y.alt_text)||`${e.name} — section ${h+1}`,className:"w-full h-full object-cover",loading:"lazy"})}):c.jsx("div",{className:"aspect-[4/3] bg-gradient-to-br from-secondary/60 to-secondary/30 border border-border/40 flex items-center justify-center",children:c.jsxs("div",{className:"text-center px-8",children:[c.jsx("div",{className:"w-12 h-12 mx-auto mb-3 border border-accent/30 flex items-center justify-center",children:c.jsx("span",{className:"text-accent text-lg font-serif",children:h+1})}),c.jsx("span",{className:"text-xs text-muted-foreground tracking-wider uppercase",children:"Upload image via Media Library"})]})})})]})})},h)})}),r.length>0&&c.jsx("section",{className:"py-16 md:py-24 bg-background",children:c.jsxs("div",{className:"container-page max-w-4xl mx-auto",children:[c.jsx(_e,{children:c.jsx("div",{className:"text-center mb-12",children:c.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-light mb-3 text-foreground",children:e.faq_title||`Common Questions About ${e.name}`})})}),c.jsx(_e,{delay:.1,children:c.jsx(Mp,{type:"single",collapsible:!0,className:"space-y-4",children:r.map((f,h)=>c.jsxs(xh,{value:`faq-${h}`,className:"border border-border/60 px-6 md:px-8 transition-all duration-300 bg-background shadow-md shadow-foreground/[0.06] hover:shadow-lg hover:shadow-foreground/[0.08]",children:[c.jsx(wh,{className:"text-left text-sm md:text-base font-medium hover:no-underline py-4 text-foreground/85 hover:text-foreground",children:f.question}),c.jsx(bh,{className:"text-sm text-muted-foreground leading-relaxed pb-5 px-1",children:f.answer})]},h))})})]})}),n&&n.length>0&&c.jsx("section",{className:"py-12 md:py-16 bg-secondary/20",children:c.jsxs("div",{className:"container-page",children:[c.jsxs(_e,{children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:"Dive Deeper"}),c.jsxs("h2",{className:"font-serif text-2xl md:text-3xl font-light mb-2",children:["Explore ",e.name," Topics"]}),c.jsx("div",{className:"w-12 h-px bg-accent mb-8"})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map((f,h)=>c.jsx(_e,{delay:h*.06,children:c.jsxs(Tt,{to:`/neighborhoods/${e.slug}/${f.slug}`,className:"group flex items-center gap-4 px-5 py-4 border-l-4 border-l-accent bg-accent/[0.07] hover:bg-accent/[0.13] border border-accent/20 hover:border-accent/40 transition-all duration-300 rounded-r-lg shadow-sm hover:shadow-md",children:[c.jsx("div",{className:"flex-1 min-w-0",children:c.jsx("h3",{className:"font-serif text-sm md:text-base group-hover:text-accent transition-colors leading-snug",children:f.h1||f.title})}),c.jsx(sc,{size:16,className:"shrink-0 text-accent/60 group-hover:text-accent transition-all group-hover:translate-x-1"})]})},f.id))})]})})]})};function nY(e){var r;const t=((r=e.split(/[.!?]/)[0])==null?void 0:r.trim())||"",n=t.split(/\s+/);return n.length<=8?t:n.slice(0,6).join(" ")+"…"}function npt(e){try{const t=new URL(e);if(t.hostname.includes("youtu.be"))return`https://www.youtube.com/embed${t.pathname}`;const n=t.searchParams.get("v");if(n)return`https://www.youtube.com/embed/${n}`;const r=t.pathname.match(/\/shorts\/([^/?&]+)/);if(r)return`https://www.youtube.com/embed/${r[1]}`}catch{}return null}function rpt(e){try{const t=new URL(e);if(t.hostname.includes("youtu.be"))return t.pathname.replace(/^\//,"").split("/")[0]||null;const n=t.searchParams.get("v");if(n)return n;const r=t.pathname.match(/\/shorts\/([^/?&]+)/);if(r)return r[1];const i=t.pathname.match(/\/embed\/([^/?&]+)/);if(i)return i[1]}catch{}return null}const pL=({subcategorySlug:e,categoryOverride:t}={})=>{var Y;const n=tm(),r=t||n.category;if(r==="about"&&!e)return c.jsx(Lre,{to:"/about",replace:!0});const{configMap:i}=_o(),s=i.agent_name,a=i.agent_email,o=i.agent_phone,l=i.booking_url,{data:u,isLoading:d}=Dh(),A=u==null?void 0:u.find(X=>X.slug===r&&!X.parent_id),f=e?u==null?void 0:u.find(X=>X.slug===e&&X.parent_id===(A==null?void 0:A.id)):A,{data:h}=BQe(e||f==null?void 0:f.id),{data:p,isLoading:m}=Lr({queryKey:["category-parents",f==null?void 0:f.id],enabled:!!f,queryFn:async()=>{const{data:X,error:K}=await Re.from("aeo_pages").select("id, title, slug, h1, subheadline, intro_text, is_parent, display_order").eq("category_id",f.id).eq("status","published").order("display_order");if(K)throw K;return X}}),{data:g}=Y0(),y=(g||[]).filter(X=>X.media_type==="stock_photo"),v=(f==null?void 0:f.cover_image_id)||null,x=(f==null?void 0:f.content_image_ids)||[],b=v?y.find(X=>X.id===v):null,w=y.filter(X=>{var K,Z;return((K=X.tags)==null?void 0:K.includes(r||""))||((Z=X.tags)==null?void 0:Z.includes("featured"))}),B=w.filter(X=>{var K;return(K=X.tags)==null?void 0:K.includes("cover")}),k=y.filter(X=>{var K;return(K=X.tags)==null?void 0:K.includes("cover")}),N=w.filter(X=>{var K;return(K=X.tags)==null?void 0:K.includes("content")}),j=y.filter(X=>{var K;return(K=X.tags)==null?void 0:K.includes("content")});if(!f&&!m&&!d)return c.jsx(En,{children:c.jsxs("div",{className:"container-page section-padding text-center",children:[c.jsx("h1",{className:"heading-section mb-4",children:"Category Not Found"}),c.jsx("p",{className:"text-body text-muted-foreground",children:"This page doesn't exist yet."})]})});const L=(f==null?void 0:f.name)||(r==null?void 0:r.replace(/-/g," "))||"",T=(f==null?void 0:f.faq_json)||[],E=((Y=f==null?void 0:f.intro_text)==null?void 0:Y.split(`
`).filter(Boolean))||[],F=(f==null?void 0:f.section_headings)||[],M=f!=null&&f.video_url?npt(f.video_url):null,D=f!=null&&f.video_url?rpt(f.video_url):null,H=`https://www.holdengr.com/${r}${e?`/${e}`:""}`,q=T.length>0?{"@context":"https://schema.org","@type":"FAQPage",mainEntityOfPage:{"@type":"WebPage","@id":H},about:{"@id":"https://www.holdengr.com/#agent"},mainEntity:T.map(X=>({"@type":"Question",name:X.question,acceptedAnswer:{"@type":"Answer",text:X.answer}}))}:null,$=f!=null&&f.video_url&&M?{"@context":"https://schema.org","@type":"VideoObject",name:f.video_headline||`${L} Video`,description:f.description||`Video about ${L} — Grand Rapids real estate.`,thumbnailUrl:D?`https://i.ytimg.com/vi/${D}/hqdefault.jpg`:"https://www.holdengr.com/og-image.jpg",embedUrl:M,...D&&{contentUrl:`https://www.youtube.com/watch?v=${D}`},uploadDate:f.created_at,publisher:{"@id":"https://www.holdengr.com/#agent"},inLanguage:"en-US",isAccessibleForFree:!0,...f.video_transcript?{transcript:f.video_transcript}:{}}:null,Q=r?{buyers:{name:"How to buy a home in Grand Rapids, Michigan",totalTime:"P60D",tool:["Pre-approval letter","Buyer's agent","Home inspector"],supply:["Down payment funds","Earnest money (typically 1–2% of purchase price)","Closing cost reserves"]}}[r]:void 0,ce=!e&&Q&&F.length>0&&F.length===E.length?{"@context":"https://schema.org","@type":"HowTo",name:Q.name,description:(f==null?void 0:f.description)||Q.name,totalTime:Q.totalTime,...Q.tool&&{tool:Q.tool.map(X=>({"@type":"HowToTool",name:X}))},...Q.supply&&{supply:Q.supply.map(X=>({"@type":"HowToSupply",name:X}))},step:E.map((X,K)=>({"@type":"HowToStep",position:K+1,name:F[K]||nY(X),text:X,url:`${H}#step-${K+1}`})),about:{"@id":"https://www.holdengr.com/#agent"},mainEntityOfPage:{"@type":"WebPage","@id":H}}:null,R=[{"@type":"ListItem",position:1,name:"Home",item:"https://www.holdengr.com/"},{"@type":"ListItem",position:2,name:(A==null?void 0:A.name)||L,item:`https://www.holdengr.com/${r}`}];e&&f&&R.push({"@type":"ListItem",position:3,name:f.name,item:H});const O={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:R};return c.jsxs(En,{children:[c.jsxs(Mr,{children:[c.jsxs("title",{children:[L," | Grand Rapids Area Real Estate"]}),c.jsx("meta",{name:"description",content:(f==null?void 0:f.description)||`${L} — Expert real estate guidance for the Grand Rapids area.`}),c.jsx("link",{rel:"canonical",href:H}),c.jsx("meta",{property:"og:title",content:`${L} | Grand Rapids Area Real Estate`}),c.jsx("meta",{property:"og:description",content:(f==null?void 0:f.description)||`${L} — Expert real estate guidance for the Grand Rapids area.`}),c.jsx("meta",{property:"og:url",content:H}),c.jsx("meta",{property:"og:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("meta",{property:"og:type",content:"website"}),c.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),c.jsx("meta",{name:"twitter:title",content:`${L} | Grand Rapids Area Real Estate`}),c.jsx("meta",{name:"twitter:description",content:(f==null?void 0:f.description)||`${L} — Expert real estate guidance.`}),c.jsx("meta",{name:"twitter:image",content:"https://www.holdengr.com/og-image.jpg"}),c.jsx("script",{type:"application/ld+json",children:JSON.stringify(O)}),q&&c.jsx("script",{type:"application/ld+json",children:JSON.stringify(q)}),$&&c.jsx("script",{type:"application/ld+json",children:JSON.stringify($)}),ce&&c.jsx("script",{type:"application/ld+json",children:JSON.stringify(ce)})]}),(()=>{const X=b||B[0]||k[0],K=X?lc(X.file_path):null;return c.jsxs("section",{className:"relative text-background py-20 md:py-28 -mt-20 pt-32 md:pt-40 overflow-hidden min-h-[50vh] flex items-end",children:[K?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${K})`}}),c.jsx("div",{className:`absolute inset-0 ${r==="buyers"?"bg-black/55":"bg-black/40"}`})]}):c.jsx("div",{className:"absolute inset-0 bg-black"}),c.jsxs("div",{className:"container-page relative z-10 w-full",children:[c.jsx(_e,{children:c.jsx("p",{className:"text-caption text-background/50 mb-4 uppercase tracking-widest",children:"Grand Rapids Area Real Estate"})}),c.jsxs(_e,{delay:.1,children:[c.jsx("h1",{className:"font-sans text-4xl md:text-5xl lg:text-6xl font-semibold leading-tight mb-4 max-w-4xl capitalize",children:L}),c.jsx("div",{className:"w-16 h-[2px] bg-accent mt-4 mb-6"})]}),(f==null?void 0:f.description)&&c.jsx(_e,{delay:.2,children:c.jsx("p",{className:"text-lg md:text-xl text-background/65 max-w-3xl font-light",children:f.description})}),!K&&c.jsxs("div",{className:"mt-6 inline-flex items-center gap-2 px-4 py-2 border border-background/20 rounded text-xs text-background/40 uppercase tracking-wider",children:[c.jsx("span",{children:"📷"}),' Tag an image "hero" + "',r,'" in Media Library for cover photo']})]})]})})(),r==="neighborhoods"&&!e&&f&&h&&h.length>0?c.jsxs(c.Fragment,{children:[c.jsx(Jft,{category:f,subcategories:h,faqs:T}),c.jsx("section",{className:"py-20 md:py-28 bg-foreground text-background",children:c.jsx("div",{className:"container-page text-center",children:c.jsxs(_e,{children:[c.jsx("p",{className:"text-caption text-gold uppercase tracking-widest mb-3 font-semibold",children:"Let's Connect"}),c.jsx("h2",{className:"font-serif text-2xl md:text-4xl font-semibold mb-3",children:"Reach Out Your Way"}),c.jsx("p",{className:"text-background/80 max-w-lg mx-auto font-medium mb-10",children:s?`${s} is here to help — pick whichever works best for you.`:"We're here to help — pick whichever works best for you."}),c.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-4",children:[l&&c.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",children:c.jsxs(Be,{size:"lg",className:"bg-background text-foreground hover:bg-background/90 rounded-none transition-colors font-semibold",children:[c.jsx(nc,{className:"w-4 h-4 mr-2"}),"Book Virtual Meeting With Holden"]})}),a&&c.jsx("a",{href:`mailto:${a}`,children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(SB,{className:"w-4 h-4 mr-2"}),"Email"]})}),o&&c.jsx("a",{href:`tel:${o}`,children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(Ap,{className:"w-4 h-4 mr-2"}),"Call"]})}),c.jsx(Tt,{to:"/contact",children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(dp,{className:"w-4 h-4 mr-2"}),"Send a Message"]})})]})]})})})]}):r==="neighborhoods"&&e&&f&&A?c.jsxs(c.Fragment,{children:[c.jsx(tpt,{category:f,parentCategory:A,pages:p||[],faqs:T}),c.jsx("section",{className:"py-20 md:py-28 bg-foreground text-background",children:c.jsx("div",{className:"container-page text-center",children:c.jsxs(_e,{children:[c.jsx("p",{className:"text-caption text-gold uppercase tracking-widest mb-3 font-semibold",children:"Let's Connect"}),c.jsx("h2",{className:"font-serif text-2xl md:text-4xl font-semibold mb-3",children:"Reach Out Your Way"}),c.jsx("p",{className:"text-background/80 max-w-lg mx-auto font-medium mb-10",children:s?`${s} is here to help — pick whichever works best for you.`:"We're here to help — pick whichever works best for you."}),c.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-4",children:[l&&c.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",children:c.jsxs(Be,{size:"lg",className:"bg-background text-foreground hover:bg-background/90 rounded-none transition-colors font-semibold",children:[c.jsx(nc,{className:"w-4 h-4 mr-2"}),"Book Virtual Meeting With Holden"]})}),a&&c.jsx("a",{href:`mailto:${a}`,children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(SB,{className:"w-4 h-4 mr-2"}),"Email"]})}),o&&c.jsx("a",{href:`tel:${o}`,children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(Ap,{className:"w-4 h-4 mr-2"}),"Call"]})}),c.jsx(Tt,{to:"/contact",children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(dp,{className:"w-4 h-4 mr-2"}),"Send a Message"]})})]})]})})})]}):e==="news"&&f?c.jsx(Zft,{categoryId:f.id,parentCategorySlug:r||"about"}):c.jsxs(c.Fragment,{children:[E.length>0&&c.jsx("div",{className:E.length>0?"bg-background":"",children:E.map((X,K)=>{const Z=K%2===1,ae=x[K],se=(ae?y.find(Se=>Se.id===ae):null)||N[K]||j[K],Ae=se?lc(se.file_path):null,de=ce?`step-${K+1}`:void 0;return c.jsx("section",{id:de,className:`py-16 md:py-24 ${K%2===0?"bg-background":"bg-secondary/20"} scroll-mt-24`,children:c.jsx("div",{className:"container-page",children:c.jsxs("div",{className:`grid grid-cols-1 lg:grid-cols-2 gap-10 lg:gap-16 items-center ${Z?"lg:[direction:rtl]":""}`,children:[c.jsxs(_e,{className:Z?"lg:[direction:ltr]":"",children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:ce?`Step ${K+1} of ${E.length}`:L}),c.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-light mb-4 leading-snug",children:F[K]||nY(X)}),c.jsx("div",{className:"w-10 h-px bg-accent mb-6"}),c.jsx("p",{className:"text-body text-foreground/75 leading-relaxed text-lg",children:X})]}),c.jsx(_e,{delay:.15,className:Z?"lg:[direction:ltr]":"",children:Ae?c.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:c.jsx("img",{src:Ae,alt:(se==null?void 0:se.alt_text)||`${L} — section ${K+1}`,className:"w-full h-full object-cover",loading:"lazy"})}):c.jsx("div",{className:"aspect-[4/3] bg-gradient-to-br from-secondary/60 to-secondary/30 border border-border/40 flex items-center justify-center",children:c.jsxs("div",{className:"text-center px-8",children:[c.jsx("div",{className:"w-12 h-12 mx-auto mb-3 border border-accent/30 flex items-center justify-center",children:c.jsx("span",{className:"text-accent text-lg font-serif",children:K+1})}),c.jsx("span",{className:"text-xs text-muted-foreground tracking-wider uppercase",children:"Upload image via Media Library"})]})})})]})})},K)})}),T.length>0&&c.jsx("section",{className:"py-16 md:py-24 bg-background",children:c.jsxs("div",{className:"container-page max-w-4xl mx-auto",children:[c.jsx(_e,{children:c.jsxs("div",{className:"text-center mb-12",children:[c.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-light mb-3 text-foreground",children:(f==null?void 0:f.faq_title)||`Common Questions About ${L}`}),(f==null?void 0:f.description)&&c.jsx("p",{className:"text-sm text-muted-foreground max-w-2xl mx-auto",children:f.description})]})}),c.jsx(_e,{delay:.1,children:c.jsx(Mp,{type:"single",collapsible:!0,className:"space-y-4",children:T.map((X,K)=>c.jsxs(xh,{value:`faq-${K}`,className:"border border-border/60 px-6 md:px-8 transition-all duration-300 bg-background shadow-md shadow-foreground/[0.06] hover:shadow-lg hover:shadow-foreground/[0.08]",children:[c.jsx(wh,{className:"text-left text-sm md:text-base font-medium hover:no-underline py-4 text-foreground/85 hover:text-foreground",children:X.question}),c.jsx(bh,{className:"text-sm text-muted-foreground leading-relaxed pb-5 px-1",children:X.answer})]},K))})})]})}),T.length>0&&M&&c.jsxs("div",{className:"flex items-center justify-center py-2 bg-background",children:[c.jsx("div",{className:"h-px bg-border flex-1 max-w-16"}),c.jsx("div",{className:"w-2 h-2 rotate-45 border border-accent/50 mx-4"}),c.jsx("div",{className:"h-px bg-border flex-1 max-w-16"})]}),M&&c.jsx("section",{className:"py-16 md:py-24 bg-secondary/20",children:c.jsxs("div",{className:"container-page max-w-4xl mx-auto",children:[c.jsxs(_e,{children:[(f==null?void 0:f.video_headline)&&c.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-light mb-8 text-center",children:f.video_headline}),c.jsx("div",{className:`mx-auto ${(f==null?void 0:f.video_orientation)==="vertical"?"max-w-sm":"max-w-4xl"}`,children:c.jsx("div",{className:`relative overflow-hidden rounded-lg shadow-lg ${(f==null?void 0:f.video_orientation)==="vertical"?"aspect-[9/16]":"aspect-video"}`,children:c.jsx("iframe",{src:M,title:(f==null?void 0:f.video_headline)||`${L} Video`,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"absolute inset-0 w-full h-full",loading:"lazy"})})})]}),(f==null?void 0:f.video_transcript)&&c.jsx(_e,{delay:.1,children:c.jsx("div",{className:"mt-8 max-w-3xl mx-auto",children:c.jsx(Mp,{type:"single",collapsible:!0,children:c.jsxs(xh,{value:"transcript",className:"border border-border/60 px-6 md:px-8 transition-all duration-200 bg-background shadow-md shadow-foreground/[0.04] hover:shadow-lg",children:[c.jsx(wh,{className:"text-left text-sm font-medium hover:no-underline py-4 text-foreground/75 hover:text-foreground",children:"View Video Transcript"}),c.jsx(bh,{className:"text-sm text-muted-foreground leading-relaxed pb-5 px-1 whitespace-pre-line",children:f.video_transcript})]})})})})]})}),c.jsx("section",{className:"py-12 md:py-16 bg-background",children:c.jsxs("div",{className:"container-page",children:[c.jsxs(_e,{children:[c.jsx("p",{className:"text-caption text-accent uppercase tracking-widest mb-3",children:"Dive Deeper"}),c.jsxs("h2",{className:"font-serif text-2xl md:text-3xl font-light mb-2",children:["Explore ",L," Topics"]}),c.jsx("div",{className:"w-12 h-px bg-accent mb-8"})]}),m?c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[1,2,3].map(X=>c.jsx(jt,{className:"h-24 w-full"},X))}):p&&p.length>0||h&&h.length>0?c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[!e&&(h==null?void 0:h.map((X,K)=>c.jsx(_e,{delay:K*.06,children:c.jsxs(Tt,{to:`/${r}/${X.slug}`,className:"group flex items-center gap-4 px-5 py-4 border-l-4 border-l-accent bg-accent/[0.07] hover:bg-accent/[0.13] border border-accent/20 hover:border-accent/40 transition-all duration-300 rounded-r-lg shadow-sm hover:shadow-md",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("h3",{className:"font-serif text-sm md:text-base group-hover:text-accent transition-colors leading-snug",children:[X.icon&&c.jsx("span",{className:"mr-1",children:X.icon}),X.name]}),X.description&&c.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-1",children:X.description})]}),c.jsx(sc,{size:16,className:"shrink-0 text-accent/60 group-hover:text-accent transition-all group-hover:translate-x-1"})]})},X.id))),p==null?void 0:p.map((X,K)=>{const Z=e?`/${r}/${e}`:`/${r}`;return c.jsx(_e,{delay:((h==null?void 0:h.length)||0+K)*.06,children:c.jsxs(Tt,{to:`${Z}/${X.slug}`,className:"group flex items-center gap-4 px-5 py-4 border-l-4 border-l-accent bg-accent/[0.07] hover:bg-accent/[0.13] border border-accent/20 hover:border-accent/40 transition-all duration-300 rounded-r-lg shadow-sm hover:shadow-md",children:[c.jsx("div",{className:"flex-1 min-w-0",children:c.jsx("h3",{className:"font-serif text-sm md:text-base group-hover:text-accent transition-colors leading-snug",children:X.h1||X.title})}),c.jsx(sc,{size:16,className:"shrink-0 text-accent/60 group-hover:text-accent transition-all group-hover:translate-x-1"})]})},X.id)})]}):c.jsx("div",{className:"text-center py-12",children:c.jsx("p",{className:"text-muted-foreground",children:"Content for this category is coming soon."})})]})}),c.jsx("section",{className:"py-20 md:py-28 bg-foreground text-background",children:c.jsx("div",{className:"container-page text-center",children:c.jsxs(_e,{children:[c.jsx("p",{className:"text-caption text-gold uppercase tracking-widest mb-3 font-semibold",children:"Let's Connect"}),c.jsx("h2",{className:"font-serif text-2xl md:text-4xl font-semibold mb-3",children:"Reach Out Your Way"}),c.jsx("p",{className:"text-background/80 max-w-lg mx-auto font-medium mb-10",children:s?`${s} is here to help — pick whichever works best for you.`:"We're here to help — pick whichever works best for you."}),c.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-4",children:[l&&c.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",children:c.jsxs(Be,{size:"lg",className:"bg-background text-foreground hover:bg-background/90 rounded-none transition-colors font-semibold",children:[c.jsx(nc,{className:"w-4 h-4 mr-2"}),"Book Virtual Meeting With Holden"]})}),a&&c.jsx("a",{href:`mailto:${a}`,children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(SB,{className:"w-4 h-4 mr-2"}),"Email"]})}),o&&c.jsx("a",{href:`tel:${o}`,children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(Ap,{className:"w-4 h-4 mr-2"}),"Call"]})}),c.jsx(Tt,{to:"/contact",children:c.jsxs(Be,{size:"lg",variant:"outline",className:"border-background/40 text-background bg-transparent hover:bg-background hover:text-foreground rounded-none transition-colors font-semibold",children:[c.jsx(dp,{className:"w-4 h-4 mr-2"}),"Send a Message"]})})]})]})})})]})]})},ipt=()=>{const{category:e,slug:t}=tm(),{data:n,isLoading:r}=Lr({queryKey:["aeo-resolve",e,t],enabled:!!e&&!!t,queryFn:async()=>{const{data:i}=await Re.from("aeo_categories").select("id").eq("slug",e).is("parent_id",null).maybeSingle();if(!i)return{type:"page"};const{data:s}=await Re.from("aeo_categories").select("id, slug").eq("slug",t).eq("parent_id",i.id).eq("enabled",!0).maybeSingle();return s?{type:"subcategory",subcategoryId:s.id}:{type:"page"}},staleTime:1e3*60*5});return r?c.jsx(En,{children:c.jsxs("div",{className:"container-page section-padding",children:[c.jsx(jt,{className:"h-12 w-3/4 mb-6"}),c.jsx(jt,{className:"h-64 w-full"})]})}):(n==null?void 0:n.type)==="subcategory"?c.jsx(pL,{subcategorySlug:t}):c.jsx(fL,{})};function spt({value:e,label:t,lens:n}){const r=Math.max(0,Math.min(100,e)),i=r>=75?"hsl(0 70% 55%)":r>=50?"hsl(35 80% 55%)":r>=25?"hsl(85 50% 50%)":"hsl(195 60% 50%)";return c.jsxs("div",{className:"bg-card border border-border p-6",children:[c.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium",children:n==="seller"?"Seller Market Heat":"Buyer Difficulty"}),c.jsx("span",{className:"text-[10px] uppercase tracking-[0.2em] text-muted-foreground/70",children:"0–100"})]}),c.jsxs("div",{className:"flex items-end gap-4",children:[c.jsx("div",{className:"text-5xl font-bold text-foreground tabular-nums",style:{color:i},children:r}),c.jsx("div",{className:"text-sm text-foreground/80 pb-2",children:t})]}),c.jsx("div",{className:"mt-4 h-2 bg-muted rounded-none overflow-hidden",children:c.jsx("div",{className:"h-full transition-all duration-700",style:{width:`${r}%`,background:i}})}),c.jsxs("div",{className:"flex justify-between text-[9px] uppercase tracking-[0.2em] text-muted-foreground/60 mt-2",children:[c.jsx("span",{children:"Cold"}),c.jsx("span",{children:"Balanced"}),c.jsx("span",{children:"Hot"})]})]})}function apt(e){return e>=20?0:e>=15?.3:e>=10?.41:e>=5?.62:1}function opt(e){const t=e.homePrice*(e.downPaymentPct/100),n=Math.max(0,e.homePrice-t),r=e.ratePct/100/12,i=e.termYears*12,s=r===0?n/i:n*(r*Math.pow(1+r,i))/(Math.pow(1+r,i)-1),a=e.homePrice*(e.propertyTaxRatePct/100)/12,o=e.annualInsurance/12,l=apt(e.downPaymentPct),u=n*(l/100)/12,d=e.monthlyHoa??0;return{loanAmount:n,downPayment:t,monthlyPI:s,monthlyTax:a,monthlyInsurance:o,monthlyPmi:u,monthlyHoa:d,monthlyTotal:s+a+o+u+d,pmiRatePct:l}}const Av=e=>e.toLocaleString("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}),rY=e=>e.toLocaleString("en-US",{style:"currency",currency:"USD",maximumFractionDigits:2}),Gd=({label:e,value:t,sub:n})=>c.jsxs("div",{className:"bg-card border border-border p-5",children:[c.jsx("div",{className:"text-[9px] uppercase tracking-[0.25em] text-muted-foreground font-medium mb-2",children:e}),c.jsx("div",{className:"text-2xl font-bold text-foreground tabular-nums",children:t}),n&&c.jsx("div",{className:"text-[11px] text-muted-foreground mt-1",children:n})]});function lpt({snapshot:e,lens:t}){return e.yoy_pct>=0,c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium",children:"Market Snapshot"}),c.jsx("span",{className:"text-[9px] uppercase tracking-[0.2em] text-muted-foreground/60",children:"AI-researched · Not MLS-verified"})]}),c.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:[c.jsx(Gd,{label:"Median Sale Price",value:Av(e.median_sale_price),sub:`${e.yoy_pct>=0?"+":""}${e.yoy_pct.toFixed(1)}% YoY`}),c.jsx(Gd,{label:"Homes Sold (30d)",value:String(e.homes_sold_30d)}),c.jsx(Gd,{label:"Median Days on Market",value:`${e.median_dom}d`}),c.jsx(Gd,{label:"List-to-Sale Ratio",value:`${e.list_to_sale_pct.toFixed(1)}%`}),c.jsx(Gd,{label:"Active Inventory",value:String(e.active_inventory),sub:e.months_supply?`${e.months_supply.toFixed(1)} mo supply`:void 0}),t==="buyer"&&e.pct_above_ask!==void 0&&c.jsx(Gd,{label:"Selling Above Ask",value:`${e.pct_above_ask.toFixed(0)}%`}),t==="buyer"&&e.new_listings_7d!==void 0&&c.jsx(Gd,{label:"New Listings (7d)",value:String(e.new_listings_7d)}),t==="buyer"&&e.price_reduced_7d!==void 0&&c.jsx(Gd,{label:"Price Reduced (7d)",value:String(e.price_reduced_7d)})]})]})}function cpt({data:e}){return c.jsxs("div",{className:"bg-card border border-border p-5",children:[c.jsx("div",{className:"flex items-center justify-between mb-4",children:c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium",children:"Median Sale Price · 24-Month Trend"})}),c.jsx("div",{style:{width:"100%",height:260},children:c.jsx(mQ,{children:c.jsxs(Lpe,{data:e,margin:{top:10,right:12,left:12,bottom:0},children:[c.jsx(yj,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),c.jsx(cm,{dataKey:"month",tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"}}),c.jsx(um,{tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"},tickFormatter:t=>`$${(t/1e3).toFixed(0)}k`,width:60}),c.jsx(zo,{contentStyle:{background:"hsl(var(--card))",border:"1px solid hsl(var(--border))"},formatter:t=>Av(t)}),c.jsx(dv,{type:"monotone",dataKey:"value",stroke:"hsl(var(--primary))",strokeWidth:2,dot:{r:2}})]})})})]})}function upt({data:e}){return c.jsxs("div",{className:"bg-card border border-border p-5",children:[c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium mb-4",children:"Homes Sold per Month · 12-Month"}),c.jsx("div",{style:{width:"100%",height:220},children:c.jsx(mQ,{children:c.jsxs(jft,{data:e,margin:{top:10,right:12,left:0,bottom:0},children:[c.jsx(yj,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),c.jsx(cm,{dataKey:"month",tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"}}),c.jsx(um,{tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"},width:40}),c.jsx(zo,{contentStyle:{background:"hsl(var(--card))",border:"1px solid hsl(var(--border))"}}),c.jsx(lm,{dataKey:"value",fill:"hsl(var(--primary))"})]})})})]})}function dpt({percentile:e,comps:t,zip:n}){return c.jsxs("div",{className:"bg-card border border-border p-5",children:[c.jsxs("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium mb-4",children:["Metro Score · How ",n," Ranks"]}),c.jsxs("div",{className:"mb-5",children:[c.jsxs("div",{className:"flex items-baseline gap-3 mb-2",children:[c.jsx("span",{className:"text-4xl font-bold tabular-nums",children:Math.round(e)}),c.jsx("span",{className:"text-sm text-muted-foreground",children:"percentile vs. GR metro"})]}),c.jsx("div",{className:"h-2 bg-muted",children:c.jsx("div",{className:"h-full bg-primary",style:{width:`${Math.max(2,Math.min(100,e))}%`}})})]}),t.length>0&&c.jsxs("div",{children:[c.jsx("div",{className:"text-[9px] uppercase tracking-[0.25em] text-muted-foreground/70 mb-2",children:"Nearby Comps"}),c.jsx("ul",{className:"space-y-1.5",children:t.map(r=>c.jsxs("li",{className:"flex items-center justify-between text-sm",children:[c.jsxs("span",{className:"text-foreground/80",children:[r.zip," · ",r.label]}),c.jsx("span",{className:"tabular-nums text-foreground",children:Av(r.median_price)})]},r.zip))})]})]})}function Apt(){const[e,t]=S.useState(null),[n,r]=S.useState(!0);return S.useEffect(()=>{let i=!0;return(async()=>{try{const{data:s}=await Re.from("market_pulse_rates").select("rates, source, fetched_at").order("fetched_at",{ascending:!1}).limit(1).maybeSingle();if(!s||Date.now()-new Date(s.fetched_at).getTime()>1e3*60*60*12){await Re.functions.invoke("market-pulse-rates",{body:{}});const{data:o}=await Re.from("market_pulse_rates").select("rates, source, fetched_at").order("fetched_at",{ascending:!1}).limit(1).maybeSingle();i&&o&&t({rates:o.rates,source:o.source,fetched_at:o.fetched_at})}else i&&t({rates:s.rates,source:s.source,fetched_at:s.fetched_at})}catch(s){console.error("RatesModule load error",s)}finally{i&&r(!1)}})(),()=>{i=!1}},[]),c.jsxs("div",{className:"bg-card border border-border p-5",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium",children:"Today's Mortgage Rates"}),e&&c.jsxs("span",{className:"text-[9px] uppercase tracking-[0.2em] text-muted-foreground/60",children:[e.source," · ",new Date(e.fetched_at).toLocaleDateString()]})]}),n||!e?c.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading rates…"}):c.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[c.jsx(vx,{label:"30-Yr Fixed",v:e.rates.thirty_year_fixed}),c.jsx(vx,{label:"15-Yr Fixed",v:e.rates.fifteen_year_fixed}),e.rates.seven_one_arm!==void 0&&c.jsx(vx,{label:"7/1 ARM",v:e.rates.seven_one_arm}),e.rates.fha_thirty!==void 0&&c.jsx(vx,{label:"FHA 30",v:e.rates.fha_thirty}),e.rates.va_thirty!==void 0&&c.jsx(vx,{label:"VA 30",v:e.rates.va_thirty})]}),c.jsx("p",{className:"text-[10px] text-muted-foreground/60 mt-3",children:"National averages. Your actual rate depends on credit, down payment, and lender."})]})}const vx=({label:e,v:t})=>c.jsxs("div",{className:"border border-border p-3",children:[c.jsx("div",{className:"text-[9px] uppercase tracking-[0.2em] text-muted-foreground mb-1",children:e}),c.jsxs("div",{className:"text-xl font-bold tabular-nums",children:[t.toFixed(3),"%"]})]});function Upe(e){if(e<=0)return 0;if(e<=1e5)return 400+e/1e3*5.75;const t=e-1e5;return 400+100*5.75+t/1e3*3.5}function hpt(e){const t=e.salePrice*(e.listingCommissionPct/100),n=e.salePrice*(e.buyerAgentCommissionPct/100),r=e.salePrice*.0075,i=e.salePrice*.0011,s=e.titleInsuranceOverride??Upe(e.salePrice),a=t+n+r+i+s+e.settlementFee+e.recordingFee+e.proratedTax+e.sellerConcessions+e.mortgagePayoff;return{salePrice:e.salePrice,listingCommission:t,buyerAgentCommission:n,stateTransferTax:r,countyTransferTax:i,titleInsurance:s,settlementFee:e.settlementFee,recordingFee:e.recordingFee,proratedTax:e.proratedTax,sellerConcessions:e.sellerConcessions,mortgagePayoff:e.mortgagePayoff,totalCosts:a,estimatedNet:e.salePrice-a}}function fpt({defaultPrice:e}){const[t,n]=S.useState(e||35e4),[r,i]=S.useState(18e4),[s,a]=S.useState(3),[o,l]=S.useState(3),[u,d]=S.useState(0),[A,f]=S.useState(1500),[h,p]=S.useState(400),[m,g]=S.useState(75),[y,v]=S.useState(""),x=S.useMemo(()=>hpt({salePrice:t,mortgagePayoff:r,listingCommissionPct:s,buyerAgentCommissionPct:o,sellerConcessions:u,proratedTax:A,settlementFee:h,recordingFee:m,titleInsuranceOverride:y?Number(y):void 0}),[t,r,s,o,u,A,h,m,y]);return c.jsxs("div",{className:"bg-card border border-border p-5",children:[c.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium",children:"Michigan Seller Net Sheet"}),c.jsx("span",{className:"text-[9px] uppercase tracking-[0.2em] text-muted-foreground/60",children:"Estimate"})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[c.jsxs("div",{className:"space-y-3",children:[c.jsx(Yd,{label:"Sale Price",value:t,setValue:n,prefix:"$"}),c.jsx(Yd,{label:"Mortgage Payoff",value:r,setValue:i,prefix:"$"}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsx(Yd,{label:"Listing Comm. %",value:s,setValue:a,step:.25}),c.jsx(Yd,{label:"Buyer Agent %",value:o,setValue:l,step:.25})]}),c.jsx(Yd,{label:"Seller Concessions",value:u,setValue:d,prefix:"$"}),c.jsx(Yd,{label:"Prorated Property Tax",value:A,setValue:f,prefix:"$"}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsx(Yd,{label:"Settlement Fee",value:h,setValue:p,prefix:"$"}),c.jsx(Yd,{label:"Recording Fee",value:m,setValue:g,prefix:"$"})]}),c.jsxs("div",{children:[c.jsxs("label",{className:"text-[10px] uppercase tracking-[0.2em] text-muted-foreground block mb-1",children:["Title Insurance Override ",c.jsxs("span",{className:"text-muted-foreground/50",children:["(default ",Av(Upe(t)),")"]})]}),c.jsx("input",{type:"number",value:y,onChange:b=>v(b.target.value),placeholder:"optional",className:"w-full bg-background border border-border px-3 py-2 text-sm"})]})]}),c.jsxs("div",{className:"bg-muted/40 border border-border p-4 space-y-2 text-sm",children:[c.jsx(Mo,{label:"Sale Price",v:x.salePrice,bold:!0}),c.jsx(iY,{}),c.jsx(Mo,{label:`Listing Commission (${s}%)`,v:-x.listingCommission}),c.jsx(Mo,{label:`Buyer Agent (${o}%)`,v:-x.buyerAgentCommission}),c.jsx(Mo,{label:"MI State Transfer Tax (0.75%)",v:-x.stateTransferTax}),c.jsx(Mo,{label:"Kent County Transfer Tax (0.11%)",v:-x.countyTransferTax}),c.jsx(Mo,{label:"Title Insurance (owner's)",v:-x.titleInsurance}),c.jsx(Mo,{label:"Settlement Fee",v:-x.settlementFee}),c.jsx(Mo,{label:"Recording / Deed Prep",v:-x.recordingFee}),c.jsx(Mo,{label:"Prorated Property Tax",v:-x.proratedTax}),x.sellerConcessions>0&&c.jsx(Mo,{label:"Seller Concessions",v:-x.sellerConcessions}),c.jsx(Mo,{label:"Mortgage Payoff",v:-x.mortgagePayoff}),c.jsx(iY,{}),c.jsx(Mo,{label:"Estimated Net Proceeds",v:x.estimatedNet,bold:!0,highlight:!0}),c.jsx("p",{className:"text-[10px] text-muted-foreground/70 mt-3 leading-relaxed",children:"Estimate only — confirm exact figures with your title company. Transfer taxes shown are MI State + Kent County. Other counties may differ."})]})]})]})}const Yd=({label:e,value:t,setValue:n,prefix:r,step:i})=>c.jsxs("div",{children:[c.jsx("label",{className:"text-[10px] uppercase tracking-[0.2em] text-muted-foreground block mb-1",children:e}),c.jsxs("div",{className:"relative",children:[r&&c.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:r}),c.jsx("input",{type:"number",step:i??1,value:t,onChange:s=>n(Number(s.target.value)||0),className:`w-full bg-background border border-border py-2 text-sm ${r?"pl-7 pr-3":"px-3"}`})]})]}),Mo=({label:e,v:t,bold:n,highlight:r})=>c.jsxs("div",{className:`flex items-center justify-between ${n?"font-bold":""} ${r?"text-lg pt-1":""}`,children:[c.jsx("span",{className:r?"text-foreground":"text-foreground/80",children:e}),c.jsx("span",{className:`tabular-nums ${t<0?"text-foreground/70":"text-foreground"}`,children:Av(t)})]}),iY=()=>c.jsx("div",{className:"h-px bg-border my-1"});function ppt({defaultPrice:e}){const[t,n]=S.useState(e||325e3),[r,i]=S.useState(10),[s,a]=S.useState(6.875),[o,l]=S.useState(30),[u,d]=S.useState(1.45),[A,f]=S.useState(1400),[h,p]=S.useState(0);S.useEffect(()=>{(async()=>{var x;const{data:y}=await Re.from("market_pulse_rates").select("rates").order("fetched_at",{ascending:!1}).limit(1).maybeSingle(),v=(x=y==null?void 0:y.rates)==null?void 0:x.thirty_year_fixed;typeof v=="number"&&a(v)})()},[]);const m=S.useMemo(()=>opt({homePrice:t,downPaymentPct:r,ratePct:s,termYears:o,propertyTaxRatePct:u,annualInsurance:A,monthlyHoa:h}),[t,r,s,o,u,A,h]),g=[{key:"P&I",v:m.monthlyPI,color:"hsl(var(--primary))"},{key:"Tax",v:m.monthlyTax,color:"hsl(35 80% 55%)"},{key:"Insurance",v:m.monthlyInsurance,color:"hsl(195 60% 50%)"},{key:"PMI",v:m.monthlyPmi,color:"hsl(0 70% 55%)"},{key:"HOA",v:m.monthlyHoa,color:"hsl(85 50% 50%)"}].filter(y=>y.v>0);return c.jsxs("div",{className:"bg-card border border-border p-5",children:[c.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium",children:"PITI + PMI Mortgage Calculator"}),c.jsx("span",{className:"text-[9px] uppercase tracking-[0.2em] text-muted-foreground/60",children:"Estimate"})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[c.jsxs("div",{className:"space-y-3",children:[c.jsx(tg,{label:"Home Price",v:t,set:n,prefix:"$"}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsx(tg,{label:"Down Payment %",v:r,set:i,step:.5}),c.jsx(tg,{label:"Rate %",v:s,set:a,step:.125})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-[10px] uppercase tracking-[0.2em] text-muted-foreground block mb-1",children:"Term"}),c.jsxs("select",{value:o,onChange:y=>l(Number(y.target.value)),className:"w-full bg-background border border-border px-3 py-2 text-sm",children:[c.jsx("option",{value:30,children:"30 years"}),c.jsx("option",{value:15,children:"15 years"})]})]}),c.jsx(tg,{label:"Property Tax %",v:u,set:d,step:.05})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsx(tg,{label:"Annual Insurance",v:A,set:f,prefix:"$"}),c.jsx(tg,{label:"Monthly HOA",v:h,set:p,prefix:"$"})]}),m.pmiRatePct>0&&c.jsxs("p",{className:"text-[11px] text-muted-foreground bg-muted/40 border border-border p-2",children:["Down payment under 20% — PMI applied at ",c.jsxs("strong",{children:[m.pmiRatePct.toFixed(2),"%/yr"]}),"."]})]}),c.jsxs("div",{className:"bg-muted/40 border border-border p-4",children:[c.jsx("div",{className:"text-[9px] uppercase tracking-[0.2em] text-muted-foreground mb-2",children:"Estimated Monthly Payment"}),c.jsx("div",{className:"text-4xl font-bold tabular-nums mb-4",children:rY(m.monthlyTotal)}),c.jsxs("div",{className:"space-y-1.5 text-sm mb-4",children:[c.jsx(yf,{label:"Principal & Interest",v:m.monthlyPI}),c.jsx(yf,{label:"Property Tax",v:m.monthlyTax}),c.jsx(yf,{label:"Insurance",v:m.monthlyInsurance}),m.monthlyPmi>0&&c.jsx(yf,{label:"PMI",v:m.monthlyPmi}),m.monthlyHoa>0&&c.jsx(yf,{label:"HOA",v:m.monthlyHoa})]}),c.jsx("div",{className:"flex h-3 overflow-hidden border border-border",children:g.map(y=>c.jsx("div",{title:`${y.key}: ${rY(y.v)}`,style:{width:`${y.v/m.monthlyTotal*100}%`,background:y.color}},y.key))}),c.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1 mt-2 text-[10px] uppercase tracking-[0.15em]",children:g.map(y=>c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"w-2 h-2",style:{background:y.color}}),c.jsx("span",{className:"text-muted-foreground",children:y.key})]},y.key))}),c.jsxs("div",{className:"mt-4 pt-3 border-t border-border text-sm space-y-1",children:[c.jsx(yf,{label:"Down Payment",v:m.downPayment}),c.jsx(yf,{label:"Loan Amount",v:m.loanAmount})]})]})]})]})}const tg=({label:e,v:t,set:n,prefix:r,step:i})=>c.jsxs("div",{children:[c.jsx("label",{className:"text-[10px] uppercase tracking-[0.2em] text-muted-foreground block mb-1",children:e}),c.jsxs("div",{className:"relative",children:[r&&c.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:r}),c.jsx("input",{type:"number",step:i??1,value:t,onChange:s=>n(Number(s.target.value)||0),className:`w-full bg-background border border-border py-2 text-sm ${r?"pl-7 pr-3":"px-3"}`})]})]}),yf=({label:e,v:t})=>c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-foreground/80",children:e}),c.jsx("span",{className:"tabular-nums",children:Av(t)})]});function mpt(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const gpt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ypt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vpt={};function sY(e,t){return(vpt.jsx?ypt:gpt).test(e)}const xpt=/[ \t\n\f\r]/g;function wpt(e){return typeof e=="object"?e.type==="text"?aY(e.value):!1:aY(e)}function aY(e){return e.replace(xpt,"")===""}class k2{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}k2.prototype.normal={};k2.prototype.property={};k2.prototype.space=void 0;function Dpe(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new k2(n,r,t)}function mL(e){return e.toLowerCase()}class za{constructor(t,n){this.attribute=n,this.property=t}}za.prototype.attribute="";za.prototype.booleanish=!1;za.prototype.boolean=!1;za.prototype.commaOrSpaceSeparated=!1;za.prototype.commaSeparated=!1;za.prototype.defined=!1;za.prototype.mustUseProperty=!1;za.prototype.number=!1;za.prototype.overloadedBoolean=!1;za.prototype.property="";za.prototype.spaceSeparated=!1;za.prototype.space=void 0;let bpt=0;const an=dm(),gi=dm(),gL=dm(),We=dm(),rr=dm(),gy=dm(),ro=dm();function dm(){return 2**++bpt}const yL=Object.freeze(Object.defineProperty({__proto__:null,boolean:an,booleanish:gi,commaOrSpaceSeparated:ro,commaSeparated:gy,number:We,overloadedBoolean:gL,spaceSeparated:rr},Symbol.toStringTag,{value:"Module"})),QI=Object.keys(yL);class ZQ extends za{constructor(t,n,r,i){let s=-1;if(super(t,n),oY(this,"space",i),typeof r=="number")for(;++s<QI.length;){const a=QI[s];oY(this,QI[s],(r&yL[a])===yL[a])}}}ZQ.prototype.defined=!0;function oY(e,t,n){n&&(e[t]=n)}function hv(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new ZQ(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[mL(r)]=r,n[mL(s.attribute)]=r}return new k2(t,n,e.space)}const Qpe=hv({properties:{ariaActiveDescendant:null,ariaAtomic:gi,ariaAutoComplete:null,ariaBusy:gi,ariaChecked:gi,ariaColCount:We,ariaColIndex:We,ariaColSpan:We,ariaControls:rr,ariaCurrent:null,ariaDescribedBy:rr,ariaDetails:null,ariaDisabled:gi,ariaDropEffect:rr,ariaErrorMessage:null,ariaExpanded:gi,ariaFlowTo:rr,ariaGrabbed:gi,ariaHasPopup:null,ariaHidden:gi,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:rr,ariaLevel:We,ariaLive:null,ariaModal:gi,ariaMultiLine:gi,ariaMultiSelectable:gi,ariaOrientation:null,ariaOwns:rr,ariaPlaceholder:null,ariaPosInSet:We,ariaPressed:gi,ariaReadOnly:gi,ariaRelevant:null,ariaRequired:gi,ariaRoleDescription:rr,ariaRowCount:We,ariaRowIndex:We,ariaRowSpan:We,ariaSelected:gi,ariaSetSize:We,ariaSort:null,ariaValueMax:We,ariaValueMin:We,ariaValueNow:We,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Hpe(e,t){return t in e?e[t]:t}function $pe(e,t){return Hpe(e,t.toLowerCase())}const Cpt=hv({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gy,acceptCharset:rr,accessKey:rr,action:null,allow:null,allowFullScreen:an,allowPaymentRequest:an,allowUserMedia:an,alt:null,as:null,async:an,autoCapitalize:null,autoComplete:rr,autoFocus:an,autoPlay:an,blocking:rr,capture:null,charSet:null,checked:an,cite:null,className:rr,cols:We,colSpan:null,content:null,contentEditable:gi,controls:an,controlsList:rr,coords:We|gy,crossOrigin:null,data:null,dateTime:null,decoding:null,default:an,defer:an,dir:null,dirName:null,disabled:an,download:gL,draggable:gi,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:an,formTarget:null,headers:rr,height:We,hidden:gL,high:We,href:null,hrefLang:null,htmlFor:rr,httpEquiv:rr,id:null,imageSizes:null,imageSrcSet:null,inert:an,inputMode:null,integrity:null,is:null,isMap:an,itemId:null,itemProp:rr,itemRef:rr,itemScope:an,itemType:rr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:an,low:We,manifest:null,max:null,maxLength:We,media:null,method:null,min:null,minLength:We,multiple:an,muted:an,name:null,nonce:null,noModule:an,noValidate:an,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:an,optimum:We,pattern:null,ping:rr,placeholder:null,playsInline:an,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:an,referrerPolicy:null,rel:rr,required:an,reversed:an,rows:We,rowSpan:We,sandbox:rr,scope:null,scoped:an,seamless:an,selected:an,shadowRootClonable:an,shadowRootDelegatesFocus:an,shadowRootMode:null,shape:null,size:We,sizes:null,slot:null,span:We,spellCheck:gi,src:null,srcDoc:null,srcLang:null,srcSet:null,start:We,step:null,style:null,tabIndex:We,target:null,title:null,translate:null,type:null,typeMustMatch:an,useMap:null,value:gi,width:We,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:rr,axis:null,background:null,bgColor:null,border:We,borderColor:null,bottomMargin:We,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:an,declare:an,event:null,face:null,frame:null,frameBorder:null,hSpace:We,leftMargin:We,link:null,longDesc:null,lowSrc:null,marginHeight:We,marginWidth:We,noResize:an,noHref:an,noShade:an,noWrap:an,object:null,profile:null,prompt:null,rev:null,rightMargin:We,rules:null,scheme:null,scrolling:gi,standby:null,summary:null,text:null,topMargin:We,valueType:null,version:null,vAlign:null,vLink:null,vSpace:We,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:an,disableRemotePlayback:an,prefix:null,property:null,results:We,security:null,unselectable:null},space:"html",transform:$pe}),Spt=hv({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:ro,accentHeight:We,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:We,amplitude:We,arabicForm:null,ascent:We,attributeName:null,attributeType:null,azimuth:We,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:We,by:null,calcMode:null,capHeight:We,className:rr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:We,diffuseConstant:We,direction:null,display:null,dur:null,divisor:We,dominantBaseline:null,download:an,dx:null,dy:null,edgeMode:null,editable:null,elevation:We,enableBackground:null,end:null,event:null,exponent:We,externalResourcesRequired:null,fill:null,fillOpacity:We,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:gy,g2:gy,glyphName:gy,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:We,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:We,horizOriginX:We,horizOriginY:We,id:null,ideographic:We,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:We,k:We,k1:We,k2:We,k3:We,k4:We,kernelMatrix:ro,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:We,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:We,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:We,overlineThickness:We,paintOrder:null,panose1:null,path:null,pathLength:We,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:rr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:We,pointsAtY:We,pointsAtZ:We,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ro,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ro,rev:ro,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ro,requiredFeatures:ro,requiredFonts:ro,requiredFormats:ro,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:We,specularExponent:We,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:We,strikethroughThickness:We,string:null,stroke:null,strokeDashArray:ro,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:We,strokeOpacity:We,strokeWidth:null,style:null,surfaceScale:We,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ro,tabIndex:We,tableValues:null,target:null,targetX:We,targetY:We,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ro,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:We,underlineThickness:We,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:We,values:null,vAlphabetic:We,vMathematical:We,vectorEffect:null,vHanging:We,vIdeographic:We,version:null,vertAdvY:We,vertOriginX:We,vertOriginY:We,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:We,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Hpe}),zpe=hv({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()}}),Vpe=hv({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$pe}),Kpe=hv({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Bpt={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"},_pt=/[A-Z]/g,lY=/-[a-z]/g,kpt=/^data[-\w.:]+$/i;function Ept(e,t){const n=mL(t);let r=t,i=za;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&kpt.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(lY,jpt);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!lY.test(s)){let a=s.replace(_pt,Npt);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=ZQ}return new i(r,t)}function Npt(e){return"-"+e.toLowerCase()}function jpt(e){return e.charAt(1).toUpperCase()}const Tpt=Dpe([Qpe,Cpt,zpe,Vpe,Kpe],"html"),eH=Dpe([Qpe,Spt,zpe,Vpe,Kpe],"svg");function Ppt(e){return e.join(" ").trim()}var tH={},cY=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ipt=/\n/g,Opt=/^\s*/,Fpt=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Mpt=/^:\s*/,Lpt=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Rpt=/^[;\s]*/,Upt=/^\s+|\s+$/g,Dpt=`
`,uY="/",dY="*",Pf="",Qpt="comment",Hpt="declaration";function $pt(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var m=p.match(Ipt);m&&(n+=m.length);var g=p.lastIndexOf(Dpt);r=~g?p.length-g:r+p.length}function s(){var p={line:n,column:r};return function(m){return m.position=new a(p),u(),m}}function a(p){this.start=p,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function o(p){var m=new Error(t.source+":"+n+":"+r+": "+p);if(m.reason=p,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(p){var m=p.exec(e);if(m){var g=m[0];return i(g),e=e.slice(g.length),m}}function u(){l(Opt)}function d(p){var m;for(p=p||[];m=A();)m!==!1&&p.push(m);return p}function A(){var p=s();if(!(uY!=e.charAt(0)||dY!=e.charAt(1))){for(var m=2;Pf!=e.charAt(m)&&(dY!=e.charAt(m)||uY!=e.charAt(m+1));)++m;if(m+=2,Pf===e.charAt(m-1))return o("End of comment missing");var g=e.slice(2,m-2);return r+=2,i(g),e=e.slice(m),r+=2,p({type:Qpt,comment:g})}}function f(){var p=s(),m=l(Fpt);if(m){if(A(),!l(Mpt))return o("property missing ':'");var g=l(Lpt),y=p({type:Hpt,property:AY(m[0].replace(cY,Pf)),value:g?AY(g[0].replace(cY,Pf)):Pf});return l(Rpt),y}}function h(){var p=[];d(p);for(var m;m=f();)m!==!1&&(p.push(m),d(p));return p}return u(),h()}function AY(e){return e?e.replace(Upt,Pf):Pf}var zpt=$pt,Vpt=TA&&TA.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tH,"__esModule",{value:!0});tH.default=Wpt;const Kpt=Vpt(zpt);function Wpt(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Kpt.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(n=n||{},n[a]=o)}),n}var xj={};Object.defineProperty(xj,"__esModule",{value:!0});xj.camelCase=void 0;var qpt=/^--[a-zA-Z0-9_-]+$/,Gpt=/-([a-z])/g,Ypt=/^[^-]+$/,Xpt=/^-(webkit|moz|ms|o|khtml)-/,Jpt=/^-(ms)-/,Zpt=function(e){return!e||Ypt.test(e)||qpt.test(e)},emt=function(e,t){return t.toUpperCase()},hY=function(e,t){return"".concat(t,"-")},tmt=function(e,t){return t===void 0&&(t={}),Zpt(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Jpt,hY):e=e.replace(Xpt,hY),e.replace(Gpt,emt))};xj.camelCase=tmt;var nmt=TA&&TA.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rmt=nmt(tH),imt=xj;function vL(e,t){var n={};return!e||typeof e!="string"||(0,rmt.default)(e,function(r,i){r&&i&&(n[(0,imt.camelCase)(r,t)]=i)}),n}vL.default=vL;var smt=vL;const amt=Bn(smt),Wpe=qpe("end"),nH=qpe("start");function qpe(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function omt(e){const t=nH(e),n=Wpe(e);if(t&&n)return{start:t,end:n}}function Mw(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fY(e.position):"start"in e||"end"in e?fY(e):"line"in e||"column"in e?xL(e):""}function xL(e){return pY(e&&e.line)+":"+pY(e&&e.column)}function fY(e){return xL(e&&e.start)+"-"+xL(e&&e.end)}function pY(e){return e&&typeof e=="number"?e:1}class Ks extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Mw(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ks.prototype.file="";Ks.prototype.name="";Ks.prototype.reason="";Ks.prototype.message="";Ks.prototype.stack="";Ks.prototype.column=void 0;Ks.prototype.line=void 0;Ks.prototype.ancestors=void 0;Ks.prototype.cause=void 0;Ks.prototype.fatal=void 0;Ks.prototype.place=void 0;Ks.prototype.ruleId=void 0;Ks.prototype.source=void 0;const rH={}.hasOwnProperty,lmt=new Map,cmt=/[A-Z]/g,umt=new Set(["table","tbody","thead","tfoot","tr"]),dmt=new Set(["td","th"]),Gpe="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Amt(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=xmt(n,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");r=vmt(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?eH:Tpt,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Ype(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Ype(e,t,n){if(t.type==="element")return hmt(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return fmt(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return mmt(e,t,n);if(t.type==="mdxjsEsm")return pmt(e,t);if(t.type==="root")return gmt(e,t,n);if(t.type==="text")return ymt(e,t)}function hmt(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=eH,e.schema=i),e.ancestors.push(t);const s=Jpe(e,t.tagName,!1),a=wmt(e,t);let o=sH(e,t);return umt.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!wpt(l):!0})),Xpe(e,a,s,t),iH(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function fmt(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}j1(e,t.position)}function pmt(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);j1(e,t.position)}function mmt(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=eH,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Jpe(e,t.name,!0),a=bmt(e,t),o=sH(e,t);return Xpe(e,a,s,t),iH(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function gmt(e,t,n){const r={};return iH(r,sH(e,t)),e.create(t,e.Fragment,r,n)}function ymt(e,t){return t.value}function Xpe(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function iH(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vmt(e,t,n){return r;function r(i,s,a,o){const u=Array.isArray(a.children)?n:t;return o?u(s,a,o):u(s,a)}}function xmt(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=nH(r);return t(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function wmt(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&rH.call(t.properties,i)){const s=Cmt(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&dmt.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function bmt(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else j1(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else j1(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function sH(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:lmt;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const o=Ype(e,s,a);o!==void 0&&n.push(o)}return n}function Cmt(e,t,n){const r=Ept(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?mpt(n):Ppt(n)),r.property==="style"){let i=typeof n=="object"?n:Smt(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Bmt(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Bpt[r.property]||r.property:r.attribute,n]}}function Smt(e,t){try{return amt(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ks("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Gpe+"#cannot-parse-style-attribute",i}}function Jpe(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=sY(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=sY(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return rH.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);j1(e)}function j1(e,t){const n=new Ks("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Gpe+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Bmt(e){const t={};let n;for(n in e)rH.call(e,n)&&(t[_mt(n)]=e[n]);return t}function _mt(e){let t=e.replace(cmt,kmt);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kmt(e){return"-"+e.toLowerCase()}const HI={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"]},Emt={};function Nmt(e,t){const n=Emt,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Zpe(e,r,i)}function Zpe(e,t,n){if(jmt(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return mY(e.children,t,n)}return Array.isArray(e)?mY(e,t,n):""}function mY(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Zpe(e[i],t,n);return r.join("")}function jmt(e){return!!(e&&typeof e=="object")}const gY=document.createElement("i");function aH(e){const t="&"+e+";";gY.innerHTML=t;const n=gY.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function lu(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Wo(e,t){return e.length>0?(lu(e,e.length,0,t),e):t}const yY={}.hasOwnProperty;function Tmt(e){const t={};let n=-1;for(;++n<e.length;)Pmt(t,e[n]);return t}function Pmt(e,t){let n;for(n in t){const i=(yY.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){yY.call(i,a)||(i[a]=[]);const o=s[a];Imt(i[a],Array.isArray(o)?o:o?[o]:[])}}}function Imt(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);lu(e,0,0,r)}function eme(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function yy(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Uc=Wh(/[A-Za-z]/),fo=Wh(/[\dA-Za-z]/),Omt=Wh(/[#-'*+\--9=?A-Z^-~]/);function wL(e){return e!==null&&(e<32||e===127)}const bL=Wh(/\d/),Fmt=Wh(/[\dA-Fa-f]/),Mmt=Wh(/[!-/:-@[-`{-~]/);function Kt(e){return e!==null&&e<-2}function Ha(e){return e!==null&&(e<0||e===32)}function In(e){return e===-2||e===-1||e===32}const Lmt=Wh(new RegExp("\\p{P}|\\p{S}","u")),Rmt=Wh(/\s/);function Wh(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function fv(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&fo(e.charCodeAt(n+1))&&fo(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function lr(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return In(l)?(e.enter(n),o(l)):t(l)}function o(l){return In(l)&&s++<i?(e.consume(l),o):(e.exit(n),t(l))}}const Umt={tokenize:Dmt};function Dmt(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),lr(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Kt(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const Qmt={tokenize:Hmt},vY={tokenize:$mt};function Hmt(e){const t=this,n=[];let r=0,i,s,a;return o;function o(x){if(r<n.length){const b=n[r];return t.containerState=b[1],e.attempt(b[0].continuation,l,u)(x)}return u(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const b=t.events.length;let w=b,B;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){B=t.events[w][1].end;break}y(r);let k=b;for(;k<t.events.length;)t.events[k][1].end={...B},k++;return lu(t.events,w+1,0,t.events.slice(b)),t.events.length=k,u(x)}return o(x)}function u(x){if(r===n.length){if(!i)return f(x);if(i.currentConstruct&&i.currentConstruct.concrete)return p(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(vY,d,A)(x)}function d(x){return i&&v(),y(r),f(x)}function A(x){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,p(x)}function f(x){return t.containerState={},e.attempt(vY,h,p)(x)}function h(x){return r++,n.push([t.currentConstruct,t.containerState]),f(x)}function p(x){if(x===null){i&&v(),y(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),m(x)}function m(x){if(x===null){g(e.exit("chunkFlow"),!0),y(0),e.consume(x);return}return Kt(x)?(e.consume(x),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(x),m)}function g(x,b){const w=t.sliceStream(x);if(b&&w.push(null),x.previous=s,s&&(s.next=x),s=x,i.defineSkip(x.start),i.write(w),t.parser.lazy[x.start.line]){let B=i.events.length;for(;B--;)if(i.events[B][1].start.offset<a&&(!i.events[B][1].end||i.events[B][1].end.offset>a))return;const k=t.events.length;let N=k,j,L;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(j){L=t.events[N][1].end;break}j=!0}for(y(r),B=k;B<t.events.length;)t.events[B][1].end={...L},B++;lu(t.events,N+1,0,t.events.slice(k)),t.events.length=B}}function y(x){let b=n.length;for(;b-- >x;){const w=n[b];t.containerState=w[1],w[0].exit.call(t,e)}n.length=x}function v(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function $mt(e,t,n){return lr(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function xY(e){if(e===null||Ha(e)||Rmt(e))return 1;if(Lmt(e))return 2}function oH(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const CL={name:"attention",resolveAll:zmt,tokenize:Vmt};function zmt(e,t){let n=-1,r,i,s,a,o,l,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const A={...e[r][1].end},f={...e[n][1].start};wY(A,-l),wY(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:A,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Wo(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Wo(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),u=Wo(u,oH(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Wo(u,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Wo(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,lu(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Vmt(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=xY(r);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const u=e.exit("attentionSequence"),d=xY(l),A=!d||d===2&&i||n.includes(l),f=!i||i===2&&d||n.includes(r);return u._open=!!(s===42?A:A&&(i||!f)),u._close=!!(s===42?f:f&&(d||!A)),t(l)}}function wY(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Kmt={name:"autolink",tokenize:Wmt};function Wmt(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(h){return Uc(h)?(e.consume(h),a):h===64?n(h):u(h)}function a(h){return h===43||h===45||h===46||fo(h)?(r=1,o(h)):u(h)}function o(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||fo(h))&&r++<32?(e.consume(h),o):(r=0,u(h))}function l(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||wL(h)?n(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),d):Omt(h)?(e.consume(h),u):n(h)}function d(h){return fo(h)?A(h):n(h)}function A(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||fo(h))&&r++<63){const p=h===45?f:A;return e.consume(h),p}return n(h)}}const wj={partial:!0,tokenize:qmt};function qmt(e,t,n){return r;function r(s){return In(s)?lr(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||Kt(s)?t(s):n(s)}}const tme={continuation:{tokenize:Ymt},exit:Xmt,name:"blockQuote",tokenize:Gmt};function Gmt(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return In(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Ymt(e,t,n){const r=this;return i;function i(a){return In(a)?lr(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(tme,t,n)(a)}}function Xmt(e){e.exit("blockQuote")}const nme={name:"characterEscape",tokenize:Jmt};function Jmt(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return Mmt(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const rme={name:"characterReference",tokenize:Zmt};function Zmt(e,t,n){const r=this;let i=0,s,a;return o;function o(A){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(A),e.exit("characterReferenceMarker"),l}function l(A){return A===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(A),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,a=fo,d(A))}function u(A){return A===88||A===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(A),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=Fmt,d):(e.enter("characterReferenceValue"),s=7,a=bL,d(A))}function d(A){if(A===59&&i){const f=e.exit("characterReferenceValue");return a===fo&&!aH(r.sliceSerialize(f))?n(A):(e.enter("characterReferenceMarker"),e.consume(A),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(A)&&i++<s?(e.consume(A),d):n(A)}}const bY={partial:!0,tokenize:tgt},CY={concrete:!0,name:"codeFenced",tokenize:egt};function egt(e,t,n){const r=this,i={partial:!0,tokenize:w};let s=0,a=0,o;return l;function l(B){return u(B)}function u(B){const k=r.events[r.events.length-1];return s=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,o=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(B)}function d(B){return B===o?(a++,e.consume(B),d):a<3?n(B):(e.exit("codeFencedFenceSequence"),In(B)?lr(e,A,"whitespace")(B):A(B))}function A(B){return B===null||Kt(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(bY,m,b)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(B))}function f(B){return B===null||Kt(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),A(B)):In(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),lr(e,h,"whitespace")(B)):B===96&&B===o?n(B):(e.consume(B),f)}function h(B){return B===null||Kt(B)?A(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(B))}function p(B){return B===null||Kt(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),A(B)):B===96&&B===o?n(B):(e.consume(B),p)}function m(B){return e.attempt(i,b,g)(B)}function g(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),y}function y(B){return s>0&&In(B)?lr(e,v,"linePrefix",s+1)(B):v(B)}function v(B){return B===null||Kt(B)?e.check(bY,m,b)(B):(e.enter("codeFlowValue"),x(B))}function x(B){return B===null||Kt(B)?(e.exit("codeFlowValue"),v(B)):(e.consume(B),x)}function b(B){return e.exit("codeFenced"),t(B)}function w(B,k,N){let j=0;return L;function L(D){return B.enter("lineEnding"),B.consume(D),B.exit("lineEnding"),T}function T(D){return B.enter("codeFencedFence"),In(D)?lr(B,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):E(D)}function E(D){return D===o?(B.enter("codeFencedFenceSequence"),F(D)):N(D)}function F(D){return D===o?(j++,B.consume(D),F):j>=a?(B.exit("codeFencedFenceSequence"),In(D)?lr(B,M,"whitespace")(D):M(D)):N(D)}function M(D){return D===null||Kt(D)?(B.exit("codeFencedFence"),k(D)):N(D)}}}function tgt(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const $I={name:"codeIndented",tokenize:rgt},ngt={partial:!0,tokenize:igt};function rgt(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),lr(e,s,"linePrefix",5)(u)}function s(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):Kt(u)?e.attempt(ngt,a,l)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||Kt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function l(u){return e.exit("codeIndented"),t(u)}}function igt(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Kt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):lr(e,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):Kt(a)?i(a):n(a)}}const sgt={name:"codeText",previous:ogt,resolve:agt,tokenize:lgt};function agt(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ogt(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function lgt(e,t,n){let r=0,i,s;return a;function a(A){return e.enter("codeText"),e.enter("codeTextSequence"),o(A)}function o(A){return A===96?(e.consume(A),r++,o):(e.exit("codeTextSequence"),l(A))}function l(A){return A===null?n(A):A===32?(e.enter("space"),e.consume(A),e.exit("space"),l):A===96?(s=e.enter("codeTextSequence"),i=0,d(A)):Kt(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(A))}function u(A){return A===null||A===32||A===96||Kt(A)?(e.exit("codeTextData"),l(A)):(e.consume(A),u)}function d(A){return A===96?(e.consume(A),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(A)):(s.type="codeTextData",u(A))}}class cgt{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&xx(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),xx(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),xx(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);xx(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);xx(this.left,n.reverse())}}}function xx(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ime(e){const t={};let n=-1,r,i,s,a,o,l,u;const d=new cgt(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ugt(d,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return lu(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function ugt(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],u={};let d,A,f=-1,h=n,p=0,m=0;const g=[m];for(;h;){for(;e.get(++i)[1]!==h;);s.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),A&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),A=h,h=h.next}for(h=n;++f<o.length;)o[f][0]==="exit"&&o[f-1][0]==="enter"&&o[f][1].type===o[f-1][1].type&&o[f][1].start.line!==o[f][1].end.line&&(m=f+1,g.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):g.pop(),f=g.length;f--;){const y=o.slice(g[f],g[f+1]),v=s.pop();l.push([v,v+y.length-1]),e.splice(v,2,y)}for(l.reverse(),f=-1;++f<l.length;)u[p+l[f][0]]=p+l[f][1],p+=l[f][1]-l[f][0]-1;return u}const dgt={resolve:hgt,tokenize:fgt},Agt={partial:!0,tokenize:pgt};function hgt(e){return ime(e),e}function fgt(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):Kt(o)?e.check(Agt,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function pgt(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),lr(e,s,"linePrefix")}function s(a){if(a===null||Kt(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function sme(e,t,n,r,i,s,a,o,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return A;function A(y){return y===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(y),e.exit(s),f):y===null||y===32||y===41||wL(y)?n(y):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(o),f(y)):y===null||y===60||Kt(y)?n(y):(e.consume(y),y===92?p:h)}function p(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function m(y){return!d&&(y===null||y===41||Ha(y))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(y)):d<u&&y===40?(e.consume(y),d++,m):y===41?(e.consume(y),d--,m):y===null||y===32||y===40||wL(y)?n(y):(e.consume(y),y===92?g:m)}function g(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function ame(e,t,n,r,i,s){const a=this;let o=0,l;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(s),d}function d(h){return o>999||h===null||h===91||h===93&&!l||h===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(e.exit(s),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):Kt(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),A(h))}function A(h){return h===null||h===91||h===93||Kt(h)||o++>999?(e.exit("chunkString"),d(h)):(e.consume(h),l||(l=!In(h)),h===92?f:A)}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,A):A(h)}}function ome(e,t,n,r,i,s){let a;return o;function o(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,l):n(f)}function l(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(s),u(f))}function u(f){return f===a?(e.exit(s),l(a)):f===null?n(f):Kt(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),lr(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===a||f===null||Kt(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?A:d)}function A(f){return f===a||f===92?(e.consume(f),d):d(f)}}function Lw(e,t){let n;return r;function r(i){return Kt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):In(i)?lr(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const mgt={name:"definition",tokenize:ygt},ggt={partial:!0,tokenize:vgt};function ygt(e,t,n){const r=this;let i;return s;function s(h){return e.enter("definition"),a(h)}function a(h){return ame.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=yy(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return Ha(h)?Lw(e,u)(h):u(h)}function u(h){return sme(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(ggt,A,A)(h)}function A(h){return In(h)?lr(e,f,"whitespace")(h):f(h)}function f(h){return h===null||Kt(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function vgt(e,t,n){return r;function r(o){return Ha(o)?Lw(e,i)(o):n(o)}function i(o){return ome(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return In(o)?lr(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Kt(o)?t(o):n(o)}}const xgt={name:"hardBreakEscape",tokenize:wgt};function wgt(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return Kt(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const bgt={name:"headingAtx",resolve:Cgt,tokenize:Sgt};function Cgt(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},lu(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function Sgt(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Ha(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||Kt(d)?(e.exit("atxHeading"),t(d)):In(d)?lr(e,o,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),o(d))}function u(d){return d===null||d===35||Ha(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),u)}}const Bgt=["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"],SY=["pre","script","style","textarea"],_gt={concrete:!0,name:"htmlFlow",resolveTo:Ngt,tokenize:jgt},kgt={partial:!0,tokenize:Pgt},Egt={partial:!0,tokenize:Tgt};function Ngt(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 jgt(e,t,n){const r=this;let i,s,a,o,l;return u;function u(O){return d(O)}function d(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),A}function A(O){return O===33?(e.consume(O),f):O===47?(e.consume(O),s=!0,m):O===63?(e.consume(O),i=3,r.interrupt?t:Q):Uc(O)?(e.consume(O),a=String.fromCharCode(O),g):n(O)}function f(O){return O===45?(e.consume(O),i=2,h):O===91?(e.consume(O),i=5,o=0,p):Uc(O)?(e.consume(O),i=4,r.interrupt?t:Q):n(O)}function h(O){return O===45?(e.consume(O),r.interrupt?t:Q):n(O)}function p(O){const Y="CDATA[";return O===Y.charCodeAt(o++)?(e.consume(O),o===Y.length?r.interrupt?t:E:p):n(O)}function m(O){return Uc(O)?(e.consume(O),a=String.fromCharCode(O),g):n(O)}function g(O){if(O===null||O===47||O===62||Ha(O)){const Y=O===47,X=a.toLowerCase();return!Y&&!s&&SY.includes(X)?(i=1,r.interrupt?t(O):E(O)):Bgt.includes(a.toLowerCase())?(i=6,Y?(e.consume(O),y):r.interrupt?t(O):E(O)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):s?v(O):x(O))}return O===45||fo(O)?(e.consume(O),a+=String.fromCharCode(O),g):n(O)}function y(O){return O===62?(e.consume(O),r.interrupt?t:E):n(O)}function v(O){return In(O)?(e.consume(O),v):L(O)}function x(O){return O===47?(e.consume(O),L):O===58||O===95||Uc(O)?(e.consume(O),b):In(O)?(e.consume(O),x):L(O)}function b(O){return O===45||O===46||O===58||O===95||fo(O)?(e.consume(O),b):w(O)}function w(O){return O===61?(e.consume(O),B):In(O)?(e.consume(O),w):x(O)}function B(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),l=O,k):In(O)?(e.consume(O),B):N(O)}function k(O){return O===l?(e.consume(O),l=null,j):O===null||Kt(O)?n(O):(e.consume(O),k)}function N(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||Ha(O)?w(O):(e.consume(O),N)}function j(O){return O===47||O===62||In(O)?x(O):n(O)}function L(O){return O===62?(e.consume(O),T):n(O)}function T(O){return O===null||Kt(O)?E(O):In(O)?(e.consume(O),T):n(O)}function E(O){return O===45&&i===2?(e.consume(O),H):O===60&&i===1?(e.consume(O),q):O===62&&i===4?(e.consume(O),ce):O===63&&i===3?(e.consume(O),Q):O===93&&i===5?(e.consume(O),z):Kt(O)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(kgt,R,F)(O)):O===null||Kt(O)?(e.exit("htmlFlowData"),F(O)):(e.consume(O),E)}function F(O){return e.check(Egt,M,R)(O)}function M(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),D}function D(O){return O===null||Kt(O)?F(O):(e.enter("htmlFlowData"),E(O))}function H(O){return O===45?(e.consume(O),Q):E(O)}function q(O){return O===47?(e.consume(O),a="",$):E(O)}function $(O){if(O===62){const Y=a.toLowerCase();return SY.includes(Y)?(e.consume(O),ce):E(O)}return Uc(O)&&a.length<8?(e.consume(O),a+=String.fromCharCode(O),$):E(O)}function z(O){return O===93?(e.consume(O),Q):E(O)}function Q(O){return O===62?(e.consume(O),ce):O===45&&i===2?(e.consume(O),Q):E(O)}function ce(O){return O===null||Kt(O)?(e.exit("htmlFlowData"),R(O)):(e.consume(O),ce)}function R(O){return e.exit("htmlFlow"),t(O)}}function Tgt(e,t,n){const r=this;return i;function i(a){return Kt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Pgt(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(wj,t,n)}}const Igt={name:"htmlText",tokenize:Ogt};function Ogt(e,t,n){const r=this;let i,s,a;return o;function o(Q){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(Q),l}function l(Q){return Q===33?(e.consume(Q),u):Q===47?(e.consume(Q),w):Q===63?(e.consume(Q),x):Uc(Q)?(e.consume(Q),N):n(Q)}function u(Q){return Q===45?(e.consume(Q),d):Q===91?(e.consume(Q),s=0,p):Uc(Q)?(e.consume(Q),v):n(Q)}function d(Q){return Q===45?(e.consume(Q),h):n(Q)}function A(Q){return Q===null?n(Q):Q===45?(e.consume(Q),f):Kt(Q)?(a=A,q(Q)):(e.consume(Q),A)}function f(Q){return Q===45?(e.consume(Q),h):A(Q)}function h(Q){return Q===62?H(Q):Q===45?f(Q):A(Q)}function p(Q){const ce="CDATA[";return Q===ce.charCodeAt(s++)?(e.consume(Q),s===ce.length?m:p):n(Q)}function m(Q){return Q===null?n(Q):Q===93?(e.consume(Q),g):Kt(Q)?(a=m,q(Q)):(e.consume(Q),m)}function g(Q){return Q===93?(e.consume(Q),y):m(Q)}function y(Q){return Q===62?H(Q):Q===93?(e.consume(Q),y):m(Q)}function v(Q){return Q===null||Q===62?H(Q):Kt(Q)?(a=v,q(Q)):(e.consume(Q),v)}function x(Q){return Q===null?n(Q):Q===63?(e.consume(Q),b):Kt(Q)?(a=x,q(Q)):(e.consume(Q),x)}function b(Q){return Q===62?H(Q):x(Q)}function w(Q){return Uc(Q)?(e.consume(Q),B):n(Q)}function B(Q){return Q===45||fo(Q)?(e.consume(Q),B):k(Q)}function k(Q){return Kt(Q)?(a=k,q(Q)):In(Q)?(e.consume(Q),k):H(Q)}function N(Q){return Q===45||fo(Q)?(e.consume(Q),N):Q===47||Q===62||Ha(Q)?j(Q):n(Q)}function j(Q){return Q===47?(e.consume(Q),H):Q===58||Q===95||Uc(Q)?(e.consume(Q),L):Kt(Q)?(a=j,q(Q)):In(Q)?(e.consume(Q),j):H(Q)}function L(Q){return Q===45||Q===46||Q===58||Q===95||fo(Q)?(e.consume(Q),L):T(Q)}function T(Q){return Q===61?(e.consume(Q),E):Kt(Q)?(a=T,q(Q)):In(Q)?(e.consume(Q),T):j(Q)}function E(Q){return Q===null||Q===60||Q===61||Q===62||Q===96?n(Q):Q===34||Q===39?(e.consume(Q),i=Q,F):Kt(Q)?(a=E,q(Q)):In(Q)?(e.consume(Q),E):(e.consume(Q),M)}function F(Q){return Q===i?(e.consume(Q),i=void 0,D):Q===null?n(Q):Kt(Q)?(a=F,q(Q)):(e.consume(Q),F)}function M(Q){return Q===null||Q===34||Q===39||Q===60||Q===61||Q===96?n(Q):Q===47||Q===62||Ha(Q)?j(Q):(e.consume(Q),M)}function D(Q){return Q===47||Q===62||Ha(Q)?j(Q):n(Q)}function H(Q){return Q===62?(e.consume(Q),e.exit("htmlTextData"),e.exit("htmlText"),t):n(Q)}function q(Q){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(Q),e.exit("lineEnding"),$}function $(Q){return In(Q)?lr(e,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):z(Q)}function z(Q){return e.enter("htmlTextData"),a(Q)}}const lH={name:"labelEnd",resolveAll:Rgt,resolveTo:Ugt,tokenize:Dgt},Fgt={tokenize:Qgt},Mgt={tokenize:Hgt},Lgt={tokenize:$gt};function Rgt(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&lu(e,0,e.length,n),e}function Ugt(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",u,t]],o=Wo(o,e.slice(s+1,s+r+3)),o=Wo(o,[["enter",d,t]]),o=Wo(o,oH(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=Wo(o,[["exit",d,t],e[a-2],e[a-1],["exit",u,t]]),o=Wo(o,e.slice(a+1)),o=Wo(o,[["exit",l,t]]),lu(e,s,e.length,o),e}function Dgt(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(f){return s?s._inactive?A(f):(a=r.parser.defined.includes(yy(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(Fgt,d,a?d:A)(f):f===91?e.attempt(Mgt,d,a?u:A)(f):a?d(f):A(f)}function u(f){return e.attempt(Lgt,d,A)(f)}function d(f){return t(f)}function A(f){return s._balanced=!0,n(f)}}function Qgt(e,t,n){return r;function r(A){return e.enter("resource"),e.enter("resourceMarker"),e.consume(A),e.exit("resourceMarker"),i}function i(A){return Ha(A)?Lw(e,s)(A):s(A)}function s(A){return A===41?d(A):sme(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(A)}function a(A){return Ha(A)?Lw(e,l)(A):d(A)}function o(A){return n(A)}function l(A){return A===34||A===39||A===40?ome(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(A):d(A)}function u(A){return Ha(A)?Lw(e,d)(A):d(A)}function d(A){return A===41?(e.enter("resourceMarker"),e.consume(A),e.exit("resourceMarker"),e.exit("resource"),t):n(A)}}function Hgt(e,t,n){const r=this;return i;function i(o){return ame.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(yy(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function $gt(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const zgt={name:"labelStartImage",resolveAll:lH.resolveAll,tokenize:Vgt};function Vgt(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Kgt={name:"labelStartLink",resolveAll:lH.resolveAll,tokenize:Wgt};function Wgt(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const zI={name:"lineEnding",tokenize:qgt};function qgt(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),lr(e,t,"linePrefix")}}const zB={name:"thematicBreak",tokenize:Ggt};function Ggt(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||Kt(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),In(u)?lr(e,o,"whitespace")(u):o(u))}}const ba={continuation:{tokenize:Zgt},exit:tyt,name:"list",tokenize:Jgt},Ygt={partial:!0,tokenize:nyt},Xgt={partial:!0,tokenize:eyt};function Jgt(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:bL(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(zB,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return bL(h)&&++a<10?(e.consume(h),l):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(wj,r.interrupt?n:d,e.attempt(Ygt,f,A))}function d(h){return r.containerState.initialBlankLine=!0,s++,f(h)}function A(h){return In(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Zgt(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(wj,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,lr(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!In(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Xgt,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,lr(e,e.attempt(ba,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function eyt(e,t,n){const r=this;return lr(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function tyt(e){e.exit(this.containerState.type)}function nyt(e,t,n){const r=this;return lr(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!In(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const BY={name:"setextUnderline",resolveTo:ryt,tokenize:iyt};function ryt(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function iyt(e,t,n){const r=this;let i;return s;function s(u){let d=r.events.length,A;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){A=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||A)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),In(u)?lr(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Kt(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const syt={tokenize:ayt};function ayt(e){const t=this,n=e.attempt(wj,r,e.attempt(this.parser.constructs.flowInitial,i,lr(e,e.attempt(this.parser.constructs.flow,i,e.attempt(dgt,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const oyt={resolveAll:cme()},lyt=lme("string"),cyt=lme("text");function lme(e){return{resolveAll:cme(e==="text"?uyt:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(d){return u(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return u(d)?(n.exit("data"),s(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const A=i[d];let f=-1;if(A)for(;++f<A.length;){const h=A[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function cme(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function uyt(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,o=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)l=!0,o++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const dyt={42:ba,43:ba,45:ba,48:ba,49:ba,50:ba,51:ba,52:ba,53:ba,54:ba,55:ba,56:ba,57:ba,62:tme},Ayt={91:mgt},hyt={[-2]:$I,[-1]:$I,32:$I},fyt={35:bgt,42:zB,45:[BY,zB],60:_gt,61:BY,95:zB,96:CY,126:CY},pyt={38:rme,92:nme},myt={[-5]:zI,[-4]:zI,[-3]:zI,33:zgt,38:rme,42:CL,60:[Kmt,Igt],91:Kgt,92:[xgt,nme],93:lH,95:CL,96:sgt},gyt={null:[CL,oyt]},yyt={null:[42,95]},vyt={null:[]},xyt=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yyt,contentInitial:Ayt,disable:vyt,document:dyt,flow:fyt,flowInitial:hyt,insideSpan:gyt,string:pyt,text:myt},Symbol.toStringTag,{value:"Module"}));function wyt(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],o=[];const l={attempt:k(w),check:k(B),consume:v,enter:x,exit:b,interrupt:k(B,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:p,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:A};let d=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function A(T){return a=Wo(a,T),g(),a[a.length-1]!==null?[]:(N(t,0),u.events=oH(s,u.events,u),u.events)}function f(T,E){return Cyt(h(T),E)}function h(T){return byt(a,T)}function p(){const{_bufferIndex:T,_index:E,line:F,column:M,offset:D}=r;return{_bufferIndex:T,_index:E,line:F,column:M,offset:D}}function m(T){i[T.line]=T.column,L()}function g(){let T;for(;r._index<a.length;){const E=a[r._index];if(typeof E=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<E.length;)y(E.charCodeAt(r._bufferIndex));else y(E)}}function y(T){d=d(T)}function v(T){Kt(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,L()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=T}function x(T,E){const F=E||{};return F.type=T,F.start=p(),u.events.push(["enter",F,u]),o.push(F),F}function b(T){const E=o.pop();return E.end=p(),u.events.push(["exit",E,u]),E}function w(T,E){N(T,E.from)}function B(T,E){E.restore()}function k(T,E){return F;function F(M,D,H){let q,$,z,Q;return Array.isArray(M)?R(M):"tokenize"in M?R([M]):ce(M);function ce(K){return Z;function Z(ae){const ue=ae!==null&&K[ae],se=ae!==null&&K.null,Ae=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(se)?se:se?[se]:[]];return R(Ae)(ae)}}function R(K){return q=K,$=0,K.length===0?H:O(K[$])}function O(K){return Z;function Z(ae){return Q=j(),z=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?X():K.tokenize.call(E?Object.assign(Object.create(u),E):u,l,Y,X)(ae)}}function Y(K){return T(z,Q),D}function X(K){return Q.restore(),++$<q.length?O(q[$]):H}}}function N(T,E){T.resolveAll&&!s.includes(T)&&s.push(T),T.resolve&&lu(u.events,E,u.events.length-E,T.resolve(u.events.slice(E),u)),T.resolveTo&&(u.events=T.resolveTo(u.events,u))}function j(){const T=p(),E=u.previous,F=u.currentConstruct,M=u.events.length,D=Array.from(o);return{from:M,restore:H};function H(){r=T,u.previous=E,u.currentConstruct=F,u.events.length=M,o=D,L()}}function L(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function byt(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function Cyt(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
`;break}case-3:{a=`\r
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function Syt(e){const r={constructs:Tmt([xyt,...(e||{}).extensions||[]]),content:i(Umt),defined:[],document:i(Qmt),flow:i(syt),lazy:{},string:i(lyt),text:i(cyt)};return r;function i(s){return a;function a(o){return wyt(r,s,o)}}}function Byt(e){for(;!ime(e););return e}const _Y=/[\0\t\n\r]/g;function _yt(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const l=[];let u,d,A,f,h;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),A=0,t="",n&&(s.charCodeAt(0)===65279&&A++,n=void 0);A<s.length;){if(_Y.lastIndex=A,u=_Y.exec(s),f=u&&u.index!==void 0?u.index:s.length,h=s.charCodeAt(f),!u){t=s.slice(A);break}if(h===10&&A===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),A<f&&(l.push(s.slice(A,f)),e+=f-A),h){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}A=f+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const kyt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Eyt(e){return e.replace(kyt,Nyt)}function Nyt(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return eme(n.slice(s?2:1),s?16:10)}return aH(n)||e}const ume={}.hasOwnProperty;function jyt(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Tyt(n)(Byt(Syt(n).document().write(_yt()(e,t,!0))))}function Tyt(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Te),autolinkProtocol:j,autolinkEmail:j,atxHeading:s(te),blockQuote:s(se),characterEscape:j,characterReference:j,codeFenced:s(Ae),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Ae,a),codeText:s(de,a),codeTextData:j,data:j,codeFlowValue:j,definition:s(Se),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Fe),hardBreakEscape:s(ke),hardBreakTrailing:s(ke),htmlFlow:s(Ze,a),htmlFlowData:j,htmlText:s(Ze,a),htmlTextData:j,image:s(et),label:a,link:s(Te),listItem:s(xe),listItemValue:f,listOrdered:s(st,A),listUnordered:s(st),paragraph:s(Qe),reference:O,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(te),strong:s(ze),thematicBreak:s(dt)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:ue,autolinkProtocol:ae,blockQuote:l(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:X,characterReferenceMarkerNumeric:X,characterReferenceValue:K,characterReference:Z,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:L,codeIndented:l(y),codeText:l(D),codeTextData:L,data:L,definition:l(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(E),hardBreakTrailing:l(E),htmlFlow:l(F),htmlFlowData:L,htmlText:l(M),htmlTextData:L,image:l(q),label:z,labelText:$,lineEnding:T,link:l(H),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Y,resourceDestinationString:Q,resourceTitleString:ce,resource:R,setextHeading:l(N),setextHeadingLineSequence:k,setextHeadingText:B,strong:l(),thematicBreak:l()}};dme(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ye){let Ee={type:"root",children:[]};const qe={stack:[Ee],tokenStack:[],config:t,enter:o,exit:u,buffer:a,resume:d,data:n},Ue=[];let Ge=-1;for(;++Ge<ye.length;)if(ye[Ge][1].type==="listOrdered"||ye[Ge][1].type==="listUnordered")if(ye[Ge][0]==="enter")Ue.push(Ge);else{const pe=Ue.pop();Ge=i(ye,pe,Ge)}for(Ge=-1;++Ge<ye.length;){const pe=t[ye[Ge][0]];ume.call(pe,ye[Ge][1].type)&&pe[ye[Ge][1].type].call(Object.assign({sliceSerialize:ye[Ge][2].sliceSerialize},qe),ye[Ge][1])}if(qe.tokenStack.length>0){const pe=qe.tokenStack[qe.tokenStack.length-1];(pe[1]||kY).call(qe,void 0,pe[0])}for(Ee.position={start:Xd(ye.length>0?ye[0][1].start:{line:1,column:1,offset:0}),end:Xd(ye.length>0?ye[ye.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<t.transforms.length;)Ee=t.transforms[Ge](Ee)||Ee;return Ee}function i(ye,Ee,qe){let Ue=Ee-1,Ge=-1,pe=!1,mt,ct,xt,Ft;for(;++Ue<=qe;){const $t=ye[Ue];switch($t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$t[0]==="enter"?Ge++:Ge--,Ft=void 0;break}case"lineEndingBlank":{$t[0]==="enter"&&(mt&&!Ft&&!Ge&&!xt&&(xt=Ue),Ft=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ft=void 0}if(!Ge&&$t[0]==="enter"&&$t[1].type==="listItemPrefix"||Ge===-1&&$t[0]==="exit"&&($t[1].type==="listUnordered"||$t[1].type==="listOrdered")){if(mt){let At=Ue;for(ct=void 0;At--;){const Mt=ye[At];if(Mt[1].type==="lineEnding"||Mt[1].type==="lineEndingBlank"){if(Mt[0]==="exit")continue;ct&&(ye[ct][1].type="lineEndingBlank",pe=!0),Mt[1].type="lineEnding",ct=At}else if(!(Mt[1].type==="linePrefix"||Mt[1].type==="blockQuotePrefix"||Mt[1].type==="blockQuotePrefixWhitespace"||Mt[1].type==="blockQuoteMarker"||Mt[1].type==="listItemIndent"))break}xt&&(!ct||xt<ct)&&(mt._spread=!0),mt.end=Object.assign({},ct?ye[ct][1].start:$t[1].end),ye.splice(ct||Ue,0,["exit",mt,$t[2]]),Ue++,qe++}if($t[1].type==="listItemPrefix"){const At={type:"listItem",_spread:!1,start:Object.assign({},$t[1].start),end:void 0};mt=At,ye.splice(Ue,0,["enter",At,$t[2]]),Ue++,qe++,xt=void 0,Ft=!0}}}return ye[Ee][1]._spread=pe,qe}function s(ye,Ee){return qe;function qe(Ue){o.call(this,ye(Ue),Ue),Ee&&Ee.call(this,Ue)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(ye,Ee,qe){this.stack[this.stack.length-1].children.push(ye),this.stack.push(ye),this.tokenStack.push([Ee,qe||void 0]),ye.position={start:Xd(Ee.start),end:void 0}}function l(ye){return Ee;function Ee(qe){ye&&ye.call(this,qe),u.call(this,qe)}}function u(ye,Ee){const qe=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==ye.type&&(Ee?Ee.call(this,ye,Ue[0]):(Ue[1]||kY).call(this,ye,Ue[0]));else throw new Error("Cannot close `"+ye.type+"` ("+Mw({start:ye.start,end:ye.end})+"): it’s not open");qe.position.end=Xd(ye.end)}function d(){return Nmt(this.stack.pop())}function A(){this.data.expectingFirstListItemValue=!0}function f(ye){if(this.data.expectingFirstListItemValue){const Ee=this.stack[this.stack.length-2];Ee.start=Number.parseInt(this.sliceSerialize(ye),10),this.data.expectingFirstListItemValue=void 0}}function h(){const ye=this.resume(),Ee=this.stack[this.stack.length-1];Ee.lang=ye}function p(){const ye=this.resume(),Ee=this.stack[this.stack.length-1];Ee.meta=ye}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const ye=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=ye.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const ye=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=ye.replace(/(\r?\n|\r)$/g,"")}function v(ye){const Ee=this.resume(),qe=this.stack[this.stack.length-1];qe.label=Ee,qe.identifier=yy(this.sliceSerialize(ye)).toLowerCase()}function x(){const ye=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=ye}function b(){const ye=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=ye}function w(ye){const Ee=this.stack[this.stack.length-1];if(!Ee.depth){const qe=this.sliceSerialize(ye).length;Ee.depth=qe}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function k(ye){const Ee=this.stack[this.stack.length-1];Ee.depth=this.sliceSerialize(ye).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function j(ye){const qe=this.stack[this.stack.length-1].children;let Ue=qe[qe.length-1];(!Ue||Ue.type!=="text")&&(Ue=Rt(),Ue.position={start:Xd(ye.start),end:void 0},qe.push(Ue)),this.stack.push(Ue)}function L(ye){const Ee=this.stack.pop();Ee.value+=this.sliceSerialize(ye),Ee.position.end=Xd(ye.end)}function T(ye){const Ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const qe=Ee.children[Ee.children.length-1];qe.position.end=Xd(ye.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ee.type)&&(j.call(this,ye),L.call(this,ye))}function E(){this.data.atHardBreak=!0}function F(){const ye=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=ye}function M(){const ye=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=ye}function D(){const ye=this.resume(),Ee=this.stack[this.stack.length-1];Ee.value=ye}function H(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=Ee,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function q(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const Ee=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=Ee,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function $(ye){const Ee=this.sliceSerialize(ye),qe=this.stack[this.stack.length-2];qe.label=Eyt(Ee),qe.identifier=yy(Ee).toLowerCase()}function z(){const ye=this.stack[this.stack.length-1],Ee=this.resume(),qe=this.stack[this.stack.length-1];if(this.data.inReference=!0,qe.type==="link"){const Ue=ye.children;qe.children=Ue}else qe.alt=Ee}function Q(){const ye=this.resume(),Ee=this.stack[this.stack.length-1];Ee.url=ye}function ce(){const ye=this.resume(),Ee=this.stack[this.stack.length-1];Ee.title=ye}function R(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function Y(ye){const Ee=this.resume(),qe=this.stack[this.stack.length-1];qe.label=Ee,qe.identifier=yy(this.sliceSerialize(ye)).toLowerCase(),this.data.referenceType="full"}function X(ye){this.data.characterReferenceType=ye.type}function K(ye){const Ee=this.sliceSerialize(ye),qe=this.data.characterReferenceType;let Ue;qe?(Ue=eme(Ee,qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=aH(Ee);const Ge=this.stack[this.stack.length-1];Ge.value+=Ue}function Z(ye){const Ee=this.stack.pop();Ee.position.end=Xd(ye.end)}function ae(ye){L.call(this,ye);const Ee=this.stack[this.stack.length-1];Ee.url=this.sliceSerialize(ye)}function ue(ye){L.call(this,ye);const Ee=this.stack[this.stack.length-1];Ee.url="mailto:"+this.sliceSerialize(ye)}function se(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function Se(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Fe(){return{type:"emphasis",children:[]}}function te(){return{type:"heading",depth:0,children:[]}}function ke(){return{type:"break"}}function Ze(){return{type:"html",value:""}}function et(){return{type:"image",title:null,url:"",alt:null}}function Te(){return{type:"link",title:null,url:"",children:[]}}function st(ye){return{type:"list",ordered:ye.type==="listOrdered",start:null,spread:ye._spread,children:[]}}function xe(ye){return{type:"listItem",spread:ye._spread,checked:null,children:[]}}function Qe(){return{type:"paragraph",children:[]}}function ze(){return{type:"strong",children:[]}}function Rt(){return{type:"text",value:""}}function dt(){return{type:"thematicBreak"}}}function Xd(e){return{line:e.line,column:e.column,offset:e.offset}}function dme(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?dme(e,r):Pyt(e,r)}}function Pyt(e,t){let n;for(n in t)if(ume.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function kY(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mw({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mw({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mw({start:t.start,end:t.end})+") is still open")}function Iyt(e){const t=this;t.parser=n;function n(r){return jyt(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Oyt(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Fyt(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
`}]}function Myt(e,t){const n=t.value?t.value+`
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Lyt(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ryt(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Uyt(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=fv(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function Dyt(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qyt(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ame(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function Hyt(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ame(e,t);const i={src:fv(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function $yt(e,t){const n={src:fv(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function zyt(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Vyt(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ame(e,t);const i={href:fv(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Kyt(e,t){const n={href:fv(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Wyt(e,t,n){const r=e.all(t),i=n?qyt(n):hme(t),s={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let A;d&&d.type==="element"&&d.tagName==="p"?A=d:(A={type:"element",tagName:"p",properties:{},children:[]},r.unshift(A)),A.children.length>0&&A.children.unshift({type:"text",value:" "}),A.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
`}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
`});const u={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,u),e.applyData(t,u)}function qyt(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=hme(n[r])}return t}function hme(e){const t=e.spread;return t??e.children.length>1}function Gyt(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Yyt(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xyt(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Jyt(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zyt(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=nH(t.children[1]),l=Wpe(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function e0t(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<o;){const A=t.children[l],f={},h=a?a[l]:void 0;h&&(f.align=h);let p={type:"element",tagName:s,properties:f,children:[]};A&&(p.children=e.all(A),e.patch(A,p),p=e.applyData(A,p)),u.push(p)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function t0t(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const EY=9,NY=32;function n0t(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(jY(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(jY(t.slice(i),i>0,!1)),s.join("")}function jY(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===EY||s===NY;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===EY||s===NY;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function r0t(e,t){const n={type:"text",value:n0t(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function i0t(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const s0t={blockquote:Oyt,break:Fyt,code:Myt,delete:Lyt,emphasis:Ryt,footnoteReference:Uyt,heading:Dyt,html:Qyt,imageReference:Hyt,image:$yt,inlineCode:zyt,linkReference:Vyt,link:Kyt,listItem:Wyt,list:Gyt,paragraph:Yyt,root:Xyt,strong:Jyt,table:Zyt,tableCell:t0t,tableRow:e0t,text:r0t,thematicBreak:i0t,toml:NS,yaml:NS,definition:NS,footnoteDefinition:NS};function NS(){}const fme=-1,bj=0,Rw=1,qE=2,cH=3,uH=4,dH=5,AH=6,pme=7,mme=8,TY=typeof self=="object"?self:globalThis,a0t=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case bj:case fme:return n(a,i);case Rw:{const o=n([],i);for(const l of a)o.push(r(l));return o}case qE:{const o=n({},i);for(const[l,u]of a)o[r(l)]=r(u);return o}case cH:return n(new Date(a),i);case uH:{const{source:o,flags:l}=a;return n(new RegExp(o,l),i)}case dH:{const o=n(new Map,i);for(const[l,u]of a)o.set(r(l),r(u));return o}case AH:{const o=n(new Set,i);for(const l of a)o.add(r(l));return o}case pme:{const{name:o,message:l}=a;return n(new TY[o](l),i)}case mme:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new TY[s](a),i)};return r},PY=e=>a0t(new Map,e)(0),ng="",{toString:o0t}={},{keys:l0t}=Object,wx=e=>{const t=typeof e;if(t!=="object"||!e)return[bj,t];const n=o0t.call(e).slice(8,-1);switch(n){case"Array":return[Rw,ng];case"Object":return[qE,ng];case"Date":return[cH,ng];case"RegExp":return[uH,ng];case"Map":return[dH,ng];case"Set":return[AH,ng];case"DataView":return[Rw,n]}return n.includes("Array")?[Rw,n]:n.includes("Error")?[pme,n]:[qE,n]},jS=([e,t])=>e===bj&&(t==="function"||t==="symbol"),c0t=(e,t,n,r)=>{const i=(a,o)=>{const l=r.push(a)-1;return n.set(o,l),l},s=a=>{if(n.has(a))return n.get(a);let[o,l]=wx(a);switch(o){case bj:{let d=a;switch(l){case"bigint":o=mme,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return i([fme],a)}return i([o,d],a)}case Rw:{if(l){let f=a;return l==="DataView"?f=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(a)),i([l,[...f]],a)}const d=[],A=i([o,d],a);for(const f of a)d.push(s(f));return A}case qE:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],A=i([o,d],a);for(const f of l0t(a))(e||!jS(wx(a[f])))&&d.push([s(f),s(a[f])]);return A}case cH:return i([o,a.toISOString()],a);case uH:{const{source:d,flags:A}=a;return i([o,{source:d,flags:A}],a)}case dH:{const d=[],A=i([o,d],a);for(const[f,h]of a)(e||!(jS(wx(f))||jS(wx(h))))&&d.push([s(f),s(h)]);return A}case AH:{const d=[],A=i([o,d],a);for(const f of a)(e||!jS(wx(f)))&&d.push(s(f));return A}}const{message:u}=a;return i([o,{name:l,message:u}],a)};return s},IY=(e,{json:t,lossy:n}={})=>{const r=[];return c0t(!(t||n),!!t,new Map,r)(e),r},GE=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?PY(IY(e,t)):structuredClone(e):(e,t)=>PY(IY(e,t));function u0t(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function d0t(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function A0t(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||u0t,r=e.options.footnoteBackLabel||d0t,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const d=e.all(u),A=String(u.identifier).toUpperCase(),f=fv(A.toLowerCase());let h=0;const p=[],m=e.footnoteCounts.get(A);for(;m!==void 0&&++h<=m;){p.length>0&&p.push({type:"text",value:" "});let v=typeof n=="string"?n:n(l,h);typeof v=="string"&&(v={type:"text",value:v}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const g=d[d.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const v=g.children[g.children.length-1];v&&v.type==="text"?v.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...p)}else d.push(...p);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(d,!0)};e.patch(u,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...GE(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
`}]}}const gme=function(e){if(e==null)return m0t;if(typeof e=="function")return Cj(e);if(typeof e=="object")return Array.isArray(e)?h0t(e):f0t(e);if(typeof e=="string")return p0t(e);throw new Error("Expected function, string, or object as test")};function h0t(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gme(e[n]);return Cj(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function f0t(e){const t=e;return Cj(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function p0t(e){return Cj(t);function t(n){return n&&n.type===e}}function Cj(e){return t;function t(n,r,i){return!!(g0t(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function m0t(){return!0}function g0t(e){return e!==null&&typeof e=="object"&&"type"in e}const yme=[],y0t=!0,OY=!1,v0t="skip";function x0t(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=gme(i),a=r?-1:1;o(e,void 0,[])();function o(l,u,d){const A=l&&typeof l=="object"?l:{};if(typeof A.type=="string"){const h=typeof A.tagName=="string"?A.tagName:typeof A.name=="string"?A.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=yme,p,m,g;if((!t||s(l,u,d[d.length-1]||void 0))&&(h=w0t(n(l,d)),h[0]===OY))return h;if("children"in l&&l.children){const y=l;if(y.children&&h[0]!==v0t)for(m=(r?y.children.length:-1)+a,g=d.concat(y);m>-1&&m<y.children.length;){const v=y.children[m];if(p=o(v,m,g)(),p[0]===OY)return p;m=typeof p[1]=="number"?p[1]:m+a}}return h}}}function w0t(e){return Array.isArray(e)?e:typeof e=="number"?[y0t,e]:e==null?yme:[e]}function vme(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),x0t(e,s,o,i);function o(l,u){const d=u[u.length-1],A=d?d.children.indexOf(l):void 0;return a(l,A,d)}}const SL={}.hasOwnProperty,b0t={};function C0t(e,t){const n=t||b0t,r=new Map,i=new Map,s=new Map,a={...s0t,...n.handlers},o={all:u,applyData:B0t,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:n,patch:S0t,wrap:k0t};return vme(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const A=d.type==="definition"?r:i,f=String(d.identifier).toUpperCase();A.has(f)||A.set(f,d)}}),o;function l(d,A){const f=d.type,h=o.handlers[f];if(SL.call(o.handlers,f)&&h)return h(o,d,A);if(o.options.passThrough&&o.options.passThrough.includes(f)){if("children"in d){const{children:m,...g}=d,y=GE(g);return y.children=o.all(d),y}return GE(d)}return(o.options.unknownHandler||_0t)(o,d,A)}function u(d){const A=[];if("children"in d){const f=d.children;let h=-1;for(;++h<f.length;){const p=o.one(f[h],d);if(p){if(h&&f[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=FY(p.value)),!Array.isArray(p)&&p.type==="element")){const m=p.children[0];m&&m.type==="text"&&(m.value=FY(m.value))}Array.isArray(p)?A.push(...p):A.push(p)}}}return A}}function S0t(e,t){e.position&&(t.position=omt(e))}function B0t(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,GE(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function _0t(e,t){const n=t.data||{},r="value"in t&&!(SL.call(n,"hProperties")||SL.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function k0t(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
`});++r<e.length;)r&&n.push({type:"text",value:`
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
`}),n}function FY(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function MY(e,t){const n=C0t(e,t),r=n.one(e,void 0),i=A0t(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
`},i),s}function E0t(e,t){return e&&"run"in e?async function(n,r){const i=MY(n,{file:r,...t});await e.run(i,r)}:function(n,r){return MY(n,{file:r,...e||t})}}function LY(e){if(e)throw e}var VB=Object.prototype.hasOwnProperty,xme=Object.prototype.toString,RY=Object.defineProperty,UY=Object.getOwnPropertyDescriptor,DY=function(t){return typeof Array.isArray=="function"?Array.isArray(t):xme.call(t)==="[object Array]"},QY=function(t){if(!t||xme.call(t)!=="[object Object]")return!1;var n=VB.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&VB.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||VB.call(t,i)},HY=function(t,n){RY&&n.name==="__proto__"?RY(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},$Y=function(t,n){if(n==="__proto__")if(VB.call(t,n)){if(UY)return UY(t,n).value}else return;return t[n]},N0t=function e(){var t,n,r,i,s,a,o=arguments[0],l=1,u=arguments.length,d=!1;for(typeof o=="boolean"&&(d=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=$Y(o,n),i=$Y(t,n),o!==i&&(d&&i&&(QY(i)||(s=DY(i)))?(s?(s=!1,a=r&&DY(r)?r:[]):a=r&&QY(r)?r:{},HY(o,{name:n,newValue:e(d,a,i)})):typeof i<"u"&&HY(o,{name:n,newValue:i}));return o};const VI=Bn(N0t);function BL(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 j0t(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(l,...u){const d=e[++s];let A=-1;if(l){a(l);return}for(;++A<i.length;)(u[A]===null||u[A]===void 0)&&(u[A]=i[A]);i=u,d?T0t(d,o)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function T0t(e,t){let n;return r;function r(...a){const o=e.length>a.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(u){const d=u;if(o&&n)throw d;return i(d)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const Ic={basename:P0t,dirname:I0t,extname:O0t,join:F0t,sep:"/"};function P0t(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');E2(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function I0t(e){if(E2(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function O0t(e){E2(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function F0t(...e){let t=-1,n;for(;++t<e.length;)E2(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":M0t(n)}function M0t(e){E2(e);const t=e.codePointAt(0)===47;let n=L0t(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function L0t(e,t){let n="",r=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function E2(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const R0t={cwd:U0t};function U0t(){return"/"}function _L(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function D0t(e){if(typeof e=="string")e=new URL(e);else if(!_L(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 Q0t(e)}function Q0t(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const KI=["history","path","basename","stem","extname","dirname"];class wme{constructor(t){let n;t?_L(t)?n={path:t}:typeof t=="string"||H0t(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":R0t.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<KI.length;){const s=KI[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)KI.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ic.basename(this.path):void 0}set basename(t){qI(t,"basename"),WI(t,"basename"),this.path=Ic.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ic.dirname(this.path):void 0}set dirname(t){zY(this.basename,"dirname"),this.path=Ic.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ic.extname(this.path):void 0}set extname(t){if(WI(t,"extname"),zY(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=Ic.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_L(t)&&(t=D0t(t)),qI(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ic.basename(this.path,this.extname):void 0}set stem(t){qI(t,"stem"),WI(t,"stem"),this.path=Ic.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ks(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function WI(e,t){if(e&&e.includes(Ic.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ic.sep+"`")}function qI(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function zY(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function H0t(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $0t=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},z0t={}.hasOwnProperty;class hH extends $0t{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=j0t()}copy(){const t=new hH;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(VI(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(XI("data",this.frozen),this.namespace[t]=n,this):z0t.call(this.namespace,t)&&this.namespace[t]||void 0:t?(XI("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=TS(t),r=this.parser||this.Parser;return GI("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),GI("process",this.parser||this.Parser),YI("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=TS(t),l=r.parse(o);r.run(l,o,function(d,A,f){if(d||!A||!f)return u(d);const h=A,p=r.stringify(h,f);W0t(p)?f.value=p:f.result=p,u(d,f)});function u(d,A){d||!A?a(d):s?s(A):n(void 0,A)}}}processSync(t){let n=!1,r;return this.freeze(),GI("processSync",this.parser||this.Parser),YI("processSync",this.compiler||this.Compiler),this.process(t,i),KY("processSync","process",n),r;function i(s,a){n=!0,LY(s),r=a}}run(t,n,r){VY(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const l=TS(n);i.run(t,l,u);function u(d,A,f){const h=A||t;d?o(d):a?a(h):r(void 0,h,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),KY("runSync","run",r),i;function s(a,o){LY(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=TS(n),i=this.compiler||this.Compiler;return YI("stringify",i),VY(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(XI("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...A]=u;l(d,A)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(u.plugins),u.settings&&(i.settings=VI(!0,i.settings,u.settings))}function o(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const A=u[d];s(A)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let A=-1,f=-1;for(;++A<r.length;)if(r[A][0]===u){f=A;break}if(f===-1)r.push([u,...d]);else if(d.length>0){let[h,...p]=d;const m=r[f][1];BL(m)&&BL(h)&&(h=VI(!0,m,h)),r[f]=[u,h,...p]}}}}const V0t=new hH().freeze();function GI(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function YI(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function XI(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 VY(e){if(!BL(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function KY(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function TS(e){return K0t(e)?e:new wme(e)}function K0t(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function W0t(e){return typeof e=="string"||q0t(e)}function q0t(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const G0t="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",WY=[],qY={allowDangerousHtml:!0},Y0t=/^(https?|ircs?|mailto|xmpp)$/i,X0t=[{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 bme(e){const t=J0t(e),n=Z0t(e);return evt(t.runSync(t.parse(n),n),e)}function J0t(e){const t=e.rehypePlugins||WY,n=e.remarkPlugins||WY,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qY}:qY;return V0t().use(Iyt).use(n).use(E0t,r).use(t)}function Z0t(e){const t=e.children||"",n=new wme;return typeof t=="string"&&(n.value=t),n}function evt(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||tvt;for(const d of X0t)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+G0t+d.id,void 0);return vme(e,u),Amt(e,{Fragment:c.Fragment,components:i,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function u(d,A,f){if(d.type==="raw"&&f&&typeof A=="number")return a?f.children.splice(A,1):f.children[A]={type:"text",value:d.value},A;if(d.type==="element"){let h;for(h in HI)if(Object.hasOwn(HI,h)&&Object.hasOwn(d.properties,h)){const p=d.properties[h],m=HI[h];(m===null||m.includes(d.tagName))&&(d.properties[h]=l(String(p||""),h,d))}}if(d.type==="element"){let h=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!h&&r&&typeof A=="number"&&(h=!r(d,A,f)),h&&f&&typeof A=="number")return o&&d.children?f.children.splice(A,1,...d.children):f.children.splice(A,1),A}}}function tvt(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Y0t.test(e.slice(0,t))?e:""}function nvt({md:e,area:t}){return c.jsxs("div",{className:"bg-card border border-border p-6",children:[c.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[c.jsx("img",{src:zse,alt:"Holden Richardson",className:"w-12 h-12 rounded-full object-cover object-top border border-border"}),c.jsxs("div",{children:[c.jsx("div",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground",children:"Holden's Take"}),c.jsxs("div",{className:"text-sm font-medium",children:["On ",t]})]})]}),c.jsx("div",{className:"prose prose-sm max-w-none prose-p:text-foreground/85 prose-p:leading-relaxed prose-headings:text-foreground prose-strong:text-foreground",children:c.jsx(bme,{children:e})})]})}const rvt=[{t:"Pre-Listing Walkthrough",d:"I walk your home, identify quick-win prep items, and recommend pricing strategy backed by live comps."},{t:"Strategic Pricing",d:"We price to attract showings in the first 10 days — that's where the strongest offers come from."},{t:"Marketing Launch",d:"Pro photos, video, social campaigns, and syndication to all major portals + my buyer database."},{t:"Negotiation",d:"I negotiate offer terms, inspection requests, and appraisal gaps to protect your bottom line."},{t:"Smooth Close",d:"I coordinate title, lender, inspectors, and movers so your closing day is the easy day."}],ivt=[{t:"Search Strategy Session",d:"We map your must-haves, deal-breakers, neighborhoods, and budget — and align on timeline."},{t:"Lender Connect",d:"I introduce you to 2–3 vetted local lenders so you get a competitive pre-approval, not just any pre-approval."},{t:"Showings + Off-Market",d:"I tour properties with you and tap my agent network for off-market opportunities."},{t:"Offer + Negotiation",d:"I structure offers that win without overpaying — escalation, concessions, and inspection terms tuned to the market."},{t:"Inspection → Close",d:"I manage inspections, repair negotiations, and the closing timeline so nothing slips."}];function svt({lens:e}){const t=e==="seller"?rvt:ivt;return c.jsxs("div",{className:"bg-card border border-border p-6",children:[c.jsxs("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium mb-1",children:["My Plan to ",e==="seller"?"Sell Your Home":"Help You Buy"]}),c.jsxs("p",{className:"text-sm text-foreground/80 mb-5",children:["Here's how I work with ",e==="seller"?"sellers":"buyers"," — start to close."]}),c.jsx("ol",{className:"space-y-4",children:t.map((n,r)=>c.jsxs("li",{className:"flex gap-3",children:[c.jsx("div",{className:"shrink-0 w-7 h-7 border border-border flex items-center justify-center text-xs font-bold text-foreground",children:r+1}),c.jsxs("div",{children:[c.jsxs("div",{className:"text-sm font-semibold flex items-center gap-2",children:[c.jsx(M0,{size:14,className:"text-foreground/70"})," ",n.t]}),c.jsx("p",{className:"text-sm text-foreground/75 mt-0.5",children:n.d})]})]},n.t))}),c.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[c.jsx(Tt,{to:"/contact",className:"inline-flex items-center justify-center px-5 py-3 bg-primary text-primary-foreground text-[11px] uppercase tracking-[0.2em] font-medium hover:bg-primary/90",children:e==="seller"?"Book a Listing Consult":"Start with a Buyer Strategy Call"}),c.jsx("a",{href:"sms:6164036393",className:"inline-flex items-center justify-center px-5 py-3 border border-border text-foreground text-[11px] uppercase tracking-[0.2em] font-medium hover:bg-muted",children:"Text Holden"})]})]})}function avt(){return c.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-40 bg-primary text-primary-foreground border-t border-primary-foreground/10 shadow-2xl",children:c.jsxs("div",{className:"container-page py-3 flex items-center justify-between gap-3",children:[c.jsx("div",{className:"hidden md:block text-[11px] uppercase tracking-[0.2em] text-primary-foreground/80",children:"Questions about this report?"}),c.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[c.jsxs("a",{href:"sms:6164036393",className:"inline-flex items-center gap-2 px-3 md:px-4 py-2 border border-primary-foreground/30 text-primary-foreground text-[10px] md:text-[11px] uppercase tracking-[0.2em] font-medium hover:bg-primary-foreground/10",children:[c.jsx(VO,{size:14})," Text"]}),c.jsxs("a",{href:"tel:+16164036393",className:"inline-flex items-center gap-2 px-3 md:px-4 py-2 border border-primary-foreground/30 text-primary-foreground text-[10px] md:text-[11px] uppercase tracking-[0.2em] font-medium hover:bg-primary-foreground/10",children:[c.jsx(Ap,{size:14})," Call"]}),c.jsxs(Tt,{to:"/contact",className:"inline-flex items-center gap-2 px-3 md:px-4 py-2 bg-gold text-primary text-[10px] md:text-[11px] uppercase tracking-[0.2em] font-medium hover:opacity-90",children:[c.jsx(nc,{size:14})," Book"]})]})]})})}const ovt="modulepreload",lvt=function(e){return"/"+e},GY={},KB=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=lvt(l),l in GY)return;GY[l]=!0;const u=l.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const A=document.createElement("link");if(A.rel=u?"stylesheet":ovt,u||(A.as="script"),A.crossOrigin="",A.href=l,o&&A.setAttribute("nonce",o),document.head.appendChild(A),u)return new Promise((f,h)=>{A.addEventListener("load",f),A.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return t().catch(s)})};function Dn(e){"@babel/helpers - typeof";return Dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dn(e)}var cc=Uint8Array,po=Uint16Array,fH=Int32Array,pH=new cc([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),mH=new cc([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),YY=new cc([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Cme=function(e,t){for(var n=new po(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new fH(n[30]),r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return{b:n,r:i}},Sme=Cme(pH,2),cvt=Sme.b,kL=Sme.r;cvt[28]=258,kL[258]=28;var uvt=Cme(mH,0),XY=uvt.r,EL=new po(32768);for(var yr=0;yr<32768;++yr){var Jd=(yr&43690)>>1|(yr&21845)<<1;Jd=(Jd&52428)>>2|(Jd&13107)<<2,Jd=(Jd&61680)>>4|(Jd&3855)<<4,EL[yr]=((Jd&65280)>>8|(Jd&255)<<8)>>1}var Uw=function(e,t,n){for(var r=e.length,i=0,s=new po(t);i<r;++i)e[i]&&++s[e[i]-1];var a=new po(t);for(i=1;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;var o;if(n){o=new po(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],d=t-e[i],A=a[e[i]-1]++<<d,f=A|(1<<d)-1;A<=f;++A)o[EL[A]>>l]=u}else for(o=new po(r),i=0;i<r;++i)e[i]&&(o[i]=EL[a[e[i]-1]++]>>15-e[i]);return o},Gp=new cc(288);for(var yr=0;yr<144;++yr)Gp[yr]=8;for(var yr=144;yr<256;++yr)Gp[yr]=9;for(var yr=256;yr<280;++yr)Gp[yr]=7;for(var yr=280;yr<288;++yr)Gp[yr]=8;var YE=new cc(32);for(var yr=0;yr<32;++yr)YE[yr]=5;var dvt=Uw(Gp,9,0),Avt=Uw(YE,5,0),Bme=function(e){return(e+7)/8|0},hvt=function(e,t,n){return(n==null||n>e.length)&&(n=e.length),new cc(e.subarray(t,n))},Tu=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},bx=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},JI=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,s=n.slice();if(!i)return{t:kme,l:0};if(i==1){var a=new cc(n[0].s+1);return a[n[0].s]=1,{t:a,l:1}}n.sort(function(w,B){return w.f-B.f}),n.push({s:-1,f:25001});var o=n[0],l=n[1],u=0,d=1,A=2;for(n[0]={s:-1,f:o.f+l.f,l:o,r:l};d!=i-1;)o=n[n[u].f<n[A].f?u++:A++],l=n[u!=d&&n[u].f<n[A].f?u++:A++],n[d++]={s:-1,f:o.f+l.f,l:o,r:l};for(var f=s[0].s,r=1;r<i;++r)s[r].s>f&&(f=s[r].s);var h=new po(f+1),p=NL(n[d-1],h,0);if(p>t){var r=0,m=0,g=p-t,y=1<<g;for(s.sort(function(B,k){return h[k.s]-h[B.s]||B.f-k.f});r<i;++r){var v=s[r].s;if(h[v]>t)m+=y-(1<<p-h[v]),h[v]=t;else break}for(m>>=g;m>0;){var x=s[r].s;h[x]<t?m-=1<<t-h[x]++-1:++r}for(;r>=0&&m;--r){var b=s[r].s;h[b]==t&&(--h[b],++m)}p=t}return{t:new cc(h),l:p}},NL=function(e,t,n){return e.s==-1?Math.max(NL(e.l,t,n+1),NL(e.r,t,n+1)):t[e.s]=n},JY=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new po(++t),r=0,i=e[0],s=1,a=function(l){n[r++]=l},o=1;o<=t;++o)if(e[o]==i&&o!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=e[o]}return{c:n.subarray(0,r),n:t}},Cx=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},_me=function(e,t,n){var r=n.length,i=Bme(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<r;++s)e[i+s+4]=n[s];return(i+4+r)*8},ZY=function(e,t,n,r,i,s,a,o,l,u,d){Tu(t,d++,n),++i[256];for(var A=JI(i,15),f=A.t,h=A.l,p=JI(s,15),m=p.t,g=p.l,y=JY(f),v=y.c,x=y.n,b=JY(m),w=b.c,B=b.n,k=new po(19),N=0;N<v.length;++N)++k[v[N]&31];for(var N=0;N<w.length;++N)++k[w[N]&31];for(var j=JI(k,7),L=j.t,T=j.l,E=19;E>4&&!L[YY[E-1]];--E);var F=u+5<<3,M=Cx(i,Gp)+Cx(s,YE)+a,D=Cx(i,f)+Cx(s,m)+a+14+3*E+Cx(k,L)+2*k[16]+3*k[17]+7*k[18];if(l>=0&&F<=M&&F<=D)return _me(t,d,e.subarray(l,l+u));var H,q,$,z;if(Tu(t,d,1+(D<M)),d+=2,D<M){H=Uw(f,h,0),q=f,$=Uw(m,g,0),z=m;var Q=Uw(L,T,0);Tu(t,d,x-257),Tu(t,d+5,B-1),Tu(t,d+10,E-4),d+=14;for(var N=0;N<E;++N)Tu(t,d+3*N,L[YY[N]]);d+=3*E;for(var ce=[v,w],R=0;R<2;++R)for(var O=ce[R],N=0;N<O.length;++N){var Y=O[N]&31;Tu(t,d,Q[Y]),d+=L[Y],Y>15&&(Tu(t,d,O[N]>>5&127),d+=O[N]>>12)}}else H=dvt,q=Gp,$=Avt,z=YE;for(var N=0;N<o;++N){var X=r[N];if(X>255){var Y=X>>18&31;bx(t,d,H[Y+257]),d+=q[Y+257],Y>7&&(Tu(t,d,X>>23&31),d+=pH[Y]);var K=X&31;bx(t,d,$[K]),d+=z[K],K>3&&(bx(t,d,X>>5&8191),d+=mH[K])}else bx(t,d,H[X]),d+=q[X]}return bx(t,d,H[256]),d+q[256]},fvt=new fH([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),kme=new cc(0),pvt=function(e,t,n,r,i,s){var a=s.z||e.length,o=new cc(r+a+5*(1+Math.ceil(a/7e3))+i),l=o.subarray(r,o.length-i),u=s.l,d=(s.r||0)&7;if(t){d&&(l[0]=s.r>>3);for(var A=fvt[t-1],f=A>>13,h=A&8191,p=(1<<n)-1,m=s.p||new po(32768),g=s.h||new po(p+1),y=Math.ceil(n/3),v=2*y,x=function(Fe){return(e[Fe]^e[Fe+1]<<y^e[Fe+2]<<v)&p},b=new fH(25e3),w=new po(288),B=new po(32),k=0,N=0,j=s.i||0,L=0,T=s.w||0,E=0;j+2<a;++j){var F=x(j),M=j&32767,D=g[F];if(m[M]=D,g[F]=M,T<=j){var H=a-j;if((k>7e3||L>24576)&&(H>423||!u)){d=ZY(e,l,0,b,w,B,N,L,E,j-E,d),L=k=N=0,E=j;for(var q=0;q<286;++q)w[q]=0;for(var q=0;q<30;++q)B[q]=0}var $=2,z=0,Q=h,ce=M-D&32767;if(H>2&&F==x(j-ce))for(var R=Math.min(f,H)-1,O=Math.min(32767,j),Y=Math.min(258,H);ce<=O&&--Q&&M!=D;){if(e[j+$]==e[j+$-ce]){for(var X=0;X<Y&&e[j+X]==e[j+X-ce];++X);if(X>$){if($=X,z=ce,X>R)break;for(var K=Math.min(ce,X-2),Z=0,q=0;q<K;++q){var ae=j-ce+q&32767,ue=m[ae],se=ae-ue&32767;se>Z&&(Z=se,D=ae)}}}M=D,D=m[M],ce+=M-D&32767}if(z){b[L++]=268435456|kL[$]<<18|XY[z];var Ae=kL[$]&31,de=XY[z]&31;N+=pH[Ae]+mH[de],++w[257+Ae],++B[de],T=j+$,++k}else b[L++]=e[j],++w[e[j]]}}for(j=Math.max(j,T);j<a;++j)b[L++]=e[j],++w[e[j]];d=ZY(e,l,u,b,w,B,N,L,E,j-E,d),u||(s.r=d&7|l[d/8|0]<<3,d-=7,s.h=g,s.p=m,s.i=j,s.w=T)}else{for(var j=s.w||0;j<a+u;j+=65535){var Se=j+65535;Se>=a&&(l[d/8|0]=u,Se=a),d=_me(l,d+1,e.subarray(j,Se))}s.i=a}return hvt(o,0,r+Bme(d)+i)},Eme=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,s=n.length|0,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=r+=n[a];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},mvt=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),a=new cc(s.length+e.length);a.set(s),a.set(e,s.length),e=a,i.w=s.length}return pvt(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)},Nme=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},gvt=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=Eme();i.p(t.dictionary),Nme(e,2,i.d())}};function jL(e,t){t||(t={});var n=Eme();n.p(e);var r=mvt(e,t,t.dictionary?6:2,4);return gvt(r,t),Nme(r,r.length-4,n.d()),r}var yvt=typeof TextDecoder<"u"&&new TextDecoder,vvt=0;try{yvt.decode(kme,{stream:!0}),vvt=1}catch{}function xvt(e){if(Array.isArray(e))return e}function wvt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function eX(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bvt(e,t){if(e){if(typeof e=="string")return eX(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eX(e,t):void 0}}function Cvt(){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 tX(e,t){return xvt(e)||wvt(e,t)||bvt(e,t)||Cvt()}function nX(e,t="utf8"){return new TextDecoder(t).decode(e)}const Svt=new TextEncoder;function Bvt(e){return Svt.encode(e)}const _vt=1024*8,kvt=(()=>{const e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),ZI={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class gH{constructor(t=_vt,n={}){dn(this,"buffer");dn(this,"byteLength");dn(this,"byteOffset");dn(this,"length");dn(this,"offset");dn(this,"lastWrittenByte");dn(this,"littleEndian");dn(this,"_data");dn(this,"_mark");dn(this,"_marks");let r=!1;typeof t=="number"?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);const i=n.offset?n.offset>>>0:0,s=t.byteLength-i;let a=i;(ArrayBuffer.isView(t)||t instanceof gH)&&(t.byteLength!==t.buffer.byteLength&&(a=t.byteOffset+i),t=t.buffer),r?this.lastWrittenByte=s:this.lastWrittenByte=0,this.buffer=t,this.length=s,this.byteLength=s,this.byteOffset=a,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,a,s),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const r=(this.offset+t)*2,i=new Uint8Array(r);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,n){const r=ZI[n].BYTES_PER_ELEMENT*t,i=this.byteOffset+this.offset,s=this.buffer.slice(i,i+r);if(this.littleEndian===kvt&&n!=="uint8"&&n!=="int8"){const o=new Uint8Array(this.buffer.slice(i,i+r));o.reverse();const l=new ZI[n](o.buffer);return this.offset+=r,l.reverse(),l}const a=new ZI[n](s);return this.offset+=r,a}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let n="";for(let r=0;r<t;r++)n+=this.readChar();return n}readUtf8(t=1){return nX(this.readBytes(t))}decodeText(t=1,n="utf8"){return nX(this.readBytes(t),n)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let n=0;n<t.length;n++)this._data.setUint8(this.offset++,t[n]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let n=0;n<t.length;n++)this.writeUint8(t.charCodeAt(n));return this}writeUtf8(t){return this.writeBytes(Bvt(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Evt=4,rX=0,iX=1,Nvt=2;function pv(e){let t=e.length;for(;--t>=0;)e[t]=0}const jvt=0,jme=1,Tvt=2,Pvt=3,Ivt=258,yH=29,N2=256,T1=N2+1+yH,vy=30,vH=19,Tme=2*T1+1,Gf=15,e4=16,Ovt=7,xH=256,Pme=16,Ime=17,Ome=18,TL=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),WB=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Fvt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Fme=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Mvt=512,Qu=new Array((T1+2)*2);pv(Qu);const Dw=new Array(vy*2);pv(Dw);const P1=new Array(Mvt);pv(P1);const I1=new Array(Ivt-Pvt+1);pv(I1);const wH=new Array(yH);pv(wH);const XE=new Array(vy);pv(XE);function t4(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let Mme,Lme,Rme;function n4(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const Ume=e=>e<256?P1[e]:P1[256+(e>>>7)],O1=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Ma=(e,t,n)=>{e.bi_valid>e4-n?(e.bi_buf|=t<<e.bi_valid&65535,O1(e,e.bi_buf),e.bi_buf=t>>e4-e.bi_valid,e.bi_valid+=n-e4):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},Dc=(e,t,n)=>{Ma(e,n[t*2],n[t*2+1])},Dme=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},Lvt=e=>{e.bi_valid===16?(O1(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},Rvt=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,s=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,l=t.stat_desc.max_length;let u,d,A,f,h,p,m=0;for(f=0;f<=Gf;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u<Tme;u++)d=e.heap[u],f=n[n[d*2+1]*2+1]+1,f>l&&(f=l,m++),n[d*2+1]=f,!(d>r)&&(e.bl_count[f]++,h=0,d>=o&&(h=a[d-o]),p=n[d*2],e.opt_len+=p*(f+h),s&&(e.static_len+=p*(i[d*2+1]+h)));if(m!==0){do{for(f=l-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(f=l;f!==0;f--)for(d=e.bl_count[f];d!==0;)A=e.heap[--u],!(A>r)&&(n[A*2+1]!==f&&(e.opt_len+=(f-n[A*2+1])*n[A*2],n[A*2+1]=f),d--)}},Qme=(e,t,n)=>{const r=new Array(Gf+1);let i=0,s,a;for(s=1;s<=Gf;s++)i=i+n[s-1]<<1,r[s]=i;for(a=0;a<=t;a++){let o=e[a*2+1];o!==0&&(e[a*2]=Dme(r[o]++,o))}},Uvt=()=>{let e,t,n,r,i;const s=new Array(Gf+1);for(n=0,r=0;r<yH-1;r++)for(wH[r]=n,e=0;e<1<<TL[r];e++)I1[n++]=r;for(I1[n-1]=r,i=0,r=0;r<16;r++)for(XE[r]=i,e=0;e<1<<WB[r];e++)P1[i++]=r;for(i>>=7;r<vy;r++)for(XE[r]=i<<7,e=0;e<1<<WB[r]-7;e++)P1[256+i++]=r;for(t=0;t<=Gf;t++)s[t]=0;for(e=0;e<=143;)Qu[e*2+1]=8,e++,s[8]++;for(;e<=255;)Qu[e*2+1]=9,e++,s[9]++;for(;e<=279;)Qu[e*2+1]=7,e++,s[7]++;for(;e<=287;)Qu[e*2+1]=8,e++,s[8]++;for(Qme(Qu,T1+1,s),e=0;e<vy;e++)Dw[e*2+1]=5,Dw[e*2]=Dme(e,5);Mme=new t4(Qu,TL,N2+1,T1,Gf),Lme=new t4(Dw,WB,0,vy,Gf),Rme=new t4(new Array(0),Fvt,0,vH,Ovt)},Hme=e=>{let t;for(t=0;t<T1;t++)e.dyn_ltree[t*2]=0;for(t=0;t<vy;t++)e.dyn_dtree[t*2]=0;for(t=0;t<vH;t++)e.bl_tree[t*2]=0;e.dyn_ltree[xH*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},$me=e=>{e.bi_valid>8?O1(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},sX=(e,t,n,r)=>{const i=t*2,s=n*2;return e[i]<e[s]||e[i]===e[s]&&r[t]<=r[n]},r4=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&sX(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!sX(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},aX=(e,t,n)=>{let r,i,s=0,a,o;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+s++]&255,r+=(e.pending_buf[e.sym_buf+s++]&255)<<8,i=e.pending_buf[e.sym_buf+s++],r===0?Dc(e,i,t):(a=I1[i],Dc(e,a+N2+1,t),o=TL[a],o!==0&&(i-=wH[a],Ma(e,i,o)),r--,a=Ume(r),Dc(e,a,n),o=WB[a],o!==0&&(r-=XE[a],Ma(e,r,o)));while(s<e.sym_next);Dc(e,xH,t)},PL=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,s=t.stat_desc.elems;let a,o,l=-1,u;for(e.heap_len=0,e.heap_max=Tme,a=0;a<s;a++)n[a*2]!==0?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):n[a*2+1]=0;for(;e.heap_len<2;)u=e.heap[++e.heap_len]=l<2?++l:0,n[u*2]=1,e.depth[u]=0,e.opt_len--,i&&(e.static_len-=r[u*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)r4(e,n,a);u=s;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],r4(e,n,1),o=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=o,n[u*2]=n[a*2]+n[o*2],e.depth[u]=(e.depth[a]>=e.depth[o]?e.depth[a]:e.depth[o])+1,n[a*2+1]=n[o*2+1]=u,e.heap[1]=u++,r4(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Rvt(e,t),Qme(n,l,e.bl_count)},oX=(e,t,n)=>{let r,i=-1,s,a=t[0*2+1],o=0,l=7,u=4;for(a===0&&(l=138,u=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)s=a,a=t[(r+1)*2+1],!(++o<l&&s===a)&&(o<u?e.bl_tree[s*2]+=o:s!==0?(s!==i&&e.bl_tree[s*2]++,e.bl_tree[Pme*2]++):o<=10?e.bl_tree[Ime*2]++:e.bl_tree[Ome*2]++,o=0,i=s,a===0?(l=138,u=3):s===a?(l=6,u=3):(l=7,u=4))},lX=(e,t,n)=>{let r,i=-1,s,a=t[0*2+1],o=0,l=7,u=4;for(a===0&&(l=138,u=3),r=0;r<=n;r++)if(s=a,a=t[(r+1)*2+1],!(++o<l&&s===a)){if(o<u)do Dc(e,s,e.bl_tree);while(--o!==0);else s!==0?(s!==i&&(Dc(e,s,e.bl_tree),o--),Dc(e,Pme,e.bl_tree),Ma(e,o-3,2)):o<=10?(Dc(e,Ime,e.bl_tree),Ma(e,o-3,3)):(Dc(e,Ome,e.bl_tree),Ma(e,o-11,7));o=0,i=s,a===0?(l=138,u=3):s===a?(l=6,u=3):(l=7,u=4)}},Dvt=e=>{let t;for(oX(e,e.dyn_ltree,e.l_desc.max_code),oX(e,e.dyn_dtree,e.d_desc.max_code),PL(e,e.bl_desc),t=vH-1;t>=3&&e.bl_tree[Fme[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},Qvt=(e,t,n,r)=>{let i;for(Ma(e,t-257,5),Ma(e,n-1,5),Ma(e,r-4,4),i=0;i<r;i++)Ma(e,e.bl_tree[Fme[i]*2+1],3);lX(e,e.dyn_ltree,t-1),lX(e,e.dyn_dtree,n-1)},Hvt=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return rX;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return iX;for(n=32;n<N2;n++)if(e.dyn_ltree[n*2]!==0)return iX;return rX};let cX=!1;const $vt=e=>{cX||(Uvt(),cX=!0),e.l_desc=new n4(e.dyn_ltree,Mme),e.d_desc=new n4(e.dyn_dtree,Lme),e.bl_desc=new n4(e.bl_tree,Rme),e.bi_buf=0,e.bi_valid=0,Hme(e)},zme=(e,t,n,r)=>{Ma(e,(jvt<<1)+(r?1:0),3),$me(e),O1(e,n),O1(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},zvt=e=>{Ma(e,jme<<1,3),Dc(e,xH,Qu),Lvt(e)},Vvt=(e,t,n,r)=>{let i,s,a=0;e.level>0?(e.strm.data_type===Nvt&&(e.strm.data_type=Hvt(e)),PL(e,e.l_desc),PL(e,e.d_desc),a=Dvt(e),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&t!==-1?zme(e,t,n,r):e.strategy===Evt||s===i?(Ma(e,(jme<<1)+(r?1:0),3),aX(e,Qu,Dw)):(Ma(e,(Tvt<<1)+(r?1:0),3),Qvt(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),aX(e,e.dyn_ltree,e.dyn_dtree)),Hme(e),r&&$me(e)},Kvt=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(I1[n]+N2+1)*2]++,e.dyn_dtree[Ume(t)*2]++),e.sym_next===e.sym_end);var Wvt=$vt,qvt=zme,Gvt=Vvt,Yvt=Kvt,Xvt=zvt,Jvt={_tr_init:Wvt,_tr_stored_block:qvt,_tr_flush_block:Gvt,_tr_tally:Yvt,_tr_align:Xvt};const Zvt=(e,t,n,r)=>{let i=e&65535|0,s=e>>>16&65535|0,a=0;for(;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+t[r++]|0,s=s+i|0;while(--a);i%=65521,s%=65521}return i|s<<16|0};var F1=Zvt;const ext=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},txt=new Uint32Array(ext()),nxt=(e,t,n,r)=>{const i=txt,s=r+n;e^=-1;for(let a=r;a<s;a++)e=e>>>8^i[(e^t[a])&255];return e^-1};var zi=nxt,E0={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},j2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:rxt,_tr_stored_block:IL,_tr_flush_block:ixt,_tr_tally:ch,_tr_align:sxt}=Jvt,{Z_NO_FLUSH:uh,Z_PARTIAL_FLUSH:axt,Z_FULL_FLUSH:oxt,Z_FINISH:Yo,Z_BLOCK:uX,Z_OK:As,Z_STREAM_END:dX,Z_STREAM_ERROR:tu,Z_DATA_ERROR:lxt,Z_BUF_ERROR:i4,Z_DEFAULT_COMPRESSION:cxt,Z_FILTERED:uxt,Z_HUFFMAN_ONLY:PS,Z_RLE:dxt,Z_FIXED:Axt,Z_DEFAULT_STRATEGY:hxt,Z_UNKNOWN:fxt,Z_DEFLATED:Sj}=j2,pxt=9,mxt=15,gxt=8,yxt=29,vxt=256,OL=vxt+1+yxt,xxt=30,wxt=19,bxt=2*OL+1,Cxt=15,gn=3,DA=258,nu=DA+gn+1,Sxt=32,N0=42,bH=57,FL=69,ML=73,LL=91,RL=103,Yf=113,Vx=666,da=1,mv=2,Yp=3,gv=4,Bxt=3,Xf=(e,t)=>(e.msg=E0[t],t),AX=e=>e*2-(e>4?9:0),xA=e=>{let t=e.length;for(;--t>=0;)e[t]=0},_xt=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)};let kxt=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,dh=kxt;const ao=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},mo=(e,t)=>{ixt(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ao(e.strm)},Tn=(e,t)=>{e.pending_buf[e.pending++]=t},Sx=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},UL=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=F1(e.adler,t,i,n):e.state.wrap===2&&(e.adler=zi(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Vme=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,s,a=e.prev_length,o=e.nice_match;const l=e.strstart>e.w_size-nu?e.strstart-(e.w_size-nu):0,u=e.window,d=e.w_mask,A=e.prev,f=e.strstart+DA;let h=u[r+a-1],p=u[r+a];e.prev_length>=e.good_match&&(n>>=2),o>e.lookahead&&(o=e.lookahead);do if(i=t,!(u[i+a]!==p||u[i+a-1]!==h||u[i]!==u[r]||u[++i]!==u[r+1])){r+=2,i++;do;while(u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&u[++r]===u[++i]&&r<f);if(s=DA-(f-r),r=f-DA,s>a){if(e.match_start=t,a=s,s>=o)break;h=u[r+a-1],p=u[r+a]}}while((t=A[t&d])>l&&--n!==0);return a<=e.lookahead?a:e.lookahead},j0=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-nu)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),_xt(e),r+=t),e.strm.avail_in===0)break;if(n=UL(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=gn)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=dh(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=dh(e,e.ins_h,e.window[i+gn-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<gn)););}while(e.lookahead<nu&&e.strm.avail_in!==0)},Kme=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,s,a=0,o=e.strm.avail_in;do{if(r=65535,s=e.bi_valid+42>>3,e.strm.avail_out<s||(s=e.strm.avail_out-s,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>s&&(r=s),r<n&&(r===0&&t!==Yo||t===uh||r!==i+e.strm.avail_in)))break;a=t===Yo&&r===i+e.strm.avail_in?1:0,IL(e,0,0,a),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,ao(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(UL(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(a===0);return o-=e.strm.avail_in,o&&(o>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=o&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-o,e.strm.next_in),e.strstart),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?gv:t!==uh&&t!==Yo&&e.strm.avail_in===0&&e.strstart===e.block_start?mv:(s=e.window_size-e.strstart,e.strm.avail_in>s&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,s+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),s>e.strm.avail_in&&(s=e.strm.avail_in),s&&(UL(e.strm,e.window,e.strstart,s),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.high_water<e.strstart&&(e.high_water=e.strstart),s=e.bi_valid+42>>3,s=e.pending_buf_size-s>65535?65535:e.pending_buf_size-s,n=s>e.w_size?e.w_size:s,i=e.strstart-e.block_start,(i>=n||(i||t===Yo)&&t!==uh&&e.strm.avail_in===0&&i<=s)&&(r=i>s?s:i,a=t===Yo&&e.strm.avail_in===0&&r===i?1:0,IL(e,e.block_start,r,a),e.block_start+=r,ao(e.strm)),a?Yp:da)},s4=(e,t)=>{let n,r;for(;;){if(e.lookahead<nu){if(j0(e),e.lookahead<nu&&t===uh)return da;if(e.lookahead===0)break}if(n=0,e.lookahead>=gn&&(e.ins_h=dh(e,e.ins_h,e.window[e.strstart+gn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-nu&&(e.match_length=Vme(e,n)),e.match_length>=gn)if(r=ch(e,e.strstart-e.match_start,e.match_length-gn),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=gn){e.match_length--;do e.strstart++,e.ins_h=dh(e,e.ins_h,e.window[e.strstart+gn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=dh(e,e.ins_h,e.window[e.strstart+1]);else r=ch(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(mo(e,!1),e.strm.avail_out===0))return da}return e.insert=e.strstart<gn-1?e.strstart:gn-1,t===Yo?(mo(e,!0),e.strm.avail_out===0?Yp:gv):e.sym_next&&(mo(e,!1),e.strm.avail_out===0)?da:mv},rg=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<nu){if(j0(e),e.lookahead<nu&&t===uh)return da;if(e.lookahead===0)break}if(n=0,e.lookahead>=gn&&(e.ins_h=dh(e,e.ins_h,e.window[e.strstart+gn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=gn-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-nu&&(e.match_length=Vme(e,n),e.match_length<=5&&(e.strategy===uxt||e.match_length===gn&&e.strstart-e.match_start>4096)&&(e.match_length=gn-1)),e.prev_length>=gn&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-gn,r=ch(e,e.strstart-1-e.prev_match,e.prev_length-gn),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=dh(e,e.ins_h,e.window[e.strstart+gn-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=gn-1,e.strstart++,r&&(mo(e,!1),e.strm.avail_out===0))return da}else if(e.match_available){if(r=ch(e,0,e.window[e.strstart-1]),r&&mo(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return da}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=ch(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<gn-1?e.strstart:gn-1,t===Yo?(mo(e,!0),e.strm.avail_out===0?Yp:gv):e.sym_next&&(mo(e,!1),e.strm.avail_out===0)?da:mv},Ext=(e,t)=>{let n,r,i,s;const a=e.window;for(;;){if(e.lookahead<=DA){if(j0(e),e.lookahead<=DA&&t===uh)return da;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=gn&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){s=e.strstart+DA;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<s);e.match_length=DA-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=gn?(n=ch(e,1,e.match_length-gn),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=ch(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(mo(e,!1),e.strm.avail_out===0))return da}return e.insert=0,t===Yo?(mo(e,!0),e.strm.avail_out===0?Yp:gv):e.sym_next&&(mo(e,!1),e.strm.avail_out===0)?da:mv},Nxt=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(j0(e),e.lookahead===0)){if(t===uh)return da;break}if(e.match_length=0,n=ch(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(mo(e,!1),e.strm.avail_out===0))return da}return e.insert=0,t===Yo?(mo(e,!0),e.strm.avail_out===0?Yp:gv):e.sym_next&&(mo(e,!1),e.strm.avail_out===0)?da:mv};function kc(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const Kx=[new kc(0,0,0,0,Kme),new kc(4,4,8,4,s4),new kc(4,5,16,8,s4),new kc(4,6,32,32,s4),new kc(4,4,16,16,rg),new kc(8,16,32,32,rg),new kc(8,16,128,128,rg),new kc(8,32,128,256,rg),new kc(32,128,258,1024,rg),new kc(32,258,258,4096,rg)],jxt=e=>{e.window_size=2*e.w_size,xA(e.head),e.max_lazy_match=Kx[e.level].max_lazy,e.good_match=Kx[e.level].good_length,e.nice_match=Kx[e.level].nice_length,e.max_chain_length=Kx[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=gn-1,e.match_available=0,e.ins_h=0};function Txt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Sj,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(bxt*2),this.dyn_dtree=new Uint16Array((2*xxt+1)*2),this.bl_tree=new Uint16Array((2*wxt+1)*2),xA(this.dyn_ltree),xA(this.dyn_dtree),xA(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Cxt+1),this.heap=new Uint16Array(2*OL+1),xA(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*OL+1),xA(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const T2=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==N0&&t.status!==bH&&t.status!==FL&&t.status!==ML&&t.status!==LL&&t.status!==RL&&t.status!==Yf&&t.status!==Vx?1:0},Wme=e=>{if(T2(e))return Xf(e,tu);e.total_in=e.total_out=0,e.data_type=fxt;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?bH:t.wrap?N0:Yf,e.adler=t.wrap===2?0:1,t.last_flush=-2,rxt(t),As},qme=e=>{const t=Wme(e);return t===As&&jxt(e.state),t},Pxt=(e,t)=>T2(e)||e.state.wrap!==2?tu:(e.state.gzhead=t,As),Gme=(e,t,n,r,i,s)=>{if(!e)return tu;let a=1;if(t===cxt&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>pxt||n!==Sj||r<8||r>15||t<0||t>9||s<0||s>Axt||r===8&&a!==1)return Xf(e,tu);r===8&&(r=9);const o=new Txt;return e.state=o,o.strm=e,o.status=N0,o.wrap=a,o.gzhead=null,o.w_bits=r,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+gn-1)/gn),o.window=new Uint8Array(o.w_size*2),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=(o.lit_bufsize-1)*3,o.level=t,o.strategy=s,o.method=n,qme(e)},Ixt=(e,t)=>Gme(e,t,Sj,mxt,gxt,hxt),Oxt=(e,t)=>{if(T2(e)||t>uX||t<0)return e?Xf(e,tu):tu;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Vx&&t!==Yo)return Xf(e,e.avail_out===0?i4:tu);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(ao(e),e.avail_out===0)return n.last_flush=-1,As}else if(e.avail_in===0&&AX(t)<=AX(r)&&t!==Yo)return Xf(e,i4);if(n.status===Vx&&e.avail_in!==0)return Xf(e,i4);if(n.status===N0&&n.wrap===0&&(n.status=Yf),n.status===N0){let i=Sj+(n.w_bits-8<<4)<<8,s=-1;if(n.strategy>=PS||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,i|=s<<6,n.strstart!==0&&(i|=Sxt),i+=31-i%31,Sx(n,i),n.strstart!==0&&(Sx(n,e.adler>>>16),Sx(n,e.adler&65535)),e.adler=1,n.status=Yf,ao(e),n.pending!==0)return n.last_flush=-1,As}if(n.status===bH){if(e.adler=0,Tn(n,31),Tn(n,139),Tn(n,8),n.gzhead)Tn(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Tn(n,n.gzhead.time&255),Tn(n,n.gzhead.time>>8&255),Tn(n,n.gzhead.time>>16&255),Tn(n,n.gzhead.time>>24&255),Tn(n,n.level===9?2:n.strategy>=PS||n.level<2?4:0),Tn(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Tn(n,n.gzhead.extra.length&255),Tn(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=zi(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=FL;else if(Tn(n,0),Tn(n,0),Tn(n,0),Tn(n,0),Tn(n,0),Tn(n,n.level===9?2:n.strategy>=PS||n.level<2?4:0),Tn(n,Bxt),n.status=Yf,ao(e),n.pending!==0)return n.last_flush=-1,As}if(n.status===FL){if(n.gzhead.extra){let i=n.pending,s=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+s>n.pending_buf_size;){let o=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=zi(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=o,ao(e),n.pending!==0)return n.last_flush=-1,As;i=0,s-=o}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending+=s,n.gzhead.hcrc&&n.pending>i&&(e.adler=zi(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=ML}if(n.status===ML){if(n.gzhead.name){let i=n.pending,s;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=zi(e.adler,n.pending_buf,n.pending-i,i)),ao(e),n.pending!==0)return n.last_flush=-1,As;i=0}n.gzindex<n.gzhead.name.length?s=n.gzhead.name.charCodeAt(n.gzindex++)&255:s=0,Tn(n,s)}while(s!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=zi(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=LL}if(n.status===LL){if(n.gzhead.comment){let i=n.pending,s;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=zi(e.adler,n.pending_buf,n.pending-i,i)),ao(e),n.pending!==0)return n.last_flush=-1,As;i=0}n.gzindex<n.gzhead.comment.length?s=n.gzhead.comment.charCodeAt(n.gzindex++)&255:s=0,Tn(n,s)}while(s!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=zi(e.adler,n.pending_buf,n.pending-i,i))}n.status=RL}if(n.status===RL){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(ao(e),n.pending!==0))return n.last_flush=-1,As;Tn(n,e.adler&255),Tn(n,e.adler>>8&255),e.adler=0}if(n.status=Yf,ao(e),n.pending!==0)return n.last_flush=-1,As}if(e.avail_in!==0||n.lookahead!==0||t!==uh&&n.status!==Vx){let i=n.level===0?Kme(n,t):n.strategy===PS?Nxt(n,t):n.strategy===dxt?Ext(n,t):Kx[n.level].func(n,t);if((i===Yp||i===gv)&&(n.status=Vx),i===da||i===Yp)return e.avail_out===0&&(n.last_flush=-1),As;if(i===mv&&(t===axt?sxt(n):t!==uX&&(IL(n,0,0,!1),t===oxt&&(xA(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),ao(e),e.avail_out===0))return n.last_flush=-1,As}return t!==Yo?As:n.wrap<=0?dX:(n.wrap===2?(Tn(n,e.adler&255),Tn(n,e.adler>>8&255),Tn(n,e.adler>>16&255),Tn(n,e.adler>>24&255),Tn(n,e.total_in&255),Tn(n,e.total_in>>8&255),Tn(n,e.total_in>>16&255),Tn(n,e.total_in>>24&255)):(Sx(n,e.adler>>>16),Sx(n,e.adler&65535)),ao(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?As:dX)},Fxt=e=>{if(T2(e))return tu;const t=e.state.status;return e.state=null,t===Yf?Xf(e,lxt):As},Mxt=(e,t)=>{let n=t.length;if(T2(e))return tu;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==N0||r.lookahead)return tu;if(i===1&&(e.adler=F1(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(xA(r.head),r.strstart=0,r.block_start=0,r.insert=0);let l=new Uint8Array(r.w_size);l.set(t.subarray(n-r.w_size,n),0),t=l,n=r.w_size}const s=e.avail_in,a=e.next_in,o=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,j0(r);r.lookahead>=gn;){let l=r.strstart,u=r.lookahead-(gn-1);do r.ins_h=dh(r,r.ins_h,r.window[l+gn-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++;while(--u);r.strstart=l,r.lookahead=gn-1,j0(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=gn-1,r.match_available=0,e.next_in=a,e.input=o,e.avail_in=s,r.wrap=i,As};var Lxt=Ixt,Rxt=Gme,Uxt=qme,Dxt=Wme,Qxt=Pxt,Hxt=Oxt,$xt=Fxt,zxt=Mxt,Vxt="pako deflate (from Nodeca project)",Qw={deflateInit:Lxt,deflateInit2:Rxt,deflateReset:Uxt,deflateResetKeep:Dxt,deflateSetHeader:Qxt,deflate:Hxt,deflateEnd:$xt,deflateSetDictionary:zxt,deflateInfo:Vxt};const Kxt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Wxt=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)Kxt(n,r)&&(e[r]=n[r])}}return e},qxt=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,s=e.length;r<s;r++){let a=e[r];n.set(a,i),i+=a.length}return n},Bj={assign:Wxt,flattenChunks:qxt};let Yme=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Yme=!1}const M1=new Uint8Array(256);for(let e=0;e<256;e++)M1[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;M1[254]=M1[254]=1;var Gxt=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,s,a=e.length,o=0;for(i=0;i<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),o+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(o),s=0,i=0;s<o;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[s++]=n:n<2048?(t[s++]=192|n>>>6,t[s++]=128|n&63):n<65536?(t[s++]=224|n>>>12,t[s++]=128|n>>>6&63,t[s++]=128|n&63):(t[s++]=240|n>>>18,t[s++]=128|n>>>12&63,t[s++]=128|n>>>6&63,t[s++]=128|n&63);return t};const Yxt=(e,t)=>{if(t<65534&&e.subarray&&Yme)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var Xxt=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const s=new Array(n*2);for(i=0,r=0;r<n;){let a=e[r++];if(a<128){s[i++]=a;continue}let o=M1[a];if(o>4){s[i++]=65533,r+=o-1;continue}for(a&=o===2?31:o===3?15:7;o>1&&r<n;)a=a<<6|e[r++]&63,o--;if(o>1){s[i++]=65533;continue}a<65536?s[i++]=a:(a-=65536,s[i++]=55296|a>>10&1023,s[i++]=56320|a&1023)}return Yxt(s,i)},Jxt=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+M1[e[n]]>t?n:t},L1={string2buf:Gxt,buf2string:Xxt,utf8border:Jxt};function Zxt(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Xme=Zxt;const Jme=Object.prototype.toString,{Z_NO_FLUSH:ewt,Z_SYNC_FLUSH:twt,Z_FULL_FLUSH:nwt,Z_FINISH:rwt,Z_OK:JE,Z_STREAM_END:iwt,Z_DEFAULT_COMPRESSION:swt,Z_DEFAULT_STRATEGY:awt,Z_DEFLATED:owt}=j2;function CH(e){this.options=Bj.assign({level:swt,method:owt,chunkSize:16384,windowBits:15,memLevel:8,strategy:awt},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Xme,this.strm.avail_out=0;let n=Qw.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==JE)throw new Error(E0[n]);if(t.header&&Qw.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=L1.string2buf(t.dictionary):Jme.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Qw.deflateSetDictionary(this.strm,r),n!==JE)throw new Error(E0[n]);this._dict_set=!0}}CH.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,s;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?rwt:ewt,typeof e=="string"?n.input=L1.string2buf(e):Jme.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(s===twt||s===nwt)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Qw.deflate(n,s),i===iwt)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Qw.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===JE;if(n.avail_out===0){this.onData(n.output);continue}if(s>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};CH.prototype.onData=function(e){this.chunks.push(e)};CH.prototype.onEnd=function(e){e===JE&&(this.result=Bj.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const IS=16209,lwt=16191;var cwt=function(t,n){let r,i,s,a,o,l,u,d,A,f,h,p,m,g,y,v,x,b,w,B,k,N,j,L;const T=t.state;r=t.next_in,j=t.input,i=r+(t.avail_in-5),s=t.next_out,L=t.output,a=s-(n-t.avail_out),o=s+(t.avail_out-257),l=T.dmax,u=T.wsize,d=T.whave,A=T.wnext,f=T.window,h=T.hold,p=T.bits,m=T.lencode,g=T.distcode,y=(1<<T.lenbits)-1,v=(1<<T.distbits)-1;e:do{p<15&&(h+=j[r++]<<p,p+=8,h+=j[r++]<<p,p+=8),x=m[h&y];t:for(;;){if(b=x>>>24,h>>>=b,p-=b,b=x>>>16&255,b===0)L[s++]=x&65535;else if(b&16){w=x&65535,b&=15,b&&(p<b&&(h+=j[r++]<<p,p+=8),w+=h&(1<<b)-1,h>>>=b,p-=b),p<15&&(h+=j[r++]<<p,p+=8,h+=j[r++]<<p,p+=8),x=g[h&v];n:for(;;){if(b=x>>>24,h>>>=b,p-=b,b=x>>>16&255,b&16){if(B=x&65535,b&=15,p<b&&(h+=j[r++]<<p,p+=8,p<b&&(h+=j[r++]<<p,p+=8)),B+=h&(1<<b)-1,B>l){t.msg="invalid distance too far back",T.mode=IS;break e}if(h>>>=b,p-=b,b=s-a,B>b){if(b=B-b,b>d&&T.sane){t.msg="invalid distance too far back",T.mode=IS;break e}if(k=0,N=f,A===0){if(k+=u-b,b<w){w-=b;do L[s++]=f[k++];while(--b);k=s-B,N=L}}else if(A<b){if(k+=u+A-b,b-=A,b<w){w-=b;do L[s++]=f[k++];while(--b);if(k=0,A<w){b=A,w-=b;do L[s++]=f[k++];while(--b);k=s-B,N=L}}}else if(k+=A-b,b<w){w-=b;do L[s++]=f[k++];while(--b);k=s-B,N=L}for(;w>2;)L[s++]=N[k++],L[s++]=N[k++],L[s++]=N[k++],w-=3;w&&(L[s++]=N[k++],w>1&&(L[s++]=N[k++]))}else{k=s-B;do L[s++]=L[k++],L[s++]=L[k++],L[s++]=L[k++],w-=3;while(w>2);w&&(L[s++]=L[k++],w>1&&(L[s++]=L[k++]))}}else if(b&64){t.msg="invalid distance code",T.mode=IS;break e}else{x=g[(x&65535)+(h&(1<<b)-1)];continue n}break}}else if(b&64)if(b&32){T.mode=lwt;break e}else{t.msg="invalid literal/length code",T.mode=IS;break e}else{x=m[(x&65535)+(h&(1<<b)-1)];continue t}break}}while(r<i&&s<o);w=p>>3,r-=w,p-=w<<3,h&=(1<<p)-1,t.next_in=r,t.next_out=s,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=s<o?257+(o-s):257-(s-o),T.hold=h,T.bits=p};const ig=15,hX=852,fX=592,pX=0,a4=1,mX=2,uwt=new Uint16Array([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,0,0]),dwt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Awt=new Uint16Array([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,0,0]),hwt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),fwt=(e,t,n,r,i,s,a,o)=>{const l=o.bits;let u=0,d=0,A=0,f=0,h=0,p=0,m=0,g=0,y=0,v=0,x,b,w,B,k,N=null,j;const L=new Uint16Array(ig+1),T=new Uint16Array(ig+1);let E=null,F,M,D;for(u=0;u<=ig;u++)L[u]=0;for(d=0;d<r;d++)L[t[n+d]]++;for(h=l,f=ig;f>=1&&L[f]===0;f--);if(h>f&&(h=f),f===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,o.bits=1,0;for(A=1;A<f&&L[A]===0;A++);for(h<A&&(h=A),g=1,u=1;u<=ig;u++)if(g<<=1,g-=L[u],g<0)return-1;if(g>0&&(e===pX||f!==1))return-1;for(T[1]=0,u=1;u<ig;u++)T[u+1]=T[u]+L[u];for(d=0;d<r;d++)t[n+d]!==0&&(a[T[t[n+d]]++]=d);if(e===pX?(N=E=a,j=20):e===a4?(N=uwt,E=dwt,j=257):(N=Awt,E=hwt,j=0),v=0,d=0,u=A,k=s,p=h,m=0,w=-1,y=1<<h,B=y-1,e===a4&&y>hX||e===mX&&y>fX)return 1;for(;;){F=u-m,a[d]+1<j?(M=0,D=a[d]):a[d]>=j?(M=E[a[d]-j],D=N[a[d]-j]):(M=96,D=0),x=1<<u-m,b=1<<p,A=b;do b-=x,i[k+(v>>m)+b]=F<<24|M<<16|D|0;while(b!==0);for(x=1<<u-1;v&x;)x>>=1;if(x!==0?(v&=x-1,v+=x):v=0,d++,--L[u]===0){if(u===f)break;u=t[n+a[d]]}if(u>h&&(v&B)!==w){for(m===0&&(m=h),k+=A,p=u-m,g=1<<p;p+m<f&&(g-=L[p+m],!(g<=0));)p++,g<<=1;if(y+=1<<p,e===a4&&y>hX||e===mX&&y>fX)return 1;w=v&B,i[w]=h<<24|p<<16|k-s|0}}return v!==0&&(i[k+v]=u-m<<24|64<<16|0),o.bits=h,0};var Hw=fwt;const pwt=0,Zme=1,ege=2,{Z_FINISH:gX,Z_BLOCK:mwt,Z_TREES:OS,Z_OK:Xp,Z_STREAM_END:gwt,Z_NEED_DICT:ywt,Z_STREAM_ERROR:pl,Z_DATA_ERROR:tge,Z_MEM_ERROR:nge,Z_BUF_ERROR:vwt,Z_DEFLATED:yX}=j2,_j=16180,vX=16181,xX=16182,wX=16183,bX=16184,CX=16185,SX=16186,BX=16187,_X=16188,kX=16189,ZE=16190,Pu=16191,o4=16192,EX=16193,l4=16194,NX=16195,jX=16196,TX=16197,PX=16198,FS=16199,MS=16200,IX=16201,OX=16202,FX=16203,MX=16204,LX=16205,c4=16206,RX=16207,UX=16208,br=16209,rge=16210,ige=16211,xwt=852,wwt=592,bwt=15,Cwt=bwt,DX=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function Swt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Am=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<_j||t.mode>ige?1:0},sge=e=>{if(Am(e))return pl;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=_j,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(xwt),t.distcode=t.distdyn=new Int32Array(wwt),t.sane=1,t.back=-1,Xp},age=e=>{if(Am(e))return pl;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,sge(e)},oge=(e,t)=>{let n;if(Am(e))return pl;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?pl:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,age(e))},lge=(e,t)=>{if(!e)return pl;const n=new Swt;e.state=n,n.strm=e,n.window=null,n.mode=_j;const r=oge(e,t);return r!==Xp&&(e.state=null),r},Bwt=e=>lge(e,Cwt);let QX=!0,u4,d4;const _wt=e=>{if(QX){u4=new Int32Array(512),d4=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Hw(Zme,e.lens,0,288,u4,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Hw(ege,e.lens,0,32,d4,0,e.work,{bits:5}),QX=!1}e.lencode=u4,e.lenbits=9,e.distcode=d4,e.distbits=5},cge=(e,t,n,r)=>{let i;const s=e.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(t.subarray(n-s.wsize,n),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(t.subarray(n-r,n-r+i),s.wnext),r-=i,r?(s.window.set(t.subarray(n-r,n),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0},kwt=(e,t)=>{let n,r,i,s,a,o,l,u,d,A,f,h,p,m,g=0,y,v,x,b,w,B,k,N;const j=new Uint8Array(4);let L,T;const E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Am(e)||!e.output||!e.input&&e.avail_in!==0)return pl;n=e.state,n.mode===Pu&&(n.mode=o4),a=e.next_out,i=e.output,l=e.avail_out,s=e.next_in,r=e.input,o=e.avail_in,u=n.hold,d=n.bits,A=o,f=l,N=Xp;e:for(;;)switch(n.mode){case _j:if(n.wrap===0){n.mode=o4;break}for(;d<16;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}if(n.wrap&2&&u===35615){n.wbits===0&&(n.wbits=15),n.check=0,j[0]=u&255,j[1]=u>>>8&255,n.check=zi(n.check,j,2,0),u=0,d=0,n.mode=vX;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=br;break}if((u&15)!==yX){e.msg="unknown compression method",n.mode=br;break}if(u>>>=4,d-=4,k=(u&15)+8,n.wbits===0&&(n.wbits=k),k>15||k>n.wbits){e.msg="invalid window size",n.mode=br;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=u&512?kX:Pu,u=0,d=0;break;case vX:for(;d<16;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}if(n.flags=u,(n.flags&255)!==yX){e.msg="unknown compression method",n.mode=br;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=br;break}n.head&&(n.head.text=u>>8&1),n.flags&512&&n.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,n.check=zi(n.check,j,2,0)),u=0,d=0,n.mode=xX;case xX:for(;d<32;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}n.head&&(n.head.time=u),n.flags&512&&n.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,j[2]=u>>>16&255,j[3]=u>>>24&255,n.check=zi(n.check,j,4,0)),u=0,d=0,n.mode=wX;case wX:for(;d<16;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}n.head&&(n.head.xflags=u&255,n.head.os=u>>8),n.flags&512&&n.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,n.check=zi(n.check,j,2,0)),u=0,d=0,n.mode=bX;case bX:if(n.flags&1024){for(;d<16;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}n.length=u,n.head&&(n.head.extra_len=u),n.flags&512&&n.wrap&4&&(j[0]=u&255,j[1]=u>>>8&255,n.check=zi(n.check,j,2,0)),u=0,d=0}else n.head&&(n.head.extra=null);n.mode=CX;case CX:if(n.flags&1024&&(h=n.length,h>o&&(h=o),h&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(s,s+h),k)),n.flags&512&&n.wrap&4&&(n.check=zi(n.check,r,h,s)),o-=h,s+=h,n.length-=h),n.length))break e;n.length=0,n.mode=SX;case SX:if(n.flags&2048){if(o===0)break e;h=0;do k=r[s+h++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k));while(k&&h<o);if(n.flags&512&&n.wrap&4&&(n.check=zi(n.check,r,h,s)),o-=h,s+=h,k)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=BX;case BX:if(n.flags&4096){if(o===0)break e;h=0;do k=r[s+h++],n.head&&k&&n.length<65536&&(n.head.comment+=String.fromCharCode(k));while(k&&h<o);if(n.flags&512&&n.wrap&4&&(n.check=zi(n.check,r,h,s)),o-=h,s+=h,k)break e}else n.head&&(n.head.comment=null);n.mode=_X;case _X:if(n.flags&512){for(;d<16;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}if(n.wrap&4&&u!==(n.check&65535)){e.msg="header crc mismatch",n.mode=br;break}u=0,d=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Pu;break;case kX:for(;d<32;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}e.adler=n.check=DX(u),u=0,d=0,n.mode=ZE;case ZE:if(n.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=s,e.avail_in=o,n.hold=u,n.bits=d,ywt;e.adler=n.check=1,n.mode=Pu;case Pu:if(t===mwt||t===OS)break e;case o4:if(n.last){u>>>=d&7,d-=d&7,n.mode=c4;break}for(;d<3;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}switch(n.last=u&1,u>>>=1,d-=1,u&3){case 0:n.mode=EX;break;case 1:if(_wt(n),n.mode=FS,t===OS){u>>>=2,d-=2;break e}break;case 2:n.mode=jX;break;case 3:e.msg="invalid block type",n.mode=br}u>>>=2,d-=2;break;case EX:for(u>>>=d&7,d-=d&7;d<32;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",n.mode=br;break}if(n.length=u&65535,u=0,d=0,n.mode=l4,t===OS)break e;case l4:n.mode=NX;case NX:if(h=n.length,h){if(h>o&&(h=o),h>l&&(h=l),h===0)break e;i.set(r.subarray(s,s+h),a),o-=h,s+=h,l-=h,a+=h,n.length-=h;break}n.mode=Pu;break;case jX:for(;d<14;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}if(n.nlen=(u&31)+257,u>>>=5,d-=5,n.ndist=(u&31)+1,u>>>=5,d-=5,n.ncode=(u&15)+4,u>>>=4,d-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=br;break}n.have=0,n.mode=TX;case TX:for(;n.have<n.ncode;){for(;d<3;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}n.lens[E[n.have++]]=u&7,u>>>=3,d-=3}for(;n.have<19;)n.lens[E[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},N=Hw(pwt,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,N){e.msg="invalid code lengths set",n.mode=br;break}n.have=0,n.mode=PX;case PX:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[u&(1<<n.lenbits)-1],y=g>>>24,v=g>>>16&255,x=g&65535,!(y<=d);){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}if(x<16)u>>>=y,d-=y,n.lens[n.have++]=x;else{if(x===16){for(T=y+2;d<T;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}if(u>>>=y,d-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=br;break}k=n.lens[n.have-1],h=3+(u&3),u>>>=2,d-=2}else if(x===17){for(T=y+3;d<T;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}u>>>=y,d-=y,k=0,h=3+(u&7),u>>>=3,d-=3}else{for(T=y+7;d<T;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}u>>>=y,d-=y,k=0,h=11+(u&127),u>>>=7,d-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=br;break}for(;h--;)n.lens[n.have++]=k}}if(n.mode===br)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=br;break}if(n.lenbits=9,L={bits:n.lenbits},N=Hw(Zme,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,N){e.msg="invalid literal/lengths set",n.mode=br;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},N=Hw(ege,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,N){e.msg="invalid distances set",n.mode=br;break}if(n.mode=FS,t===OS)break e;case FS:n.mode=MS;case MS:if(o>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=s,e.avail_in=o,n.hold=u,n.bits=d,cwt(e,f),a=e.next_out,i=e.output,l=e.avail_out,s=e.next_in,r=e.input,o=e.avail_in,u=n.hold,d=n.bits,n.mode===Pu&&(n.back=-1);break}for(n.back=0;g=n.lencode[u&(1<<n.lenbits)-1],y=g>>>24,v=g>>>16&255,x=g&65535,!(y<=d);){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}if(v&&!(v&240)){for(b=y,w=v,B=x;g=n.lencode[B+((u&(1<<b+w)-1)>>b)],y=g>>>24,v=g>>>16&255,x=g&65535,!(b+y<=d);){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}u>>>=b,d-=b,n.back+=b}if(u>>>=y,d-=y,n.back+=y,n.length=x,v===0){n.mode=LX;break}if(v&32){n.back=-1,n.mode=Pu;break}if(v&64){e.msg="invalid literal/length code",n.mode=br;break}n.extra=v&15,n.mode=IX;case IX:if(n.extra){for(T=n.extra;d<T;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=OX;case OX:for(;g=n.distcode[u&(1<<n.distbits)-1],y=g>>>24,v=g>>>16&255,x=g&65535,!(y<=d);){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}if(!(v&240)){for(b=y,w=v,B=x;g=n.distcode[B+((u&(1<<b+w)-1)>>b)],y=g>>>24,v=g>>>16&255,x=g&65535,!(b+y<=d);){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}u>>>=b,d-=b,n.back+=b}if(u>>>=y,d-=y,n.back+=y,v&64){e.msg="invalid distance code",n.mode=br;break}n.offset=x,n.extra=v&15,n.mode=FX;case FX:if(n.extra){for(T=n.extra;d<T;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=br;break}n.mode=MX;case MX:if(l===0)break e;if(h=f-l,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=br;break}h>n.wnext?(h-=n.wnext,p=n.wsize-h):p=n.wnext-h,h>n.length&&(h=n.length),m=n.window}else m=i,p=a-n.offset,h=n.length;h>l&&(h=l),l-=h,n.length-=h;do i[a++]=m[p++];while(--h);n.length===0&&(n.mode=MS);break;case LX:if(l===0)break e;i[a++]=n.length,l--,n.mode=MS;break;case c4:if(n.wrap){for(;d<32;){if(o===0)break e;o--,u|=r[s++]<<d,d+=8}if(f-=l,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?zi(n.check,i,f,a-f):F1(n.check,i,f,a-f)),f=l,n.wrap&4&&(n.flags?u:DX(u))!==n.check){e.msg="incorrect data check",n.mode=br;break}u=0,d=0}n.mode=RX;case RX:if(n.wrap&&n.flags){for(;d<32;){if(o===0)break e;o--,u+=r[s++]<<d,d+=8}if(n.wrap&4&&u!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=br;break}u=0,d=0}n.mode=UX;case UX:N=gwt;break e;case br:N=tge;break e;case rge:return nge;case ige:default:return pl}return e.next_out=a,e.avail_out=l,e.next_in=s,e.avail_in=o,n.hold=u,n.bits=d,(n.wsize||f!==e.avail_out&&n.mode<br&&(n.mode<c4||t!==gX))&&cge(e,e.output,e.next_out,f-e.avail_out),A-=e.avail_in,f-=e.avail_out,e.total_in+=A,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?zi(n.check,i,f,e.next_out-f):F1(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Pu?128:0)+(n.mode===FS||n.mode===l4?256:0),(A===0&&f===0||t===gX)&&N===Xp&&(N=vwt),N},Ewt=e=>{if(Am(e))return pl;let t=e.state;return t.window&&(t.window=null),e.state=null,Xp},Nwt=(e,t)=>{if(Am(e))return pl;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,Xp):pl},jwt=(e,t)=>{const n=t.length;let r,i,s;return Am(e)||(r=e.state,r.wrap!==0&&r.mode!==ZE)?pl:r.mode===ZE&&(i=1,i=F1(i,t,n,0),i!==r.check)?tge:(s=cge(e,t,n,n),s?(r.mode=rge,nge):(r.havedict=1,Xp))};var Twt=age,Pwt=oge,Iwt=sge,Owt=Bwt,Fwt=lge,Mwt=kwt,Lwt=Ewt,Rwt=Nwt,Uwt=jwt,Dwt="pako inflate (from Nodeca project)",Hu={inflateReset:Twt,inflateReset2:Pwt,inflateResetKeep:Iwt,inflateInit:Owt,inflateInit2:Fwt,inflate:Mwt,inflateEnd:Lwt,inflateGetHeader:Rwt,inflateSetDictionary:Uwt,inflateInfo:Dwt};function Qwt(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Hwt=Qwt;const uge=Object.prototype.toString,{Z_NO_FLUSH:$wt,Z_FINISH:zwt,Z_OK:R1,Z_STREAM_END:A4,Z_NEED_DICT:h4,Z_STREAM_ERROR:Vwt,Z_DATA_ERROR:HX,Z_MEM_ERROR:Kwt}=j2;function P2(e){this.options=Bj.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Xme,this.strm.avail_out=0;let n=Hu.inflateInit2(this.strm,t.windowBits);if(n!==R1)throw new Error(E0[n]);if(this.header=new Hwt,Hu.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=L1.string2buf(t.dictionary):uge.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Hu.inflateSetDictionary(this.strm,t.dictionary),n!==R1)))throw new Error(E0[n])}P2.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let s,a,o;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?zwt:$wt,uge.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),s=Hu.inflate(n,a),s===h4&&i&&(s=Hu.inflateSetDictionary(n,i),s===R1?s=Hu.inflate(n,a):s===HX&&(s=h4));n.avail_in>0&&s===A4&&n.state.wrap>0&&e[n.next_in]!==0;)Hu.inflateReset(n),s=Hu.inflate(n,a);switch(s){case Vwt:case HX:case h4:case Kwt:return this.onEnd(s),this.ended=!0,!1}if(o=n.avail_out,n.next_out&&(n.avail_out===0||s===A4))if(this.options.to==="string"){let l=L1.utf8border(n.output,n.next_out),u=n.next_out-l,d=L1.buf2string(n.output,l);n.next_out=u,n.avail_out=r-u,u&&n.output.set(n.output.subarray(l,l+u),0),this.onData(d)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(s===R1&&o===0)){if(s===A4)return s=Hu.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};P2.prototype.onData=function(e){this.chunks.push(e)};P2.prototype.onEnd=function(e){e===R1&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Bj.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function SH(e,t){const n=new P2(t);if(n.push(e),n.err)throw n.msg||E0[n.err];return n.result}function Wwt(e,t){return t=t||{},t.raw=!0,SH(e,t)}var qwt=P2,Gwt=SH,Ywt=Wwt,Xwt=SH,Jwt=j2,Zwt={Inflate:qwt,inflate:Gwt,inflateRaw:Ywt,ungzip:Xwt,constants:Jwt};const{Inflate:ebt,inflate:tbt,inflateRaw:gkt,ungzip:ykt}=Zwt;var $X=ebt,nbt=tbt;const dge=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=3988292384^t>>>1:t=t>>>1;dge[e]=t}const zX=4294967295;function rbt(e,t,n){let r=e;for(let i=0;i<n;i++)r=dge[(r^t[i])&255]^r>>>8;return r}function ibt(e,t){return(rbt(zX,e,t)^zX)>>>0}function VX(e,t,n){const r=e.readUint32(),i=ibt(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(i!==r)throw new Error(`CRC mismatch for chunk ${n}. Expected ${r}, found ${i}`)}function Age(e,t,n){for(let r=0;r<n;r++)t[r]=e[r]}function hge(e,t,n,r){let i=0;for(;i<r;i++)t[i]=e[i];for(;i<n;i++)t[i]=e[i]+t[i-r]&255}function fge(e,t,n,r){let i=0;if(n.length===0)for(;i<r;i++)t[i]=e[i];else for(;i<r;i++)t[i]=e[i]+n[i]&255}function pge(e,t,n,r,i){let s=0;if(n.length===0){for(;s<i;s++)t[s]=e[s];for(;s<r;s++)t[s]=e[s]+(t[s-i]>>1)&255}else{for(;s<i;s++)t[s]=e[s]+(n[s]>>1)&255;for(;s<r;s++)t[s]=e[s]+(t[s-i]+n[s]>>1)&255}}function mge(e,t,n,r,i){let s=0;if(n.length===0){for(;s<i;s++)t[s]=e[s];for(;s<r;s++)t[s]=e[s]+t[s-i]&255}else{for(;s<i;s++)t[s]=e[s]+n[s]&255;for(;s<r;s++)t[s]=e[s]+sbt(t[s-i],n[s],n[s-i])&255}}function sbt(e,t,n){const r=e+t-n,i=Math.abs(r-e),s=Math.abs(r-t),a=Math.abs(r-n);return i<=s&&i<=a?e:s<=a?t:n}function abt(e,t,n,r,i,s){switch(e){case 0:Age(t,n,i);break;case 1:hge(t,n,i,s);break;case 2:fge(t,n,r,i);break;case 3:pge(t,n,r,i,s);break;case 4:mge(t,n,r,i,s);break;default:throw new Error(`Unsupported filter: ${e}`)}}const obt=new Uint16Array([255]),lbt=new Uint8Array(obt.buffer),cbt=lbt[0]===255;function ubt(e){const{data:t,width:n,height:r,channels:i,depth:s}=e,a=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],o=Math.ceil(s/8)*i,l=new Uint8Array(r*n*o);let u=0;for(let d=0;d<7;d++){const A=a[d],f=Math.ceil((n-A.x)/A.xStep),h=Math.ceil((r-A.y)/A.yStep);if(f<=0||h<=0)continue;const p=f*o,m=new Uint8Array(p);for(let g=0;g<h;g++){const y=t[u++],v=t.subarray(u,u+p);u+=p;const x=new Uint8Array(p);abt(y,v,x,m,p,o),m.set(x);for(let b=0;b<f;b++){const w=A.x+b*A.xStep,B=A.y+g*A.yStep;if(!(w>=n||B>=r))for(let k=0;k<o;k++)l[(B*n+w)*o+k]=x[b*o+k]}}}if(s===16){const d=new Uint16Array(l.buffer);if(cbt)for(let A=0;A<d.length;A++)d[A]=dbt(d[A]);return d}else return l}function dbt(e){return(e&255)<<8|e>>8&255}const Abt=new Uint16Array([255]),hbt=new Uint8Array(Abt.buffer),fbt=hbt[0]===255,pbt=new Uint8Array(0);function KX(e){const{data:t,width:n,height:r,channels:i,depth:s}=e,a=Math.ceil(s/8)*i,o=Math.ceil(s/8*i*n),l=new Uint8Array(r*o);let u=pbt,d=0,A,f;for(let h=0;h<r;h++){switch(A=t.subarray(d+1,d+1+o),f=l.subarray(h*o,(h+1)*o),t[d]){case 0:Age(A,f,o);break;case 1:hge(A,f,o,a);break;case 2:fge(A,f,u,o);break;case 3:pge(A,f,u,o,a);break;case 4:mge(A,f,u,o,a);break;default:throw new Error(`Unsupported filter: ${t[d]}`)}u=f,d+=o+1}if(s===16){const h=new Uint16Array(l.buffer);if(fbt)for(let p=0;p<h.length;p++)h[p]=mbt(h[p]);return h}else return l}function mbt(e){return(e&255)<<8|e>>8&255}const qB=Uint8Array.of(137,80,78,71,13,10,26,10);function WX(e){if(!gbt(e.readBytes(qB.length)))throw new Error("wrong PNG signature")}function gbt(e){if(e.length<qB.length)return!1;for(let t=0;t<qB.length;t++)if(e[t]!==qB[t])return!1;return!0}const ybt="tEXt",vbt=0,gge=new TextDecoder("latin1");function xbt(e){if(bbt(e),e.length===0||e.length>79)throw new Error("keyword length must be between 1 and 79")}const wbt=/^[\u0000-\u00FF]*$/;function bbt(e){if(!wbt.test(e))throw new Error("invalid latin1 text")}function Cbt(e,t,n){const r=yge(t);e[r]=Sbt(t,n-r.length-1)}function yge(e){for(e.mark();e.readByte()!==vbt;);const t=e.offset;e.reset();const n=gge.decode(e.readBytes(t-e.offset-1));return e.skip(1),xbt(n),n}function Sbt(e,t){return gge.decode(e.readBytes(t))}const eo={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},f4={UNKNOWN:-1,DEFLATE:0},qX={UNKNOWN:-1,ADAPTIVE:0},p4={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},LS={NONE:0,BACKGROUND:1,PREVIOUS:2},m4={SOURCE:0,OVER:1};class Bbt extends gH{constructor(n,r={}){super(n);dn(this,"_checkCrc");dn(this,"_inflator");dn(this,"_png");dn(this,"_apng");dn(this,"_end");dn(this,"_hasPalette");dn(this,"_palette");dn(this,"_hasTransparency");dn(this,"_transparency");dn(this,"_compressionMethod");dn(this,"_filterMethod");dn(this,"_interlaceMethod");dn(this,"_colorType");dn(this,"_isAnimated");dn(this,"_numberOfFrames");dn(this,"_numberOfPlays");dn(this,"_frames");dn(this,"_writingDataChunks");const{checkCrc:i=!1}=r;this._checkCrc=i,this._inflator=new $X,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=f4.UNKNOWN,this._filterMethod=qX.UNKNOWN,this._interlaceMethod=p4.UNKNOWN,this._colorType=eo.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(WX(this);!this._end;){const n=this.readUint32(),r=this.readChars(4);this.decodeChunk(n,r)}return this.decodeImage(),this._png}decodeApng(){for(WX(this);!this._end;){const n=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(n,r)}return this.decodeApngImage(),this._apng}decodeChunk(n,r){const i=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case ybt:Cbt(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?VX(this,n+4,r):this.skip(4)}decodeApngChunk(n,r){const i=this.offset;switch(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,r),this.offset=i+n;break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?VX(this,n+4,r):this.skip(4)}decodeIHDR(){const n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=_bt(this.readUint8());const r=this.readUint8();this._colorType=r;let i;switch(r){case eo.GREYSCALE:i=1;break;case eo.TRUECOLOUR:i=3;break;case eo.INDEXED_COLOUR:i=1;break;case eo.GREYSCALE_ALPHA:i=2;break;case eo.TRUECOLOUR_ALPHA:i=4;break;case eo.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==f4.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const n={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);const r=n/3;this._hasPalette=!0;const i=[];this._palette=i;for(let s=0;s<r;s++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(n){this._writingDataChunks=!0;const r=n,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodeFDAT(n){this._writingDataChunks=!0;let r=n,i=this.offset+this.byteOffset;if(i+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodetRNS(n){switch(this._colorType){case eo.GREYSCALE:case eo.TRUECOLOUR:{if(n%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${n}`);if(n/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let r=0;r<n/2;r++)this._transparency[r]=this.readUint16();break}case eo.INDEXED_COLOUR:{if(n>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${n} vs ${this._palette.length})`);let r=0;for(;r<n;r++){const i=this.readByte();this._palette[r].push(i)}for(;r<this._palette.length;r++)this._palette[r].push(255);break}case eo.UNKNOWN:case eo.GREYSCALE_ALPHA:case eo.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(n){const r=yge(this),i=this.readUint8();if(i!==f4.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${i}`);const s=this.readBytes(n-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:nbt(s)}}decodepHYs(){const n=this.readUint32(),r=this.readUint32(),i=this.readByte();this._png.resolution={x:n,y:r,unit:i}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let n=0;n<this._numberOfFrames;n++){const r={sequenceNumber:this._frames[n].sequenceNumber,delayNumber:this._frames[n].delayNumber,delayDenominator:this._frames[n].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},i=this._frames.at(n);if(i){if(i.data=KX({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),n===0||i.xOffset===0&&i.yOffset===0&&i.width===this._png.width&&i.height===this._png.height)r.data=i.data;else{const s=this._apng.frames.at(n-1);this.disposeFrame(i,s,r),this.addFrameDataToCanvas(r,i)}this._apng.frames.push(r)}}return this._apng}disposeFrame(n,r,i){switch(n.disposeOp){case LS.NONE:break;case LS.BACKGROUND:for(let s=0;s<this._png.height;s++)for(let a=0;a<this._png.width;a++){const o=(s*n.width+a)*this._png.channels;for(let l=0;l<this._png.channels;l++)i.data[o+l]=0}break;case LS.PREVIOUS:i.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(n,r){const i=1<<this._png.depth,s=(a,o)=>{const l=((a+r.yOffset)*this._png.width+r.xOffset+o)*this._png.channels,u=(a*r.width+o)*this._png.channels;return{index:l,frameIndex:u}};switch(r.blendOp){case m4.SOURCE:for(let a=0;a<r.height;a++)for(let o=0;o<r.width;o++){const{index:l,frameIndex:u}=s(a,o);for(let d=0;d<this._png.channels;d++)n.data[l+d]=r.data[u+d]}break;case m4.OVER:for(let a=0;a<r.height;a++)for(let o=0;o<r.width;o++){const{index:l,frameIndex:u}=s(a,o);for(let d=0;d<this._png.channels;d++){const A=r.data[u+this._png.channels-1]/i,f=d%(this._png.channels-1)===0?1:r.data[u+d],h=Math.floor(A*f+(1-A)*n.data[l+d]);n.data[l+d]+=h}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var r;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const n=this._isAnimated?((r=this._frames)==null?void 0:r.at(0)).data:this._inflator.result;if(this._filterMethod!==qX.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===p4.NO_INTERLACE)this._png.data=KX({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===p4.ADAM7)this._png.data=ubt({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const n=this._inflator.result,r=this._frames.at(-1);r?r.data=n:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:LS.NONE,blendOp:m4.SOURCE,data:n}),this._inflator=new $X,this._writingDataChunks=!1}}function _bt(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw new Error(`invalid bit depth: ${e}`);return e}var GX;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.METRE=1]="METRE"})(GX||(GX={}));function kbt(e,t){return new Bbt(e,t).decode()}var Vt=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function g4(){Vt.console&&typeof Vt.console.log=="function"&&Vt.console.log.apply(Vt.console,arguments)}var Gn={log:g4,warn:function(e){Vt.console&&(typeof Vt.console.warn=="function"?Vt.console.warn.apply(Vt.console,arguments):g4.call(null,arguments))},error:function(e){Vt.console&&(typeof Vt.console.error=="function"?Vt.console.error.apply(Vt.console,arguments):g4(e))}};function y4(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Ef(r.response,t,n)},r.onerror=function(){Gn.error("could not download file")},r.send()}function YX(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function RS(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Ef=Vt.saveAs||((typeof window>"u"?"undefined":Dn(window))!=="object"||window!==Vt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,t,n){var r=Vt.URL||Vt.webkitURL,i=document.createElement("a");t=t||e.name||"download",i.download=t,i.rel="noopener",typeof e=="string"?(i.href=e,i.origin!==location.origin?YX(i.href)?y4(e,t,n):RS(i,i.target="_blank"):RS(i)):(i.href=r.createObjectURL(e),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){RS(i)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download",typeof e=="string")if(YX(e))y4(e,t,n);else{var r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){RS(r)})}else navigator.msSaveOrOpenBlob(function(i,s){return s===void 0?s={autoBom:!1}:Dn(s)!=="object"&&(Gn.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}(e,n),t)}:function(e,t,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return y4(e,t,n);var i=e.type==="application/octet-stream",s=/constructor/i.test(Vt.HTMLElement)||Vt.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||i&&s)&&(typeof FileReader>"u"?"undefined":Dn(FileReader))==="object"){var o=new FileReader;o.onloadend=function(){var d=o.result;d=a?d:d.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=d:location=d,r=null},o.readAsDataURL(e)}else{var l=Vt.URL||Vt.webkitURL,u=l.createObjectURL(e);r?r.location=u:location.href=u,r=null,setTimeout(function(){l.revokeObjectURL(u)},4e4)}});/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
* @license Use it if you like it
*/function vge(e){var t;e=e||"",this.ok=!1,e.charAt(0)=="#"&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}],r=0;r<n.length;r++){var i=n[r].re,s=n[r].process,a=i.exec(e);a&&(t=s(a),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var o=this.r.toString(16),l=this.g.toString(16),u=this.b.toString(16);return o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),u.length==1&&(u="0"+u),"#"+o+l+u}}var GB=Vt.atob.bind(Vt),XX=Vt.btoa.bind(Vt);/**
* @license
* Joseph Myers does not specify a particular license for his work.
*
* Author: Joseph Myers
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
*
* Modified by: Owen Leong
*/function v4(e,t){var n=e[0],r=e[1],i=e[2],s=e[3];n=Ns(n,r,i,s,t[0],7,-680876936),s=Ns(s,n,r,i,t[1],12,-389564586),i=Ns(i,s,n,r,t[2],17,606105819),r=Ns(r,i,s,n,t[3],22,-1044525330),n=Ns(n,r,i,s,t[4],7,-176418897),s=Ns(s,n,r,i,t[5],12,1200080426),i=Ns(i,s,n,r,t[6],17,-1473231341),r=Ns(r,i,s,n,t[7],22,-45705983),n=Ns(n,r,i,s,t[8],7,1770035416),s=Ns(s,n,r,i,t[9],12,-1958414417),i=Ns(i,s,n,r,t[10],17,-42063),r=Ns(r,i,s,n,t[11],22,-1990404162),n=Ns(n,r,i,s,t[12],7,1804603682),s=Ns(s,n,r,i,t[13],12,-40341101),i=Ns(i,s,n,r,t[14],17,-1502002290),n=js(n,r=Ns(r,i,s,n,t[15],22,1236535329),i,s,t[1],5,-165796510),s=js(s,n,r,i,t[6],9,-1069501632),i=js(i,s,n,r,t[11],14,643717713),r=js(r,i,s,n,t[0],20,-373897302),n=js(n,r,i,s,t[5],5,-701558691),s=js(s,n,r,i,t[10],9,38016083),i=js(i,s,n,r,t[15],14,-660478335),r=js(r,i,s,n,t[4],20,-405537848),n=js(n,r,i,s,t[9],5,568446438),s=js(s,n,r,i,t[14],9,-1019803690),i=js(i,s,n,r,t[3],14,-187363961),r=js(r,i,s,n,t[8],20,1163531501),n=js(n,r,i,s,t[13],5,-1444681467),s=js(s,n,r,i,t[2],9,-51403784),i=js(i,s,n,r,t[7],14,1735328473),n=Ts(n,r=js(r,i,s,n,t[12],20,-1926607734),i,s,t[5],4,-378558),s=Ts(s,n,r,i,t[8],11,-2022574463),i=Ts(i,s,n,r,t[11],16,1839030562),r=Ts(r,i,s,n,t[14],23,-35309556),n=Ts(n,r,i,s,t[1],4,-1530992060),s=Ts(s,n,r,i,t[4],11,1272893353),i=Ts(i,s,n,r,t[7],16,-155497632),r=Ts(r,i,s,n,t[10],23,-1094730640),n=Ts(n,r,i,s,t[13],4,681279174),s=Ts(s,n,r,i,t[0],11,-358537222),i=Ts(i,s,n,r,t[3],16,-722521979),r=Ts(r,i,s,n,t[6],23,76029189),n=Ts(n,r,i,s,t[9],4,-640364487),s=Ts(s,n,r,i,t[12],11,-421815835),i=Ts(i,s,n,r,t[15],16,530742520),n=Ps(n,r=Ts(r,i,s,n,t[2],23,-995338651),i,s,t[0],6,-198630844),s=Ps(s,n,r,i,t[7],10,1126891415),i=Ps(i,s,n,r,t[14],15,-1416354905),r=Ps(r,i,s,n,t[5],21,-57434055),n=Ps(n,r,i,s,t[12],6,1700485571),s=Ps(s,n,r,i,t[3],10,-1894986606),i=Ps(i,s,n,r,t[10],15,-1051523),r=Ps(r,i,s,n,t[1],21,-2054922799),n=Ps(n,r,i,s,t[8],6,1873313359),s=Ps(s,n,r,i,t[15],10,-30611744),i=Ps(i,s,n,r,t[6],15,-1560198380),r=Ps(r,i,s,n,t[13],21,1309151649),n=Ps(n,r,i,s,t[4],6,-145523070),s=Ps(s,n,r,i,t[11],10,-1120210379),i=Ps(i,s,n,r,t[2],15,718787259),r=Ps(r,i,s,n,t[9],21,-343485551),e[0]=QA(n,e[0]),e[1]=QA(r,e[1]),e[2]=QA(i,e[2]),e[3]=QA(s,e[3])}function kj(e,t,n,r,i,s){return t=QA(QA(t,e),QA(r,s)),QA(t<<i|t>>>32-i,n)}function Ns(e,t,n,r,i,s,a){return kj(t&n|~t&r,e,t,i,s,a)}function js(e,t,n,r,i,s,a){return kj(t&r|n&~r,e,t,i,s,a)}function Ts(e,t,n,r,i,s,a){return kj(t^n^r,e,t,i,s,a)}function Ps(e,t,n,r,i,s,a){return kj(n^(t|~r),e,t,i,s,a)}function xge(e){var t,n=e.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)v4(r,Ebt(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(v4(r,i),t=0;t<16;t++)i[t]=0;return i[14]=8*n,v4(r,i),r}function Ebt(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}var JX="0123456789abcdef".split("");function Nbt(e){for(var t="",n=0;n<4;n++)t+=JX[e>>8*n+4&15]+JX[e>>8*n&15];return t}function jbt(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function DL(e){return xge(e).map(jbt).join("")}var Tbt=function(e){for(var t=0;t<e.length;t++)e[t]=Nbt(e[t]);return e.join("")}(xge("hello"))!="5d41402abc4b2a76b9719d911017c592";function QA(e,t){if(Tbt){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}return e+t&4294967295}/**
* @license
* FPDF is released under a permissive license: there is no usage restriction.
* You may embed it freely in your application (commercial or not), with or
* without modifications.
*
* Reference: http://www.fpdf.org/en/script/script37.php
*/function QL(e,t){var n,r,i,s;if(e!==n){for(var a=(i=e,s=1+(256/e.length|0),new Array(s+1).join(i)),o=[],l=0;l<256;l++)o[l]=l;var u=0;for(l=0;l<256;l++){var d=o[l];u=(u+d+a.charCodeAt(l))%256,o[l]=o[u],o[u]=d}n=e,r=o}else o=r;var A=t.length,f=0,h=0,p="";for(l=0;l<A;l++)h=(h+(d=o[f=(f+1)%256]))%256,o[f]=o[h],o[h]=d,a=o[(o[f]+o[h])%256],p+=String.fromCharCode(t.charCodeAt(l)^a);return p}/**
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
* Author: Owen Leong (@owenl131)
* Date: 15 Oct 2020
* References:
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
* http://www.fpdf.org/en/script/script37.php
*/var ZX={print:4,modify:8,copy:16,"annot-forms":32};function vg(e,t,n,r){this.v=1,this.r=2;var i=192;e.forEach(function(o){if(ZX.perm!==void 0)throw new Error("Invalid permission: "+o);i+=ZX[o]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var s=(t+this.padding).substr(0,32),a=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,a),this.P=-(1+(255^i)),this.encryptionKey=DL(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=QL(this.encryptionKey,this.padding)}function xg(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);t+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):e[r]}return t}function eJ(e){if(Dn(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(n,r,i){if(i=i||!1,typeof n!="string"||typeof r!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(n)||(t[n]={});var s=Math.random().toString(35);return t[n][s]=[r,!!i],s},this.unsubscribe=function(n){for(var r in t)if(t[r][n])return delete t[r][n],Object.keys(t[r]).length===0&&delete t[r],!0;return!1},this.publish=function(n){if(t.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var s in t[n]){var a=t[n][s];try{a[0].apply(e,r)}catch(o){Vt.console&&Gn.error("jsPDF PubSub Error",o.message,o)}a[1]&&i.push(s)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function eN(e){if(!(this instanceof eN))return new eN(e);var t="opacity,stroke-opacity".split(",");for(var n in e)e.hasOwnProperty(n)&&t.indexOf(n)>=0&&(this[n]=e[n]);this.id="",this.objectNumber=-1}function wge(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function If(e,t,n,r,i){if(!(this instanceof If))return new If(e,t,n,r,i);this.type=e==="axial"?2:3,this.coords=t,this.colors=n,wge.call(this,r,i)}function zg(e,t,n,r,i){if(!(this instanceof zg))return new zg(e,t,n,r,i);this.boundingBox=e,this.xStep=t,this.yStep=n,this.stream="",this.cloneIndex=0,wge.call(this,r,i)}function Et(e){var t,n=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],i=arguments[2],s=arguments[3],a=[],o=1,l=16,u="S",d=null;Dn(e=e||{})==="object"&&(n=e.orientation,r=e.unit||r,i=e.format||i,s=e.compress||e.compressPdf||s,(d=e.encryption||null)!==null&&(d.userPassword=d.userPassword||"",d.ownerPassword=d.ownerPassword||"",d.userPermissions=d.userPermissions||[]),o=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(l=e.floatPrecision),u=e.defaultPathOperation||"S"),a=e.filters||(s===!0?["FlateEncode"]:a),r=r||"mm",n=(""+(n||"P")).toLowerCase();var A=e.putOnlyUsedFonts||!1,f={},h={internal:{},__private__:{}};h.__private__.PubSub=eJ;var p="1.3",m=h.__private__.getPdfVersion=function(){return p};h.__private__.setPdfVersion=function(P){p=P};var g={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};h.__private__.getPageFormats=function(){return g};var y=h.__private__.getPageFormat=function(P){return g[P]};i=i||"a4";var v="compat",x="advanced",b=v;function w(){this.saveGraphicsState(),te(new yt(Ge,0,0,-Ge,0,Zh()*Ge).toString()+" cm"),this.setFontSize(this.getFontSize()/Ge),u="n",b=x}function B(){this.restoreGraphicsState(),u="S",b=v}var k=h.__private__.combineFontStyleAndFontWeight=function(P,V){if(P=="bold"&&V=="normal"||P=="bold"&&V==400||P=="normal"&&V=="italic"||P=="bold"&&V=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return V&&(P=V==400||V==="normal"?P==="italic"?"italic":"normal":V!=700&&V!=="bold"||P!=="normal"?(V==700?"bold":V)+""+P:"bold"),P};h.advancedAPI=function(P){var V=b===v;return V&&w.call(this),typeof P!="function"||(P(this),V&&B.call(this)),this},h.compatAPI=function(P){var V=b===x;return V&&B.call(this),typeof P!="function"||(P(this),V&&w.call(this)),this},h.isAdvancedAPI=function(){return b===x};var N,j=function(P){if(b!==x)throw new Error(P+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},L=h.roundToPrecision=h.__private__.roundToPrecision=function(P,V){var ie=t||V;if(isNaN(P)||isNaN(ie))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return P.toFixed(ie).replace(/0+$/,"")};N=h.hpf=h.__private__.hpf=typeof l=="number"?function(P){if(isNaN(P))throw new Error("Invalid argument passed to jsPDF.hpf");return L(P,l)}:l==="smart"?function(P){if(isNaN(P))throw new Error("Invalid argument passed to jsPDF.hpf");return L(P,P>-1&&P<1?16:5)}:function(P){if(isNaN(P))throw new Error("Invalid argument passed to jsPDF.hpf");return L(P,16)};var T=h.f2=h.__private__.f2=function(P){if(isNaN(P))throw new Error("Invalid argument passed to jsPDF.f2");return L(P,2)},E=h.__private__.f3=function(P){if(isNaN(P))throw new Error("Invalid argument passed to jsPDF.f3");return L(P,3)},F=h.scale=h.__private__.scale=function(P){if(isNaN(P))throw new Error("Invalid argument passed to jsPDF.scale");return b===v?P*Ge:b===x?P:void 0},M=function(P){return F(function(V){return b===v?Zh()-V:b===x?V:void 0}(P))};h.__private__.setPrecision=h.setPrecision=function(P){typeof parseInt(P,10)=="number"&&(t=parseInt(P,10))};var D,H="00000000000000000000000000000000",q=h.__private__.getFileId=function(){return H},$=h.__private__.setFileId=function(P){return H=P!==void 0&&/^[a-fA-F0-9]{32}$/.test(P)?P.toUpperCase():H.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),d!==null&&(ns=new vg(d.userPermissions,d.userPassword,d.ownerPassword,H)),H};h.setFileId=function(P){return $(P),this},h.getFileId=function(){return q()};var z=h.__private__.convertDateToPDFDate=function(P){var V=P.getTimezoneOffset(),ie=V<0?"+":"-",he=Math.floor(Math.abs(V/60)),ve=Math.abs(V%60),Ne=[ie,Y(he),"'",Y(ve),"'"].join("");return["D:",P.getFullYear(),Y(P.getMonth()+1),Y(P.getDate()),Y(P.getHours()),Y(P.getMinutes()),Y(P.getSeconds()),Ne].join("")},Q=h.__private__.convertPDFDateToDate=function(P){var V=parseInt(P.substr(2,4),10),ie=parseInt(P.substr(6,2),10)-1,he=parseInt(P.substr(8,2),10),ve=parseInt(P.substr(10,2),10),Ne=parseInt(P.substr(12,2),10),Me=parseInt(P.substr(14,2),10);return new Date(V,ie,he,ve,Ne,Me,0)},ce=h.__private__.setCreationDate=function(P){var V;if(P===void 0&&(P=new Date),P instanceof Date)V=z(P);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(P))throw new Error("Invalid argument passed to jsPDF.setCreationDate");V=P}return D=V},R=h.__private__.getCreationDate=function(P){var V=D;return P==="jsDate"&&(V=Q(D)),V};h.setCreationDate=function(P){return ce(P),this},h.getCreationDate=function(P){return R(P)};var O,Y=h.__private__.padd2=function(P){return("0"+parseInt(P)).slice(-2)},X=h.__private__.padd2Hex=function(P){return("00"+(P=P.toString())).substr(P.length)},K=0,Z=[],ae=[],ue=0,se=[],Ae=[],de=!1,Se=ae;h.__private__.setCustomOutputDestination=function(P){de=!0,Se=P};var Fe=function(P){de||(Se=P)};h.__private__.resetCustomOutputDestination=function(){de=!1,Se=ae};var te=h.__private__.out=function(P){return P=P.toString(),ue+=P.length+1,Se.push(P),Se},ke=h.__private__.write=function(P){return te(arguments.length===1?P.toString():Array.prototype.join.call(arguments," "))},Ze=h.__private__.getArrayBuffer=function(P){for(var V=P.length,ie=new ArrayBuffer(V),he=new Uint8Array(ie);V--;)he[V]=P.charCodeAt(V);return ie},et=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];h.__private__.getStandardFonts=function(){return et};var Te=e.fontSize||16;h.__private__.setFontSize=h.setFontSize=function(P){return Te=b===x?P/Ge:P,this};var st,xe=h.__private__.getFontSize=h.getFontSize=function(){return b===v?Te:Te*Ge},Qe=e.R2L||!1;h.__private__.setR2L=h.setR2L=function(P){return Qe=P,this},h.__private__.getR2L=h.getR2L=function(){return Qe};var ze,Rt=h.__private__.setZoomMode=function(P){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(P))st=P;else if(isNaN(P)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(P)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+P+'" is not recognized.');st=P}else st=parseInt(P,10)};h.__private__.getZoomMode=function(){return st};var dt,ye=h.__private__.setPageMode=function(P){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(P)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+P+'" is not recognized.');ze=P};h.__private__.getPageMode=function(){return ze};var Ee=h.__private__.setLayoutMode=function(P){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(P)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+P+'" is not recognized.');dt=P};h.__private__.getLayoutMode=function(){return dt},h.__private__.setDisplayMode=h.setDisplayMode=function(P,V,ie){return Rt(P),Ee(V),ye(ie),this};var qe={title:"",subject:"",author:"",keywords:"",creator:""};h.__private__.getDocumentProperty=function(P){if(Object.keys(qe).indexOf(P)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return qe[P]},h.__private__.getDocumentProperties=function(){return qe},h.__private__.setDocumentProperties=h.setProperties=h.setDocumentProperties=function(P){for(var V in qe)qe.hasOwnProperty(V)&&P[V]&&(qe[V]=P[V]);return this},h.__private__.setDocumentProperty=function(P,V){if(Object.keys(qe).indexOf(P)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return qe[P]=V};var Ue,Ge,pe,mt,ct,xt={},Ft={},$t=[],At={},Mt={},Pt={},Wt={},Jn=null,en=0,St=[],Nn=new eJ(h),Lt=e.hotfixes||[],qt={},vn={},Ur=[],yt=function P(V,ie,he,ve,Ne,Me){if(!(this instanceof P))return new P(V,ie,he,ve,Ne,Me);isNaN(V)&&(V=1),isNaN(ie)&&(ie=0),isNaN(he)&&(he=0),isNaN(ve)&&(ve=1),isNaN(Ne)&&(Ne=0),isNaN(Me)&&(Me=0),this._matrix=[V,ie,he,ve,Ne,Me]};Object.defineProperty(yt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(P){this._matrix[0]=P}}),Object.defineProperty(yt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(P){this._matrix[1]=P}}),Object.defineProperty(yt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(P){this._matrix[2]=P}}),Object.defineProperty(yt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(P){this._matrix[3]=P}}),Object.defineProperty(yt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(P){this._matrix[4]=P}}),Object.defineProperty(yt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(P){this._matrix[5]=P}}),Object.defineProperty(yt.prototype,"a",{get:function(){return this._matrix[0]},set:function(P){this._matrix[0]=P}}),Object.defineProperty(yt.prototype,"b",{get:function(){return this._matrix[1]},set:function(P){this._matrix[1]=P}}),Object.defineProperty(yt.prototype,"c",{get:function(){return this._matrix[2]},set:function(P){this._matrix[2]=P}}),Object.defineProperty(yt.prototype,"d",{get:function(){return this._matrix[3]},set:function(P){this._matrix[3]=P}}),Object.defineProperty(yt.prototype,"e",{get:function(){return this._matrix[4]},set:function(P){this._matrix[4]=P}}),Object.defineProperty(yt.prototype,"f",{get:function(){return this._matrix[5]},set:function(P){this._matrix[5]=P}}),Object.defineProperty(yt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(yt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(yt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(yt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),yt.prototype.join=function(P){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(N).join(P)},yt.prototype.multiply=function(P){var V=P.sx*this.sx+P.shy*this.shx,ie=P.sx*this.shy+P.shy*this.sy,he=P.shx*this.sx+P.sy*this.shx,ve=P.shx*this.shy+P.sy*this.sy,Ne=P.tx*this.sx+P.ty*this.shx+this.tx,Me=P.tx*this.shy+P.ty*this.sy+this.ty;return new yt(V,ie,he,ve,Ne,Me)},yt.prototype.decompose=function(){var P=this.sx,V=this.shy,ie=this.shx,he=this.sy,ve=this.tx,Ne=this.ty,Me=Math.sqrt(P*P+V*V),vt=(P/=Me)*ie+(V/=Me)*he;ie-=P*vt,he-=V*vt;var gt=Math.sqrt(ie*ie+he*he);return vt/=gt,P*(he/=gt)<V*(ie/=gt)&&(P=-P,V=-V,vt=-vt,Me=-Me),{scale:new yt(Me,0,0,gt,0,0),translate:new yt(1,0,0,1,ve,Ne),rotate:new yt(P,V,-V,P,0,0),skew:new yt(1,0,vt,1,0,0)}},yt.prototype.toString=function(P){return this.join(" ")},yt.prototype.inversed=function(){var P=this.sx,V=this.shy,ie=this.shx,he=this.sy,ve=this.tx,Ne=this.ty,Me=1/(P*he-V*ie),vt=he*Me,gt=-V*Me,Gt=-ie*Me,Jt=P*Me;return new yt(vt,gt,Gt,Jt,-vt*ve-Gt*Ne,-gt*ve-Jt*Ne)},yt.prototype.applyToPoint=function(P){var V=P.x*this.sx+P.y*this.shx+this.tx,ie=P.x*this.shy+P.y*this.sy+this.ty;return new Jh(V,ie)},yt.prototype.applyToRectangle=function(P){var V=this.applyToPoint(P),ie=this.applyToPoint(new Jh(P.x+P.w,P.y+P.h));return new kv(V.x,V.y,ie.x-V.x,ie.y-V.y)},yt.prototype.clone=function(){var P=this.sx,V=this.shy,ie=this.shx,he=this.sy,ve=this.tx,Ne=this.ty;return new yt(P,V,ie,he,ve,Ne)},h.Matrix=yt;var Qi=h.matrixMult=function(P,V){return V.multiply(P)},es=new yt(1,0,0,1,0,0);h.unitMatrix=h.identityMatrix=es;var wr=function(P,V){if(!Mt[P]){var ie=(V instanceof If?"Sh":"P")+(Object.keys(At).length+1).toString(10);V.id=ie,Mt[P]=ie,At[ie]=V,Nn.publish("addPattern",V)}};h.ShadingPattern=If,h.TilingPattern=zg,h.addShadingPattern=function(P,V){return j("addShadingPattern()"),wr(P,V),this},h.beginTilingPattern=function(P){j("beginTilingPattern()"),Ev(P.boundingBox[0],P.boundingBox[1],P.boundingBox[2]-P.boundingBox[0],P.boundingBox[3]-P.boundingBox[1],P.matrix)},h.endTilingPattern=function(P,V){j("endTilingPattern()"),V.stream=Ae[O].join(`
`),wr(P,V),Nn.publish("endTilingPattern",V),Ur.pop().restore()};var Xr,Dr=h.__private__.newObject=function(){var P=Hi();return ts(P,!0),P},Hi=h.__private__.newObjectDeferred=function(){return K++,Z[K]=function(){return ue},K},ts=function(P,V){return V=typeof V=="boolean"&&V,Z[P]=ue,V&&te(P+" 0 obj"),P},qh=h.__private__.newAdditionalObject=function(){var P={objId:Hi(),content:""};return se.push(P),P},Ed=Hi(),xl=Hi(),gc=h.__private__.decodeColorString=function(P){var V=P.split(" ");if(V.length!==2||V[1]!=="g"&&V[1]!=="G")V.length!==5||V[4]!=="k"&&V[4]!=="K"||(V=[(1-V[0])*(1-V[3]),(1-V[1])*(1-V[3]),(1-V[2])*(1-V[3]),"r"]);else{var ie=parseFloat(V[0]);V=[ie,ie,ie,"r"]}for(var he="#",ve=0;ve<3;ve++)he+=("0"+Math.floor(255*parseFloat(V[ve])).toString(16)).slice(-2);return he},wl=h.__private__.encodeColorString=function(P){var V;typeof P=="string"&&(P={ch1:P});var ie=P.ch1,he=P.ch2,ve=P.ch3,Ne=P.ch4,Me=P.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof ie=="string"&&ie.charAt(0)!=="#"){var vt=new vge(ie);if(vt.ok)ie=vt.toHex();else if(!/^\d*\.?\d*$/.test(ie))throw new Error('Invalid color "'+ie+'" passed to jsPDF.encodeColorString.')}if(typeof ie=="string"&&/^#[0-9A-Fa-f]{3}$/.test(ie)&&(ie="#"+ie[1]+ie[1]+ie[2]+ie[2]+ie[3]+ie[3]),typeof ie=="string"&&/^#[0-9A-Fa-f]{6}$/.test(ie)){var gt=parseInt(ie.substr(1),16);ie=gt>>16&255,he=gt>>8&255,ve=255>}if(he===void 0||Ne===void 0&&ie===he&&he===ve)V=typeof ie=="string"?ie+" "+Me[0]:P.precision===2?T(ie/255)+" "+Me[0]:E(ie/255)+" "+Me[0];else if(Ne===void 0||Dn(Ne)==="object"){if(Ne&&!isNaN(Ne.a)&&Ne.a===0)return["1.","1.","1.",Me[1]].join(" ");V=typeof ie=="string"?[ie,he,ve,Me[1]].join(" "):P.precision===2?[T(ie/255),T(he/255),T(ve/255),Me[1]].join(" "):[E(ie/255),E(he/255),E(ve/255),Me[1]].join(" ")}else V=typeof ie=="string"?[ie,he,ve,Ne,Me[2]].join(" "):P.precision===2?[T(ie),T(he),T(ve),T(Ne),Me[2]].join(" "):[E(ie),E(he),E(ve),E(Ne),Me[2]].join(" ");return V},bl=h.__private__.getFilters=function(){return a},ko=h.__private__.putStream=function(P){var V=(P=P||{}).data||"",ie=P.filters||bl(),he=P.alreadyAppliedFilters||[],ve=P.addLength1||!1,Ne=V.length,Me=P.objectId,vt=function(cr){return cr};if(d!==null&&Me===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");d!==null&&(vt=ns.encryptor(Me,0));var gt={};ie===!0&&(ie=["FlateEncode"]);var Gt=P.additionalKeyValues||[],Jt=(gt=Et.API.processDataByFilters!==void 0?Et.API.processDataByFilters(V,ie):{data:V,reverseChain:[]}).reverseChain+(Array.isArray(he)?he.join(" "):he.toString());if(gt.data.length!==0&&(Gt.push({key:"Length",value:gt.data.length}),ve===!0&&Gt.push({key:"Length1",value:Ne})),Jt.length!=0)if(Jt.split("/").length-1==1)Gt.push({key:"Filter",value:Jt});else{Gt.push({key:"Filter",value:"["+Jt+"]"});for(var xn=0;xn<Gt.length;xn+=1)if(Gt[xn].key==="DecodeParms"){for(var fi=[],Wn=0;Wn<gt.reverseChain.split("/").length-1;Wn+=1)fi.push("null");fi.push(Gt[xn].value),Gt[xn].value="["+fi.join(" ")+"]"}}te("<<");for(var $n=0;$n<Gt.length;$n++)te("/"+Gt[$n].key+" "+Gt[$n].value);te(">>"),gt.data.length!==0&&(te("stream"),te(vt(gt.data)),te("endstream"))},Gh=h.__private__.putPage=function(P){var V=P.number,ie=P.data,he=P.objId,ve=P.contentsObjId;ts(he,!0),te("<</Type /Page"),te("/Parent "+P.rootDictionaryObjId+" 0 R"),te("/Resources "+P.resourceDictionaryObjId+" 0 R"),te("/MediaBox ["+parseFloat(N(P.mediaBox.bottomLeftX))+" "+parseFloat(N(P.mediaBox.bottomLeftY))+" "+N(P.mediaBox.topRightX)+" "+N(P.mediaBox.topRightY)+"]"),P.cropBox!==null&&te("/CropBox ["+N(P.cropBox.bottomLeftX)+" "+N(P.cropBox.bottomLeftY)+" "+N(P.cropBox.topRightX)+" "+N(P.cropBox.topRightY)+"]"),P.bleedBox!==null&&te("/BleedBox ["+N(P.bleedBox.bottomLeftX)+" "+N(P.bleedBox.bottomLeftY)+" "+N(P.bleedBox.topRightX)+" "+N(P.bleedBox.topRightY)+"]"),P.trimBox!==null&&te("/TrimBox ["+N(P.trimBox.bottomLeftX)+" "+N(P.trimBox.bottomLeftY)+" "+N(P.trimBox.topRightX)+" "+N(P.trimBox.topRightY)+"]"),P.artBox!==null&&te("/ArtBox ["+N(P.artBox.bottomLeftX)+" "+N(P.artBox.bottomLeftY)+" "+N(P.artBox.topRightX)+" "+N(P.artBox.topRightY)+"]"),typeof P.userUnit=="number"&&P.userUnit!==1&&te("/UserUnit "+P.userUnit),Nn.publish("putPage",{objId:he,pageContext:St[V],pageNumber:V,page:ie}),te("/Contents "+ve+" 0 R"),te(">>"),te("endobj");var Ne=ie.join(`
`);return b===x&&(Ne+=`
Q`),ts(ve,!0),ko({data:Ne,filters:bl(),objectId:ve}),te("endobj"),he},yc=h.__private__.putPages=function(){var P,V,ie=[];for(P=1;P<=en;P++)St[P].objId=Hi(),St[P].contentsObjId=Hi();for(P=1;P<=en;P++)ie.push(Gh({number:P,data:Ae[P],objId:St[P].objId,contentsObjId:St[P].contentsObjId,mediaBox:St[P].mediaBox,cropBox:St[P].cropBox,bleedBox:St[P].bleedBox,trimBox:St[P].trimBox,artBox:St[P].artBox,userUnit:St[P].userUnit,rootDictionaryObjId:Ed,resourceDictionaryObjId:xl}));ts(Ed,!0),te("<</Type /Pages");var he="/Kids [";for(V=0;V<en;V++)he+=ie[V]+" 0 R ";te(he+"]"),te("/Count "+en),te(">>"),te("endobj"),Nn.publish("postPutPages")},Yh=function(P){Nn.publish("putFont",{font:P,out:te,newObject:Dr,putStream:ko}),P.isAlreadyPutted!==!0&&(P.objectNumber=Dr(),te("<<"),te("/Type /Font"),te("/BaseFont /"+xg(P.postScriptName)),te("/Subtype /Type1"),typeof P.encoding=="string"&&te("/Encoding /"+P.encoding),te("/FirstChar 32"),te("/LastChar 255"),te(">>"),te("endobj"))},fm=function(P){P.objectNumber=Dr();var V=[];V.push({key:"Type",value:"/XObject"}),V.push({key:"Subtype",value:"/Form"}),V.push({key:"BBox",value:"["+[N(P.x),N(P.y),N(P.x+P.width),N(P.y+P.height)].join(" ")+"]"}),V.push({key:"Matrix",value:"["+P.matrix.toString()+"]"});var ie=P.pages[1].join(`
`);ko({data:ie,additionalKeyValues:V,objectId:P.objectNumber}),te("endobj")},pm=function(P,V){V||(V=21);var ie=Dr(),he=function(Me,vt){var gt,Gt=[],Jt=1/(vt-1);for(gt=0;gt<1;gt+=Jt)Gt.push(gt);if(Gt.push(1),Me[0].offset!=0){var xn={offset:0,color:Me[0].color};Me.unshift(xn)}if(Me[Me.length-1].offset!=1){var fi={offset:1,color:Me[Me.length-1].color};Me.push(fi)}for(var Wn="",$n=0,cr=0;cr<Gt.length;cr++){for(gt=Gt[cr];gt>Me[$n+1].offset;)$n++;var kr=Me[$n].offset,Er=(gt-kr)/(Me[$n+1].offset-kr),Cs=Me[$n].color,xu=Me[$n+1].color;Wn+=X(Math.round((1-Er)*Cs[0]+Er*xu[0]).toString(16))+X(Math.round((1-Er)*Cs[1]+Er*xu[1]).toString(16))+X(Math.round((1-Er)*Cs[2]+Er*xu[2]).toString(16))}return Wn.trim()}(P.colors,V),ve=[];ve.push({key:"FunctionType",value:"0"}),ve.push({key:"Domain",value:"[0.0 1.0]"}),ve.push({key:"Size",value:"["+V+"]"}),ve.push({key:"BitsPerSample",value:"8"}),ve.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ve.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ko({data:he,additionalKeyValues:ve,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:ie}),te("endobj"),P.objectNumber=Dr(),te("<< /ShadingType "+P.type),te("/ColorSpace /DeviceRGB");var Ne="/Coords ["+N(parseFloat(P.coords[0]))+" "+N(parseFloat(P.coords[1]))+" ";P.type===2?Ne+=N(parseFloat(P.coords[2]))+" "+N(parseFloat(P.coords[3])):Ne+=N(parseFloat(P.coords[2]))+" "+N(parseFloat(P.coords[3]))+" "+N(parseFloat(P.coords[4]))+" "+N(parseFloat(P.coords[5])),te(Ne+="]"),P.matrix&&te("/Matrix ["+P.matrix.toString()+"]"),te("/Function "+ie+" 0 R"),te("/Extend [true true]"),te(">>"),te("endobj")},mm=function(P,V){var ie=Hi(),he=Dr();V.push({resourcesOid:ie,objectOid:he}),P.objectNumber=he;var ve=[];ve.push({key:"Type",value:"/Pattern"}),ve.push({key:"PatternType",value:"1"}),ve.push({key:"PaintType",value:"1"}),ve.push({key:"TilingType",value:"1"}),ve.push({key:"BBox",value:"["+P.boundingBox.map(N).join(" ")+"]"}),ve.push({key:"XStep",value:N(P.xStep)}),ve.push({key:"YStep",value:N(P.yStep)}),ve.push({key:"Resources",value:ie+" 0 R"}),P.matrix&&ve.push({key:"Matrix",value:"["+P.matrix.toString()+"]"}),ko({data:P.stream,additionalKeyValues:ve,objectId:P.objectNumber}),te("endobj")},Rj=function(P){for(var V in P.objectNumber=Dr(),te("<<"),P)switch(V){case"opacity":te("/ca "+T(P[V]));break;case"stroke-opacity":te("/CA "+T(P[V]))}te(">>"),te("endobj")},vv=function(P){ts(P.resourcesOid,!0),te("<<"),te("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var V in te("/Font <<"),xt)xt.hasOwnProperty(V)&&(A===!1||A===!0&&f.hasOwnProperty(V))&&te("/"+V+" "+xt[V].objectNumber+" 0 R");te(">>")}(),function(){if(Object.keys(At).length>0){for(var V in te("/Shading <<"),At)At.hasOwnProperty(V)&&At[V]instanceof If&&At[V].objectNumber>=0&&te("/"+V+" "+At[V].objectNumber+" 0 R");Nn.publish("putShadingPatternDict"),te(">>")}}(),function(V){if(Object.keys(At).length>0){for(var ie in te("/Pattern <<"),At)At.hasOwnProperty(ie)&&At[ie]instanceof h.TilingPattern&&At[ie].objectNumber>=0&&At[ie].objectNumber<V&&te("/"+ie+" "+At[ie].objectNumber+" 0 R");Nn.publish("putTilingPatternDict"),te(">>")}}(P.objectOid),function(){if(Object.keys(Pt).length>0){var V;for(V in te("/ExtGState <<"),Pt)Pt.hasOwnProperty(V)&&Pt[V].objectNumber>=0&&te("/"+V+" "+Pt[V].objectNumber+" 0 R");Nn.publish("putGStateDict"),te(">>")}}(),function(){for(var V in te("/XObject <<"),qt)qt.hasOwnProperty(V)&&qt[V].objectNumber>=0&&te("/"+V+" "+qt[V].objectNumber+" 0 R");Nn.publish("putXobjectDict"),te(">>")}(),te(">>"),te("endobj")},F2=function(P){Ft[P.fontName]=Ft[P.fontName]||{},Ft[P.fontName][P.fontStyle]=P.id},M2=function(P,V,ie,he,ve){var Ne={id:"F"+(Object.keys(xt).length+1).toString(10),postScriptName:P,fontName:V,fontStyle:ie,encoding:he,isStandardFont:ve||!1,metadata:{}};return Nn.publish("addFont",{font:Ne,instance:this}),xt[Ne.id]=Ne,F2(Ne),Ne.id},Eo=h.__private__.pdfEscape=h.pdfEscape=function(P,V){return function(ie,he){var ve,Ne,Me,vt,gt,Gt,Jt,xn,fi;if(Me=(he=he||{}).sourceEncoding||"Unicode",gt=he.outputEncoding,(he.autoencode||gt)&&xt[Ue].metadata&&xt[Ue].metadata[Me]&&xt[Ue].metadata[Me].encoding&&(vt=xt[Ue].metadata[Me].encoding,!gt&&xt[Ue].encoding&&(gt=xt[Ue].encoding),!gt&&vt.codePages&&(gt=vt.codePages[0]),typeof gt=="string"&&(gt=vt[gt]),gt)){for(Jt=!1,Gt=[],ve=0,Ne=ie.length;ve<Ne;ve++)(xn=gt[ie.charCodeAt(ve)])?Gt.push(String.fromCharCode(xn)):Gt.push(ie[ve]),Gt[ve].charCodeAt(0)>>8&&(Jt=!0);ie=Gt.join("")}for(ve=ie.length;Jt===void 0&&ve!==0;)ie.charCodeAt(ve-1)>>8&&(Jt=!0),ve--;if(!Jt)return ie;for(Gt=he.noBOM?[]:[254,255],ve=0,Ne=ie.length;ve<Ne;ve++){if((fi=(xn=ie.charCodeAt(ve))>>8)>>8)throw new Error("Character at position "+ve+" of string '"+ie+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Gt.push(fi),Gt.push(xn-(fi<<8))}return String.fromCharCode.apply(void 0,Gt)}(P,V).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},xv=h.__private__.beginPage=function(P){Ae[++en]=[],St[en]={objId:0,contentsObjId:0,userUnit:Number(o),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(P[0]),topRightY:Number(P[1])}},R2(en),Fe(Ae[O])},L2=function(P,V){var ie,he,ve;switch(n=V||n,typeof P=="string"&&(ie=y(P.toLowerCase()),Array.isArray(ie)&&(he=ie[0],ve=ie[1])),Array.isArray(P)&&(he=P[0]*Ge,ve=P[1]*Ge),isNaN(he)&&(he=i[0],ve=i[1]),(he>14400||ve>14400)&&(Gn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),he=Math.min(14400,he),ve=Math.min(14400,ve)),i=[he,ve],n.substr(0,1)){case"l":ve>he&&(i=[ve,he]);break;case"p":he>ve&&(i=[ve,he])}xv(i),qj(zt),te(bm),Bv!==0&&te(Bv+" J"),Td!==0&&te(Td+" j"),Nn.publish("addPage",{pageNumber:en})},wv=function(P){P>0&&P<=en&&(Ae.splice(P,1),St.splice(P,1),en--,O>en&&(O=en),this.setPage(O))},R2=function(P){P>0&&P<=en&&(O=P)},U2=h.__private__.getNumberOfPages=h.getNumberOfPages=function(){return Ae.length-1},D2=function(P,V,ie){var he,ve=void 0;return ie=ie||{},P=P!==void 0?P:xt[Ue].fontName,V=V!==void 0?V:xt[Ue].fontStyle,he=P.toLowerCase(),Ft[he]!==void 0&&Ft[he][V]!==void 0?ve=Ft[he][V]:Ft[P]!==void 0&&Ft[P][V]!==void 0?ve=Ft[P][V]:ie.disableWarning===!1&&Gn.warn("Unable to look up font label for font '"+P+"', '"+V+"'. Refer to getFontList() for available fonts."),ve||ie.noFallback||(ve=Ft.times[V])==null&&(ve=Ft.times.normal),ve},vc=h.__private__.putInfo=function(){var P=Dr(),V=function(he){return he};for(var ie in d!==null&&(V=ns.encryptor(P,0)),te("<<"),te("/Producer ("+Eo(V("jsPDF "+Et.version))+")"),qe)qe.hasOwnProperty(ie)&&qe[ie]&&te("/"+ie.substr(0,1).toUpperCase()+ie.substr(1)+" ("+Eo(V(qe[ie]))+")");te("/CreationDate ("+Eo(V(D))+")"),te(">>"),te("endobj")},gm=h.__private__.putCatalog=function(P){var V=(P=P||{}).rootDictionaryObjId||Ed;switch(Dr(),te("<<"),te("/Type /Catalog"),te("/Pages "+V+" 0 R"),st||(st="fullwidth"),st){case"fullwidth":te("/OpenAction [3 0 R /FitH null]");break;case"fullheight":te("/OpenAction [3 0 R /FitV null]");break;case"fullpage":te("/OpenAction [3 0 R /Fit]");break;case"original":te("/OpenAction [3 0 R /XYZ null null 1]");break;default:var ie=""+st;ie.substr(ie.length-1)==="%"&&(st=parseInt(st)/100),typeof st=="number"&&te("/OpenAction [3 0 R /XYZ null null "+T(st)+"]")}switch(dt||(dt="continuous"),dt){case"continuous":te("/PageLayout /OneColumn");break;case"single":te("/PageLayout /SinglePage");break;case"two":case"twoleft":te("/PageLayout /TwoColumnLeft");break;case"tworight":te("/PageLayout /TwoColumnRight")}ze&&te("/PageMode /"+ze),Nn.publish("putCatalog"),te(">>"),te("endobj")},Uj=h.__private__.putTrailer=function(){te("trailer"),te("<<"),te("/Size "+(K+1)),te("/Root "+K+" 0 R"),te("/Info "+(K-1)+" 0 R"),d!==null&&te("/Encrypt "+ns.oid+" 0 R"),te("/ID [ <"+H+"> <"+H+"> ]"),te(">>")},hi=h.__private__.putHeader=function(){te("%PDF-"+p),te("%ºß¬à")},Q2=h.__private__.putXRef=function(){var P="0000000000";te("xref"),te("0 "+(K+1)),te("0000000000 65535 f ");for(var V=1;V<=K;V++)typeof Z[V]=="function"?te((P+Z[V]()).slice(-10)+" 00000 n "):Z[V]!==void 0?te((P+Z[V]).slice(-10)+" 00000 n "):te("0000000000 00000 n ")},xc=h.__private__.buildDocument=function(){var P;K=0,ue=0,ae=[],Z=[],se=[],Ed=Hi(),xl=Hi(),Fe(ae),Nn.publish("buildDocument"),hi(),yc(),function(){Nn.publish("putAdditionalObjects");for(var ie=0;ie<se.length;ie++){var he=se[ie];ts(he.objId,!0),te(he.content),te("endobj")}Nn.publish("postPutAdditionalObjects")}(),P=[],function(){for(var ie in xt)xt.hasOwnProperty(ie)&&(A===!1||A===!0&&f.hasOwnProperty(ie))&&Yh(xt[ie])}(),function(){var ie;for(ie in Pt)Pt.hasOwnProperty(ie)&&Rj(Pt[ie])}(),function(){for(var ie in qt)qt.hasOwnProperty(ie)&&fm(qt[ie])}(),function(ie){var he;for(he in At)At.hasOwnProperty(he)&&(At[he]instanceof If?pm(At[he]):At[he]instanceof zg&&mm(At[he],ie))}(P),Nn.publish("putResources"),P.forEach(vv),vv({resourcesOid:xl,objectOid:Number.MAX_SAFE_INTEGER}),Nn.publish("postPutResources"),d!==null&&(ns.oid=Dr(),te("<<"),te("/Filter /Standard"),te("/V "+ns.v),te("/R "+ns.r),te("/U <"+ns.toHexString(ns.U)+">"),te("/O <"+ns.toHexString(ns.O)+">"),te("/P "+ns.P),te(">>"),te("endobj")),vc(),gm();var V=ue;return Q2(),Uj(),te("startxref"),te(""+V),te("%%EOF"),Fe(Ae[O]),ae.join(`
`)},ym=h.__private__.getBlob=function(P){return new Blob([Ze(P)],{type:"application/pdf"})},bv=function(P){for(;P.firstChild;)P.removeChild(P.firstChild)},Ka=function(P){var V,ie=P.document,he=ie.documentElement,ve=ie.head,Ne=ie.body;return ve||(ve=ie.createElement("head"),he.appendChild(ve)),Ne||(Ne=ie.createElement("body"),he.appendChild(Ne)),bv(ve),bv(Ne),(V=ie.createElement("style")).appendChild(ie.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),ve.appendChild(V),{document:ie,body:Ne}},vm=h.output=h.__private__.output=(Xr=function(P,V){switch(typeof(V=V||{})=="string"?V={filename:V}:V.filename=V.filename||"generated.pdf",P){case void 0:return xc();case"save":h.save(V.filename);break;case"arraybuffer":return Ze(xc());case"blob":return ym(xc());case"bloburi":case"bloburl":if(Vt.URL!==void 0&&typeof Vt.URL.createObjectURL=="function")return Vt.URL&&Vt.URL.createObjectURL(ym(xc()))||void 0;Gn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var ie="",he=xc();try{ie=XX(he)}catch{ie=XX(unescape(encodeURIComponent(he)))}return"data:application/pdf;filename="+encodeURIComponent(V.filename)+";base64,"+ie;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Vt)==="[object Window]"){var ve="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",Ne=!V.pdfObjectUrl;Ne||(ve=V.pdfObjectUrl);var Me=Vt.open();if(Me!==null){var vt=Ka(Me),gt=vt.document.createElement("script"),Gt=this;gt.src=ve,Ne&&(gt.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",gt.crossOrigin="anonymous"),gt.onload=function(){Me.PDFObject.embed(Gt.output("dataurlstring"),V)},vt.body.appendChild(gt)}return Me}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Vt)==="[object Window]"){var Jt=V.pdfJsUrl||"examples/PDF.js/web/viewer.html",xn=Vt.open();if(xn!==null){var fi=Ka(xn),Wn=fi.document.createElement("iframe"),$n=Jt.indexOf("?")===-1?"?":"&";Gt=this,Wn.id="pdfViewer",Wn.width="500px",Wn.height="400px",Wn.src=Jt+$n+"file=&downloadName="+encodeURIComponent(V.filename),Wn.onload=function(){xn.document.title=V.filename,Wn.contentWindow.PDFViewerApplication.open(Gt.output("bloburl"))},fi.body.appendChild(Wn)}return xn}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Vt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var cr=Vt.open();if(cr!==null){var kr=Ka(cr),Er=kr.document.createElement("iframe");Er.src=this.output("datauristring",V),kr.body.appendChild(Er),cr.document.title=V.filename}if(cr||typeof safari>"u")return cr;break;case"datauri":case"dataurl":return Vt.document.location.href=this.output("datauristring",V);default:return null}},Xr.foo=function(){try{return Xr.apply(this,arguments)}catch(ie){var P=ie.stack||"";~P.indexOf(" at ")&&(P=P.split(" at ")[1]);var V="Error in function "+P.split(`
`)[0].split("<")[0]+": "+ie.message;if(!Vt.console)throw new Error(V);Vt.console.error(V,ie),Vt.alert&&alert(V)}},Xr.foo.bar=Xr,Xr.foo),pu=function(P){return Array.isArray(Lt)===!0&&Lt.indexOf(P)>-1};switch(r){case"pt":Ge=1;break;case"mm":Ge=72/25.4;break;case"cm":Ge=72/2.54;break;case"in":Ge=72;break;case"px":Ge=pu("px_scaling")==1?.75:96/72;break;case"pc":case"em":Ge=12;break;case"ex":Ge=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);Ge=r}var ns=null;ce(),$();var H2=h.__private__.getPageInfo=h.getPageInfo=function(P){if(isNaN(P)||P%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:St[P].objId,pageNumber:P,pageContext:St[P]}},Dj=h.__private__.getPageInfoByObjId=function(P){if(isNaN(P)||P%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var V in St)if(St[V].objId===P)break;return H2(V)},Qj=h.__private__.getCurrentPageInfo=h.getCurrentPageInfo=function(){return{objId:St[O].objId,pageNumber:O,pageContext:St[O]}};h.addPage=function(){return L2.apply(this,arguments),this},h.setPage=function(){return R2.apply(this,arguments),Fe.call(this,Ae[O]),this},h.insertPage=function(P){return this.addPage(),this.movePage(O,P),this},h.movePage=function(P,V){var ie,he;if(P>V){ie=Ae[P],he=St[P];for(var ve=P;ve>V;ve--)Ae[ve]=Ae[ve-1],St[ve]=St[ve-1];Ae[V]=ie,St[V]=he,this.setPage(V)}else if(P<V){ie=Ae[P],he=St[P];for(var Ne=P;Ne<V;Ne++)Ae[Ne]=Ae[Ne+1],St[Ne]=St[Ne+1];Ae[V]=ie,St[V]=he,this.setPage(V)}return this},h.deletePage=function(){return wv.apply(this,arguments),this},h.__private__.text=h.text=function(P,V,ie,he,ve){var Ne,Me,vt,gt,Gt,Jt,xn,fi,Wn,$n=(he=he||{}).scope||this;if(typeof P=="number"&&typeof V=="number"&&(typeof ie=="string"||Array.isArray(ie))){var cr=ie;ie=V,V=P,P=cr}if(arguments[3]instanceof yt==0?(vt=arguments[4],gt=arguments[5],Dn(xn=arguments[3])==="object"&&xn!==null||(typeof vt=="string"&&(gt=vt,vt=null),typeof xn=="string"&&(gt=xn,xn=null),typeof xn=="number"&&(vt=xn,xn=null),he={flags:xn,angle:vt,align:gt})):(j("The transform parameter of text() with a Matrix value"),Wn=ve),isNaN(V)||isNaN(ie)||P==null)throw new Error("Invalid arguments passed to jsPDF.text");if(P.length===0)return $n;var kr,Er="",Cs=typeof he.lineHeightFactor=="number"?he.lineHeightFactor:Xh,xu=$n.internal.scaleFactor;function Nv(Zn){return Zn=Zn.split(" ").join(Array(he.TabLen||9).join(" ")),Eo(Zn,xn)}function ef(Zn){for(var er,Jr=Zn.concat(),Bi=[],bu=Jr.length;bu--;)typeof(er=Jr.shift())=="string"?Bi.push(er):Array.isArray(Zn)&&(er.length===1||er[1]===void 0&&er[2]===void 0)?Bi.push(er[0]):Bi.push([er[0],er[1],er[2]]);return Bi}function tf(Zn,er){var Jr;if(typeof Zn=="string")Jr=er(Zn)[0];else if(Array.isArray(Zn)){for(var Bi,bu,Fv=Zn.concat(),Om=[],J2=Fv.length;J2--;)typeof(Bi=Fv.shift())=="string"?Om.push(er(Bi)[0]):Array.isArray(Bi)&&typeof Bi[0]=="string"&&(bu=er(Bi[0],Bi[1],Bi[2]),Om.push([bu[0],bu[1],bu[2]]));Jr=Om}return Jr}var Pd=!1,nf=!0;if(typeof P=="string")Pd=!0;else if(Array.isArray(P)){var _m=P.concat();Me=[];for(var km,Ss=_m.length;Ss--;)(typeof(km=_m.shift())!="string"||Array.isArray(km)&&typeof km[0]!="string")&&(nf=!1);Pd=nf}if(Pd===!1)throw new Error('Type of text must be string or Array. "'+P+'" is not recognized.');typeof P=="string"&&(P=P.match(/[\r?\n]/)?P.split(/\r\n|\r|\n/g):[P]);var rf=Te/$n.internal.scaleFactor,sf=rf*(Cs-1);switch(he.baseline){case"bottom":ie-=sf;break;case"top":ie+=rf-sf;break;case"hanging":ie+=rf-2*sf;break;case"middle":ie+=rf/2-sf}if((Jt=he.maxWidth||0)>0&&(typeof P=="string"?P=$n.splitTextToSize(P,Jt):Object.prototype.toString.call(P)==="[object Array]"&&(P=P.reduce(function(Zn,er){return Zn.concat($n.splitTextToSize(er,Jt))},[]))),Ne={text:P,x:V,y:ie,options:he,mutex:{pdfEscape:Eo,activeFontKey:Ue,fonts:xt,activeFontSize:Te}},Nn.publish("preProcessText",Ne),P=Ne.text,vt=(he=Ne.options).angle,Wn instanceof yt==0&&vt&&typeof vt=="number"){vt*=Math.PI/180,he.rotationDirection===0&&(vt=-vt),b===x&&(vt=-vt);var jv=Math.cos(vt),Cc=Math.sin(vt);Wn=new yt(jv,Cc,-Cc,jv,0,0)}else vt&&vt instanceof yt&&(Wn=vt);b!==x||Wn||(Wn=es),(Gt=he.charSpace||Cm)!==void 0&&(Er+=N(F(Gt))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(fi=he.horizontalScale)!==void 0&&(Er+=N(100*fi)+` Tz
`),he.lang;var Ws=-1,Y2=he.renderingMode!==void 0?he.renderingMode:he.stroke,Em=$n.internal.getCurrentPageInfo().pageContext;switch(Y2){case 0:case!1:case"fill":Ws=0;break;case 1:case!0:case"stroke":Ws=1;break;case 2:case"fillThenStroke":Ws=2;break;case 3:case"invisible":Ws=3;break;case 4:case"fillAndAddForClipping":Ws=4;break;case 5:case"strokeAndAddPathForClipping":Ws=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Ws=6;break;case 7:case"addToPathForClipping":Ws=7}var X2=Em.usedRenderingMode!==void 0?Em.usedRenderingMode:-1;Ws!==-1?Er+=Ws+` Tr
`:X2!==-1&&(Er+=`0 Tr
`),Ws!==-1&&(Em.usedRenderingMode=Ws),gt=he.align||"left";var No,af=Te*Cs,Tv=$n.internal.pageSize.getWidth(),Nm=xt[Ue];Gt=he.charSpace||Cm,Jt=he.maxWidth||0,xn=Object.assign({autoencode:!0,noBOM:!0},he.flags);var of=[],Pv=function(Zn){return $n.getStringUnitWidth(Zn,{font:Nm,charSpace:Gt,fontSize:Te,doKerning:!1})*Te/xu};if(Object.prototype.toString.call(P)==="[object Array]"){var qs;Me=ef(P),gt!=="left"&&(No=Me.map(Pv));var va,jm=0;if(gt==="right"){V-=No[0],P=[],Ss=Me.length;for(var Id=0;Id<Ss;Id++)Id===0?(va=mu(V),qs=gu(ie)):(va=F(jm-No[Id]),qs=-af),P.push([Me[Id],va,qs]),jm=No[Id]}else if(gt==="center"){V-=No[0]/2,P=[],Ss=Me.length;for(var Od=0;Od<Ss;Od++)Od===0?(va=mu(V),qs=gu(ie)):(va=F((jm-No[Od])/2),qs=-af),P.push([Me[Od],va,qs]),jm=No[Od]}else if(gt==="left"){P=[],Ss=Me.length;for(var Tm=0;Tm<Ss;Tm++)P.push(Me[Tm])}else if(gt==="justify"&&Nm.encoding==="Identity-H"){P=[],Ss=Me.length,Jt=Jt!==0?Jt:Tv;for(var lf=0,pi=0;pi<Ss;pi++)if(qs=pi===0?gu(ie):-af,va=pi===0?mu(V):lf,pi<Ss-1){var nT=F((Jt-No[pi])/(Me[pi].split(" ").length-1)),Sc=Me[pi].split(" ");P.push([Sc[0]+" ",va,qs]),lf=0;for(var Cl=1;Cl<Sc.length;Cl++){var cf=(Pv(Sc[Cl-1]+" "+Sc[Cl])-Pv(Sc[Cl]))*xu+nT;Cl==Sc.length-1?P.push([Sc[Cl],cf,0]):P.push([Sc[Cl]+" ",cf,0]),lf-=cf}}else P.push([Me[pi],va,qs]);P.push(["",lf,0])}else{if(gt!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(P=[],Ss=Me.length,Jt=Jt!==0?Jt:Tv,pi=0;pi<Ss;pi++){qs=pi===0?gu(ie):-af,va=pi===0?mu(V):0;var Iv=Me[pi].split(" ").length-1,Ov=Iv>0?(Jt-No[pi])/Iv:0;pi<Ss-1?of.push(N(F(Ov))):of.push(0),P.push([Me[pi],va,qs])}}}(typeof he.R2L=="boolean"?he.R2L:Qe)===!0&&(P=tf(P,function(Zn,er,Jr){return[Zn.split("").reverse().join(""),er,Jr]})),Ne={text:P,x:V,y:ie,options:he,mutex:{pdfEscape:Eo,activeFontKey:Ue,fonts:xt,activeFontSize:Te}},Nn.publish("postProcessText",Ne),P=Ne.text,kr=Ne.mutex.isHex||!1;var Pm=xt[Ue].encoding;Pm!=="WinAnsiEncoding"&&Pm!=="StandardEncoding"||(P=tf(P,function(Zn,er,Jr){return[Nv(Zn),er,Jr]})),Me=ef(P),P=[];for(var uf,df,Fd,wu=Array.isArray(Me[0])?1:0,Md="",Im=function(Zn,er,Jr){var Bi="";return Jr instanceof yt?(Jr=typeof he.angle=="number"?Qi(Jr,new yt(1,0,0,1,Zn,er)):Qi(new yt(1,0,0,1,Zn,er),Jr),b===x&&(Jr=Qi(new yt(1,0,0,-1,0,0),Jr)),Bi=Jr.join(" ")+` Tm
`):Bi=N(Zn)+" "+N(er)+` Td
`,Bi},Bs=0;Bs<Me.length;Bs++){switch(Md="",wu){case 1:Fd=(kr?"<":"(")+Me[Bs][0]+(kr?">":")"),uf=parseFloat(Me[Bs][1]),df=parseFloat(Me[Bs][2]);break;case 0:Fd=(kr?"<":"(")+Me[Bs]+(kr?">":")"),uf=mu(V),df=gu(ie)}of!==void 0&&of[Bs]!==void 0&&(Md=of[Bs]+` Tw
`),Bs===0?P.push(Md+Im(uf,df,Wn)+Fd):wu===0?P.push(Md+Fd):wu===1&&P.push(Md+Im(uf,df,Wn)+Fd)}P=wu===0?P.join(` Tj
T* `):P.join(` Tj
`),P+=` Tj
`;var Bc=`BT
/`;return Bc+=Ue+" "+Te+` Tf
`,Bc+=N(Te*Cs)+` TL
`,Bc+=bc+`
`,Bc+=Er,Bc+=P,te(Bc+="ET"),f[Ue]=!0,$n};var Hj=h.__private__.clip=h.clip=function(P){return te(P==="evenodd"?"W*":"W"),this};h.clipEvenOdd=function(){return Hj("evenodd")},h.__private__.discardPath=h.discardPath=function(){return te("n"),this};var wc=h.__private__.isValidStyle=function(P){var V=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(P)!==-1&&(V=!0),V};h.__private__.setDefaultPathOperation=h.setDefaultPathOperation=function(P){return wc(P)&&(u=P),this};var $2=h.__private__.getStyle=h.getStyle=function(P){var V=u;switch(P){case"D":case"S":V="S";break;case"F":V="f";break;case"FD":case"DF":V="B";break;case"f":case"f*":case"B":case"B*":V=P}return V},xm=h.close=function(){return te("h"),this};h.stroke=function(){return te("S"),this},h.fill=function(P){return wm("f",P),this},h.fillEvenOdd=function(P){return wm("f*",P),this},h.fillStroke=function(P){return wm("B",P),this},h.fillStrokeEvenOdd=function(P){return wm("B*",P),this};var wm=function(P,V){Dn(V)==="object"?zj(V,P):te(P)},Cv=function(P){P===null||b===x&&P===void 0||(P=$2(P),te(P))};function $j(P,V,ie,he,ve){var Ne=new zg(V||this.boundingBox,ie||this.xStep,he||this.yStep,this.gState,ve||this.matrix);Ne.stream=this.stream;var Me=P+"$$"+this.cloneIndex+++"$$";return wr(Me,Ne),Ne}var zj=function(P,V){var ie=Mt[P.key],he=At[ie];if(he instanceof If)te("q"),te(Vj(V)),he.gState&&h.setGState(he.gState),te(P.matrix.toString()+" cm"),te("/"+ie+" sh"),te("Q");else if(he instanceof zg){var ve=new yt(1,0,0,-1,0,Zh());P.matrix&&(ve=ve.multiply(P.matrix||es),ie=$j.call(he,P.key,P.boundingBox,P.xStep,P.yStep,ve).id),te("q"),te("/Pattern cs"),te("/"+ie+" scn"),he.gState&&h.setGState(he.gState),te(V),te("Q")}},Vj=function(P){switch(P){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Nd=h.moveTo=function(P,V){return te(N(F(P))+" "+N(M(V))+" m"),this},z2=h.lineTo=function(P,V){return te(N(F(P))+" "+N(M(V))+" l"),this},jd=h.curveTo=function(P,V,ie,he,ve,Ne){return te([N(F(P)),N(M(V)),N(F(ie)),N(M(he)),N(F(ve)),N(M(Ne)),"c"].join(" ")),this};h.__private__.line=h.line=function(P,V,ie,he,ve){if(isNaN(P)||isNaN(V)||isNaN(ie)||isNaN(he)||!wc(ve))throw new Error("Invalid arguments passed to jsPDF.line");return b===v?this.lines([[ie-P,he-V]],P,V,[1,1],ve||"S"):this.lines([[ie-P,he-V]],P,V,[1,1]).stroke()},h.__private__.lines=h.lines=function(P,V,ie,he,ve,Ne){var Me,vt,gt,Gt,Jt,xn,fi,Wn,$n,cr,kr,Er;if(typeof P=="number"&&(Er=ie,ie=V,V=P,P=Er),he=he||[1,1],Ne=Ne||!1,isNaN(V)||isNaN(ie)||!Array.isArray(P)||!Array.isArray(he)||!wc(ve)||typeof Ne!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Nd(V,ie),Me=he[0],vt=he[1],Gt=P.length,cr=V,kr=ie,gt=0;gt<Gt;gt++)(Jt=P[gt]).length===2?(cr=Jt[0]*Me+cr,kr=Jt[1]*vt+kr,z2(cr,kr)):(xn=Jt[0]*Me+cr,fi=Jt[1]*vt+kr,Wn=Jt[2]*Me+cr,$n=Jt[3]*vt+kr,cr=Jt[4]*Me+cr,kr=Jt[5]*vt+kr,jd(xn,fi,Wn,$n,cr,kr));return Ne&&xm(),Cv(ve),this},h.path=function(P){for(var V=0;V<P.length;V++){var ie=P[V],he=ie.c;switch(ie.op){case"m":Nd(he[0],he[1]);break;case"l":z2(he[0],he[1]);break;case"c":jd.apply(this,he);break;case"h":xm()}}return this},h.__private__.rect=h.rect=function(P,V,ie,he,ve){if(isNaN(P)||isNaN(V)||isNaN(ie)||isNaN(he)||!wc(ve))throw new Error("Invalid arguments passed to jsPDF.rect");return b===v&&(he=-he),te([N(F(P)),N(M(V)),N(F(ie)),N(F(he)),"re"].join(" ")),Cv(ve),this},h.__private__.triangle=h.triangle=function(P,V,ie,he,ve,Ne,Me){if(isNaN(P)||isNaN(V)||isNaN(ie)||isNaN(he)||isNaN(ve)||isNaN(Ne)||!wc(Me))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[ie-P,he-V],[ve-ie,Ne-he],[P-ve,V-Ne]],P,V,[1,1],Me,!0),this},h.__private__.roundedRect=h.roundedRect=function(P,V,ie,he,ve,Ne,Me){if(isNaN(P)||isNaN(V)||isNaN(ie)||isNaN(he)||isNaN(ve)||isNaN(Ne)||!wc(Me))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var vt=4/3*(Math.SQRT2-1);return ve=Math.min(ve,.5*ie),Ne=Math.min(Ne,.5*he),this.lines([[ie-2*ve,0],[ve*vt,0,ve,Ne-Ne*vt,ve,Ne],[0,he-2*Ne],[0,Ne*vt,-ve*vt,Ne,-ve,Ne],[2*ve-ie,0],[-ve*vt,0,-ve,-Ne*vt,-ve,-Ne],[0,2*Ne-he],[0,-Ne*vt,ve*vt,-Ne,ve,-Ne]],P+ve,V,[1,1],Me,!0),this},h.__private__.ellipse=h.ellipse=function(P,V,ie,he,ve){if(isNaN(P)||isNaN(V)||isNaN(ie)||isNaN(he)||!wc(ve))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Ne=4/3*(Math.SQRT2-1)*ie,Me=4/3*(Math.SQRT2-1)*he;return Nd(P+ie,V),jd(P+ie,V-Me,P+Ne,V-he,P,V-he),jd(P-Ne,V-he,P-ie,V-Me,P-ie,V),jd(P-ie,V+Me,P-Ne,V+he,P,V+he),jd(P+Ne,V+he,P+ie,V+Me,P+ie,V),Cv(ve),this},h.__private__.circle=h.circle=function(P,V,ie,he){if(isNaN(P)||isNaN(V)||isNaN(ie)||!wc(he))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(P,V,ie,ie,he)},h.setFont=function(P,V,ie){return ie&&(V=k(V,ie)),Ue=D2(P,V,{disableWarning:!1}),this};var Kj=h.__private__.getFont=h.getFont=function(){return xt[D2.apply(h,arguments)]};h.__private__.getFontList=h.getFontList=function(){var P,V,ie={};for(P in Ft)if(Ft.hasOwnProperty(P))for(V in ie[P]=[],Ft[P])Ft[P].hasOwnProperty(V)&&ie[P].push(V);return ie},h.addFont=function(P,V,ie,he,ve){var Ne=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Ne.indexOf(arguments[3])!==-1?ve=arguments[3]:arguments[3]&&Ne.indexOf(arguments[3])==-1&&(ie=k(ie,he)),M2.call(this,P,V,ie,ve=ve||"Identity-H")};var Xh,zt=e.lineWidth||.200025,Wj=h.__private__.getLineWidth=h.getLineWidth=function(){return zt},qj=h.__private__.setLineWidth=h.setLineWidth=function(P){return zt=P,te(N(F(P))+" w"),this};h.__private__.setLineDash=Et.API.setLineDash=Et.API.setLineDashPattern=function(P,V){if(P=P||[],V=V||0,isNaN(V)||!Array.isArray(P))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return P=P.map(function(ie){return N(F(ie))}).join(" "),V=N(F(V)),te("["+P+"] "+V+" d"),this};var Gj=h.__private__.getLineHeight=h.getLineHeight=function(){return Te*Xh};h.__private__.getLineHeight=h.getLineHeight=function(){return Te*Xh};var Yj=h.__private__.setLineHeightFactor=h.setLineHeightFactor=function(P){return typeof(P=P||1.15)=="number"&&(Xh=P),this},Xj=h.__private__.getLineHeightFactor=h.getLineHeightFactor=function(){return Xh};Yj(e.lineHeight);var mu=h.__private__.getHorizontalCoordinate=function(P){return F(P)},gu=h.__private__.getVerticalCoordinate=function(P){return b===x?P:St[O].mediaBox.topRightY-St[O].mediaBox.bottomLeftY-F(P)},Jj=h.__private__.getHorizontalCoordinateString=h.getHorizontalCoordinateString=function(P){return N(mu(P))},Zj=h.__private__.getVerticalCoordinateString=h.getVerticalCoordinateString=function(P){return N(gu(P))},bm=e.strokeColor||"0 G";h.__private__.getStrokeColor=h.getDrawColor=function(){return gc(bm)},h.__private__.setStrokeColor=h.setDrawColor=function(P,V,ie,he){return bm=wl({ch1:P,ch2:V,ch3:ie,ch4:he,pdfColorType:"draw",precision:2}),te(bm),this};var Sv=e.fillColor||"0 g";h.__private__.getFillColor=h.getFillColor=function(){return gc(Sv)},h.__private__.setFillColor=h.setFillColor=function(P,V,ie,he){return Sv=wl({ch1:P,ch2:V,ch3:ie,ch4:he,pdfColorType:"fill",precision:2}),te(Sv),this};var bc=e.textColor||"0 g",eT=h.__private__.getTextColor=h.getTextColor=function(){return gc(bc)};h.__private__.setTextColor=h.setTextColor=function(P,V,ie,he){return bc=wl({ch1:P,ch2:V,ch3:ie,ch4:he,pdfColorType:"text",precision:3}),this};var Cm=e.charSpace,tT=h.__private__.getCharSpace=h.getCharSpace=function(){return parseFloat(Cm||0)};h.__private__.setCharSpace=h.setCharSpace=function(P){if(isNaN(P))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Cm=P,this};var Bv=0;h.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},h.__private__.setLineCap=h.setLineCap=function(P){var V=h.CapJoinStyles[P];if(V===void 0)throw new Error("Line cap style of '"+P+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Bv=V,te(V+" J"),this};var Td=0;h.__private__.setLineJoin=h.setLineJoin=function(P){var V=h.CapJoinStyles[P];if(V===void 0)throw new Error("Line join style of '"+P+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Td=V,te(V+" j"),this},h.__private__.setLineMiterLimit=h.__private__.setMiterLimit=h.setLineMiterLimit=h.setMiterLimit=function(P){if(P=P||0,isNaN(P))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return te(N(F(P))+" M"),this},h.GState=eN,h.setGState=function(P){(P=typeof P=="string"?Pt[Wt[P]]:_v(null,P)).equals(Jn)||(te("/"+P.id+" gs"),Jn=P)};var _v=function(P,V){if(!P||!Wt[P]){var ie=!1;for(var he in Pt)if(Pt.hasOwnProperty(he)&&Pt[he].equals(V)){ie=!0;break}if(ie)V=Pt[he];else{var ve="GS"+(Object.keys(Pt).length+1).toString(10);Pt[ve]=V,V.id=ve}return P&&(Wt[P]=V.id),Nn.publish("addGState",V),V}};h.addGState=function(P,V){return _v(P,V),this},h.saveGraphicsState=function(){return te("q"),$t.push({key:Ue,size:Te,color:bc}),this},h.restoreGraphicsState=function(){te("Q");var P=$t.pop();return Ue=P.key,Te=P.size,bc=P.color,Jn=null,this},h.setCurrentTransformationMatrix=function(P){return te(P.toString()+" cm"),this},h.comment=function(P){return te("#"+P),this};var Jh=function(P,V){var ie=P||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return ie},set:function(Ne){isNaN(Ne)||(ie=parseFloat(Ne))}});var he=V||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return he},set:function(Ne){isNaN(Ne)||(he=parseFloat(Ne))}});var ve="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return ve},set:function(Ne){ve=Ne.toString()}}),this},kv=function(P,V,ie,he){Jh.call(this,P,V),this.type="rect";var ve=ie||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return ve},set:function(Me){isNaN(Me)||(ve=parseFloat(Me))}});var Ne=he||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Ne},set:function(Me){isNaN(Me)||(Ne=parseFloat(Me))}}),this},Sm=function(){this.page=en,this.currentPage=O,this.pages=Ae.slice(0),this.pagesContext=St.slice(0),this.x=pe,this.y=mt,this.matrix=ct,this.width=V2(O),this.height=vu(O),this.outputDestination=Se,this.id="",this.objectNumber=-1};Sm.prototype.restore=function(){en=this.page,O=this.currentPage,St=this.pagesContext,Ae=this.pages,pe=this.x,mt=this.y,ct=this.matrix,yu(O,this.width),K2(O,this.height),Se=this.outputDestination};var Ev=function(P,V,ie,he,ve){Ur.push(new Sm),en=O=0,Ae=[],pe=P,mt=V,ct=ve,xv([ie,he])};for(var Bm in h.beginFormObject=function(P,V,ie,he,ve){return Ev(P,V,ie,he,ve),this},h.endFormObject=function(P){return function(V){if(vn[V])Ur.pop().restore();else{var ie=new Sm,he="Xo"+(Object.keys(qt).length+1).toString(10);ie.id=he,vn[V]=he,qt[he]=ie,Nn.publish("addFormObject",ie),Ur.pop().restore()}}(P),this},h.doFormObject=function(P,V){var ie=qt[vn[P]];return te("q"),te(V.toString()+" cm"),te("/"+ie.id+" Do"),te("Q"),this},h.getFormObject=function(P){var V=qt[vn[P]];return{x:V.x,y:V.y,width:V.width,height:V.height,matrix:V.matrix}},h.save=function(P,V){return P=P||"generated.pdf",(V=V||{}).returnPromise=V.returnPromise||!1,V.returnPromise===!1?(Ef(ym(xc()),P),typeof Ef.unload=="function"&&Vt.setTimeout&&setTimeout(Ef.unload,911),this):new Promise(function(ie,he){try{var ve=Ef(ym(xc()),P);typeof Ef.unload=="function"&&Vt.setTimeout&&setTimeout(Ef.unload,911),ie(ve)}catch(Ne){he(Ne.message)}})},Et.API)Et.API.hasOwnProperty(Bm)&&(Bm==="events"&&Et.API.events.length?function(P,V){var ie,he,ve;for(ve=V.length-1;ve!==-1;ve--)ie=V[ve][0],he=V[ve][1],P.subscribe.apply(P,[ie].concat(typeof he=="function"?[he]:he))}(Nn,Et.API.events):h[Bm]=Et.API[Bm]);function V2(P){return St[P].mediaBox.topRightX-St[P].mediaBox.bottomLeftX}function yu(P,V){St[P].mediaBox.topRightX=V+St[P].mediaBox.bottomLeftX}function vu(P){return St[P].mediaBox.topRightY-St[P].mediaBox.bottomLeftY}function K2(P,V){St[P].mediaBox.topRightY=V+St[P].mediaBox.bottomLeftY}var W2=h.getPageWidth=function(P){return V2(P=P||O)/Ge},q2=h.setPageWidth=function(P,V){yu(P,V*Ge)},Zh=h.getPageHeight=function(P){return vu(P=P||O)/Ge},G2=h.setPageHeight=function(P,V){K2(P,V*Ge)};return h.internal={pdfEscape:Eo,getStyle:$2,getFont:Kj,getFontSize:xe,getCharSpace:tT,getTextColor:eT,getLineHeight:Gj,getLineHeightFactor:Xj,getLineWidth:Wj,write:ke,getHorizontalCoordinate:mu,getVerticalCoordinate:gu,getCoordinateString:Jj,getVerticalCoordinateString:Zj,collections:{},newObject:Dr,newAdditionalObject:qh,newObjectDeferred:Hi,newObjectDeferredBegin:ts,getFilters:bl,putStream:ko,events:Nn,scaleFactor:Ge,pageSize:{getWidth:function(){return W2(O)},setWidth:function(P){q2(O,P)},getHeight:function(){return Zh(O)},setHeight:function(P){G2(O,P)}},encryptionOptions:d,encryption:ns,getEncryptor:function(P){return d!==null?ns.encryptor(P,0):function(V){return V}},output:vm,getNumberOfPages:U2,get pages(){return Ae},out:te,f2:T,f3:E,getPageInfo:H2,getPageInfoByObjId:Dj,getCurrentPageInfo:Qj,getPDFVersion:m,Point:Jh,Rectangle:kv,Matrix:yt,hasHotfix:pu},Object.defineProperty(h.internal.pageSize,"width",{get:function(){return W2(O)},set:function(P){q2(O,P)},enumerable:!0,configurable:!0}),Object.defineProperty(h.internal.pageSize,"height",{get:function(){return Zh(O)},set:function(P){G2(O,P)},enumerable:!0,configurable:!0}),(function(P){for(var V=0,ie=et.length;V<ie;V++){var he=M2.call(this,P[V][0],P[V][1],P[V][2],et[V][3],!0);A===!1&&(f[he]=!0);var ve=P[V][0].split("-");F2({id:he,fontName:ve[0],fontStyle:ve[1]||""})}Nn.publish("addFonts",{fonts:xt,dictionary:Ft})}).call(h,et),Ue="F1",L2(i,n),Nn.publish("initialized"),h}vg.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},vg.prototype.toHexString=function(e){return e.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},vg.prototype.hexToBytes=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(String.fromCharCode(parseInt(e.substr(n,2),16)));return t.join("")},vg.prototype.processOwnerPassword=function(e,t){return QL(DL(t).substr(0,5),e)},vg.prototype.encryptor=function(e,t){var n=DL(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(r){return QL(n,r)}},eN.prototype.equals=function(e){var t,n="id,objectNumber,equals";if(!e||Dn(e)!==Dn(this))return!1;var r=0;for(t in this)if(!(n.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;r++}for(t in e)e.hasOwnProperty(t)&&n.indexOf(t)<0&&r--;return r===0},Et.API={events:[]},Et.version="4.2.1";var Vr=Et.API,BH=1,hm=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},sg=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Jp=function(e){return e.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(t){var n=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(n.length===1?"0"+n:n)})},Xt=function(e){return e.toFixed(2)},Zd=function(e){return e.toFixed(5)};Vr.__acroform__={};var Va=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},tJ=function(e){return e*BH},Nc=function(e){var t=new Cge,n=ft.internal.getHeight(e)||0,r=ft.internal.getWidth(e)||0;return t.BBox=[0,0,Number(Xt(r)),Number(Xt(n))],t},Pbt=Vr.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},Ibt=Vr.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},Obt=Vr.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<t?1:0},oi=Vr.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Obt(e,t-1)},li=Vr.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Pbt(e,t-1)},ci=Vr.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Ibt(e,t-1)},Fbt=Vr.__acroform__.calculateCoordinates=function(e,t){var n=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,i=e[0],s=e[1],a=e[2],o=e[3],l={};return l.lowerLeft_X=n(i)||0,l.lowerLeft_Y=r(s+o)||0,l.upperRight_X=n(i+a)||0,l.upperRight_Y=r(s)||0,[Number(Xt(l.lowerLeft_X)),Number(Xt(l.lowerLeft_Y)),Number(Xt(l.upperRight_X)),Number(Xt(l.upperRight_Y))]},Mbt=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],n=e._V||e.DV,r=HL(e,n),i=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+i+" "+Xt(r.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC");var s=Nc(e);return s.scope=e.scope,s.stream=t.join(`
`),s}},HL=function(e,t){var n=e.fontSize===0?e.maxFontSize:e.fontSize,r={text:"",fontSize:""},i=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");i=e.multiline?i.map(function(T){return T.split(`
`)}):i.map(function(T){return[T]});var s=n,a=ft.internal.getHeight(e)||0;a=a<0?-a:a;var o=ft.internal.getWidth(e)||0;o=o<0?-o:o;var l=function(T,E,F){if(T+1<i.length){var M=E+" "+i[T+1][0];return US(M,e,F).width<=o-4}return!1};s++;e:for(;s>0;){t="",s--;var u,d,A=US("3",e,s).height,f=e.multiline?a-s:(a-A)/2,h=f+=2,p=0,m=0,g=0;if(s<=0){t=`(...) Tj
`,t+="% Width of Text: "+US(t,e,s=12).width+", FieldWidth:"+o+`
`;break}for(var y="",v=0,x=0;x<i.length;x++)if(i.hasOwnProperty(x)){var b=!1;if(i[x].length!==1&&g!==i[x].length-1){if((A+2)*(v+2)+2>a)continue e;y+=i[x][g],b=!0,m=x,x--}else{y=(y+=i[x][g]+" ").substr(y.length-1)==" "?y.substr(0,y.length-1):y;var w=parseInt(x),B=l(w,y,s),k=x>=i.length-1;if(B&&!k){y+=" ",g=0;continue}if(B||k){if(k)m=w;else if(e.multiline&&(A+2)*(v+2)+2>a)continue e}else{if(!e.multiline||(A+2)*(v+2)+2>a)continue e;m=w}}for(var N="",j=p;j<=m;j++){var L=i[j];if(e.multiline){if(j===m){N+=L[g]+" ",g=(g+1)%L.length;continue}if(j===p){N+=L[L.length-1]+" ";continue}}N+=L[0]+" "}switch(N=N.substr(N.length-1)==" "?N.substr(0,N.length-1):N,d=US(N,e,s).width,e.textAlign){case"right":u=o-d-2;break;case"center":u=(o-d)/2;break;default:u=2}t+=Xt(u)+" "+Xt(h)+` Td
`,t+="("+hm(N)+`) Tj
`,t+=-Xt(u)+` 0 Td
`,h=-(s+2),d=0,p=b?m:m+1,v++,y=""}break}return r.text=t,r.fontSize=s,r},US=function(e,t,n){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},Lbt={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Rbt=function(e,t){var n={type:"reference",object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(r){return r.type===n.type&&r.object===n.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(n)},Ubt=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if(fc.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(Lbt)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");BH=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new Sge,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(n){n.internal.events.unsubscribe(n.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete n.internal.acroformPlugin.acroFormDictionaryRoot._eventID,n.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(n){n.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=n.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];s.objId=void 0,s.hasAnnotation&&Rbt(s,n)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(n){if(n.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");n.internal.write("/AcroForm "+n.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(n){(function(r,i){var s=!r;for(var a in r||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(a)){var o=r[a],l=[],u=o.Rect;if(o.Rect&&(o.Rect=Fbt(o.Rect,i)),i.internal.newObjectDeferredBegin(o.objId,!0),o.DA=ft.createDefaultAppearanceStream(o),Dn(o)==="object"&&typeof o.getKeyValueListForStream=="function"&&(l=o.getKeyValueListForStream()),o.Rect=u,o.hasAppearanceStream&&!o.appearanceStreamContent){var d=Mbt(o);l.push({key:"AP",value:"<</N "+d+">>"}),i.internal.acroformPlugin.xForms.push(d)}if(o.appearanceStreamContent){var A="";for(var f in o.appearanceStreamContent)if(o.appearanceStreamContent.hasOwnProperty(f)){var h=o.appearanceStreamContent[f];if(A+="/"+f+" ",A+="<<",Object.keys(h).length>=1||Array.isArray(h)){for(var a in h)if(h.hasOwnProperty(a)){var p=h[a];typeof p=="function"&&(p=p.call(i,o)),A+="/"+a+" "+p+" ",i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p)}}else typeof(p=h)=="function"&&(p=p.call(i,o)),A+="/"+a+" "+p,i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p);A+=">>"}l.push({key:"AP",value:`<<
`+A+">>"})}i.internal.putStream({additionalKeyValues:l,objectId:o.objId}),i.internal.out("endobj")}s&&function(m,g){for(var y in m)if(m.hasOwnProperty(y)){var v=y,x=m[y];g.internal.newObjectDeferredBegin(x.objId,!0),Dn(x)==="object"&&typeof x.putStream=="function"&&x.putStream(),delete m[v]}}(i.internal.acroformPlugin.xForms,i)})(n,e)}),e.internal.acroformPlugin.isInitialized=!0}},bge=Vr.__acroform__.arrayToPdfArray=function(e,t,n){var r=function(a){return a};if(Array.isArray(e)){for(var i="[",s=0;s<e.length;s++)switch(s!==0&&(i+=" "),Dn(e[s])){case"boolean":case"number":case"object":i+=e[s].toString();break;case"string":e[s].substr(0,1)==="/"?i+="/"+Jp(e[s].substr(1)):(t!==void 0&&n&&(r=n.internal.getEncryptor(t)),i+="("+hm(r(e[s].toString()))+")")}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},x4=function(e,t,n){var r=function(i){return i};return t!==void 0&&n&&(r=n.internal.getEncryptor(t)),(e=e||"").toString(),"("+hm(r(e))+")"},Vc=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Vc.prototype.toString=function(){return this.objId+" 0 R"},Vc.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},Vc.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(s){return s!="content"&&s!="appearanceStreamContent"&&s!="scope"&&s!="objId"&&s.substring(0,1)!="_"});for(var n in t)if(Object.getOwnPropertyDescriptor(this,t[n]).configurable===!1){var r=t[n],i=this[r];i&&(Array.isArray(i)?e.push({key:r,value:bge(i,this.objId,this.scope)}):i instanceof Vc?(i.scope=this.scope,e.push({key:r,value:i.objId+" 0 R"})):typeof i!="function"&&e.push({key:r,value:i}))}return e};var Cge=function(){Vc.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(n){t=n}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(n){e=n.trim()},get:function(){return e||null}})};Va(Cge,Vc);var Sge=function(){Vc.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var n=function(r){return r};return this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),"("+hm(n(e))+")"}},set:function(n){e=n}})};Va(Sge,Vc);var fc=function e(){Vc.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(y){if(isNaN(y))throw new Error('Invalid value "'+y+'" for attribute F supplied.');t=y}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!oi(t,3)},set:function(y){y?this.F=li(t,3):this.F=ci(t,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(y){if(isNaN(y))throw new Error('Invalid value "'+y+'" for attribute Ff supplied.');n=y}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(y){r=y!==void 0?y:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(y){r[0]=y}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(y){r[1]=y}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(y){r[2]=y}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(y){r[3]=y}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(y){switch(y){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=y;break;default:throw new Error('Invalid value "'+y+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!s||s.length<1){if(this instanceof tN)return;s="FieldObject"+e.FieldNum++}var y=function(v){return v};return this.scope&&(y=this.scope.internal.getEncryptor(this.objId)),"("+hm(y(s))+")"},set:function(y){s=y.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(y){s=y}});var a="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return a},set:function(y){a=y}});var o="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return o},set:function(y){o=y}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(y){l=y}});var u=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return u===void 0?50/BH:u},set:function(y){u=y}});var d="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return d},set:function(y){d=y}});var A="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!A||this instanceof tN||this instanceof bp))return x4(A,this.objId,this.scope)},set:function(y){y=y.toString(),A=y}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof Wi==0?x4(f,this.objId,this.scope):f},set:function(y){y=y.toString(),f=this instanceof Wi==0?y.substr(0,1)==="("?sg(y.substr(1,y.length-2)):sg(y):y}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Wi==1?sg(f.substr(1,f.length-1)):f},set:function(y){y=y.toString(),f=this instanceof Wi==1?"/"+Jp(y):y}});var h=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(h)return h},set:function(y){this.V=y}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof Wi==0?x4(h,this.objId,this.scope):h},set:function(y){y=y.toString(),h=this instanceof Wi==0?y.substr(0,1)==="("?sg(y.substr(1,y.length-2)):sg(y):y}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Wi==1?sg(h.substr(1,h.length-1)):h},set:function(y){y=y.toString(),h=this instanceof Wi==1?"/"+Jp(y):y}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,m=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return m},set:function(y){y=!!y,m=y}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(y){p=y}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,1)},set:function(y){y?this.Ff=li(this.Ff,1):this.Ff=ci(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,2)},set:function(y){y?this.Ff=li(this.Ff,2):this.Ff=ci(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,3)},set:function(y){y?this.Ff=li(this.Ff,3):this.Ff=ci(this.Ff,3)}});var g=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(g!==null)return g},set:function(y){if([0,1,2].indexOf(y)===-1)throw new Error('Invalid value "'+y+'" for attribute Q supplied.');g=y}}),Object.defineProperty(this,"textAlign",{get:function(){var y;switch(g){case 0:default:y="left";break;case 1:y="center";break;case 2:y="right"}return y},configurable:!0,enumerable:!0,set:function(y){switch(y){case"right":case 2:g=2;break;case"center":case 1:g=1;break;default:g=0}}})};Va(fc,Vc);var xy=function(){fc.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(n){e=n}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(n){e=n}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return bge(t,this.objId,this.scope)},set:function(n){var r,i;i=[],typeof(r=n)=="string"&&(i=function(s,a,o){o||(o=1);for(var l,u=[];l=a.exec(s);)u.push(l[o]);return u}(r,/\((.*?)\)/g)),t=i}}),this.getOptions=function(){return t},this.setOptions=function(n){t=n,this.sort&&t.sort()},this.addOption=function(n){n=(n=n||"").toString(),t.push(n),this.sort&&t.sort()},this.removeOption=function(n,r){for(r=r||!1,n=(n=n||"").toString();t.indexOf(n)!==-1&&(t.splice(t.indexOf(n),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,18)},set:function(n){n?this.Ff=li(this.Ff,18):this.Ff=ci(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,19)},set:function(n){this.combo===!0&&(n?this.Ff=li(this.Ff,19):this.Ff=ci(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,20)},set:function(n){n?(this.Ff=li(this.Ff,20),t.sort()):this.Ff=ci(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,22)},set:function(n){n?this.Ff=li(this.Ff,22):this.Ff=ci(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,23)},set:function(n){n?this.Ff=li(this.Ff,23):this.Ff=ci(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,27)},set:function(n){n?this.Ff=li(this.Ff,27):this.Ff=ci(this.Ff,27)}}),this.hasAppearanceStream=!1};Va(xy,fc);var wy=function(){xy.call(this),this.fontName="helvetica",this.combo=!1};Va(wy,xy);var by=function(){wy.call(this),this.combo=!0};Va(by,wy);var YB=function(){by.call(this),this.edit=!0};Va(YB,by);var Wi=function(){fc.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,15)},set:function(n){n?this.Ff=li(this.Ff,15):this.Ff=ci(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,16)},set:function(n){n?this.Ff=li(this.Ff,16):this.Ff=ci(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,17)},set:function(n){n?this.Ff=li(this.Ff,17):this.Ff=ci(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,26)},set:function(n){n?this.Ff=li(this.Ff,26):this.Ff=ci(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var n=function(s){return s};if(this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var r,i=[];for(r in i.push("<<"),t)i.push("/"+r+" ("+hm(n(t[r]))+")");return i.push(">>"),i.join(`
`)}},set:function(n){Dn(n)==="object"&&(t=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(n){typeof n=="string"&&(t.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(n){var r=n==null?"":n.toString();r.substr(0,1)==="/"&&(r=r.substr(1)),e="/"+Jp(r)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(n){e="/"+Jp(n)}})};Va(Wi,fc);var XB=function(){Wi.call(this),this.pushButton=!0};Va(XB,Wi);var Cy=function(){Wi.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t!==void 0?t:[]}})};Va(Cy,Wi);var tN=function(){var e,t;fc.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(i){e=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(i){t=i}});var n,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(o){return o};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var s,a=[];for(s in a.push("<<"),r)a.push("/"+s+" ("+hm(i(r[s]))+")");return a.push(">>"),a.join(`
`)},set:function(i){Dn(i)==="object"&&(r=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(i){typeof i=="string"&&(r.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(i){var s=i==null?"":i.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),n="/"+Jp(s)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(i){var s=i==null?"":i.toString();s.substr(0,1)==="/"&&(s=s.substr(1)),n="/"+Jp(s)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=ft.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Va(tN,fc),Cy.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},Cy.prototype.createOption=function(e){var t=new tN;return t.Parent=this,t.optionName=e,this.Kids.push(t),Dbt.call(this.scope,t),t};var JB=function(){Wi.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=ft.CheckBox.createAppearanceStream()};Va(JB,Wi);var bp=function(){fc.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,13)},set:function(t){t?this.Ff=li(this.Ff,13):this.Ff=ci(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,21)},set:function(t){t?this.Ff=li(this.Ff,21):this.Ff=ci(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,23)},set:function(t){t?this.Ff=li(this.Ff,23):this.Ff=ci(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,24)},set:function(t){t?this.Ff=li(this.Ff,24):this.Ff=ci(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,25)},set:function(t){t?this.Ff=li(this.Ff,25):this.Ff=ci(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,26)},set:function(t){t?this.Ff=li(this.Ff,26):this.Ff=ci(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Va(bp,fc);var ZB=function(){bp.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!oi(this.Ff,14)},set:function(e){e?this.Ff=li(this.Ff,14):this.Ff=ci(this.Ff,14)}}),this.password=!0};Va(ZB,bp);var ft={CheckBox:{createAppearanceStream:function(){return{N:{On:ft.CheckBox.YesNormal},D:{On:ft.CheckBox.YesPushDown,Off:ft.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=Nc(e);t.scope=e.scope;var n=[],r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),s=HL(e,e.caption);return n.push("0.749023 g"),n.push("0 0 "+Xt(ft.internal.getWidth(e))+" "+Xt(ft.internal.getHeight(e))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+r+" "+Xt(s.fontSize)+" Tf "+i),n.push("BT"),n.push(s.text),n.push("ET"),n.push("Q"),n.push("EMC"),t.stream=n.join(`
`),t},YesNormal:function(e){var t=Nc(e);t.scope=e.scope;var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color),i=[],s=ft.internal.getHeight(e),a=ft.internal.getWidth(e),o=HL(e,e.caption);return i.push("1 g"),i.push("0 0 "+Xt(a)+" "+Xt(s)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+Xt(a-1)+" "+Xt(s-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+n+" "+Xt(o.fontSize)+" Tf "+r),i.push(o.text),i.push("ET"),i.push("Q"),t.stream=i.join(`
`),t},OffPushDown:function(e){var t=Nc(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Xt(ft.internal.getWidth(e))+" "+Xt(ft.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join(`
`),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:ft.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=ft.RadioButton.Circle.YesNormal,t.D[e]=ft.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=Nc(e);t.scope=e.scope;var n=[],r=ft.internal.getWidth(e)<=ft.internal.getHeight(e)?ft.internal.getWidth(e)/4:ft.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=ft.internal.Bezier_C,s=Number((r*i).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+Zd(ft.internal.getWidth(e)/2)+" "+Zd(ft.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+s+" "+s+" "+r+" 0 "+r+" c"),n.push("-"+s+" "+r+" -"+r+" "+s+" -"+r+" 0 c"),n.push("-"+r+" -"+s+" -"+s+" -"+r+" 0 -"+r+" c"),n.push(s+" -"+r+" "+r+" -"+s+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join(`
`),t},YesPushDown:function(e){var t=Nc(e);t.scope=e.scope;var n=[],r=ft.internal.getWidth(e)<=ft.internal.getHeight(e)?ft.internal.getWidth(e)/4:ft.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),s=Number((i*ft.internal.Bezier_C).toFixed(5)),a=Number((r*ft.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Zd(ft.internal.getWidth(e)/2)+" "+Zd(ft.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),n.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),n.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),n.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+Zd(ft.internal.getWidth(e)/2)+" "+Zd(ft.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),n.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),n.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),n.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join(`
`),t},OffPushDown:function(e){var t=Nc(e);t.scope=e.scope;var n=[],r=ft.internal.getWidth(e)<=ft.internal.getHeight(e)?ft.internal.getWidth(e)/4:ft.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),s=Number((i*ft.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+Zd(ft.internal.getWidth(e)/2)+" "+Zd(ft.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),n.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),n.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),n.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join(`
`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:ft.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=ft.RadioButton.Cross.YesNormal,t.D[e]=ft.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=Nc(e);t.scope=e.scope;var n=[],r=ft.internal.calculateCross(e);return n.push("q"),n.push("1 1 "+Xt(ft.internal.getWidth(e)-2)+" "+Xt(ft.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(Xt(r.x1.x)+" "+Xt(r.x1.y)+" m"),n.push(Xt(r.x2.x)+" "+Xt(r.x2.y)+" l"),n.push(Xt(r.x4.x)+" "+Xt(r.x4.y)+" m"),n.push(Xt(r.x3.x)+" "+Xt(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join(`
`),t},YesPushDown:function(e){var t=Nc(e);t.scope=e.scope;var n=ft.internal.calculateCross(e),r=[];return r.push("0.749023 g"),r.push("0 0 "+Xt(ft.internal.getWidth(e))+" "+Xt(ft.internal.getHeight(e))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+Xt(ft.internal.getWidth(e)-2)+" "+Xt(ft.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(Xt(n.x1.x)+" "+Xt(n.x1.y)+" m"),r.push(Xt(n.x2.x)+" "+Xt(n.x2.y)+" l"),r.push(Xt(n.x4.x)+" "+Xt(n.x4.y)+" m"),r.push(Xt(n.x3.x)+" "+Xt(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(`
`),t},OffPushDown:function(e){var t=Nc(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Xt(ft.internal.getWidth(e))+" "+Xt(ft.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join(`
`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+n}};ft.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=ft.internal.getWidth(e),n=ft.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},ft.internal.getWidth=function(e){var t=0;return Dn(e)==="object"&&(t=tJ(e.Rect[2])),t},ft.internal.getHeight=function(e){var t=0;return Dn(e)==="object"&&(t=tJ(e.Rect[3])),t};var Dbt=Vr.addField=function(e){if(Ubt(this,e),!(e instanceof fc))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};Vr.AcroFormChoiceField=xy,Vr.AcroFormListBox=wy,Vr.AcroFormComboBox=by,Vr.AcroFormEditBox=YB,Vr.AcroFormButton=Wi,Vr.AcroFormPushButton=XB,Vr.AcroFormRadioButton=Cy,Vr.AcroFormCheckBox=JB,Vr.AcroFormTextField=bp,Vr.AcroFormPasswordField=ZB,Vr.AcroFormAppearance=ft,Vr.AcroForm={ChoiceField:xy,ListBox:wy,ComboBox:by,EditBox:YB,Button:Wi,PushButton:XB,RadioButton:Cy,CheckBox:JB,TextField:bp,PasswordField:ZB,Appearance:ft},Et.AcroForm={ChoiceField:xy,ListBox:wy,ComboBox:by,EditBox:YB,Button:Wi,PushButton:XB,RadioButton:Cy,CheckBox:JB,TextField:bp,PasswordField:ZB,Appearance:ft};function Bge(e){return e.reduce(function(t,n,r){return t[n]=r,t},{})}(function(e){var t="addImage_";e.__addimage__={};var n="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=e.__addimage__.getImageFileTypeByImageData=function(T,E){var F,M,D,H,q,$=n;if((E=E||n)==="RGBA"||T.data!==void 0&&T.data instanceof Uint8ClampedArray&&"height"in T&&"width"in T)return"RGBA";if(B(T))for(q in r)for(D=r[q],F=0;F<D.length;F+=1){for(H=!0,M=0;M<D[F].length;M+=1)if(D[F][M]!==void 0&&D[F][M]!==T[M]){H=!1;break}if(H===!0){$=q;break}}else for(q in r)for(D=r[q],F=0;F<D.length;F+=1){for(H=!0,M=0;M<D[F].length;M+=1)if(D[F][M]!==void 0&&D[F][M]!==T.charCodeAt(M)){H=!1;break}if(H===!0){$=q;break}}return $===n&&E!==n&&($=E),$},s=function T(E){for(var F=this.internal.write,M=this.internal.putStream,D=(0,this.internal.getFilters)();D.indexOf("FlateEncode")!==-1;)D.splice(D.indexOf("FlateEncode"),1);E.objectId=this.internal.newObject();var H=[];if(H.push({key:"Type",value:"/XObject"}),H.push({key:"Subtype",value:"/Image"}),H.push({key:"Width",value:E.width}),H.push({key:"Height",value:E.height}),E.colorSpace===y.INDEXED?H.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(E.palette.length/3-1)+" "+("sMask"in E&&E.sMask!==void 0?E.objectId+2:E.objectId+1)+" 0 R]"}):(H.push({key:"ColorSpace",value:"/"+E.colorSpace}),E.colorSpace===y.DEVICE_CMYK&&H.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),H.push({key:"BitsPerComponent",value:E.bitsPerComponent}),"decodeParameters"in E&&E.decodeParameters!==void 0&&H.push({key:"DecodeParms",value:"<<"+E.decodeParameters+">>"}),"transparency"in E&&Array.isArray(E.transparency)&&E.transparency.length>0){for(var q="",$=0,z=E.transparency.length;$<z;$++)q+=E.transparency[$]+" "+E.transparency[$]+" ";H.push({key:"Mask",value:"["+q+"]"})}E.sMask!==void 0&&H.push({key:"SMask",value:E.objectId+1+" 0 R"});var Q=E.filter!==void 0?["/"+E.filter]:void 0;if(M({data:E.data,additionalKeyValues:H,alreadyAppliedFilters:Q,objectId:E.objectId}),F("endobj"),"sMask"in E&&E.sMask!==void 0){var ce,R=(ce=E.sMaskBitsPerComponent)!==null&&ce!==void 0?ce:E.bitsPerComponent,O={width:E.width,height:E.height,colorSpace:"DeviceGray",bitsPerComponent:R,data:E.sMask};"filter"in E&&(O.decodeParameters="/Predictor ".concat(E.predictor," /Colors 1 /BitsPerComponent ").concat(R," /Columns ").concat(E.width),O.filter=E.filter),T.call(this,O)}if(E.colorSpace===y.INDEXED){var Y=this.internal.newObject();M({data:N(new Uint8Array(E.palette)),objectId:Y}),F("endobj")}},a=function(){var T=this.internal.collections[t+"images"];for(var E in T)s.call(this,T[E])},o=function(){var T,E=this.internal.collections[t+"images"],F=this.internal.write;for(var M in E)F("/I"+(T=E[M]).index,T.objectId,"0","R")},l=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",o))},u=function(){var T=this.internal.collections[t+"images"];return l.call(this),T},d=function(){return Object.keys(this.internal.collections[t+"images"]).length},A=function(T){return typeof e["process"+T.toUpperCase()]=="function"},f=function(T){return Dn(T)==="object"&&T.nodeType===1},h=function(T,E){if(T.nodeName==="IMG"&&T.hasAttribute("src")){var F=""+T.getAttribute("src");if(F.indexOf("data:image/")===0)return GB(unescape(F).split("base64,").pop());var M=e.loadFile(F,!0);if(M!==void 0)return M}if(T.nodeName==="CANVAS"){if(T.width===0||T.height===0)throw new Error("Given canvas must have data. Canvas width: "+T.width+", height: "+T.height);var D;switch(E){case"PNG":D="image/png";break;case"WEBP":D="image/webp";break;default:D="image/jpeg"}return GB(T.toDataURL(D,1).split("base64,").pop())}},p=function(T){var E=this.internal.collections[t+"images"];if(E){for(var F in E)if(T===E[F].alias)return E[F]}},m=function(T,E,F){return T||E||(T=-96,E=-96),T<0&&(T=-1*F.width*72/T/this.internal.scaleFactor),E<0&&(E=-1*F.height*72/E/this.internal.scaleFactor),T===0&&(T=E*F.width/F.height),E===0&&(E=T*F.height/F.width),[T,E]},g=function(T,E,F,M,D,H){var q=m.call(this,F,M,D),$=this.internal.getCoordinateString,z=this.internal.getVerticalCoordinateString,Q=u.call(this);if(F=q[0],M=q[1],Q[D.index]=D,H){H*=Math.PI/180;var ce=Math.cos(H),R=Math.sin(H),O=function(X){return X.toFixed(4)},Y=[O(ce),O(R),O(-1*R),O(ce),0,0,"cm"]}this.internal.write("q"),H?(this.internal.write([1,"0","0",1,$(T),z(E+M),"cm"].join(" ")),this.internal.write(Y.join(" ")),this.internal.write([$(F),"0","0",$(M),"0","0","cm"].join(" "))):this.internal.write([$(F),"0","0",$(M),$(T),z(E+M),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+D.index+" Do"),this.internal.write("Q")},y=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var v=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},x=e.__addimage__.sHashCode=function(T){var E,F,M=0;if(typeof T=="string")for(F=T.length,E=0;E<F;E++)M=(M<<5)-M+T.charCodeAt(E),M|=0;else if(B(T))for(F=T.byteLength/2,E=0;E<F;E++)M=(M<<5)-M+T[E],M|=0;return M},b=e.__addimage__.validateStringAsBase64=function(T){(T=T||"").toString().trim();var E=!0;return T.length===0&&(E=!1),T.length%4!=0&&(E=!1),/^[A-Za-z0-9+/]+$/.test(T.substr(0,T.length-2))===!1&&(E=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(T.substr(-2))===!1&&(E=!1),E},w=e.__addimage__.extractImageFromDataUrl=function(T){if(T==null||!(T=T.trim()).startsWith("data:"))return null;var E=T.indexOf(",");return E<0?null:T.substring(0,E).trim().endsWith("base64")?T.substring(E+1):null};e.__addimage__.isArrayBuffer=function(T){return T instanceof ArrayBuffer};var B=e.__addimage__.isArrayBufferView=function(T){return T instanceof Int8Array||T instanceof Uint8Array||T instanceof Uint8ClampedArray||T instanceof Int16Array||T instanceof Uint16Array||T instanceof Int32Array||T instanceof Uint32Array||T instanceof Float32Array||T instanceof Float64Array},k=e.__addimage__.binaryStringToUint8Array=function(T){for(var E=T.length,F=new Uint8Array(E),M=0;M<E;M++)F[M]=T.charCodeAt(M);return F},N=e.__addimage__.arrayBufferToBinaryString=function(T){for(var E="",F=B(T)?T:new Uint8Array(T),M=0;M<F.length;M+=8192)E+=String.fromCharCode.apply(null,F.subarray(M,M+8192));return E};e.addImage=function(){var T,E,F,M,D,H,q,$,z;if(typeof arguments[1]=="number"?(E=n,F=arguments[1],M=arguments[2],D=arguments[3],H=arguments[4],q=arguments[5],$=arguments[6],z=arguments[7]):(E=arguments[1],F=arguments[2],M=arguments[3],D=arguments[4],H=arguments[5],q=arguments[6],$=arguments[7],z=arguments[8]),Dn(T=arguments[0])==="object"&&!f(T)&&"imageData"in T){var Q=T;T=Q.imageData,E=Q.format||E||n,F=Q.x||F||0,M=Q.y||M||0,D=Q.w||Q.width||D,H=Q.h||Q.height||H,q=Q.alias||q,$=Q.compression||$,z=Q.rotation||Q.angle||z}var ce=this.internal.getFilters();if($===void 0&&ce.indexOf("FlateEncode")!==-1&&($="SLOW"),isNaN(F)||isNaN(M))throw new Error("Invalid coordinates passed to jsPDF.addImage");l.call(this);var R=j.call(this,T,E,q,$);return g.call(this,F,M,D,H,R,z),this};var j=function(T,E,F,M){var D,H,q;if(typeof T=="string"&&i(T)===n){T=unescape(T);var $=L(T,!1);($!==""||($=e.loadFile(T,!0))!==void 0)&&(T=$)}if(f(T)&&(T=h(T,E)),E=i(T,E),!A(E))throw new Error("addImage does not support files of type '"+E+"', please ensure that a plugin for '"+E+"' support is added.");if(((q=F)==null||q.length===0)&&(F=function(z){return typeof z=="string"||B(z)?x(z):B(z.data)?x(z.data):null}(T)),(D=p.call(this,F))||(T instanceof Uint8Array||E==="RGBA"||(H=T,T=k(T)),D=this["process"+E.toUpperCase()](T,d.call(this),F,function(z){return z&&typeof z=="string"&&(z=z.toUpperCase()),z in e.image_compression?z:v.NONE}(M),H)),!D)throw new Error("An unknown error occurred whilst processing the image.");return D},L=e.__addimage__.convertBase64ToBinaryString=function(T,E){E=typeof E!="boolean"||E;var F,M="";if(typeof T=="string"){var D;F=(D=w(T))!==null&&D!==void 0?D:T;try{M=GB(F)}catch(H){if(E)throw b(F)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+H.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return M};e.getImageProperties=function(T){var E,F,M="";if(f(T)&&(T=h(T)),typeof T=="string"&&i(T)===n&&((M=L(T,!1))===""&&(M=e.loadFile(T)||""),T=M),F=i(T),!A(F))throw new Error("addImage does not support files of type '"+F+"', please ensure that a plugin for '"+F+"' support is added.");if(T instanceof Uint8Array||(T=k(T)),!(E=this["process"+F.toUpperCase()](T)))throw new Error("An unknown error occurred whilst processing the image");return E.fileType=F,E}})(Et.API),function(e){var t=function(n){if(n!==void 0&&n!="")return!0};Et.API.events.push(["addPage",function(n){this.internal.getPageInfo(n.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(n){for(var r,i,s,a=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,l=this.internal.getPageInfoByObjId(n.objId),u=n.pageContext.annotations,d=!1,A=0;A<u.length&&!d;A++)switch((r=u[A]).type){case"link":(t(r.options.url)||t(r.options.pageNumber))&&(d=!0);break;case"reference":case"text":case"freetext":d=!0}if(d!=0){this.internal.write("/Annots [");for(var f=0;f<u.length;f++){r=u[f];var h=this.internal.pdfEscape,p=this.internal.getEncryptor(n.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var m=this.internal.newAdditionalObject(),g=this.internal.newAdditionalObject(),y=this.internal.getEncryptor(m.objId),v=r.title||"Note";s="<</Type /Annot /Subtype /Text "+(i="/Rect ["+a(r.bounds.x)+" "+o(r.bounds.y+r.bounds.h)+" "+a(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y)+"] ")+"/Contents ("+h(y(r.contents))+")",s+=" /Popup "+g.objId+" 0 R",s+=" /P "+l.objId+" 0 R",s+=" /T ("+h(y(v))+") >>",m.content=s;var x=m.objId+" 0 R";s="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+a(r.bounds.x+30)+" "+o(r.bounds.y+r.bounds.h)+" "+a(r.bounds.x+r.bounds.w+30)+" "+o(r.bounds.y)+"] ")+" /Parent "+x,r.open&&(s+=" /Open true"),s+=" >>",g.content=s,this.internal.write(m.objId,"0 R",g.objId,"0 R");break;case"freetext":i="/Rect ["+a(r.bounds.x)+" "+o(r.bounds.y)+" "+a(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y+r.bounds.h)+"] ";var b="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(r.color||"#000000");s="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+h(p(r.contents))+")",s+=" /DS("+h(p(b))+")",s+=" /Border [0 0 0]",s+=" >>",this.internal.write(s);break;case"link":if(r.options.name){var w=this.annotations._nameMap[r.options.name];r.options.pageNumber=w.page,r.options.top=w.y}else r.options.top||(r.options.top=0);if(i="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",s="",r.options.url)s="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+h(p(r.options.url))+") >>";else if(r.options.pageNumber)switch(s="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":s+=" /Fit]";break;case"FitH":s+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,s+=" /FitV "+r.options.left+"]";break;default:var B=o(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),s+=" /XYZ "+r.options.left+" "+B+" "+r.options.zoom+"]"}s!=""&&(s+=" >>",this.internal.write(s))}}this.internal.write("]")}}]),e.createAnnotation=function(n){var r=this.internal.getCurrentPageInfo();switch(n.type){case"link":this.link(n.bounds.x,n.bounds.y,n.bounds.w,n.bounds.h,n);break;case"text":case"freetext":r.pageContext.annotations.push(n)}},e.link=function(n,r,i,s,a){var o=this.internal.getCurrentPageInfo(),l=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString;o.pageContext.annotations.push({finalBounds:{x:l(n),y:u(r),w:l(n+i),h:u(r+s)},options:a,type:"link"})},e.textWithLink=function(n,r,i,s){var a,o,l=this.getTextWidth(n),u=this.internal.getLineHeight()/this.internal.scaleFactor;if(s.maxWidth!==void 0){o=s.maxWidth;var d=this.splitTextToSize(n,o).length;a=Math.ceil(u*d)}else o=l,a=u;return this.text(n,r,i,s),i+=.2*u,s.align==="center"&&(r-=l/2),s.align==="right"&&(r-=l),this.link(r,i-u,o,a,s),l},e.getTextWidth=function(n){var r=this.internal.getFontSize();return this.getStringUnitWidth(n)*r/this.internal.scaleFactor}}(Et.API),function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var s=e.__arabicParser__.isInArabicSubstitutionA=function(m){return t[m.charCodeAt(0)]!==void 0},a=e.__arabicParser__.isArabicLetter=function(m){return typeof m=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(m)},o=e.__arabicParser__.isArabicEndLetter=function(m){return a(m)&&s(m)&&t[m.charCodeAt(0)].length<=2},l=e.__arabicParser__.isArabicAlfLetter=function(m){return a(m)&&i.indexOf(m.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(m){return a(m)&&s(m)&&t[m.charCodeAt(0)].length>=1};var u=e.__arabicParser__.arabicLetterHasFinalForm=function(m){return a(m)&&s(m)&&t[m.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(m){return a(m)&&s(m)&&t[m.charCodeAt(0)].length>=3};var d=e.__arabicParser__.arabicLetterHasMedialForm=function(m){return a(m)&&s(m)&&t[m.charCodeAt(0)].length==4},A=e.__arabicParser__.resolveLigatures=function(m){var g=0,y=n,v="",x=0;for(g=0;g<m.length;g+=1)y[m.charCodeAt(g)]!==void 0?(x++,typeof(y=y[m.charCodeAt(g)])=="number"&&(v+=String.fromCharCode(y),y=n,x=0),g===m.length-1&&(y=n,v+=m.charAt(g-(x-1)),g-=x-1,x=0)):(y=n,v+=m.charAt(g-x),g-=x,x=0);return v};e.__arabicParser__.isArabicDiacritic=function(m){return m!==void 0&&r[m.charCodeAt(0)]!==void 0};var f=e.__arabicParser__.getCorrectForm=function(m,g,y){return a(m)?s(m)===!1?-1:!u(m)||!a(g)&&!a(y)||!a(y)&&o(g)||o(m)&&!a(g)||o(m)&&l(g)||o(m)&&o(g)?0:d(m)&&a(g)&&!o(g)&&a(y)&&u(y)?3:o(m)||!a(y)?1:2:-1},h=function(m){var g=0,y=0,v=0,x="",b="",w="",B=(m=m||"").split("\\s+"),k=[];for(g=0;g<B.length;g+=1){for(k.push(""),y=0;y<B[g].length;y+=1)x=B[g][y],b=B[g][y-1],w=B[g][y+1],a(x)?(v=f(x,b,w),k[g]+=v!==-1?String.fromCharCode(t[x.charCodeAt(0)][v]):x):k[g]+=x;k[g]=A(k[g])}return k.join(" ")},p=e.__arabicParser__.processArabic=e.processArabic=function(){var m,g=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,y=[];if(Array.isArray(g)){var v=0;for(y=[],v=0;v<g.length;v+=1)Array.isArray(g[v])?y.push([h(g[v][0]),g[v][1],g[v][2]]):y.push([h(g[v])]);m=y}else m=h(g);return typeof arguments[0]=="string"?m:(arguments[0].text=m,arguments[0])};e.events.push(["preProcessText",p])}(Et.API),Et.API.autoPrint=function(e){var t;return(e=e||{}).variant=e.variant||"non-conform",e.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},function(e){var t=function(){var n=void 0;Object.defineProperty(this,"pdf",{get:function(){return n},set:function(o){n=o}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(o){r=isNaN(o)||Number.isInteger(o)===!1||o<0?150:o,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(o){i=isNaN(o)||Number.isInteger(o)===!1||o<0?300:o,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var s=[];Object.defineProperty(this,"childNodes",{get:function(){return s},set:function(o){s=o}});var a={};Object.defineProperty(this,"style",{get:function(){return a},set:function(o){a=o}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(n,r){var i;if((n=n||"2d")!=="2d")return null;for(i in r)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=r[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])}(Et.API),function(e){var t={left:0,top:0,bottom:0,right:0},n=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var l=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return l},set:function(m){l=m}});var u=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return u},set:function(m){u=m}});var d=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return d},set:function(m){d=m}});var A=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return A},set:function(m){A=m}});var f=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return f},set:function(m){f=m}});var h=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return h},set:function(m){h=m}});var p=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return p},set:function(m){p=m}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(l){return r.call(this),this.internal.__cell__.headerFunction=typeof l=="function"?l:void 0,this},e.getTextDimensions=function(l,u){r.call(this);var d=(u=u||{}).fontSize||this.getFontSize(),A=u.font||this.getFont(),f=u.scaleFactor||this.internal.scaleFactor,h=0,p=0,m=0,g=this;if(!Array.isArray(l)&&typeof l!="string"){if(typeof l!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");l=String(l)}var y=u.maxWidth;y>0?typeof l=="string"?l=this.splitTextToSize(l,y):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(x,b){return x.concat(g.splitTextToSize(b,y))},[])):l=Array.isArray(l)?l:[l];for(var v=0;v<l.length;v++)h<(m=this.getStringUnitWidth(l[v],{font:A})*d)&&(h=m);return h!==0&&(p=l.length),{w:h/=f,h:Math.max((p*d*this.getLineHeightFactor()-d*(this.getLineHeightFactor()-1))/f,0)}},e.cellAddPage=function(){r.call(this),this.addPage();var l=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new s(l.left,l.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var a=e.cell=function(){var l;l=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var u=this.internal.__cell__.lastCell,d=this.internal.__cell__.padding,A=this.internal.__cell__.margins||t,f=this.internal.__cell__.tableHeaderRow,h=this.internal.__cell__.printHeaders;return u.lineNumber!==void 0&&(u.lineNumber===l.lineNumber?(l.x=(u.x||0)+(u.width||0),l.y=u.y||0):u.y+u.height+l.height+A.bottom>this.getPageHeight()?(this.cellAddPage(),l.y=A.top,h&&f&&(this.printHeaderRow(l.lineNumber,!0),l.y+=f[0].height)):l.y=u.y+u.height||l.y),l.text[0]!==void 0&&(this.rect(l.x,l.y,l.width,l.height,n===!0?"FD":void 0),l.align==="right"?this.text(l.text,l.x+l.width-d,l.y+d,{align:"right",baseline:"top"}):l.align==="center"?this.text(l.text,l.x+l.width/2,l.y+d,{align:"center",baseline:"top",maxWidth:l.width-d-d}):this.text(l.text,l.x+d,l.y+d,{align:"left",baseline:"top",maxWidth:l.width-d-d})),this.internal.__cell__.lastCell=l,this};e.table=function(l,u,d,A,f){if(r.call(this),!d)throw new Error("No data for PDF table.");var h,p,m,g,y=[],v=[],x=[],b={},w={},B=[],k=[],N=(f=f||{}).autoSize||!1,j=f.printHeaders!==!1,L=f.css&&f.css["font-size"]!==void 0?16*f.css["font-size"]:f.fontSize||12,T=f.margins||Object.assign({width:this.getPageWidth()},t),E=typeof f.padding=="number"?f.padding:3,F=f.headerBackgroundColor||"#c8c8c8",M=f.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=j,this.internal.__cell__.margins=T,this.internal.__cell__.table_font_size=L,this.internal.__cell__.padding=E,this.internal.__cell__.headerBackgroundColor=F,this.internal.__cell__.headerTextColor=M,this.setFontSize(L),A==null)v=y=Object.keys(d[0]),x=y.map(function(){return"left"});else if(Array.isArray(A)&&Dn(A[0])==="object")for(y=A.map(function(Q){return Q.name}),v=A.map(function(Q){return Q.prompt||Q.name||""}),x=A.map(function(Q){return Q.align||"left"}),h=0;h<A.length;h+=1)w[A[h].name]=.7499990551181103*A[h].width;else Array.isArray(A)&&typeof A[0]=="string"&&(v=y=A,x=y.map(function(){return"left"}));if(N||Array.isArray(A)&&typeof A[0]=="string")for(h=0;h<y.length;h+=1){for(b[g=y[h]]=d.map(function(Q){return Q[g]}),this.setFont(void 0,"bold"),B.push(this.getTextDimensions(v[h],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=b[g],this.setFont(void 0,"normal"),m=0;m<p.length;m+=1)B.push(this.getTextDimensions(p[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);w[g]=Math.max.apply(null,B)+E+E,B=[]}if(j){var D={};for(h=0;h<y.length;h+=1)D[y[h]]={},D[y[h]].text=v[h],D[y[h]].align=x[h];var H=o.call(this,D,w);k=y.map(function(Q){return new s(l,u,w[Q],H,D[Q].text,void 0,D[Q].align)}),this.setTableHeaderRow(k),this.printHeaderRow(1,!1)}var q=A.reduce(function(Q,ce){return Q[ce.name]=ce.align,Q},{});for(h=0;h<d.length;h+=1){"rowStart"in f&&f.rowStart instanceof Function&&f.rowStart({row:h,data:d[h]},this);var $=o.call(this,d[h],w);for(m=0;m<y.length;m+=1){var z=d[h][y[m]];"cellStart"in f&&f.cellStart instanceof Function&&f.cellStart({row:h,col:m,data:z},this),a.call(this,new s(l,u,w[y[m]],$,z,h+2,q[y[m]]))}}return this.internal.__cell__.table_x=l,this.internal.__cell__.table_y=u,this};var o=function(l,u){var d=this.internal.__cell__.padding,A=this.internal.__cell__.table_font_size,f=this.internal.scaleFactor;return Object.keys(l).map(function(h){var p=l[h];return this.splitTextToSize(p.hasOwnProperty("text")?p.text:p,u[h]-d-d)},this).map(function(h){return this.getLineHeightFactor()*h.length*A/f+d+d},this).reduce(function(h,p){return Math.max(h,p)},0)};e.setTableHeaderRow=function(l){r.call(this),this.internal.__cell__.tableHeaderRow=l},e.printHeaderRow=function(l,u){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var d;if(n=!0,typeof this.internal.__cell__.headerFunction=="function"){var A=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(A[0],A[1],A[2],A[3],void 0,-1)}this.setFont(void 0,"bold");for(var f=[],h=0;h<this.internal.__cell__.tableHeaderRow.length;h+=1){d=this.internal.__cell__.tableHeaderRow[h].clone(),u&&(d.y=this.internal.__cell__.margins.top||0,f.push(d)),d.lineNumber=l;var p=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),a.call(this,d),this.setTextColor(p)}f.length>0&&this.setTableHeaderRow(f),this.setFont(void 0,"normal"),n=!1}}(Et.API);var _ge={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},kge=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],$L=Bge(kge),Ege=[100,200,300,400,500,600,700,800,900],Qbt=Bge(Ege);function w4(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),n=function(s){return _ge[s=s||"normal"]?s:"normal"}(e.style),r=function(s){return s?typeof s=="number"?s>=100&&s<=900&&s%100==0?s:400:/^\d00$/.test(s)?parseInt(s):s==="bold"?700:400:400}(e.weight),i=function(s){return typeof $L[s=s||"normal"]=="number"?s:"normal"}(e.stretch);return{family:t,style:n,weight:r,stretch:i,src:e.src||[],ref:e.ref||{name:t,style:[i,n,r].join(" ")}}}function nJ(e,t,n,r){var i;for(i=n;i>=0&&i<t.length;i+=r)if(e[t[i]])return e[t[i]];for(i=n;i>=0&&i<t.length;i-=r)if(e[t[i]])return e[t[i]]}var Hbt={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},rJ={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function iJ(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function sJ(e){return e.trimLeft()}function $bt(e,t){for(var n=0;n<e.length;){if(e.charAt(n)===t)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}function zbt(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],e.substring(t[0].length)]}var ag,DS,aJ,oJ,lJ,b4=["times"];function cJ(e,t,n,r,i){var s=4,a=dJ;switch(i){case Et.API.image_compression.FAST:s=1,a=uJ;break;case Et.API.image_compression.MEDIUM:s=6,a=AJ;break;case Et.API.image_compression.SLOW:s=9,a=hJ}e=function(l,u,d,A){for(var f,h=l.length/u,p=new Uint8Array(l.length+h),m=[Vbt,uJ,dJ,AJ,hJ],g=0;g<h;g+=1){var y=g*u,v=l.subarray(y,y+u);if(A)p.set(A(v,d,f),y+g);else{for(var x=m.length,b=[],w=0;w<x;w+=1)b[w]=m[w](v,d,f);var B=Wbt(b.concat());p.set(b[B],y+g)}f=v}return p}(e,t,Math.ceil(n*r/8),a);var o=jL(e,{level:s});return Et.API.__addimage__.arrayBufferToBinaryString(o)}function Vbt(e){var t=Array.apply([],e);return t.unshift(0),t}function uJ(e,t){var n=e.length,r=[];r[0]=1;for(var i=0;i<n;i+=1){var s=e[i-t]||0;r[i+1]=e[i]-s+256&255}return r}function dJ(e,t,n){var r=e.length,i=[];i[0]=2;for(var s=0;s<r;s+=1){var a=n&&n[s]||0;i[s+1]=e[s]-a+256&255}return i}function AJ(e,t,n){var r=e.length,i=[];i[0]=3;for(var s=0;s<r;s+=1){var a=e[s-t]||0,o=n&&n[s]||0;i[s+1]=e[s]+256-(a+o>>>1)&255}return i}function hJ(e,t,n){var r=e.length,i=[];i[0]=4;for(var s=0;s<r;s+=1){var a=Kbt(e[s-t]||0,n&&n[s]||0,n&&n[s-t]||0);i[s+1]=e[s]-a+256&255}return i}function Kbt(e,t,n){if(e===t&&t===n)return e;var r=Math.abs(t-n),i=Math.abs(e-n),s=Math.abs(e+t-n-n);return r<=i&&r<=s?e:i<=s?t:n}function Wbt(e){var t=e.map(function(n){return n.reduce(function(r,i){return r+Math.abs(i)},0)});return t.indexOf(Math.min.apply(null,t))}function C4(e,t,n){var r=t*n,i=Math.floor(r/8),s=16-(r-8*i+n),a=(1<<n)-1;return Nge(e,i)>>s&a}function fJ(e,t,n,r){var i=n*r,s=Math.floor(i/8),a=16-(i-8*s+r),o=(1<<r)-1,l=(t&o)<<a;(function(u,d,A){if(d+1<u.byteLength)u.setUint16(d,A,!1);else{var f=A>>8&255;u.setUint8(d,f)}})(e,s,Nge(e,s)&~(o<<a)&65535|l)}function Nge(e,t){return t+1<e.byteLength?e.getUint16(t,!1):e.getUint8(t)<<8}function qbt(e){var t=0;if(e[t++]!==71||e[t++]!==73||e[t++]!==70||e[t++]!==56||(e[t++]+1&253)!=56||e[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var n=e[t++]|e[t++]<<8,r=e[t++]|e[t++]<<8,i=e[t++],s=i>>7,a=1<<1+(7&i);e[t++],e[t++];var o=null,l=null;s&&(o=t,l=a,t+=3*a);var u=!0,d=[],A=0,f=null,h=0,p=null;for(this.width=n,this.height=r;u&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(e[t]!==11||e[t+1]==78&&e[t+2]==69&&e[t+3]==84&&e[t+4]==83&&e[t+5]==67&&e[t+6]==65&&e[t+7]==80&&e[t+8]==69&&e[t+9]==50&&e[t+10]==46&&e[t+11]==48&&e[t+12]==3&&e[t+13]==1&&e[t+16]==0)t+=14,p=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((T=e[t++])>=0))throw Error("Invalid block size");if(T===0)break;t+=T}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw new Error("Invalid graphics extension block.");var m=e[t++];A=e[t++]|e[t++]<<8,f=e[t++],1&m||(f=null),h=m>>2&7,t++;break;case 254:for(;;){if(!((T=e[t++])>=0))throw Error("Invalid block size");if(T===0)break;t+=T}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var g=e[t++]|e[t++]<<8,y=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,x=e[t++]|e[t++]<<8,b=e[t++],w=b>>6&1,B=1<<1+(7&b),k=o,N=l,j=!1;b>>7&&(j=!0,k=t,N=B,t+=3*B);var L=t;for(t++;;){var T;if(!((T=e[t++])>=0))throw Error("Invalid block size");if(T===0)break;t+=T}d.push({x:g,y,width:v,height:x,has_local_palette:j,palette_offset:k,palette_size:N,data_offset:L,data_length:t-L,transparent_index:f,interlaced:!!w,delay:A,disposal:h});break;case 59:u=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return d.length},this.loopCount=function(){return p},this.frameInfo=function(E){if(E<0||E>=d.length)throw new Error("Frame index out of range.");return d[E]},this.decodeAndBlitFrameBGRA=function(E,F){var M=this.frameInfo(E),D=M.width*M.height;if(D>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var H=new Uint8Array(D);pJ(e,M.data_offset,H,D);var q=M.palette_offset,$=M.transparent_index;$===null&&($=256);var z=M.width,Q=n-z,ce=z,R=4*(M.y*n+M.x),O=4*((M.y+M.height)*n+M.x),Y=R,X=4*Q;M.interlaced===!0&&(X+=4*n*7);for(var K=8,Z=0,ae=H.length;Z<ae;++Z){var ue=H[Z];if(ce===0&&(ce=z,(Y+=X)>=O&&(X=4*Q+4*n*(K-1),Y=R+(z+Q)*(K<<1),K>>=1)),ue===$)Y+=4;else{var se=e[q+3*ue],Ae=e[q+3*ue+1],de=e[q+3*ue+2];F[Y++]=de,F[Y++]=Ae,F[Y++]=se,F[Y++]=255}--ce}},this.decodeAndBlitFrameRGBA=function(E,F){var M=this.frameInfo(E),D=M.width*M.height;if(D>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var H=new Uint8Array(D);pJ(e,M.data_offset,H,D);var q=M.palette_offset,$=M.transparent_index;$===null&&($=256);var z=M.width,Q=n-z,ce=z,R=4*(M.y*n+M.x),O=4*((M.y+M.height)*n+M.x),Y=R,X=4*Q;M.interlaced===!0&&(X+=4*n*7);for(var K=8,Z=0,ae=H.length;Z<ae;++Z){var ue=H[Z];if(ce===0&&(ce=z,(Y+=X)>=O&&(X=4*Q+4*n*(K-1),Y=R+(z+Q)*(K<<1),K>>=1)),ue===$)Y+=4;else{var se=e[q+3*ue],Ae=e[q+3*ue+1],de=e[q+3*ue+2];F[Y++]=se,F[Y++]=Ae,F[Y++]=de,F[Y++]=255}--ce}}}function pJ(e,t,n,r){for(var i=e[t++],s=1<<i,a=s+1,o=a+1,l=i+1,u=(1<<l)-1,d=0,A=0,f=0,h=e[t++],p=new Int32Array(4096),m=null;;){for(;d<16&&h!==0;)A|=e[t++]<<d,d+=8,h===1?h=e[t++]:--h;if(d<l)break;var g=A&u;if(A>>=l,d-=l,g!==s){if(g===a)break;for(var y=g<o?g:m,v=0,x=y;x>s;)x=p[x]>>8,++v;var b=x;if(f+v+(y!==g?1:0)>r)return void Gn.log("Warning, gif stream longer than expected.");n[f++]=b;var w=f+=v;for(y!==g&&(n[f++]=b),x=y;v--;)x=p[x],n[--w]=255&x,x>>=8;m!==null&&o<4096&&(p[o++]=m<<8|b,o>=u+1&&l<12&&(++l,u=u<<1|1)),m=g}else o=a+1,u=(1<<(l=i+1))-1,m=null}return f!==r&&Gn.log("Warning, gif stream shorter than expected."),n}/**
* @license
Copyright (c) 2008, Adobe Systems Incorporated
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Adobe Systems Incorporated nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/function S4(e){var t,n,r,i,s,a=Math.floor,o=new Array(64),l=new Array(64),u=new Array(64),d=new Array(64),A=new Array(65535),f=new Array(65535),h=new Array(64),p=new Array(64),m=[],g=0,y=7,v=new Array(64),x=new Array(64),b=new Array(64),w=new Array(256),B=new Array(2048),k=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],N=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],L=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],T=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],E=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],F=[0,1,2,3,4,5,6,7,8,9,10,11],M=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],D=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function H(R,O){for(var Y=0,X=0,K=new Array,Z=1;Z<=16;Z++){for(var ae=1;ae<=R[Z];ae++)K[O[X]]=[],K[O[X]][0]=Y,K[O[X]][1]=Z,X++,Y++;Y*=2}return K}function q(R){for(var O=R[0],Y=R[1]-1;Y>=0;)O&1<<Y&&(g|=1<<y),Y--,--y<0&&(g==255?($(255),$(0)):$(g),y=7,g=0)}function $(R){m.push(R)}function z(R){$(R>>8&255),$(255&R)}function Q(R,O,Y,X,K){for(var Z,ae=K[0],ue=K[240],se=function(Te,st){var xe,Qe,ze,Rt,dt,ye,Ee,qe,Ue,Ge,pe=0;for(Ue=0;Ue<8;++Ue){xe=Te[pe],Qe=Te[pe+1],ze=Te[pe+2],Rt=Te[pe+3],dt=Te[pe+4],ye=Te[pe+5],Ee=Te[pe+6];var mt=xe+(qe=Te[pe+7]),ct=xe-qe,xt=Qe+Ee,Ft=Qe-Ee,$t=ze+ye,At=ze-ye,Mt=Rt+dt,Pt=Rt-dt,Wt=mt+Mt,Jn=mt-Mt,en=xt+$t,St=xt-$t;Te[pe]=Wt+en,Te[pe+4]=Wt-en;var Nn=.707106781*(St+Jn);Te[pe+2]=Jn+Nn,Te[pe+6]=Jn-Nn;var Lt=.382683433*((Wt=Pt+At)-(St=Ft+ct)),qt=.5411961*Wt+Lt,vn=1.306562965*St+Lt,Ur=.707106781*(en=At+Ft),yt=ct+Ur,Qi=ct-Ur;Te[pe+5]=Qi+qt,Te[pe+3]=Qi-qt,Te[pe+1]=yt+vn,Te[pe+7]=yt-vn,pe+=8}for(pe=0,Ue=0;Ue<8;++Ue){xe=Te[pe],Qe=Te[pe+8],ze=Te[pe+16],Rt=Te[pe+24],dt=Te[pe+32],ye=Te[pe+40],Ee=Te[pe+48];var es=xe+(qe=Te[pe+56]),wr=xe-qe,Xr=Qe+Ee,Dr=Qe-Ee,Hi=ze+ye,ts=ze-ye,qh=Rt+dt,Ed=Rt-dt,xl=es+qh,gc=es-qh,wl=Xr+Hi,bl=Xr-Hi;Te[pe]=xl+wl,Te[pe+32]=xl-wl;var ko=.707106781*(bl+gc);Te[pe+16]=gc+ko,Te[pe+48]=gc-ko;var Gh=.382683433*((xl=Ed+ts)-(bl=Dr+wr)),yc=.5411961*xl+Gh,Yh=1.306562965*bl+Gh,fm=.707106781*(wl=ts+Dr),pm=wr+fm,mm=wr-fm;Te[pe+40]=mm+yc,Te[pe+24]=mm-yc,Te[pe+8]=pm+Yh,Te[pe+56]=pm-Yh,pe++}for(Ue=0;Ue<64;++Ue)Ge=Te[Ue]*st[Ue],h[Ue]=Ge>0?Ge+.5|0:Ge-.5|0;return h}(R,O),Ae=0;Ae<64;++Ae)p[k[Ae]]=se[Ae];var de=p[0]-Y;Y=p[0],de==0?q(X[0]):(q(X[f[Z=32767+de]]),q(A[Z]));for(var Se=63;Se>0&&p[Se]==0;)Se--;if(Se==0)return q(ae),Y;for(var Fe,te=1;te<=Se;){for(var ke=te;p[te]==0&&te<=Se;)++te;var Ze=te-ke;if(Ze>=16){Fe=Ze>>4;for(var et=1;et<=Fe;++et)q(ue);Ze&=15}Z=32767+p[te],q(K[(Ze<<4)+f[Z]]),q(A[Z]),te++}return Se!=63&&q(ae),Y}function ce(R){R=Math.min(Math.max(R,1),100),s!=R&&(function(O){for(var Y=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],X=0;X<64;X++){var K=a((Y[X]*O+50)/100);K=Math.min(Math.max(K,1),255),o[k[X]]=K}for(var Z=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],ae=0;ae<64;ae++){var ue=a((Z[ae]*O+50)/100);ue=Math.min(Math.max(ue,1),255),l[k[ae]]=ue}for(var se=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Ae=0,de=0;de<8;de++)for(var Se=0;Se<8;Se++)u[Ae]=1/(o[k[Ae]]*se[de]*se[Se]*8),d[Ae]=1/(l[k[Ae]]*se[de]*se[Se]*8),Ae++}(R<50?Math.floor(5e3/R):Math.floor(200-2*R)),s=R)}this.encode=function(R,O){O&&ce(O),m=new Array,g=0,y=7,z(65496),z(65504),z(16),$(74),$(70),$(73),$(70),$(0),$(1),$(1),$(0),z(1),z(1),$(0),$(0),function(){z(65499),z(132),$(0);for(var Qe=0;Qe<64;Qe++)$(o[Qe]);$(1);for(var ze=0;ze<64;ze++)$(l[ze])}(),function(Qe,ze){z(65472),z(17),$(8),z(ze),z(Qe),$(3),$(1),$(17),$(0),$(2),$(17),$(1),$(3),$(17),$(1)}(R.width,R.height),function(){z(65476),z(418),$(0);for(var Qe=0;Qe<16;Qe++)$(N[Qe+1]);for(var ze=0;ze<=11;ze++)$(j[ze]);$(16);for(var Rt=0;Rt<16;Rt++)$(L[Rt+1]);for(var dt=0;dt<=161;dt++)$(T[dt]);$(1);for(var ye=0;ye<16;ye++)$(E[ye+1]);for(var Ee=0;Ee<=11;Ee++)$(F[Ee]);$(17);for(var qe=0;qe<16;qe++)$(M[qe+1]);for(var Ue=0;Ue<=161;Ue++)$(D[Ue])}(),z(65498),z(12),$(3),$(1),$(0),$(2),$(17),$(3),$(17),$(0),$(63),$(0);var Y=0,X=0,K=0;g=0,y=7,this.encode.displayName="_encode_";for(var Z,ae,ue,se,Ae,de,Se,Fe,te,ke=R.data,Ze=R.width,et=R.height,Te=4*Ze,st=0;st<et;){for(Z=0;Z<Te;){for(Ae=Te*st+Z,Se=-1,Fe=0,te=0;te<64;te++)de=Ae+(Fe=te>>3)*Te+(Se=4*(7&te)),st+Fe>=et&&(de-=Te*(st+1+Fe-et)),Z+Se>=Te&&(de-=Z+Se-Te+4),ae=ke[de++],ue=ke[de++],se=ke[de++],v[te]=(B[ae]+B[ue+256|0]+B[se+512|0]>>16)-128,x[te]=(B[ae+768|0]+B[ue+1024|0]+B[se+1280|0]>>16)-128,b[te]=(B[ae+1280|0]+B[ue+1536|0]+B[se+1792|0]>>16)-128;Y=Q(v,u,Y,t,r),X=Q(x,d,X,n,i),K=Q(b,d,K,n,i),Z+=32}st+=8}if(y>=0){var xe=[];xe[1]=y+1,xe[0]=(1<<y+1)-1,q(xe)}return z(65497),new Uint8Array(m)},e=e||50,function(){for(var R=String.fromCharCode,O=0;O<256;O++)w[O]=R(O)}(),t=H(N,j),n=H(E,F),r=H(L,T),i=H(M,D),function(){for(var R=1,O=2,Y=1;Y<=15;Y++){for(var X=R;X<O;X++)f[32767+X]=Y,A[32767+X]=[],A[32767+X][1]=Y,A[32767+X][0]=X;for(var K=-(O-1);K<=-R;K++)f[32767+K]=Y,A[32767+K]=[],A[32767+K][1]=Y,A[32767+K][0]=O-1+K;R<<=1,O<<=1}}(),function(){for(var R=0;R<256;R++)B[R]=19595*R,B[R+256|0]=38470*R,B[R+512|0]=7471*R+32768,B[R+768|0]=-11059*R,B[R+1024|0]=-21709*R,B[R+1280|0]=32768*R+8421375,B[R+1536|0]=-27439*R,B[R+1792|0]=-5329*R}(),ce(e)}/**
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/function Tl(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function mJ(e){function t(j){if(!j)throw Error("assert :P")}function n(j,L,T){for(var E=0;4>E;E++)if(j[L+E]!=T.charCodeAt(E))return!0;return!1}function r(j,L,T,E,F){for(var M=0;M<F;M++)j[L+M]=T[E+M]}function i(j,L,T,E){for(var F=0;F<E;F++)j[L+F]=T}function s(j){return new Int32Array(j)}function a(j,L){for(var T=[],E=0;E<j;E++)T.push(new L);return T}function o(j,L){var T=[];return function E(F,M,D){for(var H=D[M],q=0;q<H&&(F.push(D.length>M+1?[]:new L),!(D.length<M+1));q++)E(F[q],M+1,D)}(T,0,j),T}var l=function(){var j=this;function L(C,_){for(var I=1<<_-1>>>0;C&I;)I>>>=1;return I?(C&I-1)+I:C}function T(C,_,I,U,W){t(!(U%I));do C[_+(U-=I)]=W;while(0<U)}function E(C,_,I,U,W){if(t(2328>=W),512>=W)var G=s(512);else if((G=s(W))==null)return 0;return function(J,ee,ne,oe,me,Ce){var le,ge,we=ee,je=1<<ne,be=s(16),Ie=s(16);for(t(me!=0),t(oe!=null),t(J!=null),t(0<ne),ge=0;ge<me;++ge){if(15<oe[ge])return 0;++be[oe[ge]]}if(be[0]==me)return 0;for(Ie[1]=0,le=1;15>le;++le){if(be[le]>1<<le)return 0;Ie[le+1]=Ie[le]+be[le]}for(ge=0;ge<me;++ge)le=oe[ge],0<oe[ge]&&(Ce[Ie[le]++]=ge);if(Ie[15]==1)return(oe=new F).g=0,oe.value=Ce[0],T(J,we,1,je,oe),je;var Oe,He=-1,Le=je-1,kt=0,ut=1,nn=1,wt=1<<ne;for(ge=0,le=1,me=2;le<=ne;++le,me<<=1){if(ut+=nn<<=1,0>(nn-=be[le]))return 0;for(;0<be[le];--be[le])(oe=new F).g=le,oe.value=Ce[ge++],T(J,we+kt,me,wt,oe),kt=L(kt,le)}for(le=ne+1,me=2;15>=le;++le,me<<=1){if(ut+=nn<<=1,0>(nn-=be[le]))return 0;for(;0<be[le];--be[le]){if(oe=new F,(kt&Le)!=He){for(we+=wt,Oe=1<<(He=le)-ne;15>He&&!(0>=(Oe-=be[He]));)++He,Oe<<=1;je+=wt=1<<(Oe=He-ne),J[ee+(He=kt&Le)].g=Oe+ne,J[ee+He].value=we-ee-He}oe.g=le-ne,oe.value=Ce[ge++],T(J,we+(kt>>ne),me,wt,oe),kt=L(kt,le)}}return ut!=2*Ie[15]-1?0:je}(C,_,I,U,W,G)}function F(){this.value=this.g=0}function M(){this.value=this.g=0}function D(){this.G=a(5,F),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=a(Nm,M)}function H(C,_,I,U){t(C!=null),t(_!=null),t(2147483648>U),C.Ca=254,C.I=0,C.b=-8,C.Ka=0,C.oa=_,C.pa=I,C.Jd=_,C.Yc=I+U,C.Zc=4<=U?I+U-4+1:I,ae(C)}function q(C,_){for(var I=0;0<_--;)I|=se(C,128)<<_;return I}function $(C,_){var I=q(C,_);return ue(C)?-I:I}function z(C,_,I,U){var W,G=0;for(t(C!=null),t(_!=null),t(4294967288>U),C.Sb=U,C.Ra=0,C.u=0,C.h=0,4<U&&(U=4),W=0;W<U;++W)G+=_[I+W]<<8*W;C.Ra=G,C.bb=U,C.oa=_,C.pa=I}function Q(C){for(;8<=C.u&&C.bb<C.Sb;)C.Ra>>>=8,C.Ra+=C.oa[C.pa+C.bb]<<qs-8>>>0,++C.bb,C.u-=8;X(C)&&(C.h=1,C.u=0)}function ce(C,_){if(t(0<=_),!C.h&&_<=Pv){var I=Y(C)&of[_];return C.u+=_,Q(C),I}return C.h=1,C.u=0}function R(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function O(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function Y(C){return C.Ra>>>(C.u&qs-1)>>>0}function X(C){return t(C.bb<=C.Sb),C.h||C.bb==C.Sb&&C.u>qs}function K(C,_){C.u=_,C.h=X(C)}function Z(C){C.u>=va&&(t(C.u>=va),Q(C))}function ae(C){t(C!=null&&C.oa!=null),C.pa<C.Zc?(C.I=(C.oa[C.pa++]|C.I<<8)>>>0,C.b+=8):(t(C!=null&&C.oa!=null),C.pa<C.Yc?(C.b+=8,C.I=C.oa[C.pa++]|C.I<<8):C.Ka?C.b=0:(C.I<<=8,C.b+=8,C.Ka=1))}function ue(C){return q(C,1)}function se(C,_){var I=C.Ca;0>C.b&&ae(C);var U=C.b,W=I*_>>>8,G=(C.I>>>U>W)+0;for(G?(I-=W,C.I-=W+1<<U>>>0):I=W+1,U=I,W=0;256<=U;)W+=8,U>>=8;return U=7^W+jm[U],C.b-=U,C.Ca=(I<<U)-1,G}function Ae(C,_,I){C[_+0]=I>>24&255,C[_+1]=I>>16&255,C[_+2]=I>>8&255,C[_+3]=255&I}function de(C,_){return C[_+0]|C[_+1]<<8}function Se(C,_){return de(C,_)|C[_+2]<<16}function Fe(C,_){return de(C,_)|de(C,_+2)<<16}function te(C,_){var I=1<<_;return t(C!=null),t(0<_),C.X=s(I),C.X==null?0:(C.Mb=32-_,C.Xa=_,1)}function ke(C,_){t(C!=null),t(_!=null),t(C.Xa==_.Xa),r(_.X,0,C.X,0,1<<_.Xa)}function Ze(){this.X=[],this.Xa=this.Mb=0}function et(C,_,I,U){t(I!=null),t(U!=null);var W=I[0],G=U[0];return W==0&&(W=(C*G+_/2)/_),G==0&&(G=(_*W+C/2)/C),0>=W||0>=G?0:(I[0]=W,U[0]=G,1)}function Te(C,_){return C+(1<<_)-1>>>_}function st(C,_){return((4278255360&C)+(4278255360&_)>>>0&4278255360)+((16711935&C)+(16711935&_)>>>0&16711935)>>>0}function xe(C,_){j[_]=function(I,U,W,G,J,ee,ne){var oe;for(oe=0;oe<J;++oe){var me=j[C](ee[ne+oe-1],W,G+oe);ee[ne+oe]=st(I[U+oe],me)}}}function Qe(){this.ud=this.hd=this.jd=0}function ze(C,_){return((4278124286&(C^_))>>>1)+(C&_)>>>0}function Rt(C){return 0<=C&&256>C?C:0>C?0:255<C?255:void 0}function dt(C,_){return Rt(C+(C-_+.5>>1))}function ye(C,_,I){return Math.abs(_-I)-Math.abs(C-I)}function Ee(C,_,I,U,W,G,J){for(U=G[J-1],I=0;I<W;++I)G[J+I]=U=st(C[_+I],U)}function qe(C,_,I,U,W){var G;for(G=0;G<I;++G){var J=C[_+G],ee=J>>8&255,ne=16711935&(ne=(ne=16711935&J)+((ee<<16)+ee));U[W+G]=(4278255360&J)+ne>>>0}}function Ue(C,_){_.jd=255&C,_.hd=C>>8&255,_.ud=C>>16&255}function Ge(C,_,I,U,W,G){var J;for(J=0;J<U;++J){var ee=_[I+J],ne=ee>>>8,oe=ee,me=255&(me=(me=ee>>>16)+((C.jd<<24>>24)*(ne<<24>>24)>>>5));oe=255&(oe=(oe+=(C.hd<<24>>24)*(ne<<24>>24)>>>5)+((C.ud<<24>>24)*(me<<24>>24)>>>5)),W[G+J]=(4278255360&ee)+(me<<16)+oe}}function pe(C,_,I,U,W){j[_]=function(G,J,ee,ne,oe,me,Ce,le,ge){for(ne=Ce;ne<le;++ne)for(Ce=0;Ce<ge;++Ce)oe[me++]=W(ee[U(G[J++])])},j[C]=function(G,J,ee,ne,oe,me,Ce){var le=8>>G.b,ge=G.Ea,we=G.K[0],je=G.w;if(8>le)for(G=(1<<G.b)-1,je=(1<<le)-1;J<ee;++J){var be,Ie=0;for(be=0;be<ge;++be)be&G||(Ie=U(ne[oe++])),me[Ce++]=W(we[Ie&je]),Ie>>=le}else j["VP8LMapColor"+I](ne,oe,we,je,me,Ce,J,ee,ge)}}function mt(C,_,I,U,W){for(I=_+I;_<I;){var G=C[_++];U[W++]=G>>16&255,U[W++]=G>>8&255,U[W++]=255&G}}function ct(C,_,I,U,W){for(I=_+I;_<I;){var G=C[_++];U[W++]=G>>16&255,U[W++]=G>>8&255,U[W++]=255&G,U[W++]=G>>24&255}}function xt(C,_,I,U,W){for(I=_+I;_<I;){var G=(J=C[_++])>>16&240|J>>12&15,J=240&J|J>>28&15;U[W++]=G,U[W++]=J}}function Ft(C,_,I,U,W){for(I=_+I;_<I;){var G=(J=C[_++])>>16&248|J>>13&7,J=J>>5&224|J>>3&31;U[W++]=G,U[W++]=J}}function $t(C,_,I,U,W){for(I=_+I;_<I;){var G=C[_++];U[W++]=255&G,U[W++]=G>>8&255,U[W++]=G>>16&255}}function At(C,_,I,U,W,G){if(G==0)for(I=_+I;_<I;)Ae(U,((G=C[_++])[0]>>24|G[1]>>8&65280|G[2]<<8&16711680|G[3]<<24)>>>0),W+=32;else r(U,W,C,_,I)}function Mt(C,_){j[_][0]=j[C+"0"],j[_][1]=j[C+"1"],j[_][2]=j[C+"2"],j[_][3]=j[C+"3"],j[_][4]=j[C+"4"],j[_][5]=j[C+"5"],j[_][6]=j[C+"6"],j[_][7]=j[C+"7"],j[_][8]=j[C+"8"],j[_][9]=j[C+"9"],j[_][10]=j[C+"10"],j[_][11]=j[C+"11"],j[_][12]=j[C+"12"],j[_][13]=j[C+"13"],j[_][14]=j[C+"0"],j[_][15]=j[C+"0"]}function Pt(C){return C==sT||C==aT||C==iC||C==oT}function Wt(){this.eb=[],this.size=this.A=this.fb=0}function Jn(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function en(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Wt,this.f.kb=new Jn,this.sd=null}function St(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Nn(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Lt(C){return alert("todo:WebPSamplerProcessPlane"),C.T}function qt(C,_){var I=C.T,U=_.ba.f.RGBA,W=U.eb,G=U.fb+C.ka*U.A,J=To[_.ba.S],ee=C.y,ne=C.O,oe=C.f,me=C.N,Ce=C.ea,le=C.W,ge=_.cc,we=_.dc,je=_.Mc,be=_.Nc,Ie=C.ka,Oe=C.ka+C.T,He=C.U,Le=He+1>>1;for(Ie==0?J(ee,ne,null,null,oe,me,Ce,le,oe,me,Ce,le,W,G,null,null,He):(J(_.ec,_.fc,ee,ne,ge,we,je,be,oe,me,Ce,le,W,G-U.A,W,G,He),++I);Ie+2<Oe;Ie+=2)ge=oe,we=me,je=Ce,be=le,me+=C.Rc,le+=C.Rc,G+=2*U.A,J(ee,(ne+=2*C.fa)-C.fa,ee,ne,ge,we,je,be,oe,me,Ce,le,W,G-U.A,W,G,He);return ne+=C.fa,C.j+Oe<C.o?(r(_.ec,_.fc,ee,ne,He),r(_.cc,_.dc,oe,me,Le),r(_.Mc,_.Nc,Ce,le,Le),I--):1&Oe||J(ee,ne,null,null,oe,me,Ce,le,oe,me,Ce,le,W,G+U.A,null,null,He),I}function vn(C,_,I){var U=C.F,W=[C.J];if(U!=null){var G=C.U,J=_.ba.S,ee=J==rC||J==iC;_=_.ba.f.RGBA;var ne=[0],oe=C.ka;ne[0]=C.T,C.Kb&&(oe==0?--ne[0]:(--oe,W[0]-=C.width),C.j+C.ka+C.T==C.o&&(ne[0]=C.o-C.j-oe));var me=_.eb;oe=_.fb+oe*_.A,C=RH(U,W[0],C.width,G,ne,me,oe+(ee?0:3),_.A),t(I==ne),C&&Pt(J)&&Mv(me,oe,ee,G,ne,_.A)}return 0}function Ur(C){var _=C.ma,I=_.ba.S,U=11>I,W=I==tC||I==nC||I==rC||I==iT||I==12||Pt(I);if(_.memory=null,_.Ib=null,_.Jb=null,_.Nd=null,!No(_.Oa,C,W?11:12))return 0;if(W&&Pt(I)&&xu(),C.da)alert("todo:use_scaling");else{if(U){if(_.Ib=Lt,C.Kb){if(I=C.U+1>>1,_.memory=s(C.U+2*I),_.memory==null)return 0;_.ec=_.memory,_.fc=0,_.cc=_.ec,_.dc=_.fc+C.U,_.Mc=_.cc,_.Nc=_.dc+I,_.Ib=qt,xu()}}else alert("todo:EmitYUV");W&&(_.Jb=vn,U&&Er())}if(U&&!t$){for(C=0;256>C;++C)t0e[C]=89858*(C-128)+aC>>sC,i0e[C]=-22014*(C-128)+aC,r0e[C]=-45773*(C-128),n0e[C]=113618*(C-128)+aC>>sC;for(C=Rv;C<uT;++C)_=76283*(C-16)+aC>>sC,s0e[C-Rv]=vc(_,255),a0e[C-Rv]=vc(_+8>>4,15);t$=1}return 1}function yt(C){var _=C.ma,I=C.U,U=C.T;return t(!(1&C.ka)),0>=I||0>=U?0:(I=_.Ib(C,_),_.Jb!=null&&_.Jb(C,_,I),_.Dc+=I,1)}function Qi(C){C.ma.memory=null}function es(C,_,I,U){return ce(C,8)!=47?0:(_[0]=ce(C,14)+1,I[0]=ce(C,14)+1,U[0]=ce(C,1),ce(C,3)!=0?0:!C.h)}function wr(C,_){if(4>C)return C+1;var I=C-2>>1;return(2+(1&C)<<I)+ce(_,I)+1}function Xr(C,_){return 120<_?_-120:1<=(I=((I=Qye[_-1])>>4)*C+(8-(15&I)))?I:1;var I}function Dr(C,_,I){var U=Y(I),W=C[_+=255&U].g-8;return 0<W&&(K(I,I.u+8),U=Y(I),_+=C[_].value,_+=U&(1<<W)-1),K(I,I.u+C[_].g),C[_].value}function Hi(C,_,I){return I.g+=C.g,I.value+=C.value<<_>>>0,t(8>=I.g),C.g}function ts(C,_,I){var U=C.xc;return t((_=U==0?0:C.vc[C.md*(I>>U)+(_>>U)])<C.Wb),C.Ya[_]}function qh(C,_,I,U){var W=C.ab,G=C.c*_,J=C.C;_=J+_;var ee=I,ne=U;for(U=C.Ta,I=C.Ua;0<W--;){var oe=C.gc[W],me=J,Ce=_,le=ee,ge=ne,we=(ne=U,ee=I,oe.Ea);switch(t(me<Ce),t(Ce<=oe.nc),oe.hc){case 2:Tm(le,ge,(Ce-me)*we,ne,ee);break;case 0:var je=me,be=Ce,Ie=ne,Oe=ee,He=(wt=oe).Ea;je==0&&(Id(le,ge,null,null,1,Ie,Oe),Ee(le,ge+1,0,0,He-1,Ie,Oe+1),ge+=He,Oe+=He,++je);for(var Le=1<<wt.b,kt=Le-1,ut=Te(He,wt.b),nn=wt.K,wt=wt.w+(je>>wt.b)*ut;je<be;){var pn=nn,_i=wt,rn=1;for(Od(le,ge,Ie,Oe-He,1,Ie,Oe);rn<He;){var bt=(rn&~kt)+Le;bt>He&&(bt=He),(0,Cl[pn[_i++]>>8&15])(le,ge+ +rn,Ie,Oe+rn-He,bt-rn,Ie,Oe+rn),rn=bt}ge+=He,Oe+=He,++je&kt||(wt+=ut)}Ce!=oe.nc&&r(ne,ee-we,ne,ee+(Ce-me-1)*we,we);break;case 1:for(we=le,be=ge,He=(le=oe.Ea)-(Oe=le&~(Ie=(ge=1<<oe.b)-1)),je=Te(le,oe.b),Le=oe.K,oe=oe.w+(me>>oe.b)*je;me<Ce;){for(kt=Le,ut=oe,nn=new Qe,wt=be+Oe,pn=be+le;be<wt;)Ue(kt[ut++],nn),cf(nn,we,be,ge,ne,ee),be+=ge,ee+=ge;be<pn&&(Ue(kt[ut++],nn),cf(nn,we,be,He,ne,ee),be+=He,ee+=He),++me&Ie||(oe+=je)}break;case 3:if(le==ne&&ge==ee&&0<oe.b){for(be=ne,le=we=ee+(Ce-me)*we-(Oe=(Ce-me)*Te(oe.Ea,oe.b)),ge=ne,Ie=ee,je=[],Oe=(He=Oe)-1;0<=Oe;--Oe)je[Oe]=ge[Ie+Oe];for(Oe=He-1;0<=Oe;--Oe)be[le+Oe]=je[Oe];lf(oe,me,Ce,ne,we,ne,ee)}else lf(oe,me,Ce,le,ge,ne,ee)}ee=U,ne=I}ne!=I&&r(U,I,ee,ne,G)}function Ed(C,_){var I=C.V,U=C.Ba+C.c*C.C,W=_-C.C;if(t(_<=C.l.o),t(16>=W),0<W){var G=C.l,J=C.Ta,ee=C.Ua,ne=G.width;if(qh(C,W,I,U),W=ee=[ee],t((I=C.C)<(U=_)),t(G.v<G.va),U>G.o&&(U=G.o),I<G.j){var oe=G.j-I;I=G.j,W[0]+=oe*ne}if(I>=U?I=0:(W[0]+=4*G.v,G.ka=I-G.j,G.U=G.va-G.v,G.T=U-I,I=1),I){if(ee=ee[0],11>(I=C.ca).S){var me=I.f.RGBA,Ce=(U=I.S,W=G.U,G=G.T,oe=me.eb,me.A),le=G;for(me=me.fb+C.Ma*me.A;0<le--;){var ge=J,we=ee,je=W,be=oe,Ie=me;switch(U){case eC:Iv(ge,we,je,be,Ie);break;case tC:Ov(ge,we,je,be,Ie);break;case sT:Ov(ge,we,je,be,Ie),Mv(be,Ie,0,je,1,0);break;case VH:df(ge,we,je,be,Ie);break;case nC:At(ge,we,je,be,Ie,1);break;case aT:At(ge,we,je,be,Ie,1),Mv(be,Ie,0,je,1,0);break;case rC:At(ge,we,je,be,Ie,0);break;case iC:At(ge,we,je,be,Ie,0),Mv(be,Ie,1,je,1,0);break;case iT:Pm(ge,we,je,be,Ie);break;case oT:Pm(ge,we,je,be,Ie),LH(be,Ie,je,1,0);break;case KH:uf(ge,we,je,be,Ie);break;default:t(0)}ee+=ne,me+=Ce}C.Ma+=G}else alert("todo:EmitRescaledRowsYUVA");t(C.Ma<=I.height)}}C.C=_,t(C.C<=C.i)}function xl(C){var _;if(0<C.ua)return 0;for(_=0;_<C.Wb;++_){var I=C.Ya[_].G,U=C.Ya[_].H;if(0<I[1][U[1]+0].g||0<I[2][U[2]+0].g||0<I[3][U[3]+0].g)return 0}return 1}function gc(C,_,I,U,W,G){if(C.Z!=0){var J=C.qd,ee=C.rd;for(t(Rd[C.Z]!=null);_<I;++_)Rd[C.Z](J,ee,U,W,U,W,G),J=U,ee=W,W+=G;C.qd=J,C.rd=ee}}function wl(C,_){var I=C.l.ma,U=I.Z==0||I.Z==1?C.l.j:C.C;if(U=C.C<U?U:C.C,t(_<=C.l.o),_>U){var W=C.l.width,G=I.ca,J=I.tb+W*U,ee=C.V,ne=C.Ba+C.c*U,oe=C.gc;t(C.ab==1),t(oe[0].hc==3),nT(oe[0],U,_,ee,ne,G,J),gc(I,U,_,G,J,W)}C.C=C.Ma=_}function bl(C,_,I,U,W,G,J){var ee=C.$/U,ne=C.$%U,oe=C.m,me=C.s,Ce=I+C.$,le=Ce;W=I+U*W;var ge=I+U*G,we=280+me.ua,je=C.Pb?ee:16777216,be=0<me.ua?me.Wa:null,Ie=me.wc,Oe=Ce<ge?ts(me,ne,ee):null;t(C.C<G),t(ge<=W);var He=!1;e:for(;;){for(;He||Ce<ge;){var Le=0;if(ee>=je){var kt=Ce-I;t((je=C).Pb),je.wd=je.m,je.xd=kt,0<je.s.ua&&ke(je.s.Wa,je.s.vb),je=ee+$ye}if(ne&Ie||(Oe=ts(me,ne,ee)),t(Oe!=null),Oe.Qb&&(_[Ce]=Oe.qb,He=!0),!He)if(Z(oe),Oe.jc){Le=oe,kt=_;var ut=Ce,nn=Oe.pd[Y(Le)&Nm-1];t(Oe.jc),256>nn.g?(K(Le,Le.u+nn.g),kt[ut]=nn.value,Le=0):(K(Le,Le.u+nn.g-256),t(256<=nn.value),Le=nn.value),Le==0&&(He=!0)}else Le=Dr(Oe.G[0],Oe.H[0],oe);if(oe.h)break;if(He||256>Le){if(!He)if(Oe.nd)_[Ce]=(Oe.qb|Le<<8)>>>0;else{if(Z(oe),He=Dr(Oe.G[1],Oe.H[1],oe),Z(oe),kt=Dr(Oe.G[2],Oe.H[2],oe),ut=Dr(Oe.G[3],Oe.H[3],oe),oe.h)break;_[Ce]=(ut<<24|He<<16|Le<<8|kt)>>>0}if(He=!1,++Ce,++ne>=U&&(ne=0,++ee,J!=null&&ee<=G&&!(ee%16)&&J(C,ee),be!=null))for(;le<Ce;)Le=_[le++],be.X[(506832829*Le&4294967295)>>>be.Mb]=Le}else if(280>Le){if(Le=wr(Le-256,oe),kt=Dr(Oe.G[4],Oe.H[4],oe),Z(oe),kt=Xr(U,kt=wr(kt,oe)),oe.h)break;if(Ce-I<kt||W-Ce<Le)break e;for(ut=0;ut<Le;++ut)_[Ce+ut]=_[Ce+ut-kt];for(Ce+=Le,ne+=Le;ne>=U;)ne-=U,++ee,J!=null&&ee<=G&&!(ee%16)&&J(C,ee);if(t(Ce<=W),ne&Ie&&(Oe=ts(me,ne,ee)),be!=null)for(;le<Ce;)Le=_[le++],be.X[(506832829*Le&4294967295)>>>be.Mb]=Le}else{if(!(Le<we))break e;for(He=Le-280,t(be!=null);le<Ce;)Le=_[le++],be.X[(506832829*Le&4294967295)>>>be.Mb]=Le;Le=Ce,t(!(He>>>(kt=be).Xa)),_[Le]=kt.X[He],He=!0}He||t(oe.h==X(oe))}if(C.Pb&&oe.h&&Ce<W)t(C.m.h),C.a=5,C.m=C.wd,C.$=C.xd,0<C.s.ua&&ke(C.s.vb,C.s.Wa);else{if(oe.h)break e;J!=null&&J(C,ee>G?G:ee),C.a=0,C.$=Ce-I}return 1}return C.a=3,0}function ko(C){t(C!=null),C.vc=null,C.yc=null,C.Ya=null;var _=C.Wa;_!=null&&(_.X=null),C.vb=null,t(C!=null)}function Gh(){var C=new vt;return C==null?null:(C.a=0,C.xb=GH,Mt("Predictor","VP8LPredictors"),Mt("Predictor","VP8LPredictors_C"),Mt("PredictorAdd","VP8LPredictorsAdd"),Mt("PredictorAdd","VP8LPredictorsAdd_C"),Tm=qe,cf=Ge,Iv=mt,Ov=ct,Pm=xt,uf=Ft,df=$t,j.VP8LMapColor32b=pi,j.VP8LMapColor8b=Sc,C)}function yc(C,_,I,U,W){var G=1,J=[C],ee=[_],ne=U.m,oe=U.s,me=null,Ce=0;e:for(;;){if(I)for(;G&&ce(ne,1);){var le=J,ge=ee,we=U,je=1,be=we.m,Ie=we.gc[we.ab],Oe=ce(be,2);if(we.Oc&1<<Oe)G=0;else{switch(we.Oc|=1<<Oe,Ie.hc=Oe,Ie.Ea=le[0],Ie.nc=ge[0],Ie.K=[null],++we.ab,t(4>=we.ab),Oe){case 0:case 1:Ie.b=ce(be,3)+2,je=yc(Te(Ie.Ea,Ie.b),Te(Ie.nc,Ie.b),0,we,Ie.K),Ie.K=Ie.K[0];break;case 3:var He,Le=ce(be,8)+1,kt=16<Le?0:4<Le?1:2<Le?2:3;if(le[0]=Te(Ie.Ea,kt),Ie.b=kt,He=je=yc(Le,1,0,we,Ie.K)){var ut,nn=Le,wt=Ie,pn=1<<(8>>wt.b),_i=s(pn);if(_i==null)He=0;else{var rn=wt.K[0],bt=wt.w;for(_i[0]=wt.K[0][0],ut=1;ut<1*nn;++ut)_i[ut]=st(rn[bt+ut],_i[ut-1]);for(;ut<4*pn;++ut)_i[ut]=0;wt.K[0]=null,wt.K[0]=_i,He=1}}je=He;break;case 2:break;default:t(0)}G=je}}if(J=J[0],ee=ee[0],G&&ce(ne,1)&&!(G=1<=(Ce=ce(ne,4))&&11>=Ce)){U.a=3;break e}var Ye;if(Ye=G)t:{var Zr,Zt,wn,ur=U,rs=J,Gs=ee,Qr=Ce,_s=I,Ys=ur.m,ki=ur.s,_n=[null],Ln=1,Hr=0,Rn=Hye[Qr];n:for(;;){if(_s&&ce(Ys,1)){var is=ce(Ys,3)+2,Bl=Te(rs,is),ei=Te(Gs,is),xa=Bl*ei;if(!yc(Bl,ei,0,ur,_n))break n;for(_n=_n[0],ki.xc=is,Zr=0;Zr<xa;++Zr){var qn=_n[Zr]>>8&65535;_n[Zr]=qn,qn>=Ln&&(Ln=qn+1)}}if(Ys.h)break n;for(Zt=0;5>Zt;++Zt){var Ei=WH[Zt];!Zt&&0<Qr&&(Ei+=1<<Qr),Hr<Ei&&(Hr=Ei)}var qa=a(Ln*Rn,F),Xs=Ln,Ga=a(Xs,D);if(Ga==null)var Ya=null;else t(65536>=Xs),Ya=Ga;var wa=s(Hr);if(Ya==null||wa==null||qa==null){ur.a=1;break n}var Xa=qa;for(Zr=wn=0;Zr<Ln;++Zr){var tr=Ya[Zr],Ja=tr.G,_l=tr.H,Af=0,Su=1,ss=0;for(Zt=0;5>Zt;++Zt){Ei=WH[Zt],Ja[Zt]=Xa,_l[Zt]=wn,!Zt&&0<Qr&&(Ei+=1<<Qr);i:{var lC,dT=Ei,cC=ur,Uv=wa,c0e=Xa,u0e=wn,AT=0,Ud=cC.m,d0e=ce(Ud,1);if(i(Uv,0,0,dT),d0e){var A0e=ce(Ud,1)+1,h0e=ce(Ud,1),i$=ce(Ud,h0e==0?1:8);Uv[i$]=1,A0e==2&&(Uv[i$=ce(Ud,8)]=1);var uC=1}else{var s$=s(19),a$=ce(Ud,4)+4;if(19<a$){cC.a=3;var dC=0;break i}for(lC=0;lC<a$;++lC)s$[Dye[lC]]=ce(Ud,3);var hT=void 0,Dv=void 0,o$=cC,f0e=s$,AC=dT,l$=Uv,fT=0,Dd=o$.m,c$=8,u$=a(128,F);r:for(;E(u$,0,7,f0e,19);){if(ce(Dd,1)){var p0e=2+2*ce(Dd,3);if((hT=2+ce(Dd,p0e))>AC)break r}else hT=AC;for(Dv=0;Dv<AC&&hT--;){Z(Dd);var d$=u$[0+(127&Y(Dd))];K(Dd,Dd.u+d$.g);var Fm=d$.value;if(16>Fm)l$[Dv++]=Fm,Fm!=0&&(c$=Fm);else{var m0e=Fm==16,A$=Fm-16,g0e=Rye[A$],h$=ce(Dd,Lye[A$])+g0e;if(Dv+h$>AC)break r;for(var y0e=m0e?c$:0;0<h$--;)l$[Dv++]=y0e}}fT=1;break r}fT||(o$.a=3),uC=fT}(uC=uC&&!Ud.h)&&(AT=E(c0e,u0e,8,Uv,dT)),uC&&AT!=0?dC=AT:(cC.a=3,dC=0)}if(dC==0)break n;if(Su&&Uye[Zt]==1&&(Su=Xa[wn].g==0),Af+=Xa[wn].g,wn+=dC,3>=Zt){var Qv,pT=wa[0];for(Qv=1;Qv<Ei;++Qv)wa[Qv]>pT&&(pT=wa[Qv]);ss+=pT}}if(tr.nd=Su,tr.Qb=0,Su&&(tr.qb=(Ja[3][_l[3]+0].value<<24|Ja[1][_l[1]+0].value<<16|Ja[2][_l[2]+0].value)>>>0,Af==0&&256>Ja[0][_l[0]+0].value&&(tr.Qb=1,tr.qb+=Ja[0][_l[0]+0].value<<8)),tr.jc=!tr.Qb&&6>ss,tr.jc){var hC,Bu=tr;for(hC=0;hC<Nm;++hC){var Qd=hC,Hd=Bu.pd[Qd],fC=Bu.G[0][Bu.H[0]+Qd];256<=fC.value?(Hd.g=fC.g+256,Hd.value=fC.value):(Hd.g=0,Hd.value=0,Qd>>=Hi(fC,8,Hd),Qd>>=Hi(Bu.G[1][Bu.H[1]+Qd],16,Hd),Qd>>=Hi(Bu.G[2][Bu.H[2]+Qd],0,Hd),Hi(Bu.G[3][Bu.H[3]+Qd],24,Hd))}}}ki.vc=_n,ki.Wb=Ln,ki.Ya=Ya,ki.yc=qa,Ye=1;break t}Ye=0}if(!(G=Ye)){U.a=3;break e}if(0<Ce){if(oe.ua=1<<Ce,!te(oe.Wa,Ce)){U.a=1,G=0;break e}}else oe.ua=0;var mT=U,f$=J,v0e=ee,gT=mT.s,yT=gT.xc;if(mT.c=f$,mT.i=v0e,gT.md=Te(f$,yT),gT.wc=yT==0?-1:(1<<yT)-1,I){U.xb=Yye;break e}if((me=s(J*ee))==null){U.a=1,G=0;break e}G=(G=bl(U,me,0,J,ee,ee,null))&&!ne.h;break e}return G?(W!=null?W[0]=me:(t(me==null),t(I)),U.$=0,I||ko(oe)):ko(oe),G}function Yh(C,_){var I=C.c*C.i,U=I+_+16*_;return t(C.c<=_),C.V=s(U),C.V==null?(C.Ta=null,C.Ua=0,C.a=1,0):(C.Ta=C.V,C.Ua=C.Ba+I+_,1)}function fm(C,_){var I=C.C,U=_-I,W=C.V,G=C.Ba+C.c*I;for(t(_<=C.l.o);0<U;){var J=16<U?16:U,ee=C.l.ma,ne=C.l.width,oe=ne*J,me=ee.ca,Ce=ee.tb+ne*I,le=C.Ta,ge=C.Ua;qh(C,J,W,G),UH(le,ge,me,Ce,oe),gc(ee,I,I+J,me,Ce,ne),U-=J,W+=J*C.c,I+=J}t(I==_),C.C=C.Ma=_}function pm(){this.ub=this.yd=this.td=this.Rb=0}function mm(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Rj(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function vv(){this.Yb=function(){var C=[];return function _(I,U,W){for(var G=W[U],J=0;J<G&&(I.push(W.length>U+1?[]:0),!(W.length<U+1));J++)_(I[J],U+1,W)}(C,0,[3,11]),C}()}function F2(){this.jb=s(3),this.Wc=o([4,8],vv),this.Xc=o([4,17],vv)}function M2(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function Eo(){this.ld=this.La=this.dd=this.tc=0}function xv(){this.Na=this.la=0}function L2(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function wv(){this.ad=s(384),this.Za=0,this.Ob=s(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function R2(){this.uc=this.M=this.Nb=0,this.wa=Array(new Eo),this.Y=0,this.ya=Array(new wv),this.aa=0,this.l=new gm}function U2(){this.y=s(16),this.f=s(8),this.ea=s(8)}function D2(){this.cb=this.a=0,this.sc="",this.m=new R,this.Od=new pm,this.Kc=new mm,this.ed=new M2,this.Qa=new Rj,this.Ic=this.$c=this.Aa=0,this.D=new R2,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=a(8,R),this.ia=0,this.pb=a(4,L2),this.Pa=new F2,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new U2),this.Hd=0,this.rb=Array(new xv),this.sb=0,this.wa=Array(new Eo),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new wv),this.L=this.aa=0,this.gd=o([4,2],Eo),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function vc(C,_){return 0>C?0:C>_?_:C}function gm(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Uj(){var C=new D2;return C!=null&&(C.a=0,C.sc="OK",C.cb=0,C.Xb=0,Lv||(Lv=ym)),C}function hi(C,_,I){return C.a==0&&(C.a=_,C.sc=I,C.cb=0),0}function Q2(C,_,I){return 3<=I&&C[_+0]==157&&C[_+1]==1&&C[_+2]==42}function xc(C,_){if(C==null)return 0;if(C.a=0,C.sc="OK",_==null)return hi(C,2,"null VP8Io passed to VP8GetHeaders()");var I=_.data,U=_.w,W=_.ha;if(4>W)return hi(C,7,"Truncated header.");var G=I[U+0]|I[U+1]<<8|I[U+2]<<16,J=C.Od;if(J.Rb=!(1&G),J.td=G>>1&7,J.yd=G>>4&1,J.ub=G>>5,3<J.td)return hi(C,3,"Incorrect keyframe parameters.");if(!J.yd)return hi(C,4,"Frame not displayable.");U+=3,W-=3;var ee=C.Kc;if(J.Rb){if(7>W)return hi(C,7,"cannot parse picture header");if(!Q2(I,U,W))return hi(C,3,"Bad code word");ee.c=16383&(I[U+4]<<8|I[U+3]),ee.Td=I[U+4]>>6,ee.i=16383&(I[U+6]<<8|I[U+5]),ee.Ud=I[U+6]>>6,U+=7,W-=7,C.za=ee.c+15>>4,C.Ub=ee.i+15>>4,_.width=ee.c,_.height=ee.i,_.Da=0,_.j=0,_.v=0,_.va=_.width,_.o=_.height,_.da=0,_.ib=_.width,_.hb=_.height,_.U=_.width,_.T=_.height,i((G=C.Pa).jb,0,255,G.jb.length),t((G=C.Qa)!=null),G.Cb=0,G.Bb=0,G.Fb=1,i(G.Zb,0,0,G.Zb.length),i(G.Lb,0,0,G.Lb)}if(J.ub>W)return hi(C,7,"bad partition length");H(G=C.m,I,U,J.ub),U+=J.ub,W-=J.ub,J.Rb&&(ee.Ld=ue(G),ee.Kd=ue(G)),ee=C.Qa;var ne,oe=C.Pa;if(t(G!=null),t(ee!=null),ee.Cb=ue(G),ee.Cb){if(ee.Bb=ue(G),ue(G)){for(ee.Fb=ue(G),ne=0;4>ne;++ne)ee.Zb[ne]=ue(G)?$(G,7):0;for(ne=0;4>ne;++ne)ee.Lb[ne]=ue(G)?$(G,6):0}if(ee.Bb)for(ne=0;3>ne;++ne)oe.jb[ne]=ue(G)?q(G,8):255}else ee.Bb=0;if(G.Ka)return hi(C,3,"cannot parse segment header");if((ee=C.ed).zd=ue(G),ee.Tb=q(G,6),ee.wb=q(G,3),ee.Pc=ue(G),ee.Pc&&ue(G)){for(oe=0;4>oe;++oe)ue(G)&&(ee.vd[oe]=$(G,6));for(oe=0;4>oe;++oe)ue(G)&&(ee.od[oe]=$(G,6))}if(C.L=ee.Tb==0?0:ee.zd?1:2,G.Ka)return hi(C,3,"cannot parse filter header");var me=W;if(W=ne=U,U=ne+me,ee=me,C.Xb=(1<<q(C.m,2))-1,me<3*(oe=C.Xb))I=7;else{for(ne+=3*oe,ee-=3*oe,me=0;me<oe;++me){var Ce=I[W+0]|I[W+1]<<8|I[W+2]<<16;Ce>ee&&(Ce=ee),H(C.Jc[+me],I,ne,Ce),ne+=Ce,ee-=Ce,W+=3}H(C.Jc[+oe],I,ne,ee),I=ne<U?0:5}if(I!=0)return hi(C,I,"cannot parse partitions");for(I=q(ne=C.m,7),W=ue(ne)?$(ne,4):0,U=ue(ne)?$(ne,4):0,ee=ue(ne)?$(ne,4):0,oe=ue(ne)?$(ne,4):0,ne=ue(ne)?$(ne,4):0,me=C.Qa,Ce=0;4>Ce;++Ce){if(me.Cb){var le=me.Zb[Ce];me.Fb||(le+=I)}else{if(0<Ce){C.pb[Ce]=C.pb[0];continue}le=I}var ge=C.pb[Ce];ge.Sc[0]=lT[vc(le+W,127)],ge.Sc[1]=cT[vc(le+0,127)],ge.Eb[0]=2*lT[vc(le+U,127)],ge.Eb[1]=101581*cT[vc(le+ee,127)]>>16,8>ge.Eb[1]&&(ge.Eb[1]=8),ge.Qc[0]=lT[vc(le+oe,117)],ge.Qc[1]=cT[vc(le+ne,127)],ge.lc=le+ne}if(!J.Rb)return hi(C,4,"Not a key frame.");for(ue(G),J=C.Pa,I=0;4>I;++I){for(W=0;8>W;++W)for(U=0;3>U;++U)for(ee=0;11>ee;++ee)oe=se(G,qye[I][W][U][ee])?q(G,8):Kye[I][W][U][ee],J.Wc[I][W].Yb[U][ee]=oe;for(W=0;17>W;++W)J.Xc[I][W]=J.Wc[I][Gye[W]]}return C.kc=ue(G),C.kc&&(C.Bd=q(G,8)),C.cb=1}function ym(C,_,I,U,W,G,J){var ee=_[W].Yb[I];for(I=0;16>W;++W){if(!se(C,ee[I+0]))return W;for(;!se(C,ee[I+1]);)if(ee=_[++W].Yb[0],I=0,W==16)return 16;var ne=_[W+1].Yb;if(se(C,ee[I+2])){var oe=C,me=0;if(se(oe,(le=ee)[(Ce=I)+3]))if(se(oe,le[Ce+6])){for(ee=0,Ce=2*(me=se(oe,le[Ce+8]))+(le=se(oe,le[Ce+9+me])),me=0,le=zye[Ce];le[ee];++ee)me+=me+se(oe,le[ee]);me+=3+(8<<Ce)}else se(oe,le[Ce+7])?(me=7+2*se(oe,165),me+=se(oe,145)):me=5+se(oe,159);else me=se(oe,le[Ce+4])?3+se(oe,le[Ce+5]):2;ee=ne[2]}else me=1,ee=ne[1];ne=J+Vye[W],0>(oe=C).b&&ae(oe);var Ce,le=oe.b,ge=(Ce=oe.Ca>>1)-(oe.I>>le)>>31;--oe.b,oe.Ca+=ge,oe.Ca|=1,oe.I-=(Ce+1&ge)<<le,G[ne]=((me^ge)-ge)*U[(0<W)+0]}return 16}function bv(C){var _=C.rb[C.sb-1];_.la=0,_.Na=0,i(C.zc,0,0,C.zc.length),C.ja=0}function Ka(C,_,I,U,W){W=C[_+I+32*U]+(W>>3),C[_+I+32*U]=-256&W?0>W?0:255:W}function vm(C,_,I,U,W,G){Ka(C,_,0,I,U+W),Ka(C,_,1,I,U+G),Ka(C,_,2,I,U-G),Ka(C,_,3,I,U-W)}function pu(C){return(20091*C>>16)+C}function ns(C,_,I,U){var W,G=0,J=s(16);for(W=0;4>W;++W){var ee=C[_+0]+C[_+8],ne=C[_+0]-C[_+8],oe=(35468*C[_+4]>>16)-pu(C[_+12]),me=pu(C[_+4])+(35468*C[_+12]>>16);J[G+0]=ee+me,J[G+1]=ne+oe,J[G+2]=ne-oe,J[G+3]=ee-me,G+=4,_++}for(W=G=0;4>W;++W)ee=(C=J[G+0]+4)+J[G+8],ne=C-J[G+8],oe=(35468*J[G+4]>>16)-pu(J[G+12]),Ka(I,U,0,0,ee+(me=pu(J[G+4])+(35468*J[G+12]>>16))),Ka(I,U,1,0,ne+oe),Ka(I,U,2,0,ne-oe),Ka(I,U,3,0,ee-me),G++,U+=32}function H2(C,_,I,U){var W=C[_+0]+4,G=35468*C[_+4]>>16,J=pu(C[_+4]),ee=35468*C[_+1]>>16;vm(I,U,0,W+J,C=pu(C[_+1]),ee),vm(I,U,1,W+G,C,ee),vm(I,U,2,W-G,C,ee),vm(I,U,3,W-J,C,ee)}function Dj(C,_,I,U,W){ns(C,_,I,U),W&&ns(C,_+16,I,U+4)}function Qj(C,_,I,U){wu(C,_+0,I,U,1),wu(C,_+32,I,U+128,1)}function Hj(C,_,I,U){var W;for(C=C[_+0]+4,W=0;4>W;++W)for(_=0;4>_;++_)Ka(I,U,_,W,C)}function wc(C,_,I,U){C[_+0]&&Bs(C,_+0,I,U),C[_+16]&&Bs(C,_+16,I,U+4),C[_+32]&&Bs(C,_+32,I,U+128),C[_+48]&&Bs(C,_+48,I,U+128+4)}function $2(C,_,I,U){var W,G=s(16);for(W=0;4>W;++W){var J=C[_+0+W]+C[_+12+W],ee=C[_+4+W]+C[_+8+W],ne=C[_+4+W]-C[_+8+W],oe=C[_+0+W]-C[_+12+W];G[0+W]=J+ee,G[8+W]=J-ee,G[4+W]=oe+ne,G[12+W]=oe-ne}for(W=0;4>W;++W)J=(C=G[0+4*W]+3)+G[3+4*W],ee=G[1+4*W]+G[2+4*W],ne=G[1+4*W]-G[2+4*W],oe=C-G[3+4*W],I[U+0]=J+ee>>3,I[U+16]=oe+ne>>3,I[U+32]=J-ee>>3,I[U+48]=oe-ne>>3,U+=64}function xm(C,_,I){var U,W=_-32,G=Wa,J=255-C[W-1];for(U=0;U<I;++U){var ee,ne=G,oe=J+C[_-1];for(ee=0;ee<I;++ee)C[_+ee]=ne[oe+C[W+ee]];_+=32}}function wm(C,_){xm(C,_,4)}function Cv(C,_){xm(C,_,8)}function $j(C,_){xm(C,_,16)}function zj(C,_){var I;for(I=0;16>I;++I)r(C,_+32*I,C,_-32,16)}function Vj(C,_){var I;for(I=16;0<I;--I)i(C,_,C[_-1],16),_+=32}function Nd(C,_,I){var U;for(U=0;16>U;++U)i(_,I+32*U,C,16)}function z2(C,_){var I,U=16;for(I=0;16>I;++I)U+=C[_-1+32*I]+C[_+I-32];Nd(U>>5,C,_)}function jd(C,_){var I,U=8;for(I=0;16>I;++I)U+=C[_-1+32*I];Nd(U>>4,C,_)}function Kj(C,_){var I,U=8;for(I=0;16>I;++I)U+=C[_+I-32];Nd(U>>4,C,_)}function Xh(C,_){Nd(128,C,_)}function zt(C,_,I){return C+2*_+I+2>>2}function Wj(C,_){var I,U=_-32;for(U=new Uint8Array([zt(C[U-1],C[U+0],C[U+1]),zt(C[U+0],C[U+1],C[U+2]),zt(C[U+1],C[U+2],C[U+3]),zt(C[U+2],C[U+3],C[U+4])]),I=0;4>I;++I)r(C,_+32*I,U,0,U.length)}function qj(C,_){var I=C[_-1],U=C[_-1+32],W=C[_-1+64],G=C[_-1+96];Ae(C,_+0,16843009*zt(C[_-1-32],I,U)),Ae(C,_+32,16843009*zt(I,U,W)),Ae(C,_+64,16843009*zt(U,W,G)),Ae(C,_+96,16843009*zt(W,G,G))}function Gj(C,_){var I,U=4;for(I=0;4>I;++I)U+=C[_+I-32]+C[_-1+32*I];for(U>>=3,I=0;4>I;++I)i(C,_+32*I,U,4)}function Yj(C,_){var I=C[_-1+0],U=C[_-1+32],W=C[_-1+64],G=C[_-1-32],J=C[_+0-32],ee=C[_+1-32],ne=C[_+2-32],oe=C[_+3-32];C[_+0+96]=zt(U,W,C[_-1+96]),C[_+1+96]=C[_+0+64]=zt(I,U,W),C[_+2+96]=C[_+1+64]=C[_+0+32]=zt(G,I,U),C[_+3+96]=C[_+2+64]=C[_+1+32]=C[_+0+0]=zt(J,G,I),C[_+3+64]=C[_+2+32]=C[_+1+0]=zt(ee,J,G),C[_+3+32]=C[_+2+0]=zt(ne,ee,J),C[_+3+0]=zt(oe,ne,ee)}function Xj(C,_){var I=C[_+1-32],U=C[_+2-32],W=C[_+3-32],G=C[_+4-32],J=C[_+5-32],ee=C[_+6-32],ne=C[_+7-32];C[_+0+0]=zt(C[_+0-32],I,U),C[_+1+0]=C[_+0+32]=zt(I,U,W),C[_+2+0]=C[_+1+32]=C[_+0+64]=zt(U,W,G),C[_+3+0]=C[_+2+32]=C[_+1+64]=C[_+0+96]=zt(W,G,J),C[_+3+32]=C[_+2+64]=C[_+1+96]=zt(G,J,ee),C[_+3+64]=C[_+2+96]=zt(J,ee,ne),C[_+3+96]=zt(ee,ne,ne)}function mu(C,_){var I=C[_-1+0],U=C[_-1+32],W=C[_-1+64],G=C[_-1-32],J=C[_+0-32],ee=C[_+1-32],ne=C[_+2-32],oe=C[_+3-32];C[_+0+0]=C[_+1+64]=G+J+1>>1,C[_+1+0]=C[_+2+64]=J+ee+1>>1,C[_+2+0]=C[_+3+64]=ee+ne+1>>1,C[_+3+0]=ne+oe+1>>1,C[_+0+96]=zt(W,U,I),C[_+0+64]=zt(U,I,G),C[_+0+32]=C[_+1+96]=zt(I,G,J),C[_+1+32]=C[_+2+96]=zt(G,J,ee),C[_+2+32]=C[_+3+96]=zt(J,ee,ne),C[_+3+32]=zt(ee,ne,oe)}function gu(C,_){var I=C[_+0-32],U=C[_+1-32],W=C[_+2-32],G=C[_+3-32],J=C[_+4-32],ee=C[_+5-32],ne=C[_+6-32],oe=C[_+7-32];C[_+0+0]=I+U+1>>1,C[_+1+0]=C[_+0+64]=U+W+1>>1,C[_+2+0]=C[_+1+64]=W+G+1>>1,C[_+3+0]=C[_+2+64]=G+J+1>>1,C[_+0+32]=zt(I,U,W),C[_+1+32]=C[_+0+96]=zt(U,W,G),C[_+2+32]=C[_+1+96]=zt(W,G,J),C[_+3+32]=C[_+2+96]=zt(G,J,ee),C[_+3+64]=zt(J,ee,ne),C[_+3+96]=zt(ee,ne,oe)}function Jj(C,_){var I=C[_-1+0],U=C[_-1+32],W=C[_-1+64],G=C[_-1+96];C[_+0+0]=I+U+1>>1,C[_+2+0]=C[_+0+32]=U+W+1>>1,C[_+2+32]=C[_+0+64]=W+G+1>>1,C[_+1+0]=zt(I,U,W),C[_+3+0]=C[_+1+32]=zt(U,W,G),C[_+3+32]=C[_+1+64]=zt(W,G,G),C[_+3+64]=C[_+2+64]=C[_+0+96]=C[_+1+96]=C[_+2+96]=C[_+3+96]=G}function Zj(C,_){var I=C[_-1+0],U=C[_-1+32],W=C[_-1+64],G=C[_-1+96],J=C[_-1-32],ee=C[_+0-32],ne=C[_+1-32],oe=C[_+2-32];C[_+0+0]=C[_+2+32]=I+J+1>>1,C[_+0+32]=C[_+2+64]=U+I+1>>1,C[_+0+64]=C[_+2+96]=W+U+1>>1,C[_+0+96]=G+W+1>>1,C[_+3+0]=zt(ee,ne,oe),C[_+2+0]=zt(J,ee,ne),C[_+1+0]=C[_+3+32]=zt(I,J,ee),C[_+1+32]=C[_+3+64]=zt(U,I,J),C[_+1+64]=C[_+3+96]=zt(W,U,I),C[_+1+96]=zt(G,W,U)}function bm(C,_){var I;for(I=0;8>I;++I)r(C,_+32*I,C,_-32,8)}function Sv(C,_){var I;for(I=0;8>I;++I)i(C,_,C[_-1],8),_+=32}function bc(C,_,I){var U;for(U=0;8>U;++U)i(_,I+32*U,C,8)}function eT(C,_){var I,U=8;for(I=0;8>I;++I)U+=C[_+I-32]+C[_-1+32*I];bc(U>>4,C,_)}function Cm(C,_){var I,U=4;for(I=0;8>I;++I)U+=C[_+I-32];bc(U>>3,C,_)}function tT(C,_){var I,U=4;for(I=0;8>I;++I)U+=C[_-1+32*I];bc(U>>3,C,_)}function Bv(C,_){bc(128,C,_)}function Td(C,_,I){var U=C[_-I],W=C[_+0],G=3*(W-U)+rT[1020+C[_-2*I]-C[_+I]],J=Z2[112+(G+4>>3)];C[_-I]=Wa[255+U+Z2[112+(G+3>>3)]],C[_+0]=Wa[255+W-J]}function _v(C,_,I,U){var W=C[_+0],G=C[_+I];return jo[255+C[_-2*I]-C[_-I]]>U||jo[255+G-W]>U}function Jh(C,_,I,U){return 4*jo[255+C[_-I]-C[_+0]]+jo[255+C[_-2*I]-C[_+I]]<=U}function kv(C,_,I,U,W){var G=C[_-3*I],J=C[_-2*I],ee=C[_-I],ne=C[_+0],oe=C[_+I],me=C[_+2*I],Ce=C[_+3*I];return 4*jo[255+ee-ne]+jo[255+J-oe]>U?0:jo[255+C[_-4*I]-G]<=W&&jo[255+G-J]<=W&&jo[255+J-ee]<=W&&jo[255+Ce-me]<=W&&jo[255+me-oe]<=W&&jo[255+oe-ne]<=W}function Sm(C,_,I,U){var W=2*U+1;for(U=0;16>U;++U)Jh(C,_+U,I,W)&&Td(C,_+U,I)}function Ev(C,_,I,U){var W=2*U+1;for(U=0;16>U;++U)Jh(C,_+U*I,1,W)&&Td(C,_+U*I,1)}function Bm(C,_,I,U){var W;for(W=3;0<W;--W)Sm(C,_+=4*I,I,U)}function V2(C,_,I,U){var W;for(W=3;0<W;--W)Ev(C,_+=4,I,U)}function yu(C,_,I,U,W,G,J,ee){for(G=2*G+1;0<W--;){if(kv(C,_,I,G,J))if(_v(C,_,I,ee))Td(C,_,I);else{var ne=C,oe=_,me=I,Ce=ne[oe-2*me],le=ne[oe-me],ge=ne[oe+0],we=ne[oe+me],je=ne[oe+2*me],be=27*(Oe=rT[1020+3*(ge-le)+rT[1020+Ce-we]])+63>>7,Ie=18*Oe+63>>7,Oe=9*Oe+63>>7;ne[oe-3*me]=Wa[255+ne[oe-3*me]+Oe],ne[oe-2*me]=Wa[255+Ce+Ie],ne[oe-me]=Wa[255+le+be],ne[oe+0]=Wa[255+ge-be],ne[oe+me]=Wa[255+we-Ie],ne[oe+2*me]=Wa[255+je-Oe]}_+=U}}function vu(C,_,I,U,W,G,J,ee){for(G=2*G+1;0<W--;){if(kv(C,_,I,G,J))if(_v(C,_,I,ee))Td(C,_,I);else{var ne=C,oe=_,me=I,Ce=ne[oe-me],le=ne[oe+0],ge=ne[oe+me],we=Z2[112+(4+(je=3*(le-Ce))>>3)],je=Z2[112+(je+3>>3)],be=we+1>>1;ne[oe-2*me]=Wa[255+ne[oe-2*me]+be],ne[oe-me]=Wa[255+Ce+je],ne[oe+0]=Wa[255+le-we],ne[oe+me]=Wa[255+ge-be]}_+=U}}function K2(C,_,I,U,W,G){yu(C,_,I,1,16,U,W,G)}function W2(C,_,I,U,W,G){yu(C,_,1,I,16,U,W,G)}function q2(C,_,I,U,W,G){var J;for(J=3;0<J;--J)vu(C,_+=4*I,I,1,16,U,W,G)}function Zh(C,_,I,U,W,G){var J;for(J=3;0<J;--J)vu(C,_+=4,1,I,16,U,W,G)}function G2(C,_,I,U,W,G,J,ee){yu(C,_,W,1,8,G,J,ee),yu(I,U,W,1,8,G,J,ee)}function P(C,_,I,U,W,G,J,ee){yu(C,_,1,W,8,G,J,ee),yu(I,U,1,W,8,G,J,ee)}function V(C,_,I,U,W,G,J,ee){vu(C,_+4*W,W,1,8,G,J,ee),vu(I,U+4*W,W,1,8,G,J,ee)}function ie(C,_,I,U,W,G,J,ee){vu(C,_+4,1,W,8,G,J,ee),vu(I,U+4,1,W,8,G,J,ee)}function he(){this.ba=new en,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Nn,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function ve(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Ne(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Me(){this.ua=0,this.Wa=new Ze,this.vb=new Ze,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new D,this.yc=new F}function vt(){this.xb=this.a=0,this.l=new gm,this.ca=new en,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new O,this.Pb=0,this.wd=new O,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Me,this.ab=0,this.gc=a(4,Ne),this.Oc=0}function gt(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new gm,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Gt(C,_,I,U,W,G,J){for(C=C==null?0:C[_+0],_=0;_<J;++_)W[G+_]=C+I[U+_]&255,C=W[G+_]}function Jt(C,_,I,U,W,G,J){var ee;if(C==null)Gt(null,null,I,U,W,G,J);else for(ee=0;ee<J;++ee)W[G+ee]=C[_+ee]+I[U+ee]&255}function xn(C,_,I,U,W,G,J){if(C==null)Gt(null,null,I,U,W,G,J);else{var ee,ne=C[_+0],oe=ne,me=ne;for(ee=0;ee<J;++ee)oe=me+(ne=C[_+ee])-oe,me=I[U+ee]+(-256&oe?0>oe?0:255:oe)&255,oe=ne,W[G+ee]=me}}function fi(C,_,I,U){var W=_.width,G=_.o;if(t(C!=null&&_!=null),0>I||0>=U||I+U>G)return null;if(!C.Cc){if(C.ga==null){var J;if(C.ga=new gt,(J=C.ga==null)||(J=_.width*_.o,t(C.Gb.length==0),C.Gb=s(J),C.Uc=0,C.Gb==null?J=0:(C.mb=C.Gb,C.nb=C.Uc,C.rc=null,J=1),J=!J),!J){J=C.ga;var ee=C.Fa,ne=C.P,oe=C.qc,me=C.mb,Ce=C.nb,le=ne+1,ge=oe-1,we=J.l;if(t(ee!=null&&me!=null&&_!=null),Rd[0]=null,Rd[1]=Gt,Rd[2]=Jt,Rd[3]=xn,J.ca=me,J.tb=Ce,J.c=_.width,J.i=_.height,t(0<J.c&&0<J.i),1>=oe)_=0;else if(J.$a=3&ee[ne+0],J.Z=ee[ne+0]>>2&3,J.Lc=ee[ne+0]>>4&3,ne=ee[ne+0]>>6&3,0>J.$a||1<J.$a||4<=J.Z||1<J.Lc||ne)_=0;else if(we.put=yt,we.ac=Ur,we.bc=Qi,we.ma=J,we.width=_.width,we.height=_.height,we.Da=_.Da,we.v=_.v,we.va=_.va,we.j=_.j,we.o=_.o,J.$a)e:{t(J.$a==1),_=Gh();t:for(;;){if(_==null){_=0;break e}if(t(J!=null),J.mc=_,_.c=J.c,_.i=J.i,_.l=J.l,_.l.ma=J,_.l.width=J.c,_.l.height=J.i,_.a=0,z(_.m,ee,le,ge),!yc(J.c,J.i,1,_,null)||(_.ab==1&&_.gc[0].hc==3&&xl(_.s)?(J.ic=1,ee=_.c*_.i,_.Ta=null,_.Ua=0,_.V=s(ee),_.Ba=0,_.V==null?(_.a=1,_=0):_=1):(J.ic=0,_=Yh(_,J.c)),!_))break t;_=1;break e}J.mc=null,_=0}else _=ge>=J.c*J.i;J=!_}if(J)return null;C.ga.Lc!=1?C.Ga=0:U=G-I}t(C.ga!=null),t(I+U<=G);e:{if(_=(ee=C.ga).c,G=ee.l.o,ee.$a==0){if(le=C.rc,ge=C.Vc,we=C.Fa,ne=C.P+1+I*_,oe=C.mb,me=C.nb+I*_,t(ne<=C.P+C.qc),ee.Z!=0)for(t(Rd[ee.Z]!=null),J=0;J<U;++J)Rd[ee.Z](le,ge,we,ne,oe,me,_),le=oe,ge=me,me+=_,ne+=_;else for(J=0;J<U;++J)r(oe,me,we,ne,_),le=oe,ge=me,me+=_,ne+=_;C.rc=le,C.Vc=ge}else{if(t(ee.mc!=null),_=I+U,t((J=ee.mc)!=null),t(_<=J.i),J.C>=_)_=1;else if(ee.ic||Er(),ee.ic){ee=J.V,le=J.Ba,ge=J.c;var je=J.i,be=(we=1,ne=J.$/ge,oe=J.$%ge,me=J.m,Ce=J.s,J.$),Ie=ge*je,Oe=ge*_,He=Ce.wc,Le=be<Oe?ts(Ce,oe,ne):null;t(be<=Ie),t(_<=je),t(xl(Ce));t:for(;;){for(;!me.h&&be<Oe;){if(oe&He||(Le=ts(Ce,oe,ne)),t(Le!=null),Z(me),256>(je=Dr(Le.G[0],Le.H[0],me)))ee[le+be]=je,++be,++oe>=ge&&(oe=0,++ne<=_&&!(ne%16)&&wl(J,ne));else{if(!(280>je)){we=0;break t}je=wr(je-256,me);var kt,ut=Dr(Le.G[4],Le.H[4],me);if(Z(me),!(be>=(ut=Xr(ge,ut=wr(ut,me)))&&Ie-be>=je)){we=0;break t}for(kt=0;kt<je;++kt)ee[le+be+kt]=ee[le+be+kt-ut];for(be+=je,oe+=je;oe>=ge;)oe-=ge,++ne<=_&&!(ne%16)&&wl(J,ne);be<Oe&&oe&He&&(Le=ts(Ce,oe,ne))}t(me.h==X(me))}wl(J,ne>_?_:ne);break t}!we||me.h&&be<Ie?(we=0,J.a=me.h?5:3):J.$=be,_=we}else _=bl(J,J.V,J.Ba,J.c,J.i,_,fm);if(!_){U=0;break e}}I+U>=G&&(C.Cc=1),U=1}if(!U)return null;if(C.Cc&&((U=C.ga)!=null&&(U.mc=null),C.ga=null,0<C.Ga))return alert("todo:WebPDequantizeLevels"),null}return C.nb+I*W}function Wn(C,_,I,U,W,G){for(;0<W--;){var J,ee=C,ne=_+(I?1:0),oe=C,me=_+(I?0:3);for(J=0;J<U;++J){var Ce=oe[me+4*J];Ce!=255&&(Ce*=32897,ee[ne+4*J+0]=ee[ne+4*J+0]*Ce>>23,ee[ne+4*J+1]=ee[ne+4*J+1]*Ce>>23,ee[ne+4*J+2]=ee[ne+4*J+2]*Ce>>23)}_+=G}}function $n(C,_,I,U,W){for(;0<U--;){var G;for(G=0;G<I;++G){var J=C[_+2*G+0],ee=15&(oe=C[_+2*G+1]),ne=4369*ee,oe=(240&oe|oe>>4)*ne>>16;C[_+2*G+0]=(240&J|J>>4)*ne>>16&240|(15&J|J<<4)*ne>>16>>4&15,C[_+2*G+1]=240&oe|ee}_+=W}}function cr(C,_,I,U,W,G,J,ee){var ne,oe,me=255;for(oe=0;oe<W;++oe){for(ne=0;ne<U;++ne){var Ce=C[_+ne];G[J+4*ne]=Ce,me&=Ce}_+=I,J+=ee}return me!=255}function kr(C,_,I,U,W){var G;for(G=0;G<W;++G)I[U+G]=C[_+G]>>8}function Er(){Mv=Wn,LH=$n,RH=cr,UH=kr}function Cs(C,_,I){j[C]=function(U,W,G,J,ee,ne,oe,me,Ce,le,ge,we,je,be,Ie,Oe,He){var Le,kt=He-1>>1,ut=ee[ne+0]|oe[me+0]<<16,nn=Ce[le+0]|ge[we+0]<<16;t(U!=null);var wt=3*ut+nn+131074>>2;for(_(U[W+0],255&wt,wt>>16,je,be),G!=null&&(wt=3*nn+ut+131074>>2,_(G[J+0],255&wt,wt>>16,Ie,Oe)),Le=1;Le<=kt;++Le){var pn=ee[ne+Le]|oe[me+Le]<<16,_i=Ce[le+Le]|ge[we+Le]<<16,rn=ut+pn+nn+_i+524296,bt=rn+2*(pn+nn)>>3;wt=bt+ut>>1,ut=(rn=rn+2*(ut+_i)>>3)+pn>>1,_(U[W+2*Le-1],255&wt,wt>>16,je,be+(2*Le-1)*I),_(U[W+2*Le-0],255&ut,ut>>16,je,be+(2*Le-0)*I),G!=null&&(wt=rn+nn>>1,ut=bt+_i>>1,_(G[J+2*Le-1],255&wt,wt>>16,Ie,Oe+(2*Le-1)*I),_(G[J+2*Le+0],255&ut,ut>>16,Ie,Oe+(2*Le+0)*I)),ut=pn,nn=_i}1&He||(wt=3*ut+nn+131074>>2,_(U[W+He-1],255&wt,wt>>16,je,be+(He-1)*I),G!=null&&(wt=3*nn+ut+131074>>2,_(G[J+He-1],255&wt,wt>>16,Ie,Oe+(He-1)*I)))}}function xu(){To[eC]=Xye,To[tC]=YH,To[VH]=Jye,To[nC]=XH,To[rC]=JH,To[iT]=ZH,To[KH]=Zye,To[sT]=YH,To[aT]=XH,To[iC]=JH,To[oT]=ZH}function Nv(C){return C&~e0e?0>C?0:255:C>>e$}function ef(C,_){return Nv((19077*C>>8)+(26149*_>>8)-14234)}function tf(C,_,I){return Nv((19077*C>>8)-(6419*_>>8)-(13320*I>>8)+8708)}function Pd(C,_){return Nv((19077*C>>8)+(33050*_>>8)-17685)}function nf(C,_,I,U,W){U[W+0]=ef(C,I),U[W+1]=tf(C,_,I),U[W+2]=Pd(C,_)}function _m(C,_,I,U,W){U[W+0]=Pd(C,_),U[W+1]=tf(C,_,I),U[W+2]=ef(C,I)}function km(C,_,I,U,W){var G=tf(C,_,I);_=G<<3&224|Pd(C,_)>>3,U[W+0]=248&ef(C,I)|G>>5,U[W+1]=_}function Ss(C,_,I,U,W){var G=240&Pd(C,_)|15;U[W+0]=240&ef(C,I)|tf(C,_,I)>>4,U[W+1]=G}function rf(C,_,I,U,W){U[W+0]=255,nf(C,_,I,U,W+1)}function sf(C,_,I,U,W){_m(C,_,I,U,W),U[W+3]=255}function jv(C,_,I,U,W){nf(C,_,I,U,W),U[W+3]=255}function Cc(C,_,I){j[C]=function(U,W,G,J,ee,ne,oe,me,Ce){for(var le=me+(-2&Ce)*I;me!=le;)_(U[W+0],G[J+0],ee[ne+0],oe,me),_(U[W+1],G[J+0],ee[ne+0],oe,me+I),W+=2,++J,++ne,me+=2*I;1&Ce&&_(U[W+0],G[J+0],ee[ne+0],oe,me)}}function Ws(C,_,I){return I==0?C==0?_==0?6:5:_==0?4:0:I}function Y2(C,_,I,U,W){switch(C>>>30){case 3:wu(_,I,U,W,0);break;case 2:Md(_,I,U,W);break;case 1:Bs(_,I,U,W)}}function Em(C,_){var I,U,W=_.M,G=_.Nb,J=C.oc,ee=C.pc+40,ne=C.oc,oe=C.pc+584,me=C.oc,Ce=C.pc+600;for(I=0;16>I;++I)J[ee+32*I-1]=129;for(I=0;8>I;++I)ne[oe+32*I-1]=129,me[Ce+32*I-1]=129;for(0<W?J[ee-1-32]=ne[oe-1-32]=me[Ce-1-32]=129:(i(J,ee-32-1,127,21),i(ne,oe-32-1,127,9),i(me,Ce-32-1,127,9)),U=0;U<C.za;++U){var le=_.ya[_.aa+U];if(0<U){for(I=-1;16>I;++I)r(J,ee+32*I-4,J,ee+32*I+12,4);for(I=-1;8>I;++I)r(ne,oe+32*I-4,ne,oe+32*I+4,4),r(me,Ce+32*I-4,me,Ce+32*I+4,4)}var ge=C.Gd,we=C.Hd+U,je=le.ad,be=le.Hc;if(0<W&&(r(J,ee-32,ge[we].y,0,16),r(ne,oe-32,ge[we].f,0,8),r(me,Ce-32,ge[we].ea,0,8)),le.Za){var Ie=J,Oe=ee-32+16;for(0<W&&(U>=C.za-1?i(Ie,Oe,ge[we].y[15],4):r(Ie,Oe,ge[we+1].y,0,4)),I=0;4>I;I++)Ie[Oe+128+I]=Ie[Oe+256+I]=Ie[Oe+384+I]=Ie[Oe+0+I];for(I=0;16>I;++I,be<<=2)Ie=J,Oe=ee+n$[I],Sl[le.Ob[I]](Ie,Oe),Y2(be,je,16*+I,Ie,Oe)}else if(Ie=Ws(U,W,le.Ob[0]),Ld[Ie](J,ee),be!=0)for(I=0;16>I;++I,be<<=2)Y2(be,je,16*+I,J,ee+n$[I]);for(I=le.Gc,Ie=Ws(U,W,le.Dd),Cu[Ie](ne,oe),Cu[Ie](me,Ce),be=je,Ie=ne,Oe=oe,255&(le=0|I)&&(170&le?Im(be,256,Ie,Oe):Bc(be,256,Ie,Oe)),le=me,be=Ce,255&(I>>=8)&&(170&I?Im(je,320,le,be):Bc(je,320,le,be)),W<C.Ub-1&&(r(ge[we].y,0,J,ee+480,16),r(ge[we].f,0,ne,oe+224,8),r(ge[we].ea,0,me,Ce+224,8)),I=8*G*C.B,ge=C.sa,we=C.ta+16*U+16*G*C.R,je=C.qa,le=C.ra+8*U+I,be=C.Ha,Ie=C.Ia+8*U+I,I=0;16>I;++I)r(ge,we+I*C.R,J,ee+32*I,16);for(I=0;8>I;++I)r(je,le+I*C.B,ne,oe+32*I,8),r(be,Ie+I*C.B,me,Ce+32*I,8)}}function X2(C,_,I,U,W,G,J,ee,ne){var oe=[0],me=[0],Ce=0,le=ne!=null?ne.kd:0,ge=ne??new ve;if(C==null||12>I)return 7;ge.data=C,ge.w=_,ge.ha=I,_=[_],I=[I],ge.gb=[ge.gb];e:{var we=_,je=I,be=ge.gb;if(t(C!=null),t(je!=null),t(be!=null),be[0]=0,12<=je[0]&&!n(C,we[0],"RIFF")){if(n(C,we[0]+8,"WEBP")){be=3;break e}var Ie=Fe(C,we[0]+4);if(12>Ie||4294967286<Ie){be=3;break e}if(le&&Ie>je[0]-8){be=7;break e}be[0]=Ie,we[0]+=12,je[0]-=12}be=0}if(be!=0)return be;for(Ie=0<ge.gb[0],I=I[0];;){e:{var Oe=C;je=_,be=I;var He=oe,Le=me,kt=we=[0];if((wt=Ce=[Ce])[0]=0,8>be[0])be=7;else{if(!n(Oe,je[0],"VP8X")){if(Fe(Oe,je[0]+4)!=10){be=3;break e}if(18>be[0]){be=7;break e}var ut=Fe(Oe,je[0]+8),nn=1+Se(Oe,je[0]+12);if(2147483648<=nn*(Oe=1+Se(Oe,je[0]+15))){be=3;break e}kt!=null&&(kt[0]=ut),He!=null&&(He[0]=nn),Le!=null&&(Le[0]=Oe),je[0]+=18,be[0]-=18,wt[0]=1}be=0}}if(Ce=Ce[0],we=we[0],be!=0)return be;if(je=!!(2&we),!Ie&&Ce)return 3;if(G!=null&&(G[0]=!!(16&we)),J!=null&&(J[0]=je),ee!=null&&(ee[0]=0),J=oe[0],we=me[0],Ce&&je&&ne==null){be=0;break}if(4>I){be=7;break}if(Ie&&Ce||!Ie&&!Ce&&!n(C,_[0],"ALPH")){I=[I],ge.na=[ge.na],ge.P=[ge.P],ge.Sa=[ge.Sa];e:{ut=C,be=_,Ie=I;var wt=ge.gb;He=ge.na,Le=ge.P,kt=ge.Sa,nn=22,t(ut!=null),t(Ie!=null),Oe=be[0];var pn=Ie[0];for(t(He!=null),t(kt!=null),He[0]=null,Le[0]=null,kt[0]=0;;){if(be[0]=Oe,Ie[0]=pn,8>pn){be=7;break e}var _i=Fe(ut,Oe+4);if(4294967286<_i){be=3;break e}var rn=8+_i+1&-2;if(nn+=rn,0<wt&&nn>wt){be=3;break e}if(!n(ut,Oe,"VP8 ")||!n(ut,Oe,"VP8L")){be=0;break e}if(pn[0]<rn){be=7;break e}n(ut,Oe,"ALPH")||(He[0]=ut,Le[0]=Oe+8,kt[0]=_i),Oe+=rn,pn-=rn}}if(I=I[0],ge.na=ge.na[0],ge.P=ge.P[0],ge.Sa=ge.Sa[0],be!=0)break}I=[I],ge.Ja=[ge.Ja],ge.xa=[ge.xa];e:if(wt=C,be=_,Ie=I,He=ge.gb[0],Le=ge.Ja,kt=ge.xa,ut=be[0],Oe=!n(wt,ut,"VP8 "),nn=!n(wt,ut,"VP8L"),t(wt!=null),t(Ie!=null),t(Le!=null),t(kt!=null),8>Ie[0])be=7;else{if(Oe||nn){if(wt=Fe(wt,ut+4),12<=He&&wt>He-12){be=3;break e}if(le&&wt>Ie[0]-8){be=7;break e}Le[0]=wt,be[0]+=8,Ie[0]-=8,kt[0]=nn}else kt[0]=5<=Ie[0]&&wt[ut+0]==47&&!(wt[ut+4]>>5),Le[0]=Ie[0];be=0}if(I=I[0],ge.Ja=ge.Ja[0],ge.xa=ge.xa[0],_=_[0],be!=0)break;if(4294967286<ge.Ja)return 3;if(ee==null||je||(ee[0]=ge.xa?2:1),J=[J],we=[we],ge.xa){if(5>I){be=7;break}ee=J,le=we,je=G,C==null||5>I?C=0:5<=I&&C[_+0]==47&&!(C[_+4]>>5)?(Ie=[0],wt=[0],He=[0],z(Le=new O,C,_,I),es(Le,Ie,wt,He)?(ee!=null&&(ee[0]=Ie[0]),le!=null&&(le[0]=wt[0]),je!=null&&(je[0]=He[0]),C=1):C=0):C=0}else{if(10>I){be=7;break}ee=we,C==null||10>I||!Q2(C,_+3,I-3)?C=0:(le=C[_+0]|C[_+1]<<8|C[_+2]<<16,je=16383&(C[_+7]<<8|C[_+6]),C=16383&(C[_+9]<<8|C[_+8]),1&le||3<(le>>1&7)||!(le>>4&1)||le>>5>=ge.Ja||!je||!C?C=0:(J&&(J[0]=je),ee&&(ee[0]=C),C=1))}if(!C||(J=J[0],we=we[0],Ce&&(oe[0]!=J||me[0]!=we)))return 3;ne!=null&&(ne[0]=ge,ne.offset=_-ne.w,t(4294967286>_-ne.w),t(ne.offset==ne.ha-I));break}return be==0||be==7&&Ce&&ne==null?(G!=null&&(G[0]|=ge.na!=null&&0<ge.na.length),U!=null&&(U[0]=J),W!=null&&(W[0]=we),0):be}function No(C,_,I){var U=_.width,W=_.height,G=0,J=0,ee=U,ne=W;if(_.Da=C!=null&&0<C.Da,_.Da&&(ee=C.cd,ne=C.bd,G=C.v,J=C.j,11>I||(G&=-2,J&=-2),0>G||0>J||0>=ee||0>=ne||G+ee>U||J+ne>W))return 0;if(_.v=G,_.j=J,_.va=G+ee,_.o=J+ne,_.U=ee,_.T=ne,_.da=C!=null&&0<C.da,_.da){if(!et(ee,ne,I=[C.ib],G=[C.hb]))return 0;_.ib=I[0],_.hb=G[0]}return _.ob=C!=null&&C.ob,_.Kb=C==null||!C.Sd,_.da&&(_.ob=_.ib<3*U/4&&_.hb<3*W/4,_.Kb=0),1}function af(C){if(C==null)return 2;if(11>C.S){var _=C.f.RGBA;_.fb+=(C.height-1)*_.A,_.A=-_.A}else _=C.f.kb,C=C.height,_.O+=(C-1)*_.fa,_.fa=-_.fa,_.N+=(C-1>>1)*_.Ab,_.Ab=-_.Ab,_.W+=(C-1>>1)*_.Db,_.Db=-_.Db,_.F!=null&&(_.J+=(C-1)*_.lb,_.lb=-_.lb);return 0}function Tv(C,_,I,U){if(U==null||0>=C||0>=_)return 2;if(I!=null){if(I.Da){var W=I.cd,G=I.bd,J=-2&I.v,ee=-2&I.j;if(0>J||0>ee||0>=W||0>=G||J+W>C||ee+G>_)return 2;C=W,_=G}if(I.da){if(!et(C,_,W=[I.ib],G=[I.hb]))return 2;C=W[0],_=G[0]}}U.width=C,U.height=_;e:{var ne=U.width,oe=U.height;if(C=U.S,0>=ne||0>=oe||!(C>=eC&&13>C))C=2;else{if(0>=U.Rd&&U.sd==null){J=G=W=_=0;var me=(ee=ne*r$[C])*oe;if(11>C||(G=(oe+1)/2*(_=(ne+1)/2),C==12&&(J=(W=ne)*oe)),(oe=s(me+2*G+J))==null){C=1;break e}U.sd=oe,11>C?((ne=U.f.RGBA).eb=oe,ne.fb=0,ne.A=ee,ne.size=me):((ne=U.f.kb).y=oe,ne.O=0,ne.fa=ee,ne.Fd=me,ne.f=oe,ne.N=0+me,ne.Ab=_,ne.Cd=G,ne.ea=oe,ne.W=0+me+G,ne.Db=_,ne.Ed=G,C==12&&(ne.F=oe,ne.J=0+me+2*G),ne.Tc=J,ne.lb=W)}if(_=1,W=U.S,G=U.width,J=U.height,W>=eC&&13>W)if(11>W)C=U.f.RGBA,_&=(ee=Math.abs(C.A))*(J-1)+G<=C.size,_&=ee>=G*r$[W],_&=C.eb!=null;else{C=U.f.kb,ee=(G+1)/2,me=(J+1)/2,ne=Math.abs(C.fa),oe=Math.abs(C.Ab);var Ce=Math.abs(C.Db),le=Math.abs(C.lb),ge=le*(J-1)+G;_&=ne*(J-1)+G<=C.Fd,_&=oe*(me-1)+ee<=C.Cd,_=(_&=Ce*(me-1)+ee<=C.Ed)&ne>=G&oe>=ee&Ce>=ee,_&=C.y!=null,_&=C.f!=null,_&=C.ea!=null,W==12&&(_&=le>=G,_&=ge<=C.Tc,_&=C.F!=null)}else _=0;C=_?0:2}}return C!=0||I!=null&&I.fd&&(C=af(U)),C}var Nm=64,of=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Pv=24,qs=32,va=8,jm=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];xe("Predictor0","PredictorAdd0"),j.Predictor0=function(){return 4278190080},j.Predictor1=function(C){return C},j.Predictor2=function(C,_,I){return _[I+0]},j.Predictor3=function(C,_,I){return _[I+1]},j.Predictor4=function(C,_,I){return _[I-1]},j.Predictor5=function(C,_,I){return ze(ze(C,_[I+1]),_[I+0])},j.Predictor6=function(C,_,I){return ze(C,_[I-1])},j.Predictor7=function(C,_,I){return ze(C,_[I+0])},j.Predictor8=function(C,_,I){return ze(_[I-1],_[I+0])},j.Predictor9=function(C,_,I){return ze(_[I+0],_[I+1])},j.Predictor10=function(C,_,I){return ze(ze(C,_[I-1]),ze(_[I+0],_[I+1]))},j.Predictor11=function(C,_,I){var U=_[I+0];return 0>=ye(U>>24&255,C>>24&255,(_=_[I-1])>>24&255)+ye(U>>16&255,C>>16&255,_>>16&255)+ye(U>>8&255,C>>8&255,_>>8&255)+ye(255&U,255&C,255&_)?U:C},j.Predictor12=function(C,_,I){var U=_[I+0];return(Rt((C>>24&255)+(U>>24&255)-((_=_[I-1])>>24&255))<<24|Rt((C>>16&255)+(U>>16&255)-(_>>16&255))<<16|Rt((C>>8&255)+(U>>8&255)-(_>>8&255))<<8|Rt((255&C)+(255&U)-(255&_)))>>>0},j.Predictor13=function(C,_,I){var U=_[I-1];return(dt((C=ze(C,_[I+0]))>>24&255,U>>24&255)<<24|dt(C>>16&255,U>>16&255)<<16|dt(C>>8&255,U>>8&255)<<8|dt(255&C,255&U))>>>0};var Id=j.PredictorAdd0;j.PredictorAdd1=Ee,xe("Predictor2","PredictorAdd2"),xe("Predictor3","PredictorAdd3"),xe("Predictor4","PredictorAdd4"),xe("Predictor5","PredictorAdd5"),xe("Predictor6","PredictorAdd6"),xe("Predictor7","PredictorAdd7"),xe("Predictor8","PredictorAdd8"),xe("Predictor9","PredictorAdd9"),xe("Predictor10","PredictorAdd10"),xe("Predictor11","PredictorAdd11"),xe("Predictor12","PredictorAdd12"),xe("Predictor13","PredictorAdd13");var Od=j.PredictorAdd2;pe("ColorIndexInverseTransform","MapARGB","32b",function(C){return C>>8&255},function(C){return C}),pe("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(C){return C},function(C){return C>>8&255});var Tm,lf=j.ColorIndexInverseTransform,pi=j.MapARGB,nT=j.VP8LColorIndexInverseTransformAlpha,Sc=j.MapAlpha,Cl=j.VP8LPredictorsAdd=[];Cl.length=16,(j.VP8LPredictors=[]).length=16,(j.VP8LPredictorsAdd_C=[]).length=16,(j.VP8LPredictors_C=[]).length=16;var cf,Iv,Ov,Pm,uf,df,Fd,wu,Md,Im,Bs,Bc,Zn,er,Jr,Bi,bu,Fv,Om,J2,IH,OH,FH,MH,Mv,LH,RH,UH,DH=s(511),QH=s(2041),HH=s(225),$H=s(767),zH=0,rT=QH,Z2=HH,Wa=$H,jo=DH,eC=0,tC=1,VH=2,nC=3,rC=4,iT=5,KH=6,sT=7,aT=8,iC=9,oT=10,Lye=[2,3,7],Rye=[3,3,11],WH=[280,256,256,256,40],Uye=[0,1,1,1,0],Dye=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Qye=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Hye=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],$ye=8,lT=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],cT=[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,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Lv=null,zye=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],Vye=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],qH=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Kye=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Wye=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],qye=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Gye=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Ld=[],Sl=[],Cu=[],Yye=1,GH=2,Rd=[],To=[];Cs("UpsampleRgbLinePair",nf,3),Cs("UpsampleBgrLinePair",_m,3),Cs("UpsampleRgbaLinePair",jv,4),Cs("UpsampleBgraLinePair",sf,4),Cs("UpsampleArgbLinePair",rf,4),Cs("UpsampleRgba4444LinePair",Ss,2),Cs("UpsampleRgb565LinePair",km,2);var Xye=j.UpsampleRgbLinePair,Jye=j.UpsampleBgrLinePair,YH=j.UpsampleRgbaLinePair,XH=j.UpsampleBgraLinePair,JH=j.UpsampleArgbLinePair,ZH=j.UpsampleRgba4444LinePair,Zye=j.UpsampleRgb565LinePair,sC=16,aC=1<<sC-1,Rv=-227,uT=482,e$=6,e0e=(256<<e$)-1,t$=0,t0e=s(256),n0e=s(256),r0e=s(256),i0e=s(256),s0e=s(uT-Rv),a0e=s(uT-Rv);Cc("YuvToRgbRow",nf,3),Cc("YuvToBgrRow",_m,3),Cc("YuvToRgbaRow",jv,4),Cc("YuvToBgraRow",sf,4),Cc("YuvToArgbRow",rf,4),Cc("YuvToRgba4444Row",Ss,2),Cc("YuvToRgb565Row",km,2);var n$=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],oC=[0,2,8],o0e=[8,7,6,4,4,2,2,2,1,1,1,1],l0e=1;this.WebPDecodeRGBA=function(C,_,I,U,W){var G=tC,J=new he,ee=new en;J.ba=ee,ee.S=G,ee.width=[ee.width],ee.height=[ee.height];var ne=ee.width,oe=ee.height,me=new St;if(me==null||C==null)var Ce=2;else t(me!=null),Ce=X2(C,_,I,me.width,me.height,me.Pd,me.Qd,me.format,null);if(Ce!=0?ne=0:(ne!=null&&(ne[0]=me.width[0]),oe!=null&&(oe[0]=me.height[0]),ne=1),ne){ee.width=ee.width[0],ee.height=ee.height[0],U!=null&&(U[0]=ee.width),W!=null&&(W[0]=ee.height);e:{if(U=new gm,(W=new ve).data=C,W.w=_,W.ha=I,W.kd=1,_=[0],t(W!=null),((C=X2(W.data,W.w,W.ha,null,null,null,_,null,W))==0||C==7)&&_[0]&&(C=4),(_=C)==0){if(t(J!=null),U.data=W.data,U.w=W.w+W.offset,U.ha=W.ha-W.offset,U.put=yt,U.ac=Ur,U.bc=Qi,U.ma=J,W.xa){if((C=Gh())==null){J=1;break e}if(function(le,ge){var we=[0],je=[0],be=[0];t:for(;;){if(le==null)return 0;if(ge==null)return le.a=2,0;if(le.l=ge,le.a=0,z(le.m,ge.data,ge.w,ge.ha),!es(le.m,we,je,be)){le.a=3;break t}if(le.xb=GH,ge.width=we[0],ge.height=je[0],!yc(we[0],je[0],1,le,null))break t;return 1}return t(le.a!=0),0}(C,U)){if(U=(_=Tv(U.width,U.height,J.Oa,J.ba))==0){t:{U=C;n:for(;;){if(U==null){U=0;break t}if(t(U.s.yc!=null),t(U.s.Ya!=null),t(0<U.s.Wb),t((I=U.l)!=null),t((W=I.ma)!=null),U.xb!=0){if(U.ca=W.ba,U.tb=W.tb,t(U.ca!=null),!No(W.Oa,I,nC)){U.a=2;break n}if(!Yh(U,I.width)||I.da)break n;if((I.da||Pt(U.ca.S))&&Er(),11>U.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),U.ca.f.kb.F!=null&&Er()),U.Pb&&0<U.s.ua&&U.s.vb.X==null&&!te(U.s.vb,U.s.Wa.Xa)){U.a=1;break n}U.xb=0}if(!bl(U,U.V,U.Ba,U.c,U.i,I.o,Ed))break n;W.Dc=U.Ma,U=1;break t}t(U.a!=0),U=0}U=!U}U&&(_=C.a)}else _=C.a}else{if((C=new Uj)==null){J=1;break e}if(C.Fa=W.na,C.P=W.P,C.qc=W.Sa,xc(C,U)){if((_=Tv(U.width,U.height,J.Oa,J.ba))==0){if(C.Aa=0,I=J.Oa,t((W=C)!=null),I!=null){if(0<(ne=0>(ne=I.Md)?0:100<ne?255:255*ne/100)){for(oe=me=0;4>oe;++oe)12>(Ce=W.pb[oe]).lc&&(Ce.ia=ne*o0e[0>Ce.lc?0:Ce.lc]>>3),me|=Ce.ia;me&&(alert("todo:VP8InitRandom"),W.ia=1)}W.Ga=I.Id,100<W.Ga?W.Ga=100:0>W.Ga&&(W.Ga=0)}(function(le,ge){if(le==null)return 0;if(ge==null)return hi(le,2,"NULL VP8Io parameter in VP8Decode().");if(!le.cb&&!xc(le,ge))return 0;if(t(le.cb),ge.ac==null||ge.ac(ge)){ge.ob&&(le.L=0);var we=oC[le.L];if(le.L==2?(le.yb=0,le.zb=0):(le.yb=ge.v-we>>4,le.zb=ge.j-we>>4,0>le.yb&&(le.yb=0),0>le.zb&&(le.zb=0)),le.Va=ge.o+15+we>>4,le.Hb=ge.va+15+we>>4,le.Hb>le.za&&(le.Hb=le.za),le.Va>le.Ub&&(le.Va=le.Ub),0<le.L){var je=le.ed;for(we=0;4>we;++we){var be;if(le.Qa.Cb){var Ie=le.Qa.Lb[we];le.Qa.Fb||(Ie+=je.Tb)}else Ie=je.Tb;for(be=0;1>=be;++be){var Oe=le.gd[we][be],He=Ie;if(je.Pc&&(He+=je.vd[0],be&&(He+=je.od[0])),0<(He=0>He?0:63<He?63:He)){var Le=He;0<je.wb&&(Le=4<je.wb?Le>>2:Le>>1)>9-je.wb&&(Le=9-je.wb),1>Le&&(Le=1),Oe.dd=Le,Oe.tc=2*He+Le,Oe.ld=40<=He?2:15<=He?1:0}else Oe.tc=0;Oe.La=be}}}we=0}else hi(le,6,"Frame setup failed"),we=le.a;if(we=we==0){if(we){le.$c=0,0<le.Aa||(le.Ic=l0e);t:{we=le.Ic,je=4*(Le=le.za);var kt=32*Le,ut=Le+1,nn=0<le.L?Le*(0<le.Aa?2:1):0,wt=(le.Aa==2?2:1)*Le;if((Oe=je+832+(be=3*(16*we+oC[le.L])/2*kt)+(Ie=le.Fa!=null&&0<le.Fa.length?le.Kc.c*le.Kc.i:0))!=Oe)we=0;else{if(Oe>le.Vb){if(le.Vb=0,le.Ec=s(Oe),le.Fc=0,le.Ec==null){we=hi(le,1,"no memory during frame initialization.");break t}le.Vb=Oe}Oe=le.Ec,He=le.Fc,le.Ac=Oe,le.Bc=He,He+=je,le.Gd=a(kt,U2),le.Hd=0,le.rb=a(ut+1,xv),le.sb=1,le.wa=nn?a(nn,Eo):null,le.Y=0,le.D.Nb=0,le.D.wa=le.wa,le.D.Y=le.Y,0<le.Aa&&(le.D.Y+=Le),t(!0),le.oc=Oe,le.pc=He,He+=832,le.ya=a(wt,wv),le.aa=0,le.D.ya=le.ya,le.D.aa=le.aa,le.Aa==2&&(le.D.aa+=Le),le.R=16*Le,le.B=8*Le,Le=(kt=oC[le.L])*le.R,kt=kt/2*le.B,le.sa=Oe,le.ta=He+Le,le.qa=le.sa,le.ra=le.ta+16*we*le.R+kt,le.Ha=le.qa,le.Ia=le.ra+8*we*le.B+kt,le.$c=0,He+=be,le.mb=Ie?Oe:null,le.nb=Ie?He:null,t(He+Ie<=le.Fc+le.Vb),bv(le),i(le.Ac,le.Bc,0,je),we=1}}if(we){if(ge.ka=0,ge.y=le.sa,ge.O=le.ta,ge.f=le.qa,ge.N=le.ra,ge.ea=le.Ha,ge.Vd=le.Ia,ge.fa=le.R,ge.Rc=le.B,ge.F=null,ge.J=0,!zH){for(we=-255;255>=we;++we)DH[255+we]=0>we?-we:we;for(we=-1020;1020>=we;++we)QH[1020+we]=-128>we?-128:127<we?127:we;for(we=-112;112>=we;++we)HH[112+we]=-16>we?-16:15<we?15:we;for(we=-255;510>=we;++we)$H[255+we]=0>we?0:255<we?255:we;zH=1}Fd=$2,wu=Dj,Im=Qj,Bs=Hj,Bc=wc,Md=H2,Zn=K2,er=W2,Jr=G2,Bi=P,bu=q2,Fv=Zh,Om=V,J2=ie,IH=Sm,OH=Ev,FH=Bm,MH=V2,Sl[0]=Gj,Sl[1]=wm,Sl[2]=Wj,Sl[3]=qj,Sl[4]=Yj,Sl[5]=mu,Sl[6]=Xj,Sl[7]=gu,Sl[8]=Zj,Sl[9]=Jj,Ld[0]=z2,Ld[1]=$j,Ld[2]=zj,Ld[3]=Vj,Ld[4]=jd,Ld[5]=Kj,Ld[6]=Xh,Cu[0]=eT,Cu[1]=Cv,Cu[2]=bm,Cu[3]=Sv,Cu[4]=tT,Cu[5]=Cm,Cu[6]=Bv,we=1}else we=0}we&&(we=function(pn,_i){for(pn.M=0;pn.M<pn.Va;++pn.M){var rn,bt=pn.Jc[pn.M&pn.Xb],Ye=pn.m,Zr=pn;for(rn=0;rn<Zr.za;++rn){var Zt=Ye,wn=Zr,ur=wn.Ac,rs=wn.Bc+4*rn,Gs=wn.zc,Qr=wn.ya[wn.aa+rn];if(wn.Qa.Bb?Qr.$b=se(Zt,wn.Pa.jb[0])?2+se(Zt,wn.Pa.jb[2]):se(Zt,wn.Pa.jb[1]):Qr.$b=0,wn.kc&&(Qr.Ad=se(Zt,wn.Bd)),Qr.Za=!se(Zt,145)+0,Qr.Za){var _s=Qr.Ob,Ys=0;for(wn=0;4>wn;++wn){var ki,_n=Gs[0+wn];for(ki=0;4>ki;++ki){_n=Wye[ur[rs+ki]][_n];for(var Ln=qH[se(Zt,_n[0])];0<Ln;)Ln=qH[2*Ln+se(Zt,_n[Ln])];_n=-Ln,ur[rs+ki]=_n}r(_s,Ys,ur,rs,4),Ys+=4,Gs[0+wn]=_n}}else _n=se(Zt,156)?se(Zt,128)?1:3:se(Zt,163)?2:0,Qr.Ob[0]=_n,i(ur,rs,_n,4),i(Gs,0,_n,4);Qr.Dd=se(Zt,142)?se(Zt,114)?se(Zt,183)?1:3:2:0}if(Zr.m.Ka)return hi(pn,7,"Premature end-of-partition0 encountered.");for(;pn.ja<pn.za;++pn.ja){if(Zr=bt,Zt=(Ye=pn).rb[Ye.sb-1],ur=Ye.rb[Ye.sb+Ye.ja],rn=Ye.ya[Ye.aa+Ye.ja],rs=Ye.kc?rn.Ad:0)Zt.la=ur.la=0,rn.Za||(Zt.Na=ur.Na=0),rn.Hc=0,rn.Gc=0,rn.ia=0;else{var Hr,Rn;if(Zt=ur,ur=Zr,rs=Ye.Pa.Xc,Gs=Ye.ya[Ye.aa+Ye.ja],Qr=Ye.pb[Gs.$b],wn=Gs.ad,_s=0,Ys=Ye.rb[Ye.sb-1],_n=ki=0,i(wn,_s,0,384),Gs.Za)var is=0,Bl=rs[3];else{Ln=s(16);var ei=Zt.Na+Ys.Na;if(ei=Lv(ur,rs[1],ei,Qr.Eb,0,Ln,0),Zt.Na=Ys.Na=(0<ei)+0,1<ei)Fd(Ln,0,wn,_s);else{var xa=Ln[0]+3>>3;for(Ln=0;256>Ln;Ln+=16)wn[_s+Ln]=xa}is=1,Bl=rs[0]}var qn=15&Zt.la,Ei=15&Ys.la;for(Ln=0;4>Ln;++Ln){var qa=1&Ei;for(xa=Rn=0;4>xa;++xa)qn=qn>>1|(qa=(ei=Lv(ur,Bl,ei=qa+(1&qn),Qr.Sc,is,wn,_s))>is)<<7,Rn=Rn<<2|(3<ei?3:1<ei?2:wn[_s+0]!=0),_s+=16;qn>>=4,Ei=Ei>>1|qa<<7,ki=(ki<<8|Rn)>>>0}for(Bl=qn,is=Ei>>4,Hr=0;4>Hr;Hr+=2){for(Rn=0,qn=Zt.la>>4+Hr,Ei=Ys.la>>4+Hr,Ln=0;2>Ln;++Ln){for(qa=1&Ei,xa=0;2>xa;++xa)ei=qa+(1&qn),qn=qn>>1|(qa=0<(ei=Lv(ur,rs[2],ei,Qr.Qc,0,wn,_s)))<<3,Rn=Rn<<2|(3<ei?3:1<ei?2:wn[_s+0]!=0),_s+=16;qn>>=2,Ei=Ei>>1|qa<<5}_n|=Rn<<4*Hr,Bl|=qn<<4<<Hr,is|=(240&Ei)<<Hr}Zt.la=Bl,Ys.la=is,Gs.Hc=ki,Gs.Gc=_n,Gs.ia=43690&_n?0:Qr.ia,rs=!(ki|_n)}if(0<Ye.L&&(Ye.wa[Ye.Y+Ye.ja]=Ye.gd[rn.$b][rn.Za],Ye.wa[Ye.Y+Ye.ja].La|=!rs),Zr.Ka)return hi(pn,7,"Premature end-of-file encountered.")}if(bv(pn),Ye=_i,Zr=1,rn=(bt=pn).D,Zt=0<bt.L&&bt.M>=bt.zb&&bt.M<=bt.Va,bt.Aa==0)t:{if(rn.M=bt.M,rn.uc=Zt,Em(bt,rn),Zr=1,rn=(Rn=bt.D).Nb,Zt=(_n=oC[bt.L])*bt.R,ur=_n/2*bt.B,Ln=16*rn*bt.R,xa=8*rn*bt.B,rs=bt.sa,Gs=bt.ta-Zt+Ln,Qr=bt.qa,wn=bt.ra-ur+xa,_s=bt.Ha,Ys=bt.Ia-ur+xa,Ei=(qn=Rn.M)==0,ki=qn>=bt.Va-1,bt.Aa==2&&Em(bt,Rn),Rn.uc)for(qa=(ei=bt).D.M,t(ei.D.uc),Rn=ei.yb;Rn<ei.Hb;++Rn){is=Rn,Bl=qa;var Xs=(Ga=(ss=ei).D).Nb;Hr=ss.R;var Ga=Ga.wa[Ga.Y+is],Ya=ss.sa,wa=ss.ta+16*Xs*Hr+16*is,Xa=Ga.dd,tr=Ga.tc;if(tr!=0)if(t(3<=tr),ss.L==1)0<is&&OH(Ya,wa,Hr,tr+4),Ga.La&&MH(Ya,wa,Hr,tr),0<Bl&&IH(Ya,wa,Hr,tr+4),Ga.La&&FH(Ya,wa,Hr,tr);else{var Ja=ss.B,_l=ss.qa,Af=ss.ra+8*Xs*Ja+8*is,Su=ss.Ha,ss=ss.Ia+8*Xs*Ja+8*is;Xs=Ga.ld,0<is&&(er(Ya,wa,Hr,tr+4,Xa,Xs),Bi(_l,Af,Su,ss,Ja,tr+4,Xa,Xs)),Ga.La&&(Fv(Ya,wa,Hr,tr,Xa,Xs),J2(_l,Af,Su,ss,Ja,tr,Xa,Xs)),0<Bl&&(Zn(Ya,wa,Hr,tr+4,Xa,Xs),Jr(_l,Af,Su,ss,Ja,tr+4,Xa,Xs)),Ga.La&&(bu(Ya,wa,Hr,tr,Xa,Xs),Om(_l,Af,Su,ss,Ja,tr,Xa,Xs))}}if(bt.ia&&alert("todo:DitherRow"),Ye.put!=null){if(Rn=16*qn,qn=16*(qn+1),Ei?(Ye.y=bt.sa,Ye.O=bt.ta+Ln,Ye.f=bt.qa,Ye.N=bt.ra+xa,Ye.ea=bt.Ha,Ye.W=bt.Ia+xa):(Rn-=_n,Ye.y=rs,Ye.O=Gs,Ye.f=Qr,Ye.N=wn,Ye.ea=_s,Ye.W=Ys),ki||(qn-=_n),qn>Ye.o&&(qn=Ye.o),Ye.F=null,Ye.J=null,bt.Fa!=null&&0<bt.Fa.length&&Rn<qn&&(Ye.J=fi(bt,Ye,Rn,qn-Rn),Ye.F=bt.mb,Ye.F==null&&Ye.F.length==0)){Zr=hi(bt,3,"Could not decode alpha data.");break t}Rn<Ye.j&&(_n=Ye.j-Rn,Rn=Ye.j,t(!(1&_n)),Ye.O+=bt.R*_n,Ye.N+=bt.B*(_n>>1),Ye.W+=bt.B*(_n>>1),Ye.F!=null&&(Ye.J+=Ye.width*_n)),Rn<qn&&(Ye.O+=Ye.v,Ye.N+=Ye.v>>1,Ye.W+=Ye.v>>1,Ye.F!=null&&(Ye.J+=Ye.v),Ye.ka=Rn-Ye.j,Ye.U=Ye.va-Ye.v,Ye.T=qn-Rn,Zr=Ye.put(Ye))}rn+1!=bt.Ic||ki||(r(bt.sa,bt.ta-Zt,rs,Gs+16*bt.R,Zt),r(bt.qa,bt.ra-ur,Qr,wn+8*bt.B,ur),r(bt.Ha,bt.Ia-ur,_s,Ys+8*bt.B,ur))}if(!Zr)return hi(pn,6,"Output aborted.")}return 1}(le,ge)),ge.bc!=null&&ge.bc(ge),we&=1}return we?(le.cb=0,we):0})(C,U)||(_=C.a)}}else _=C.a}_==0&&J.Oa!=null&&J.Oa.fd&&(_=af(J.ba))}J=_}G=J!=0?null:11>G?ee.f.RGBA.eb:ee.f.kb.y}else G=null;return G};var r$=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(j,L){for(var T="",E=0;E<4;E++)T+=String.fromCharCode(j[L++]);return T}function d(j,L){return j[L+0]|j[L+1]<<8}function A(j,L){return(j[L+0]|j[L+1]<<8|j[L+2]<<16)>>>0}function f(j,L){return(j[L+0]|j[L+1]<<8|j[L+2]<<16|j[L+3]<<24)>>>0}new l;var h=[0],p=[0],m=[],g=new l,y=e,v=function(j,L){var T={},E=0,F=!1,M=0,D=0;if(T.frames=[],!function(R,O){for(var Y=0;Y<4;Y++)if(R[O+Y]!="RIFF".charCodeAt(Y))return!0;return!1}(j,L)){for(f(j,L+=4),L+=8;L<j.length;){var H=u(j,L),q=f(j,L+=4);L+=4;var $=q+(1&q);switch(H){case"VP8 ":case"VP8L":T.frames[E]===void 0&&(T.frames[E]={}),(ce=T.frames[E]).src_off=F?D:L-8,ce.src_size=M+q+8,E++,F&&(F=!1,M=0,D=0);break;case"VP8X":(ce=T.header={}).feature_flags=j[L];var z=L+4;ce.canvas_width=1+A(j,z),z+=3,ce.canvas_height=1+A(j,z),z+=3;break;case"ALPH":F=!0,M=$+8,D=L-8;break;case"ANIM":(ce=T.header).bgcolor=f(j,L),z=L+4,ce.loop_count=d(j,z),z+=2;break;case"ANMF":var Q,ce;(ce=T.frames[E]={}).offset_x=2*A(j,L),L+=3,ce.offset_y=2*A(j,L),L+=3,ce.width=1+A(j,L),L+=3,ce.height=1+A(j,L),L+=3,ce.duration=A(j,L),L+=3,Q=j[L++],ce.dispose=1&Q,ce.blend=Q>>1&1}H!="ANMF"&&(L+=$)}return T}}(y,0);v.response=y,v.rgbaoutput=!0,v.dataurl=!1;var x=v.header?v.header:null,b=v.frames?v.frames:null;if(x){x.loop_counter=x.loop_count,h=[x.canvas_height],p=[x.canvas_width];for(var w=0;w<b.length&&b[w].blend!=0;w++);}var B=b[0],k=g.WebPDecodeRGBA(y,B.src_off,B.src_size,p,h);B.rgba=k,B.imgwidth=p[0],B.imgheight=h[0];for(var N=0;N<p[0]*h[0]*4;N++)m[N]=k[N];return this.width=p,this.height=h,this.data=m,this}/** ====================================================================
* @license
* jsPDF XMP metadata plugin
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
*/function Gbt(){var e,t=this.internal.__metadata__.metadata,n=unescape(encodeURIComponent(t));e=this.internal.__metadata__.rawXml?n:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+e.length+" >>"),this.internal.write("stream"),this.internal.write(e),this.internal.write("endstream"),this.internal.write("endobj")}function Ybt(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(e){var t,n,r,i,s,a,o,l,u,d=function(R){return R=R||{},this.isStrokeTransparent=R.isStrokeTransparent||!1,this.strokeOpacity=R.strokeOpacity||1,this.strokeStyle=R.strokeStyle||"#000000",this.fillStyle=R.fillStyle||"#000000",this.isFillTransparent=R.isFillTransparent||!1,this.fillOpacity=R.fillOpacity||1,this.font=R.font||"10px sans-serif",this.textBaseline=R.textBaseline||"alphabetic",this.textAlign=R.textAlign||"left",this.lineWidth=R.lineWidth||1,this.lineJoin=R.lineJoin||"miter",this.lineCap=R.lineCap||"butt",this.path=R.path||[],this.transform=R.transform!==void 0?R.transform.clone():new l,this.globalCompositeOperation=R.globalCompositeOperation||"normal",this.globalAlpha=R.globalAlpha||1,this.clip_path=R.clip_path||[],this.currentPoint=R.currentPoint||new a,this.miterLimit=R.miterLimit||10,this.lastPoint=R.lastPoint||new a,this.lineDashOffset=R.lineDashOffset||0,this.lineDash=R.lineDash||[],this.margin=R.margin||[0,0,0,0],this.prevPageLastElemOffset=R.prevPageLastElemOffset||0,this.ignoreClearRect=typeof R.ignoreClearRect!="boolean"||R.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new A(this),t=this.internal.f2,n=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,a=this.internal.Point,o=this.internal.Rectangle,l=this.internal.Matrix,u=new d}]);var A=function(R){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var O=R;Object.defineProperty(this,"pdf",{get:function(){return O}});var Y=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return Y},set:function(te){Y=!!te}});var X=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return X},set:function(te){X=!!te}});var K=0;Object.defineProperty(this,"posX",{get:function(){return K},set:function(te){isNaN(te)||(K=te)}});var Z=0;Object.defineProperty(this,"posY",{get:function(){return Z},set:function(te){isNaN(te)||(Z=te)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(te){var ke;typeof te=="number"?ke=[te,te,te,te]:((ke=new Array(4))[0]=te[0],ke[1]=te.length>=2?te[1]:ke[0],ke[2]=te.length>=3?te[2]:ke[0],ke[3]=te.length>=4?te[3]:ke[1]),u.margin=ke}});var ae=!1;Object.defineProperty(this,"autoPaging",{get:function(){return ae},set:function(te){ae=te}});var ue=0;Object.defineProperty(this,"lastBreak",{get:function(){return ue},set:function(te){ue=te}});var se=[];Object.defineProperty(this,"pageBreaks",{get:function(){return se},set:function(te){se=te}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(te){te instanceof d&&(u=te)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(te){u.path=te}});var Ae=[];Object.defineProperty(this,"ctxStack",{get:function(){return Ae},set:function(te){Ae=te}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(te){var ke;ke=f(te),this.ctx.fillStyle=ke.style,this.ctx.isFillTransparent=ke.a===0,this.ctx.fillOpacity=ke.a,this.pdf.setFillColor(ke.r,ke.g,ke.b,{a:ke.a}),this.pdf.setTextColor(ke.r,ke.g,ke.b,{a:ke.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(te){var ke=f(te);this.ctx.strokeStyle=ke.style,this.ctx.isStrokeTransparent=ke.a===0,this.ctx.strokeOpacity=ke.a,ke.a===0?this.pdf.setDrawColor(255,255,255):(ke.a,this.pdf.setDrawColor(ke.r,ke.g,ke.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(te){["butt","round","square"].indexOf(te)!==-1&&(this.ctx.lineCap=te,this.pdf.setLineCap(te))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(te){isNaN(te)||(this.ctx.lineWidth=te,this.pdf.setLineWidth(te))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(te){["bevel","round","miter"].indexOf(te)!==-1&&(this.ctx.lineJoin=te,this.pdf.setLineJoin(te))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(te){isNaN(te)||(this.ctx.miterLimit=te,this.pdf.setMiterLimit(te))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(te){this.ctx.textBaseline=te}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(te){["right","end","center","left","start"].indexOf(te)!==-1&&(this.ctx.textAlign=te)}});var de=null,Se=null,Fe=null;Object.defineProperty(this,"fontFaces",{get:function(){return Fe},set:function(te){de=null,Se=null,Fe=te}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(te){var ke;if(this.ctx.font=te,(ke=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(te))!==null){var Ze=ke[1];ke[2];var et=ke[3],Te=ke[4];ke[5];var st=ke[6],xe=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Te)[2];Te=Math.floor(xe==="px"?parseFloat(Te)*this.pdf.internal.scaleFactor:xe==="em"?parseFloat(Te)*this.pdf.getFontSize():parseFloat(Te)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Te);var Qe=function(pe){var mt,ct,xt=[],Ft=pe.trim();if(Ft==="")return b4;if(Ft in rJ)return[rJ[Ft]];for(;Ft!=="";){switch(ct=null,mt=(Ft=sJ(Ft)).charAt(0)){case'"':case"'":ct=$bt(Ft.substring(1),mt);break;default:ct=zbt(Ft)}if(ct===null||(xt.push(ct[0]),(Ft=sJ(ct[1]))!==""&&Ft.charAt(0)!==","))return b4;Ft=Ft.replace(/^,/,"")}return xt}(st);if(this.fontFaces){var ze=function(pe,mt){var ct=pe.getFontList(),xt=JSON.stringify(ct);if(de===null||Se!==xt){var Ft=function($t){var At=[];return Object.keys($t).forEach(function(Mt){$t[Mt].forEach(function(Pt){var Wt=null;switch(Pt){case"bold":Wt={family:Mt,weight:"bold"};break;case"italic":Wt={family:Mt,style:"italic"};break;case"bolditalic":Wt={family:Mt,weight:"bold",style:"italic"};break;case"":case"normal":Wt={family:Mt}}Wt!==null&&(Wt.ref={name:Mt,style:Pt},At.push(Wt))})}),At}(ct);de=function($t){for(var At={},Mt=0;Mt<$t.length;++Mt){var Pt=w4($t[Mt]),Wt=Pt.family,Jn=Pt.stretch,en=Pt.style,St=Pt.weight;At[Wt]=At[Wt]||{},At[Wt][Jn]=At[Wt][Jn]||{},At[Wt][Jn][en]=At[Wt][Jn][en]||{},At[Wt][Jn][en][St]=Pt}return At}(Ft.concat(mt)),Se=xt}return de}(this.pdf,this.fontFaces),Rt=Qe.map(function(pe){return{family:pe,stretch:"normal",weight:et,style:Ze}}),dt=function(pe,mt,ct){for(var xt=(ct=ct||{}).defaultFontFamily||"times",Ft=Object.assign({},Hbt,ct.genericFontFamilies||{}),$t=null,At=null,Mt=0;Mt<mt.length;++Mt)if(Ft[($t=w4(mt[Mt])).family]&&($t.family=Ft[$t.family]),pe.hasOwnProperty($t.family)){At=pe[$t.family];break}if(!(At=At||pe[xt]))throw new Error("Could not find a font-family for the rule '"+iJ($t)+"' and default family '"+xt+"'.");if(At=function(Pt,Wt){if(Wt[Pt])return Wt[Pt];var Jn=$L[Pt],en=Jn<=$L.normal?-1:1,St=nJ(Wt,kge,Jn,en);if(!St)throw new Error("Could not find a matching font-stretch value for "+Pt);return St}($t.stretch,At),At=function(Pt,Wt){if(Wt[Pt])return Wt[Pt];for(var Jn=_ge[Pt],en=0;en<Jn.length;++en)if(Wt[Jn[en]])return Wt[Jn[en]];throw new Error("Could not find a matching font-style for "+Pt)}($t.style,At),!(At=function(Pt,Wt){if(Wt[Pt])return Wt[Pt];if(Pt===400&&Wt[500])return Wt[500];if(Pt===500&&Wt[400])return Wt[400];var Jn=Qbt[Pt],en=nJ(Wt,Ege,Jn,Pt<400?-1:1);if(!en)throw new Error("Could not find a matching font-weight for value "+Pt);return en}($t.weight,At)))throw new Error("Failed to resolve a font for the rule '"+iJ($t)+"'.");return At}(ze,Rt);this.pdf.setFont(dt.ref.name,dt.ref.style)}else{var ye="";(et==="bold"||parseInt(et,10)>=700||Ze==="bold")&&(ye="bold"),Ze==="italic"&&(ye+="italic"),ye.length===0&&(ye="normal");for(var Ee="",qe={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Ue=0;Ue<Qe.length;Ue++){if(this.pdf.internal.getFont(Qe[Ue],ye,{noFallback:!0,disableWarning:!0})!==void 0){Ee=Qe[Ue];break}if(ye==="bolditalic"&&this.pdf.internal.getFont(Qe[Ue],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Ee=Qe[Ue],ye="bold";else if(this.pdf.internal.getFont(Qe[Ue],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Ee=Qe[Ue],ye="normal";break}}if(Ee===""){for(var Ge=0;Ge<Qe.length;Ge++)if(qe[Qe[Ge]]){Ee=qe[Qe[Ge]];break}}Ee=Ee===""?"Times":Ee,this.pdf.setFont(Ee,ye)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(te){this.ctx.globalCompositeOperation=te}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(te){this.ctx.globalAlpha=te}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(te){this.ctx.lineDashOffset=te,ce.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(te){this.ctx.lineDash=te,ce.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(te){this.ctx.ignoreClearRect=!!te}})};A.prototype.setLineDash=function(R){this.lineDash=R},A.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},A.prototype.fill=function(){b.call(this,"fill",!1)},A.prototype.stroke=function(){b.call(this,"stroke",!1)},A.prototype.beginPath=function(){this.path=[{type:"begin"}]},A.prototype.moveTo=function(R,O){if(isNaN(R)||isNaN(O))throw Gn.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var Y=this.ctx.transform.applyToPoint(new a(R,O));this.path.push({type:"mt",x:Y.x,y:Y.y}),this.ctx.lastPoint=new a(R,O)},A.prototype.closePath=function(){var R=new a(0,0),O=0;for(O=this.path.length-1;O!==-1;O--)if(this.path[O].type==="begin"&&Dn(this.path[O+1])==="object"&&typeof this.path[O+1].x=="number"){R=new a(this.path[O+1].x,this.path[O+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new a(R.x,R.y)},A.prototype.lineTo=function(R,O){if(isNaN(R)||isNaN(O))throw Gn.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var Y=this.ctx.transform.applyToPoint(new a(R,O));this.path.push({type:"lt",x:Y.x,y:Y.y}),this.ctx.lastPoint=new a(Y.x,Y.y)},A.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),b.call(this,null,!0)},A.prototype.quadraticCurveTo=function(R,O,Y,X){if(isNaN(Y)||isNaN(X)||isNaN(R)||isNaN(O))throw Gn.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var K=this.ctx.transform.applyToPoint(new a(Y,X)),Z=this.ctx.transform.applyToPoint(new a(R,O));this.path.push({type:"qct",x1:Z.x,y1:Z.y,x:K.x,y:K.y}),this.ctx.lastPoint=new a(K.x,K.y)},A.prototype.bezierCurveTo=function(R,O,Y,X,K,Z){if(isNaN(K)||isNaN(Z)||isNaN(R)||isNaN(O)||isNaN(Y)||isNaN(X))throw Gn.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var ae=this.ctx.transform.applyToPoint(new a(K,Z)),ue=this.ctx.transform.applyToPoint(new a(R,O)),se=this.ctx.transform.applyToPoint(new a(Y,X));this.path.push({type:"bct",x1:ue.x,y1:ue.y,x2:se.x,y2:se.y,x:ae.x,y:ae.y}),this.ctx.lastPoint=new a(ae.x,ae.y)},A.prototype.arc=function(R,O,Y,X,K,Z){if(isNaN(R)||isNaN(O)||isNaN(Y)||isNaN(X)||isNaN(K))throw Gn.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(Z=!!Z,!this.ctx.transform.isIdentity){var ae=this.ctx.transform.applyToPoint(new a(R,O));R=ae.x,O=ae.y;var ue=this.ctx.transform.applyToPoint(new a(0,Y)),se=this.ctx.transform.applyToPoint(new a(0,0));Y=Math.sqrt(Math.pow(ue.x-se.x,2)+Math.pow(ue.y-se.y,2))}Math.abs(K-X)>=2*Math.PI&&(X=0,K=2*Math.PI),this.path.push({type:"arc",x:R,y:O,radius:Y,startAngle:X,endAngle:K,counterclockwise:Z})},A.prototype.arcTo=function(R,O,Y,X,K){throw new Error("arcTo not implemented.")},A.prototype.rect=function(R,O,Y,X){if(isNaN(R)||isNaN(O)||isNaN(Y)||isNaN(X))throw Gn.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(R,O),this.lineTo(R+Y,O),this.lineTo(R+Y,O+X),this.lineTo(R,O+X),this.lineTo(R,O),this.lineTo(R+Y,O),this.lineTo(R,O)},A.prototype.fillRect=function(R,O,Y,X){if(isNaN(R)||isNaN(O)||isNaN(Y)||isNaN(X))throw Gn.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!h.call(this)){var K={};this.lineCap!=="butt"&&(K.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(K.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(R,O,Y,X),this.fill(),K.hasOwnProperty("lineCap")&&(this.lineCap=K.lineCap),K.hasOwnProperty("lineJoin")&&(this.lineJoin=K.lineJoin)}},A.prototype.strokeRect=function(R,O,Y,X){if(isNaN(R)||isNaN(O)||isNaN(Y)||isNaN(X))throw Gn.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");p.call(this)||(this.beginPath(),this.rect(R,O,Y,X),this.stroke())},A.prototype.clearRect=function(R,O,Y,X){if(isNaN(R)||isNaN(O)||isNaN(Y)||isNaN(X))throw Gn.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(R,O,Y,X))},A.prototype.save=function(R){R=typeof R!="boolean"||R;for(var O=this.pdf.internal.getCurrentPageInfo().pageNumber,Y=0;Y<this.pdf.internal.getNumberOfPages();Y++)this.pdf.setPage(Y+1),this.pdf.internal.out("q");if(this.pdf.setPage(O),R){this.ctx.fontSize=this.pdf.internal.getFontSize();var X=new d(this.ctx);this.ctxStack.push(this.ctx),this.ctx=X}},A.prototype.restore=function(R){R=typeof R!="boolean"||R;for(var O=this.pdf.internal.getCurrentPageInfo().pageNumber,Y=0;Y<this.pdf.internal.getNumberOfPages();Y++)this.pdf.setPage(Y+1),this.pdf.internal.out("Q");this.pdf.setPage(O),R&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},A.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var f=function(R){var O,Y,X,K;if(R.isCanvasGradient===!0&&(R=R.getColor()),!R)return{r:0,g:0,b:0,a:0,style:R};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(R))O=0,Y=0,X=0,K=0;else{var Z=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(R);if(Z!==null)O=parseInt(Z[1]),Y=parseInt(Z[2]),X=parseInt(Z[3]),K=1;else if((Z=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(R))!==null)O=parseInt(Z[1]),Y=parseInt(Z[2]),X=parseInt(Z[3]),K=parseFloat(Z[4]);else{if(K=1,typeof R=="string"&&R.charAt(0)!=="#"){var ae=new vge(R);R=ae.ok?ae.toHex():"#000000"}R.length===4?(O=R.substring(1,2),O+=O,Y=R.substring(2,3),Y+=Y,X=R.substring(3,4),X+=X):(O=R.substring(1,3),Y=R.substring(3,5),X=R.substring(5,7)),O=parseInt(O,16),Y=parseInt(Y,16),X=parseInt(X,16)}}return{r:O,g:Y,b:X,a:K,style:R}},h=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},p=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};A.prototype.fillText=function(R,O,Y,X){if(isNaN(O)||isNaN(Y)||typeof R!="string")throw Gn.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(X=isNaN(X)?void 0:X,!h.call(this)){var K=$(this.ctx.transform.rotation),Z=this.ctx.transform.scaleX;E.call(this,{text:R,x:O,y:Y,scale:Z,angle:K,align:this.textAlign,maxWidth:X})}},A.prototype.strokeText=function(R,O,Y,X){if(isNaN(O)||isNaN(Y)||typeof R!="string")throw Gn.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!p.call(this)){X=isNaN(X)?void 0:X;var K=$(this.ctx.transform.rotation),Z=this.ctx.transform.scaleX;E.call(this,{text:R,x:O,y:Y,scale:Z,renderingMode:"stroke",angle:K,align:this.textAlign,maxWidth:X})}},A.prototype.measureText=function(R){if(typeof R!="string")throw Gn.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var O=this.pdf,Y=this.pdf.internal.scaleFactor,X=O.internal.getFontSize(),K=O.getStringUnitWidth(R)*X/O.internal.scaleFactor;return new function(Z){var ae=(Z=Z||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return ae}}),this}({width:K*=Math.round(96*Y/72*1e4)/1e4})},A.prototype.scale=function(R,O){if(isNaN(R)||isNaN(O))throw Gn.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var Y=new l(R,0,0,O,0,0);this.ctx.transform=this.ctx.transform.multiply(Y)},A.prototype.rotate=function(R){if(isNaN(R))throw Gn.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var O=new l(Math.cos(R),Math.sin(R),-Math.sin(R),Math.cos(R),0,0);this.ctx.transform=this.ctx.transform.multiply(O)},A.prototype.translate=function(R,O){if(isNaN(R)||isNaN(O))throw Gn.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var Y=new l(1,0,0,1,R,O);this.ctx.transform=this.ctx.transform.multiply(Y)},A.prototype.transform=function(R,O,Y,X,K,Z){if(isNaN(R)||isNaN(O)||isNaN(Y)||isNaN(X)||isNaN(K)||isNaN(Z))throw Gn.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var ae=new l(R,O,Y,X,K,Z);this.ctx.transform=this.ctx.transform.multiply(ae)},A.prototype.setTransform=function(R,O,Y,X,K,Z){R=isNaN(R)?1:R,O=isNaN(O)?0:O,Y=isNaN(Y)?0:Y,X=isNaN(X)?1:X,K=isNaN(K)?0:K,Z=isNaN(Z)?0:Z,this.ctx.transform=new l(R,O,Y,X,K,Z)};var m=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};A.prototype.drawImage=function(R,O,Y,X,K,Z,ae,ue,se){var Ae=this.pdf.getImageProperties(R),de=1,Se=1,Fe=1,te=1;X!==void 0&&ue!==void 0&&(Fe=ue/X,te=se/K,de=Ae.width/X*ue/X,Se=Ae.height/K*se/K),Z===void 0&&(Z=O,ae=Y,O=0,Y=0),X!==void 0&&ue===void 0&&(ue=X,se=K),X===void 0&&ue===void 0&&(ue=Ae.width,se=Ae.height);var ke=this.ctx.transform.decompose(),Ze=$(ke.rotate.shx),et=new l,Te=(et=(et=(et=et.multiply(ke.translate)).multiply(ke.skew)).multiply(ke.scale)).applyToRectangle(new o(Z-O*Fe,ae-Y*te,X*de,K*Se));if(this.autoPaging){for(var st,xe=g.call(this,Te),Qe=[],ze=0;ze<xe.length;ze+=1)Qe.indexOf(xe[ze])===-1&&Qe.push(xe[ze]);x(Qe);for(var Rt=Qe[0],dt=Qe[Qe.length-1],ye=Rt;ye<dt+1;ye++){this.pdf.setPage(ye);var Ee=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],qe=ye===1?this.posY+this.margin[0]:this.margin[0],Ue=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ge=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],pe=ye===1?0:Ue+(ye-2)*Ge;if(this.ctx.clip_path.length!==0){var mt=this.path;st=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(st,this.posX+this.margin[3],-pe+qe+this.ctx.prevPageLastElemOffset),w.call(this,"fill",!0),this.path=mt}var ct=JSON.parse(JSON.stringify(Te));ct=v([ct],this.posX+this.margin[3],-pe+qe+this.ctx.prevPageLastElemOffset)[0];var xt=(ye>Rt||ye<dt)&&m.call(this);xt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ee,Ge,null).clip().discardPath()),this.pdf.addImage(R,"JPEG",ct.x,ct.y,ct.w,ct.h,null,null,Ze),xt&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(R,"JPEG",Te.x,Te.y,Te.w,Te.h,null,null,Ze)};var g=function(R,O,Y){var X=[];O=O||this.pdf.internal.pageSize.width,Y=Y||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var K=this.posY+this.ctx.prevPageLastElemOffset;switch(R.type){default:case"mt":case"lt":X.push(Math.floor((R.y+K)/Y)+1);break;case"arc":X.push(Math.floor((R.y+K-R.radius)/Y)+1),X.push(Math.floor((R.y+K+R.radius)/Y)+1);break;case"qct":var Z=z(this.ctx.lastPoint.x,this.ctx.lastPoint.y,R.x1,R.y1,R.x,R.y);X.push(Math.floor((Z.y+K)/Y)+1),X.push(Math.floor((Z.y+Z.h+K)/Y)+1);break;case"bct":var ae=Q(this.ctx.lastPoint.x,this.ctx.lastPoint.y,R.x1,R.y1,R.x2,R.y2,R.x,R.y);X.push(Math.floor((ae.y+K)/Y)+1),X.push(Math.floor((ae.y+ae.h+K)/Y)+1);break;case"rect":X.push(Math.floor((R.y+K)/Y)+1),X.push(Math.floor((R.y+R.h+K)/Y)+1)}for(var ue=0;ue<X.length;ue+=1)for(;this.pdf.internal.getNumberOfPages()<X[ue];)y.call(this);return X},y=function(){var R=this.fillStyle,O=this.strokeStyle,Y=this.font,X=this.lineCap,K=this.lineWidth,Z=this.lineJoin;this.pdf.addPage(),this.fillStyle=R,this.strokeStyle=O,this.font=Y,this.lineCap=X,this.lineWidth=K,this.lineJoin=Z},v=function(R,O,Y){for(var X=0;X<R.length;X++)switch(R[X].type){case"bct":R[X].x2+=O,R[X].y2+=Y;case"qct":R[X].x1+=O,R[X].y1+=Y;default:R[X].x+=O,R[X].y+=Y}return R},x=function(R){return R.sort(function(O,Y){return O-Y})},b=function(R,O){var Y=this.fillStyle,X=this.strokeStyle,K=this.lineCap,Z=this.lineWidth,ae=Math.abs(Z*this.ctx.transform.scaleX),ue=this.lineJoin;if(this.autoPaging){for(var se,Ae,de=JSON.parse(JSON.stringify(this.path)),Se=JSON.parse(JSON.stringify(this.path)),Fe=[],te=0;te<Se.length;te++)if(Se[te].x!==void 0)for(var ke=g.call(this,Se[te]),Ze=0;Ze<ke.length;Ze+=1)Fe.indexOf(ke[Ze])===-1&&Fe.push(ke[Ze]);for(var et=0;et<Fe.length;et++)for(;this.pdf.internal.getNumberOfPages()<Fe[et];)y.call(this);x(Fe);for(var Te=Fe[0],st=Fe[Fe.length-1],xe=Te;xe<st+1;xe++){this.pdf.setPage(xe),this.fillStyle=Y,this.strokeStyle=X,this.lineCap=K,this.lineWidth=ae,this.lineJoin=ue;var Qe=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ze=xe===1?this.posY+this.margin[0]:this.margin[0],Rt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],dt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ye=xe===1?0:Rt+(xe-2)*dt;if(this.ctx.clip_path.length!==0){var Ee=this.path;se=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(se,this.posX+this.margin[3],-ye+ze+this.ctx.prevPageLastElemOffset),w.call(this,R,!0),this.path=Ee}if(Ae=JSON.parse(JSON.stringify(de)),this.path=v(Ae,this.posX+this.margin[3],-ye+ze+this.ctx.prevPageLastElemOffset),O===!1||xe===0){var qe=(xe>Te||xe<st)&&m.call(this);qe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Qe,dt,null).clip().discardPath()),w.call(this,R,O),qe&&this.pdf.restoreGraphicsState()}this.lineWidth=Z}this.path=de}else this.lineWidth=ae,w.call(this,R,O),this.lineWidth=Z},w=function(R,O){if((R!=="stroke"||O||!p.call(this))&&(R==="stroke"||O||!h.call(this))){for(var Y,X,K=[],Z=this.path,ae=0;ae<Z.length;ae++){var ue=Z[ae];switch(ue.type){case"begin":K.push({begin:!0});break;case"close":K.push({close:!0});break;case"mt":K.push({start:ue,deltas:[],abs:[]});break;case"lt":var se=K.length;if(Z[ae-1]&&!isNaN(Z[ae-1].x)&&(Y=[ue.x-Z[ae-1].x,ue.y-Z[ae-1].y],se>0)){for(;se>=0;se--)if(K[se-1].close!==!0&&K[se-1].begin!==!0){K[se-1].deltas.push(Y),K[se-1].abs.push(ue);break}}break;case"bct":Y=[ue.x1-Z[ae-1].x,ue.y1-Z[ae-1].y,ue.x2-Z[ae-1].x,ue.y2-Z[ae-1].y,ue.x-Z[ae-1].x,ue.y-Z[ae-1].y],K[K.length-1].deltas.push(Y);break;case"qct":var Ae=Z[ae-1].x+2/3*(ue.x1-Z[ae-1].x),de=Z[ae-1].y+2/3*(ue.y1-Z[ae-1].y),Se=ue.x+2/3*(ue.x1-ue.x),Fe=ue.y+2/3*(ue.y1-ue.y),te=ue.x,ke=ue.y;Y=[Ae-Z[ae-1].x,de-Z[ae-1].y,Se-Z[ae-1].x,Fe-Z[ae-1].y,te-Z[ae-1].x,ke-Z[ae-1].y],K[K.length-1].deltas.push(Y);break;case"arc":K.push({deltas:[],abs:[],arc:!0}),Array.isArray(K[K.length-1].abs)&&K[K.length-1].abs.push(ue)}}X=O?null:R==="stroke"?"stroke":"fill";for(var Ze=!1,et=0;et<K.length;et++)if(K[et].arc)for(var Te=K[et].abs,st=0;st<Te.length;st++){var xe=Te[st];xe.type==="arc"?N.call(this,xe.x,xe.y,xe.radius,xe.startAngle,xe.endAngle,xe.counterclockwise,void 0,O,!Ze):F.call(this,xe.x,xe.y),Ze=!0}else if(K[et].close===!0)this.pdf.internal.out("h"),Ze=!1;else if(K[et].begin!==!0){var Qe=K[et].start.x,ze=K[et].start.y;M.call(this,K[et].deltas,Qe,ze),Ze=!0}X&&j.call(this,X),O&&L.call(this)}},B=function(R){var O=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,Y=O*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return R-Y;case"top":return R+O-Y;case"hanging":return R+O-2*Y;case"middle":return R+O/2-Y;default:return R}},k=function(R){return R+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};A.prototype.createLinearGradient=function(){var R=function(){};return R.colorStops=[],R.addColorStop=function(O,Y){this.colorStops.push([O,Y])},R.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},R.isCanvasGradient=!0,R},A.prototype.createPattern=function(){return this.createLinearGradient()},A.prototype.createRadialGradient=function(){return this.createLinearGradient()};var N=function(R,O,Y,X,K,Z,ae,ue,se){for(var Ae=H.call(this,Y,X,K,Z),de=0;de<Ae.length;de++){var Se=Ae[de];de===0&&(se?T.call(this,Se.x1+R,Se.y1+O):F.call(this,Se.x1+R,Se.y1+O)),D.call(this,R,O,Se.x2,Se.y2,Se.x3,Se.y3,Se.x4,Se.y4)}ue?L.call(this):j.call(this,ae)},j=function(R){switch(R){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},L=function(){this.pdf.clip(),this.pdf.discardPath()},T=function(R,O){this.pdf.internal.out(n(R)+" "+r(O)+" m")},E=function(R){var O;switch(R.align){case"right":case"end":O="right";break;case"center":O="center";break;default:O="left"}var Y,X,K,Z=this.pdf.getTextDimensions(R.text),ae=B.call(this,R.y),ue=k.call(this,ae)-Z.h,se=this.ctx.transform.applyToPoint(new a(R.x,ae));if(this.autoPaging){var Ae=this.ctx.transform.decompose(),de=new l;de=(de=(de=de.multiply(Ae.translate)).multiply(Ae.skew)).multiply(Ae.scale);for(var Se=this.ctx.transform.applyToRectangle(new o(R.x,ae,Z.w,Z.h)),Fe=de.applyToRectangle(new o(R.x,ue,Z.w,Z.h)),te=g.call(this,Fe),ke=[],Ze=0;Ze<te.length;Ze+=1)ke.indexOf(te[Ze])===-1&&ke.push(te[Ze]);x(ke);for(var et=ke[0],Te=ke[ke.length-1],st=et;st<Te+1;st++){this.pdf.setPage(st);var xe=st===1?this.posY+this.margin[0]:this.margin[0],Qe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],ze=this.pdf.internal.pageSize.height-this.margin[2],Rt=ze-this.margin[0],dt=this.pdf.internal.pageSize.width-this.margin[1],ye=dt-this.margin[3],Ee=st===1?0:Qe+(st-2)*Rt;if(this.ctx.clip_path.length!==0){var qe=this.path;Y=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(Y,this.posX+this.margin[3],-1*Ee+xe),w.call(this,"fill",!0),this.path=qe}var Ue=v([JSON.parse(JSON.stringify(Fe))],this.posX+this.margin[3],-Ee+xe+this.ctx.prevPageLastElemOffset)[0];R.scale>=.01&&(X=this.pdf.internal.getFontSize(),this.pdf.setFontSize(X*R.scale),K=this.lineWidth,this.lineWidth=K*R.scale);var Ge=this.autoPaging!=="text";if(Ge||Ue.y+Ue.h<=ze){if(Ge||Ue.y>=xe&&Ue.x<=dt){var pe=Ge?R.text:this.pdf.splitTextToSize(R.text,R.maxWidth||dt-Ue.x)[0],mt=v([JSON.parse(JSON.stringify(Se))],this.posX+this.margin[3],-Ee+xe+this.ctx.prevPageLastElemOffset)[0],ct=Ge&&(st>et||st<Te)&&m.call(this);ct&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ye,Rt,null).clip().discardPath()),this.pdf.text(pe,mt.x,mt.y,{angle:R.angle,align:O,renderingMode:R.renderingMode}),ct&&this.pdf.restoreGraphicsState()}}else Ue.y<ze&&(this.ctx.prevPageLastElemOffset+=ze-Ue.y);R.scale>=.01&&(this.pdf.setFontSize(X),this.lineWidth=K)}}else R.scale>=.01&&(X=this.pdf.internal.getFontSize(),this.pdf.setFontSize(X*R.scale),K=this.lineWidth,this.lineWidth=K*R.scale),this.pdf.text(R.text,se.x+this.posX,se.y+this.posY,{angle:R.angle,align:O,renderingMode:R.renderingMode,maxWidth:R.maxWidth}),R.scale>=.01&&(this.pdf.setFontSize(X),this.lineWidth=K)},F=function(R,O,Y,X){Y=Y||0,X=X||0,this.pdf.internal.out(n(R+Y)+" "+r(O+X)+" l")},M=function(R,O,Y){return this.pdf.lines(R,O,Y,null,null)},D=function(R,O,Y,X,K,Z,ae,ue){this.pdf.internal.out([t(i(Y+R)),t(s(X+O)),t(i(K+R)),t(s(Z+O)),t(i(ae+R)),t(s(ue+O)),"c"].join(" "))},H=function(R,O,Y,X){for(var K=2*Math.PI,Z=Math.PI/2;O>Y;)O-=K;var ae=Math.abs(Y-O);ae<K&&X&&(ae=K-ae);for(var ue=[],se=X?-1:1,Ae=O;ae>1e-5;){var de=Ae+se*Math.min(ae,Z);ue.push(q.call(this,R,Ae,de)),ae-=Math.abs(de-Ae),Ae=de}return ue},q=function(R,O,Y){var X=(Y-O)/2,K=R*Math.cos(X),Z=R*Math.sin(X),ae=K,ue=-Z,se=ae*ae+ue*ue,Ae=se+ae*K+ue*Z,de=4/3*(Math.sqrt(2*se*Ae)-Ae)/(ae*Z-ue*K),Se=ae-de*ue,Fe=ue+de*ae,te=Se,ke=-Fe,Ze=X+O,et=Math.cos(Ze),Te=Math.sin(Ze);return{x1:R*Math.cos(O),y1:R*Math.sin(O),x2:Se*et-Fe*Te,y2:Se*Te+Fe*et,x3:te*et-ke*Te,y3:te*Te+ke*et,x4:R*Math.cos(Y),y4:R*Math.sin(Y)}},$=function(R){return 180*R/Math.PI},z=function(R,O,Y,X,K,Z){var ae=R+.5*(Y-R),ue=O+.5*(X-O),se=K+.5*(Y-K),Ae=Z+.5*(X-Z),de=Math.min(R,K,ae,se),Se=Math.max(R,K,ae,se),Fe=Math.min(O,Z,ue,Ae),te=Math.max(O,Z,ue,Ae);return new o(de,Fe,Se-de,te-Fe)},Q=function(R,O,Y,X,K,Z,ae,ue){var se,Ae,de,Se,Fe,te,ke,Ze,et,Te,st,xe,Qe,ze,Rt=Y-R,dt=X-O,ye=K-Y,Ee=Z-X,qe=ae-K,Ue=ue-Z;for(Ae=0;Ae<41;Ae++)et=(ke=(de=R+(se=Ae/40)*Rt)+se*((Fe=Y+se*ye)-de))+se*(Fe+se*(K+se*qe-Fe)-ke),Te=(Ze=(Se=O+se*dt)+se*((te=X+se*Ee)-Se))+se*(te+se*(Z+se*Ue-te)-Ze),Ae==0?(st=et,xe=Te,Qe=et,ze=Te):(st=Math.min(st,et),xe=Math.min(xe,Te),Qe=Math.max(Qe,et),ze=Math.max(ze,Te));return new o(Math.round(st),Math.round(xe),Math.round(Qe-st),Math.round(ze-xe))},ce=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var R,O,Y=(R=this.ctx.lineDash,O=this.ctx.lineDashOffset,JSON.stringify({lineDash:R,lineDashOffset:O}));this.prevLineDash!==Y&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=Y)}}})(Et.API),function(e){var t=function(a){var o,l,u,d,A,f,h,p,m,g;for(l=[],u=0,d=(a+=o="\0\0\0\0".slice(a.length%4||4)).length;d>u;u+=4)(A=(a.charCodeAt(u)<<24)+(a.charCodeAt(u+1)<<16)+(a.charCodeAt(u+2)<<8)+a.charCodeAt(u+3))!==0?(f=(A=((A=((A=((A=(A-(g=A%85))/85)-(m=A%85))/85)-(p=A%85))/85)-(h=A%85))/85)%85,l.push(f+33,h+33,p+33,m+33,g+33)):l.push(122);return function(y,v){for(var x=v;x>0;x--)y.pop()}(l,o.length),String.fromCharCode.apply(String,l)+"~>"},n=function(a){var o,l,u,d,A,f=String,h="length",p=255,m="charCodeAt",g="slice",y="replace";for(a[g](-2),a=a[g](0,-2)[y](/\s/g,"")[y]("z","!!!!!"),u=[],d=0,A=(a+=o="uuuuu"[g](a[h]%5||5))[h];A>d;d+=5)l=52200625*(a[m](d)-33)+614125*(a[m](d+1)-33)+7225*(a[m](d+2)-33)+85*(a[m](d+3)-33)+(a[m](d+4)-33),u.push(p&l>>24,p&l>>16,p&l>>8,p&l);return function(v,x){for(var b=x;b>0;b--)v.pop()}(u,o[h]),f.fromCharCode.apply(f,u)},r=function(a){return a.split("").map(function(o){return("0"+o.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(a){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((a=a.replace(/\s/g,"")).indexOf(">")!==-1&&(a=a.substr(0,a.indexOf(">"))),a.length%2&&(a+="0"),o.test(a)===!1)return"";for(var l="",u=0;u<a.length;u+=2)l+=String.fromCharCode("0x"+(a[u]+a[u+1]));return l},s=function(a){for(var o=new Uint8Array(a.length),l=a.length;l--;)o[l]=a.charCodeAt(l);return(o=jL(o)).reduce(function(u,d){return u+String.fromCharCode(d)},"")};e.processDataByFilters=function(a,o){var l=0,u=a||"",d=[];for(typeof(o=o||[])=="string"&&(o=[o]),l=0;l<o.length;l+=1)switch(o[l]){case"ASCII85Decode":case"/ASCII85Decode":u=n(u),d.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":u=t(u),d.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":u=i(u),d.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":u=r(u),d.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":u=s(u),d.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[l]+'" is not implemented')}return{data:u,reverseChain:d.reverse().join(" ")}}}(Et.API),function(e){e.loadFile=function(t,n,r){return function(i,s,a){s=s!==!1,a=typeof a=="function"?a:function(){};var o=void 0;try{o=function(l,u,d){var A=new XMLHttpRequest,f=0,h=function(p){var m=p.length,g=[],y=String.fromCharCode;for(f=0;f<m;f+=1)g.push(y(255&p.charCodeAt(f)));return g.join("")};if(A.open("GET",l,!u),A.overrideMimeType("text/plain; charset=x-user-defined"),u===!1&&(A.onload=function(){A.status===200?d(h(this.responseText)):d(void 0)}),A.send(null),u&&A.status===200)return h(A.responseText)}(i,s,a)}catch{}return o}(t,n,r)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile}(Et.API),function(e){function t(){return(Vt.html2canvas?Promise.resolve(Vt.html2canvas):KB(()=>Promise.resolve().then(()=>M_t),void 0)).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function n(){return(Vt.DOMPurify?Promise.resolve(Vt.DOMPurify):KB(()=>import("./purify.es-dhnUglUx.js"),[])).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var r=function(o){var l=Dn(o);return l==="undefined"?"undefined":l==="string"||o instanceof String?"string":l==="number"||o instanceof Number?"number":l==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":l==="object"?"object":"unknown"},i=function(o,l){var u=document.createElement(o);for(var d in l.className&&(u.className=l.className),l.innerHTML&&l.dompurify&&(u.innerHTML=l.dompurify.sanitize(l.innerHTML)),l.style)u.style[d]=l.style[d];return u},s=function o(l,u){for(var d=l.nodeType===3?document.createTextNode(l.nodeValue):l.cloneNode(!1),A=l.firstChild;A;A=A.nextSibling)u!==!0&&A.nodeType===1&&A.nodeName==="SCRIPT"||d.appendChild(o(A,u));return l.nodeType===1&&(l.nodeName==="CANVAS"?(d.width=l.width,d.height=l.height,d.getContext("2d").drawImage(l,0,0)):l.nodeName!=="TEXTAREA"&&l.nodeName!=="SELECT"||(d.value=l.value),d.addEventListener("load",function(){d.scrollTop=l.scrollTop,d.scrollLeft=l.scrollLeft},!0)),d},a=function o(l){var u=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),d=o.convert(Promise.resolve(),u);return(d=d.setProgress(1,o,1,[o])).set(l)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(o,l){return o.__proto__=l||a.prototype,o},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(o,l){return this.then(function(){switch(l=l||function(u){switch(r(u)){case"string":return"string";case"element":return u.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(o),l){case"string":return this.then(n).then(function(u){return this.set({src:i("div",{innerHTML:o,dompurify:u})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},a.prototype.to=function(o){switch(o){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var o={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},l=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);l.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(l),this.prop.container.firstChild.appendChild(i("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},a.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(t).then(function(l){var u=Object.assign({},this.opt.html2canvas);return delete u.onrendered,l(this.prop.container,u)}).then(function(l){(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(t).then(function(l){var u=this.opt.jsPDF,d=this.opt.fontFaces,A=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,f=Object.assign({async:!0,allowTaint:!0,scale:A,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete f.onrendered,u.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,u.context2d.posX=this.opt.x,u.context2d.posY=this.opt.y,u.context2d.margin=this.opt.margin,u.context2d.fontFaces=d,d)for(var h=0;h<d.length;++h){var p=d[h],m=p.src.find(function(g){return g.format==="truetype"});m&&u.addFont(m.url,p.ref.name,p.ref.style)}return f.windowHeight=f.windowHeight||0,f.windowHeight=f.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):f.windowHeight,u.context2d.save(!0),l(this.prop.container,f)}).then(function(l){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(o,l,u){return(u=u||"pdf").toLowerCase()==="img"||u.toLowerCase()==="image"?this.outputImg(o,l):this.outputPdf(o,l)},a.prototype.outputPdf=function(o,l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,l)})},a.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+o+'" is not supported.'}})},a.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(o){if(r(o)!=="object")return this;var l=Object.keys(o||{}).map(function(u){if(u in a.template.prop)return function(){this.prop[u]=o[u]};switch(u){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[u]=o[u]}}},this);return this.then(function(){return this.thenList(l)})},a.prototype.get=function(o,l){return this.then(function(){var u=o in a.template.prop?this.prop[o]:this.opt[o];return l?l(u):u})},a.prototype.setMargin=function(o){return this.then(function(){switch(r(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},a.prototype.setPageSize=function(o){function l(u,d){return Math.floor(u*d/72*96)}return this.then(function(){(o=o||Et.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:l(o.inner.width,o.k),height:l(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},a.prototype.setProgress=function(o,l,u,d){return o!=null&&(this.progress.val=o),l!=null&&(this.progress.state=l),u!=null&&(this.progress.n=u),d!=null&&(this.progress.stack=d),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(o,l,u,d){return this.setProgress(o?this.progress.val+o:null,l||null,u?this.progress.n+u:null,d?this.progress.stack.concat(d):null)},a.prototype.then=function(o,l){var u=this;return this.thenCore(o,l,function(d,A){return u.updateProgress(null,null,1,[d]),Promise.prototype.then.call(this,function(f){return u.updateProgress(null,d),f}).then(d,A).then(function(f){return u.updateProgress(1),f})})},a.prototype.thenCore=function(o,l,u){u=u||Promise.prototype.then;var d=this;o&&(o=o.bind(d)),l&&(l=l.bind(d));var A=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?d:a.convert(Object.assign({},d),Promise.prototype),f=u.call(A,o,l);return a.convert(f,d.__proto__)},a.prototype.thenExternal=function(o,l){return Promise.prototype.then.call(this,o,l)},a.prototype.thenList=function(o){var l=this;return o.forEach(function(u){l=l.thenCore(u)}),l},a.prototype.catch=function(o){o&&(o=o.bind(this));var l=Promise.prototype.catch.call(this,o);return a.convert(l,this)},a.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},a.prototype.error=function(o){return this.then(function(){throw new Error(o)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,Et.getPageSize=function(o,l,u){if(Dn(o)==="object"){var d=o;o=d.orientation,l=d.unit||l,u=d.format||u}l=l||"mm",u=u||"a4",o=(""+(o||"P")).toLowerCase();var A,f=(""+u).toLowerCase(),h={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(l){case"pt":A=1;break;case"mm":A=72/25.4;break;case"cm":A=72/2.54;break;case"in":A=72;break;case"px":A=.75;break;case"pc":case"em":A=12;break;case"ex":A=6;break;default:throw"Invalid unit: "+l}var p,m=0,g=0;if(h.hasOwnProperty(f))m=h[f][1]/A,g=h[f][0]/A;else try{m=u[1],g=u[0]}catch{throw new Error("Invalid format: "+u)}if(o==="p"||o==="portrait")o="p",g>m&&(p=g,g=m,m=p);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",m>g&&(p=g,g=m,m=p)}return{width:g,height:m,unit:l,k:A,orientation:o}},e.html=function(o,l){(l=l||{}).callback=l.callback||function(){},l.html2canvas=l.html2canvas||{},l.html2canvas.canvas=l.html2canvas.canvas||this.canvas,l.jsPDF=l.jsPDF||this,l.fontFaces=l.fontFaces?l.fontFaces.map(w4):null;var u=new a(l);return l.worker?u:u.from(o).doCallback()}}(Et.API),Et.API.addJS=function(e){var t,n,r=function(i){for(var s="",a=0;a<i.length;a++){var o=i[a];if(o==="("||o===")"){for(var l=0,u=a-1;u>=0&&i[u]==="\\";u--)l++;s+=l%2==0?"\\"+o:o}else s+=o}return s}(e);return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(t+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),n=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+r+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){t!==void 0&&n!==void 0&&this.internal.out("/Names <</JavaScript "+t+" 0 R>>")}),this},function(e){var t;e.events.push(["postPutResources",function(){var n=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=n.outline.render().split(/\r\n/),s=0;s<i.length;s++){var a=i[s],o=r.exec(a);if(o!=null){var l=o[1];n.internal.newObjectDeferredBegin(l,!1)}n.internal.write(a)}if(this.outline.createNamedDestinations){var u=this.internal.pages.length,d=[];for(s=0;s<u;s++){var A=n.internal.newObject();d.push(A);var f=n.internal.getPageInfo(s+1);n.internal.write("<< /D["+f.objId+" 0 R /XYZ null null null]>> endobj")}var h=n.internal.newObject();for(n.internal.write("<< /Names [ "),s=0;s<d.length;s++)n.internal.write("(page_"+(s+1)+")"+d[s]+" 0 R");n.internal.write(" ] >>","endobj"),t=n.internal.newObject(),n.internal.write("<< /Dests "+h+" 0 R"),n.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var n=this;n.outline.root.children.length>0&&(n.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&n.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var n=this;n.outline={createNamedDestinations:!1,root:{children:[]}},n.outline.add=function(r,i,s){var a={title:i,options:s,children:[]};return r==null&&(r=this.root),r.children.push(a),a},n.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=n,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},n.outline.genIds_r=function(r){r.id=n.internal.newObjectDeferred();for(var i=0;i<r.children.length;i++)this.genIds_r(r.children[i])},n.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},n.outline.renderItems=function(r){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,s=0;s<r.children.length;s++){var a=r.children[s];this.objStart(a),this.line("/Title "+this.makeString(a.title)),this.line("/Parent "+this.makeRef(r)),s>0&&this.line("/Prev "+this.makeRef(r.children[s-1])),s<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[s+1])),a.children.length>0&&(this.line("/First "+this.makeRef(a.children[0])),this.line("/Last "+this.makeRef(a.children[a.children.length-1])));var o=this.count=this.count_r({count:0},a);if(o>0&&this.line("/Count "+o),a.options&&a.options.pageNumber){var l=n.internal.getPageInfo(a.options.pageNumber);this.line("/Dest ["+l.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var u=0;u<r.children.length;u++)this.renderItems(r.children[u])},n.outline.line=function(r){this.ctx.val+=r+`\r
`},n.outline.makeRef=function(r){return r.id+" 0 R"},n.outline.makeString=function(r){return"("+n.internal.pdfEscape(r)+")"},n.outline.objStart=function(r){this.ctx.val+=`\r
`+r.id+` 0 obj\r
<<\r
`},n.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},n.outline.count_r=function(r,i){for(var s=0;s<i.children.length;s++)r.count++,this.count_r(r,i.children[s]);return r.count}}])}(Et.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(n,r,i,s,a,o){var l,u=this.decode.DCT_DECODE,d=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=a||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,l=function(A){for(var f,h=256*A.charCodeAt(4)+A.charCodeAt(5),p=A.length,m={width:0,height:0,numcomponents:1},g=4;g<p;g+=2){if(g+=h,t.indexOf(A.charCodeAt(g+1))!==-1){f=256*A.charCodeAt(g+5)+A.charCodeAt(g+6),m={width:256*A.charCodeAt(g+7)+A.charCodeAt(g+8),height:f,numcomponents:A.charCodeAt(g+9)};break}h=256*A.charCodeAt(g+2)+A.charCodeAt(g+3)}return m}(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n),l.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}d={data:n,width:l.width,height:l.height,colorSpace:o,bitsPerComponent:8,filter:u,index:r,alias:i}}return d}}(Et.API),Et.API.processPNG=function(e,t,n,r){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,s=kbt(e,{checkCrc:!0}),a=s.width,o=s.height,l=s.channels,u=s.palette,d=s.depth;i=u&&l===1?function(N){for(var j=N.width,L=N.height,T=N.data,E=N.palette,F=N.depth,M=!1,D=[],H=[],q=void 0,$=!1,z=0,Q=0;Q<E.length;Q++){var ce=tX(E[Q],4),R=ce[0],O=ce[1],Y=ce[2],X=ce[3];D.push(R,O,Y),X!=null&&(X===0?(z++,H.length<1&&H.push(Q)):X<255&&($=!0))}if($||z>1){M=!0,H=void 0;var K=j*L;q=new Uint8Array(K);for(var Z=new DataView(T.buffer),ae=0;ae<K;ae++){var ue=C4(Z,ae,F),se=tX(E[ue],4)[3];q[ae]=se}}else z===0&&(H=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:M?8:void 0,colorBytes:T,alphaBytes:q,needSMask:M,palette:D,mask:H}}(s):l===2||l===4?function(N){for(var j=N.data,L=N.width,T=N.height,E=N.channels,F=N.depth,M=E===2?"DeviceGray":"DeviceRGB",D=E-1,H=L*T,q=D,$=H*q,z=1*H,Q=Math.ceil($*F/8),ce=Math.ceil(z*F/8),R=new Uint8Array(Q),O=new Uint8Array(ce),Y=new DataView(j.buffer),X=new DataView(R.buffer),K=new DataView(O.buffer),Z=!1,ae=0;ae<H;ae++){for(var ue=ae*E,se=0;se<q;se++)fJ(X,C4(Y,ue+se,F),ae*q+se,F);var Ae=C4(Y,ue+q,F);Ae<(1<<F)-1&&(Z=!0),fJ(K,Ae,1*ae,F)}return{colorSpace:M,colorsPerPixel:D,sMaskBitsPerComponent:Z?F:void 0,colorBytes:R,alphaBytes:O,needSMask:Z}}(s):function(N){var j=N.data,L=N.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:L,colorsPerPixel:L==="DeviceGray"?1:3,colorBytes:j instanceof Uint16Array?function(T){for(var E=T.length,F=new Uint8Array(2*E),M=new DataView(F.buffer,F.byteOffset,F.byteLength),D=0;D<E;D++)M.setUint16(2*D,T[D],!1);return F}(j):j,needSMask:!1}}(s);var A,f,h,p=i,m=p.colorSpace,g=p.colorsPerPixel,y=p.sMaskBitsPerComponent,v=p.colorBytes,x=p.alphaBytes,b=p.needSMask,w=p.palette,B=p.mask,k=null;return r!==Et.API.image_compression.NONE&&typeof jL=="function"?(k=function(N){var j;switch(N){case Et.API.image_compression.FAST:j=11;break;case Et.API.image_compression.MEDIUM:j=13;break;case Et.API.image_compression.SLOW:j=14;break;default:j=12}return j}(r),A=this.decode.FLATE_DECODE,f="/Predictor ".concat(k," /Colors ").concat(g," /BitsPerComponent ").concat(d," /Columns ").concat(a),e=cJ(v,Math.ceil(a*g*d/8),g,d,r),b&&(h=cJ(x,Math.ceil(a*y/8),1,y,r))):(A=void 0,f=void 0,e=v,b&&(h=x)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(h&&this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),{alias:n,data:e,index:t,filter:A,decodeParameters:f,transparency:B,palette:w,sMask:h,predictor:k,width:a,height:o,bitsPerComponent:d,sMaskBitsPerComponent:y,colorSpace:m}}},function(e){e.processGIF89A=function(t,n,r,i){var s=new qbt(t),a=s.width,o=s.height,l=[];s.decodeAndBlitFrameRGBA(0,l);var u={data:l,width:a,height:o},d=new S4(100).encode(u,100);return e.processJPEG.call(this,d,n,r,i)},e.processGIF87A=e.processGIF89A}(Et.API),Tl.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:n,quad:s}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Tl.prototype.parseBGR=function(){this.pos=this.offset;var e="bit"+this.bitPP,t=this.width*this.height*4;if(t>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(t);try{this[e]()}catch(n){Gn.log("bit decode error:"+n)}},Tl.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var s=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+8*i*4,o=0;o<8&&8*i+o<this.width;o++){var l=this.palette[s>>7-o&1];this.data[a+4*o]=l.blue,this.data[a+4*o+1]=l.green,this.data[a+4*o+2]=l.red,this.data[a+4*o+3]=255}n!==0&&(this.pos+=4-n)}},Tl.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++){var s=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+2*i*4,o=s>>4,l=15&s,u=this.palette[o];if(this.data[a]=u.blue,this.data[a+1]=u.green,this.data[a+2]=u.red,this.data[a+3]=255,2*i+1>=this.width)break;u=this.palette[l],this.data[a+4]=u.blue,this.data[a+4+1]=u.green,this.data[a+4+2]=u.red,this.data[a+4+3]=255}t!==0&&(this.pos+=4-t)}},Tl.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),s=n*this.width*4+4*r;if(i<this.palette.length){var a=this.palette[i];this.data[s]=a.red,this.data[s+1]=a.green,this.data[s+2]=a.blue,this.data[s+3]=255}else this.data[s]=255,this.data[s+1]=255,this.data[s+2]=255,this.data[s+3]=255}e!==0&&(this.pos+=4-e)}},Tl.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(s&t)/t*255|0,o=(s>>5&t)/t*255|0,l=(s>>10&t)/t*255|0,u=s>>15?255:0,d=r*this.width*4+4*i;this.data[d]=l,this.data[d+1]=o,this.data[d+2]=a,this.data[d+3]=u}this.pos+=e}},Tl.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,s=0;s<this.width;s++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&t)/t*255|0,l=(a>>5&n)/n*255|0,u=(a>>11)/t*255|0,d=i*this.width*4+4*s;this.data[d]=u,this.data[d+1]=l,this.data[d+2]=o,this.data[d+3]=255}this.pos+=e}},Tl.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*n;this.data[a]=s,this.data[a+1]=i,this.data[a+2]=r,this.data[a+3]=255}this.pos+=this.width%4}},Tl.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*n;this.data[o]=s,this.data[o+1]=i,this.data[o+2]=r,this.data[o+3]=a}},Tl.prototype.getData=function(){return this.data},function(e){e.processBMP=function(t,n,r,i){var s=new Tl(t,!1),a=s.width,o=s.height,l={data:s.getData(),width:a,height:o},u=new S4(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)}}(Et.API),mJ.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(t,n,r,i){var s=new mJ(t),a=s.width,o=s.height,l={data:s.getData(),width:a,height:o},u=new S4(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)}}(Et.API),Et.API.processRGBA=function(e,t,n){for(var r=e.data,i=r.length,s=new Uint8Array(i/4*3),a=new Uint8Array(i/4),o=0,l=0,u=0;u<i;u+=4){var d=r[u],A=r[u+1],f=r[u+2],h=r[u+3];s[o++]=d,s[o++]=A,s[o++]=f,a[l++]=h}var p=this.__addimage__.arrayBufferToBinaryString(s);return{alpha:this.__addimage__.arrayBufferToBinaryString(a),data:p,index:t,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},Et.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},ag=Et.API,DS=ag.getCharWidthsArray=function(e,t){var n,r,i=(t=t||{}).font||this.internal.getFont(),s=t.fontSize||this.internal.getFontSize(),a=t.charSpace||this.internal.getCharSpace(),o=t.widths?t.widths:i.metadata.Unicode.widths,l=o.fof?o.fof:1,u=t.kerning?t.kerning:i.metadata.Unicode.kerning,d=u.fof?u.fof:1,A=t.doKerning!==!1,f=0,h=e.length,p=0,m=o[0]||l,g=[];for(n=0;n<h;n++)r=e.charCodeAt(n),typeof i.metadata.widthOfString=="function"?g.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+a*(1e3/s)||0)/1e3):(f=A&&Dn(u[r])==="object"&&!isNaN(parseInt(u[r][p],10))?u[r][p]/d:0,g.push((o[r]||m)/l+f)),p=r;return g},aJ=ag.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return ag.processArabic&&(e=ag.processArabic(e)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(e,n,i)/n:DS.apply(this,arguments).reduce(function(s,a){return s+a},0)},oJ=function(e,t,n,r){for(var i=[],s=0,a=e.length,o=0;s!==a&&o+t[s]<n;)o+=t[s],s++;i.push(e.slice(0,s));var l=s;for(o=0;s!==a;)o+t[s]>r&&(i.push(e.slice(l,s)),o=0,l=s),o+=t[s],s++;return l!==s&&i.push(e.slice(l,s)),i},lJ=function(e,t,n){n||(n={});var r,i,s,a,o,l,u,d=[],A=[d],f=n.textIndent||0,h=0,p=0,m=e.split(" "),g=DS.apply(this,[" ",n])[0];if(l=n.lineIndent===-1?m[0].length+2:n.lineIndent||0){var y=Array(l).join(" "),v=[];m.map(function(b){(b=b.split(/\s*\n/)).length>1?v=v.concat(b.map(function(w,B){return(B&&w.length?`
`:"")+w})):v.push(b[0])}),m=v,l=aJ.apply(this,[y,n])}for(s=0,a=m.length;s<a;s++){var x=0;if(r=m[s],l&&r[0]==`
`&&(r=r.substr(1),x=1),f+h+(p=(i=DS.apply(this,[r,n])).reduce(function(b,w){return b+w},0))>t||x){if(p>t){for(o=oJ.apply(this,[r,i,t-(f+h),t]),d.push(o.shift()),d=[o.pop()];o.length;)A.push([o.shift()]);p=i.slice(r.length-(d[0]?d[0].length:0)).reduce(function(b,w){return b+w},0)}else d=[r];A.push(d),f=p+l,h=g}else d.push(r),f+=h+p,h=g}return u=l?function(b,w){return(w?y:"")+b.join(" ")}:function(b){return b.join(" ")},A.map(u)},ag.splitTextToSize=function(e,t,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),s=(function(d){if(d.widths&&d.kerning)return{widths:d.widths,kerning:d.kerning};var A=this.internal.getFont(d.fontName,d.fontStyle),f="Unicode";return A.metadata[f]?{widths:A.metadata[f].widths||{0:1},kerning:A.metadata[f].kerning||{}}:{font:A.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var a=1*this.internal.scaleFactor*t/i;s.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,s.lineIndent=n.lineIndent;var o,l,u=[];for(o=0,l=r.length;o<l;o++)u=u.concat(lJ.apply(this,[r[o],a,s]));return u},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",r={},i={},s=0;s<16;s++)r[n[s]]=t[s],i[t[s]]=n[s];var a=function(f){return"0x"+parseInt(f,10).toString(16)},o=e.__fontmetrics__.compress=function(f){var h,p,m,g,y=["{"];for(var v in f){if(h=f[v],isNaN(parseInt(v,10))?p="'"+v+"'":(v=parseInt(v,10),p=(p=a(v).slice(2)).slice(0,-1)+i[p.slice(-1)]),typeof h=="number")h<0?(m=a(h).slice(3),g="-"):(m=a(h).slice(2),g=""),m=g+m.slice(0,-1)+i[m.slice(-1)];else{if(Dn(h)!=="object")throw new Error("Don't know what to do with value type "+Dn(h)+".");m=o(h)}y.push(p+m)}return y.push("}"),y.join("")},l=e.__fontmetrics__.uncompress=function(f){if(typeof f!="string")throw new Error("Invalid argument passed to uncompress.");for(var h,p,m,g,y={},v=1,x=y,b=[],w="",B="",k=f.length-1,N=1;N<k;N+=1)(g=f[N])=="'"?h?(m=h.join(""),h=void 0):h=[]:h?h.push(g):g=="{"?(b.push([x,m]),x={},m=void 0):g=="}"?((p=b.pop())[0][p[1]]=x,m=void 0,x=p[0]):g=="-"?v=-1:m===void 0?r.hasOwnProperty(g)?(w+=r[g],m=parseInt(w,16)*v,v=1,w=""):w+=g:r.hasOwnProperty(g)?(B+=r[g],x[m]=parseInt(B,16)*v,v=1,m=void 0,B=""):B+=g;return y},u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},d={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},A={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(f){var h=f.font,p=A.Unicode[h.postScriptName];p&&(h.metadata.Unicode={},h.metadata.Unicode.widths=p.widths,h.metadata.Unicode.kerning=p.kerning);var m=d.Unicode[h.postScriptName];m&&(h.metadata.Unicode.encoding=m,h.encoding=m.codePages[0])}])}(Et.API),function(e){var t=function(n){for(var r=n.length,i=new Uint8Array(r),s=0;s<r;s++)i[s]=n.charCodeAt(s);return i};e.API.events.push(["addFont",function(n){var r=void 0,i=n.font,s=n.instance;if(!i.isStandardFont){if(s===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=s.existsFileInVFS(i.postScriptName)===!1?s.loadFile(i.postScriptName):s.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(a,o){o=/^\x00\x01\x00\x00/.test(o)?t(o):t(GB(o)),a.metadata=e.API.TTFFont.open(o),a.metadata.Unicode=a.metadata.Unicode||{encoding:{},kerning:{},widths:[]},a.metadata.glyIdsUsed=[0]})(i,r)}}])}(Et),Et.API.addSvgAsImage=function(e,t,n,r,i,s,a,o){if(isNaN(t)||isNaN(n))throw Gn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(i))throw Gn.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=r,l.height=i;var u=l.getContext("2d");u.fillStyle="#fff",u.fillRect(0,0,l.width,l.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},A=this;return(Vt.canvg?Promise.resolve(Vt.canvg):KB(()=>import("./index.es-DB6EUJ8K.js"),[])).catch(function(f){return Promise.reject(new Error("Could not load canvg: "+f))}).then(function(f){return f.default?f.default:f}).then(function(f){return f.fromString(u,e,d)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(f){return f.render(d)}).then(function(){A.addImage(l.toDataURL("image/jpeg",1),t,n,r,i,a,o)})},Et.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},Et.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,i,s,a={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},o=Object.keys(a),l=[],u=0,d=0,A=0;function f(p,m){var g,y=!1;for(g=0;g<p.length;g+=1)p[g]===m&&(y=!0);return y}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var h=o.length;for(A=0;A<h;A+=1)n[o[A]].value=n[o[A]].defaultValue,n[o[A]].explicitSet=!1}if(Dn(e)==="object"){for(i in e)if(s=e[i],f(o,i)&&s!==void 0){if(n[i].type==="boolean"&&typeof s=="boolean")n[i].value=s;else if(n[i].type==="name"&&f(n[i].valueSet,s))n[i].value=s;else if(n[i].type==="integer"&&Number.isInteger(s))n[i].value=s;else if(n[i].type==="array"){for(u=0;u<s.length;u+=1)if(r=!0,s[u].length===1&&typeof s[u][0]=="number")l.push(String(s[u]-1));else if(s[u].length>1){for(d=0;d<s[u].length;d+=1)typeof s[u][d]!="number"&&(r=!1);r===!0&&l.push([s[u][0]-1,s[u][1]-1].join(" "))}n[i].value="["+l.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,m=[];for(p in n)n[p].explicitSet===!0&&(n[p].type==="name"?m.push("/"+p+" /"+n[p].value):m.push("/"+p+" "+n[p].value));m.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+m.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},Et.API.addMetadata=function(e,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:e,namespaceUri:t??"http://jspdf.default.namespaceuri/",rawXml:typeof t=="boolean"&&t},this.internal.events.subscribe("putCatalog",Ybt),this.internal.events.subscribe("postPutResources",Gbt)),this},function(e){var t=e.API,n=t.pdfEscape16=function(s,a){for(var o,l=a.metadata.Unicode.widths,u=["","0","00","000","0000"],d=[""],A=0,f=s.length;A<f;++A){if(o=a.metadata.characterToGlyph(s.charCodeAt(A)),a.metadata.glyIdsUsed.push(o),a.metadata.toUnicode[o]=s.charCodeAt(A),l.indexOf(o)==-1&&(l.push(o),l.push([parseInt(a.metadata.widthOfGlyph(o),10)])),o=="0")return d.join("");o=o.toString(16),d.push(u[4-o.length],o)}return d.join("")},r=function(s){var a,o,l,u,d,A,f;for(d=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
/Registry (Adobe)
/Ordering (UCS)
/Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,l=[],A=0,f=(o=Object.keys(s).sort(function(h,p){return h-p})).length;A<f;A++)a=o[A],l.length>=100&&(d+=`
`+l.length+` beginbfchar
`+l.join(`
`)+`
endbfchar`,l=[]),s[a]!==void 0&&s[a]!==null&&typeof s[a].toString=="function"&&(u=("0000"+s[a].toString(16)).slice(-4),a=("0000"+(+a).toString(16)).slice(-4),l.push("<"+a+"><"+u+">"));return l.length&&(d+=`
`+l.length+` beginbfchar
`+l.join(`
`)+`
endbfchar
`),d+`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};t.events.push(["putFont",function(s){(function(a){var o=a.font,l=a.out,u=a.newObject,d=a.putStream;if(o.metadata instanceof e.API.TTFFont&&o.encoding==="Identity-H"){for(var A=o.metadata.Unicode.widths,f=o.metadata.subset.encode(o.metadata.glyIdsUsed,1),h="",p=0;p<f.length;p++)h+=String.fromCharCode(f[p]);var m=u();d({data:h,addLength1:!0,objectId:m}),l("endobj");var g=u();d({data:r(o.metadata.toUnicode),addLength1:!0,objectId:g}),l("endobj");var y=u();l("<<"),l("/Type /FontDescriptor"),l("/FontName /"+xg(o.fontName)),l("/FontFile2 "+m+" 0 R"),l("/FontBBox "+e.API.PDFObject.convert(o.metadata.bbox)),l("/Flags "+o.metadata.flags),l("/StemV "+o.metadata.stemV),l("/ItalicAngle "+o.metadata.italicAngle),l("/Ascent "+o.metadata.ascender),l("/Descent "+o.metadata.decender),l("/CapHeight "+o.metadata.capHeight),l(">>"),l("endobj");var v=u();l("<<"),l("/Type /Font"),l("/BaseFont /"+xg(o.fontName)),l("/FontDescriptor "+y+" 0 R"),l("/W "+e.API.PDFObject.convert(A)),l("/CIDToGIDMap /Identity"),l("/DW 1000"),l("/Subtype /CIDFontType2"),l("/CIDSystemInfo"),l("<<"),l("/Supplement 0"),l("/Registry (Adobe)"),l("/Ordering ("+o.encoding+")"),l(">>"),l(">>"),l("endobj"),o.objectNumber=u(),l("<<"),l("/Type /Font"),l("/Subtype /Type0"),l("/ToUnicode "+g+" 0 R"),l("/BaseFont /"+xg(o.fontName)),l("/Encoding /"+o.encoding),l("/DescendantFonts ["+v+" 0 R]"),l(">>"),l("endobj"),o.isAlreadyPutted=!0}})(s)}]),t.events.push(["putFont",function(s){(function(a){var o=a.font,l=a.out,u=a.newObject,d=a.putStream;if(o.metadata instanceof e.API.TTFFont&&o.encoding==="WinAnsiEncoding"){for(var A=o.metadata.rawData,f="",h=0;h<A.length;h++)f+=String.fromCharCode(A[h]);var p=u();d({data:f,addLength1:!0,objectId:p}),l("endobj");var m=u();d({data:r(o.metadata.toUnicode),addLength1:!0,objectId:m}),l("endobj");var g=u();l("<<"),l("/Descent "+o.metadata.decender),l("/CapHeight "+o.metadata.capHeight),l("/StemV "+o.metadata.stemV),l("/Type /FontDescriptor"),l("/FontFile2 "+p+" 0 R"),l("/Flags 96"),l("/FontBBox "+e.API.PDFObject.convert(o.metadata.bbox)),l("/FontName /"+xg(o.fontName)),l("/ItalicAngle "+o.metadata.italicAngle),l("/Ascent "+o.metadata.ascender),l(">>"),l("endobj"),o.objectNumber=u();for(var y=0;y<o.metadata.hmtx.widths.length;y++)o.metadata.hmtx.widths[y]=parseInt(o.metadata.hmtx.widths[y]*(1e3/o.metadata.head.unitsPerEm));l("<</Subtype/TrueType/Type/Font/ToUnicode "+m+" 0 R/BaseFont/"+xg(o.fontName)+"/FontDescriptor "+g+" 0 R/Encoding/"+o.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(o.metadata.hmtx.widths)+">>"),l("endobj"),o.isAlreadyPutted=!0}})(s)}]);var i=function(s){var a,o=s.text||"",l=s.x,u=s.y,d=s.options||{},A=s.mutex||{},f=A.pdfEscape,h=A.activeFontKey,p=A.fonts,m=h,g="",y=0,v="",x=p[m].encoding;if(p[m].encoding!=="Identity-H")return{text:o,x:l,y:u,options:d,mutex:A};for(v=o,m=h,Array.isArray(o)&&(v=o[0]),y=0;y<v.length;y+=1)p[m].metadata.hasOwnProperty("cmap")&&(a=p[m].metadata.cmap.unicode.codeMap[v[y].charCodeAt(0)]),a||v[y].charCodeAt(0)<256&&p[m].metadata.hasOwnProperty("Unicode")?g+=v[y]:g+="";var b="";return parseInt(m.slice(1))<14||x==="WinAnsiEncoding"?b=f(g,m).split("").map(function(w){return w.charCodeAt(0).toString(16)}).join(""):x==="Identity-H"&&(b=n(g,p[m])),A.isHex=!0,{text:b,x:l,y:u,options:d,mutex:A}};t.events.push(["postProcessText",function(s){var a=s.text||"",o=[],l={text:a,x:s.x,y:s.y,options:s.options,mutex:s.mutex};if(Array.isArray(a)){var u=0;for(u=0;u<a.length;u+=1)Array.isArray(a[u])&&a[u].length===3?o.push([i(Object.assign({},l,{text:a[u][0]})).text,a[u][1],a[u][2]]):o.push(i(Object.assign({},l,{text:a[u]})).text);s.text=o}else s.text=i(Object.assign({},l,{text:a})).text}])}(Et),function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(n){return t.call(this),this.internal.vFS[n]!==void 0},e.addFileToVFS=function(n,r){return t.call(this),this.internal.vFS[n]=r,this},e.getFileFromVFS=function(n){return t.call(this),this.internal.vFS[n]!==void 0?this.internal.vFS[n]:null}}(Et.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(r){var i,s,a,o,l,u,d,A=t,f=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],h=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],p={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},m={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},g=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],y=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),v=!1,x=0;this.__bidiEngine__={};var b=function(T){var E=T.charCodeAt(),F=E>>8,M=m[F];return M!==void 0?A[256*M+(255&E)]:F===252||F===253?"AL":y.test(F)?"L":F===8?"R":"N"},w=function(T){for(var E,F=0;F<T.length;F++){if((E=b(T.charAt(F)))==="L")return!1;if(E==="R")return!0}return!1},B=function(T,E,F,M){var D,H,q,$,z=E[M];switch(z){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":v=!1;break;case"N":case"AN":break;case"EN":v&&(z="AN");break;case"AL":v=!0,z="R";break;case"WS":case"BN":z="N";break;case"CS":M<1||M+1>=E.length||(D=F[M-1])!=="EN"&&D!=="AN"||(H=E[M+1])!=="EN"&&H!=="AN"?z="N":v&&(H="AN"),z=H===D?H:"N";break;case"ES":z=(D=M>0?F[M-1]:"B")==="EN"&&M+1<E.length&&E[M+1]==="EN"?"EN":"N";break;case"ET":if(M>0&&F[M-1]==="EN"){z="EN";break}if(v){z="N";break}for(q=M+1,$=E.length;q<$&&E[q]==="ET";)q++;z=q<$&&E[q]==="EN"?"EN":"N";break;case"NSM":if(a&&!o){for($=E.length,q=M+1;q<$&&E[q]==="NSM";)q++;if(q<$){var Q=T[M],ce=Q>=1425&&Q<=2303||Q===64286;if(D=E[q],ce&&(D==="R"||D==="AL")){z="R";break}}}z=M<1||(D=E[M-1])==="B"?"N":F[M-1];break;case"B":v=!1,i=!0,z=x;break;case"S":s=!0,z="N"}return z},k=function(T,E,F){var M=T.split("");return F&&N(M,F,{hiLevel:x}),M.reverse(),E&&E.reverse(),M.join("")},N=function(T,E,F){var M,D,H,q,$,z=-1,Q=T.length,ce=0,R=[],O=x?h:f,Y=[];for(v=!1,i=!1,s=!1,D=0;D<Q;D++)Y[D]=b(T[D]);for(H=0;H<Q;H++){if($=ce,R[H]=B(T,Y,R,H),M=240&(ce=O[$][p[R[H]]]),ce&=15,E[H]=q=O[ce][5],M>0)if(M===16){for(D=z;D<H;D++)E[D]=1;z=-1}else z=-1;if(O[ce][6])z===-1&&(z=H);else if(z>-1){for(D=z;D<H;D++)E[D]=q;z=-1}Y[H]==="B"&&(E[H]=0),F.hiLevel|=q}s&&function(X,K,Z){for(var ae=0;ae<Z;ae++)if(X[ae]==="S"){K[ae]=x;for(var ue=ae-1;ue>=0&&X[ue]==="WS";ue--)K[ue]=x}}(Y,E,Q)},j=function(T,E,F,M,D){if(!(D.hiLevel<T)){if(T===1&&x===1&&!i)return E.reverse(),void(F&&F.reverse());for(var H,q,$,z,Q=E.length,ce=0;ce<Q;){if(M[ce]>=T){for($=ce+1;$<Q&&M[$]>=T;)$++;for(z=ce,q=$-1;z<q;z++,q--)H=E[z],E[z]=E[q],E[q]=H,F&&(H=F[z],F[z]=F[q],F[q]=H);ce=$}ce++}}},L=function(T,E,F){var M=T.split(""),D={hiLevel:x};return F||(F=[]),N(M,F,D),function(H,q,$){if($.hiLevel!==0&&d)for(var z,Q=0;Q<H.length;Q++)q[Q]===1&&(z=g.indexOf(H[Q]))>=0&&(H[Q]=g[z+1])}(M,F,D),j(2,M,E,F,D),j(1,M,E,F,D),M.join("")};return this.__bidiEngine__.doBidiReorder=function(T,E,F){if(function(D,H){if(H)for(var q=0;q<D.length;q++)H[q]=q;o===void 0&&(o=w(D)),u===void 0&&(u=w(D))}(T,E),a||!l||u)if(a&&l&&o^u)x=o?1:0,T=k(T,E,F);else if(!a&&l&&u)x=o?1:0,T=L(T,E,F),T=k(T,E);else if(!a||o||l||u){if(a&&!l&&o^u)T=k(T,E),o?(x=0,T=L(T,E,F)):(x=1,T=L(T,E,F),T=k(T,E));else if(a&&o&&!l&&u)x=1,T=L(T,E,F),T=k(T,E);else if(!a&&!l&&o^u){var M=d;o?(x=1,T=L(T,E,F),x=0,d=!1,T=L(T,E,F),d=M):(x=0,T=L(T,E,F),T=k(T,E),x=1,d=!1,T=L(T,E,F),d=M,T=k(T,E))}}else x=0,T=L(T,E,F);else x=o?1:0,T=L(T,E,F);return T},this.__bidiEngine__.setOptions=function(T){T&&(a=T.isInputVisual,l=T.isOutputVisual,o=T.isInputRtl,u=T.isOutputRtl,d=T.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(r){var i=r.text;r.x,r.y;var s=r.options||{};r.mutex,s.lang;var a=[];if(s.isInputVisual=typeof s.isInputVisual!="boolean"||s.isInputVisual,n.setOptions(s),Object.prototype.toString.call(i)==="[object Array]"){var o=0;for(a=[],o=0;o<i.length;o+=1)Object.prototype.toString.call(i[o])==="[object Array]"?a.push([n.doBidiReorder(i[o][0]),i[o][1],i[o][2]]):a.push([n.doBidiReorder(i[o])]);r.text=a}else r.text=n.doBidiReorder(i);n.setOptions({isInputVisual:!0})}])}(Et),Et.API.TTFFont=function(){function e(t){var n;if(this.rawData=t,n=this.contents=new kh(t),this.contents.pos=4,n.readString(4)==="ttcf")throw new Error("TTCF not supported.");n.pos=0,this.parse(),this.subset=new d1t(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new Xbt(this.contents),this.head=new Zbt(this),this.name=new i1t(this),this.cmap=new jge(this),this.toUnicode={},this.hhea=new e1t(this),this.maxp=new s1t(this),this.hmtx=new a1t(this),this.post=new n1t(this),this.os2=new t1t(this),this.loca=new u1t(this),this.glyf=new o1t(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var t,n,r,i,s;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var a,o,l,u;for(u=[],a=0,o=(l=this.bbox).length;a<o;a++)t=l[a],u.push(Math.round(t*this.scaleFactor));return u}).call(this),this.stemV=0,this.post.exists?(r=255&(i=this.post.italic_angle),32768&(n=i>>16)&&(n=-(1+(65535^n))),this.italicAngle=+(n+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(s=this.familyClass)===1||s===2||s===3||s===4||s===5||s===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(t){var n;return((n=this.cmap.unicode)!=null?n.codeMap[t]:void 0)||0},e.prototype.widthOfGlyph=function(t){var n;return n=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*n},e.prototype.widthOfString=function(t,n,r){var i,s,a,o;for(a=0,s=0,o=(t=""+t).length;0<=o?s<o:s>o;s=0<=o?++s:--s)i=t.charCodeAt(s),a+=this.widthOfGlyph(this.characterToGlyph(i))+r*(1e3/n)||0;return a*(n/1e3)},e.prototype.lineHeight=function(t,n){var r;return n==null&&(n=!1),r=n?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},e}();var pc,kh=function(){function e(t){this.data=t??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(t){return this.data[this.pos++]=t},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},e.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},e.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},e.prototype.readString=function(t){var n,r;for(r=[],n=0;0<=t?n<t:n>t;n=0<=t?++n:--n)r[n]=String.fromCharCode(this.readByte());return r.join("")},e.prototype.writeString=function(t){var n,r,i;for(i=[],n=0,r=t.length;0<=r?n<r:n>r;n=0<=r?++n:--n)i.push(this.writeByte(t.charCodeAt(n)));return i},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(t){return this.writeInt16(t)},e.prototype.readLongLong=function(){var t,n,r,i,s,a,o,l;return t=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),s=this.readByte(),a=this.readByte(),o=this.readByte(),l=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^n)+1099511627776*(255^r)+4294967296*(255^i)+16777216*(255^s)+65536*(255^a)+256*(255^o)+(255^l)+1):72057594037927940*t+281474976710656*n+1099511627776*r+4294967296*i+16777216*s+65536*a+256*o+l},e.prototype.writeLongLong=function(t){var n,r;return n=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(t){return this.writeInt32(t)},e.prototype.read=function(t){var n,r;for(n=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)n.push(this.readByte());return n},e.prototype.write=function(t){var n,r,i,s;for(s=[],r=0,i=t.length;r<i;r++)n=t[r],s.push(this.writeByte(n));return s},e}(),Xbt=function(){var e;function t(n){var r,i,s;for(this.scalarType=n.readInt(),this.tableCount=n.readShort(),this.searchRange=n.readShort(),this.entrySelector=n.readShort(),this.rangeShift=n.readShort(),this.tables={},i=0,s=this.tableCount;0<=s?i<s:i>s;i=0<=s?++i:--i)r={tag:n.readString(4),checksum:n.readInt(),offset:n.readInt(),length:n.readInt()},this.tables[r.tag]=r}return t.prototype.encode=function(n){var r,i,s,a,o,l,u,d,A,f,h,p,m;for(m in h=Object.keys(n).length,l=Math.log(2),A=16*Math.floor(Math.log(h)/l),a=Math.floor(A/l),d=16*h-A,(i=new kh).writeInt(this.scalarType),i.writeShort(h),i.writeShort(A),i.writeShort(a),i.writeShort(d),s=16*h,u=i.pos+s,o=null,p=[],n)for(f=n[m],i.writeString(m),i.writeInt(e(f)),i.writeInt(u),i.writeInt(f.length),p=p.concat(f),m==="head"&&(o=u),u+=f.length;u%4;)p.push(0),u++;return i.write(p),r=2981146554-e(i.data),i.pos=o+8,i.writeUInt32(r),i.data},e=function(n){var r,i,s,a;for(n=Tge.call(n);n.length%4;)n.push(0);for(s=new kh(n),i=0,r=0,a=n.length;r<a;r=r+=4)i+=s.readUInt32();return 4294967295&i},t}(),Jbt={}.hasOwnProperty,Au=function(e,t){for(var n in t)Jbt.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};pc=function(){function e(t){var n;this.file=t,n=this.file.directory.tables[this.tag],this.exists=!!n,n&&(this.offset=n.offset,this.length=n.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var Zbt=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Au(e,pc),e.prototype.tag="head",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},e.prototype.encode=function(t){var n;return(n=new kh).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t),n.writeShort(this.glyphDataFormat),n.data},e}(),gJ=function(){function e(t,n){var r,i,s,a,o,l,u,d,A,f,h,p,m,g,y,v,x;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=n+t.readInt(),A=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(l=0;l<256;++l)this.codeMap[l]=t.readByte();break;case 4:for(h=t.readUInt16(),f=h/2,t.pos+=6,s=function(){var b,w;for(w=[],l=b=0;0<=f?b<f:b>f;l=0<=f?++b:--b)w.push(t.readUInt16());return w}(),t.pos+=2,m=function(){var b,w;for(w=[],l=b=0;0<=f?b<f:b>f;l=0<=f?++b:--b)w.push(t.readUInt16());return w}(),u=function(){var b,w;for(w=[],l=b=0;0<=f?b<f:b>f;l=0<=f?++b:--b)w.push(t.readUInt16());return w}(),d=function(){var b,w;for(w=[],l=b=0;0<=f?b<f:b>f;l=0<=f?++b:--b)w.push(t.readUInt16());return w}(),i=(this.length-t.pos+this.offset)/2,o=function(){var b,w;for(w=[],l=b=0;0<=i?b<i:b>i;l=0<=i?++b:--b)w.push(t.readUInt16());return w}(),l=y=0,x=s.length;y<x;l=++y)for(g=s[l],r=v=p=m[l];p<=g?v<=g:v>=g;r=p<=g?++v:--v)d[l]===0?a=r+u[l]:(a=o[d[l]/2+(r-p)-(f-l)]||0)!==0&&(a+=u[l]),this.codeMap[r]=65535&a}t.pos=A}return e.encode=function(t,n){var r,i,s,a,o,l,u,d,A,f,h,p,m,g,y,v,x,b,w,B,k,N,j,L,T,E,F,M,D,H,q,$,z,Q,ce,R,O,Y,X,K,Z,ae,ue,se,Ae,de;switch(M=new kh,a=Object.keys(t).sort(function(Se,Fe){return Se-Fe}),n){case"macroman":for(m=0,g=function(){var Se=[];for(p=0;p<256;++p)Se.push(0);return Se}(),v={0:0},s={},D=0,z=a.length;D<z;D++)v[ue=t[i=a[D]]]==null&&(v[ue]=++m),s[i]={old:t[i],new:v[t[i]]},g[i]=v[t[i]];return M.writeUInt16(1),M.writeUInt16(0),M.writeUInt32(12),M.writeUInt16(0),M.writeUInt16(262),M.writeUInt16(0),M.write(g),{charMap:s,subtable:M.data,maxGlyphID:m+1};case"unicode":for(E=[],A=[],x=0,v={},r={},y=u=null,H=0,Q=a.length;H<Q;H++)v[w=t[i=a[H]]]==null&&(v[w]=++x),r[i]={old:w,new:v[w]},o=v[w]-i,y!=null&&o===u||(y&&A.push(y),E.push(i),u=o),y=i;for(y&&A.push(y),A.push(65535),E.push(65535),L=2*(j=E.length),N=2*Math.pow(Math.log(j)/Math.LN2,2),f=Math.log(N/2)/Math.LN2,k=2*j-N,l=[],B=[],h=[],p=q=0,ce=E.length;q<ce;p=++q){if(T=E[p],d=A[p],T===65535){l.push(0),B.push(0);break}if(T-(F=r[T].new)>=32768)for(l.push(0),B.push(2*(h.length+j-p)),i=$=T;T<=d?$<=d:$>=d;i=T<=d?++$:--$)h.push(r[i].new);else l.push(F-T),B.push(0)}for(M.writeUInt16(3),M.writeUInt16(1),M.writeUInt32(12),M.writeUInt16(4),M.writeUInt16(16+8*j+2*h.length),M.writeUInt16(0),M.writeUInt16(L),M.writeUInt16(N),M.writeUInt16(f),M.writeUInt16(k),Z=0,R=A.length;Z<R;Z++)i=A[Z],M.writeUInt16(i);for(M.writeUInt16(0),ae=0,O=E.length;ae<O;ae++)i=E[ae],M.writeUInt16(i);for(se=0,Y=l.length;se<Y;se++)o=l[se],M.writeUInt16(o);for(Ae=0,X=B.length;Ae<X;Ae++)b=B[Ae],M.writeUInt16(b);for(de=0,K=h.length;de<K;de++)m=h[de],M.writeUInt16(m);return{charMap:r,subtable:M.data,maxGlyphID:x+1}}},e}(),jge=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Au(e,pc),e.prototype.tag="cmap",e.prototype.parse=function(t){var n,r,i;for(t.pos=this.offset,this.version=t.readUInt16(),i=t.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=i?r<i:r>i;r=0<=i?++r:--r)n=new gJ(t,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},e.encode=function(t,n){var r,i;return n==null&&(n="macroman"),r=gJ.encode(t,n),(i=new kh).writeUInt16(0),i.writeUInt16(1),r.table=i.data.concat(r.subtable),r},e}(),e1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Au(e,pc),e.prototype.tag="hhea",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},e}(),t1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Au(e,pc),e.prototype.tag="OS/2",e.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var n,r;for(r=[],n=0;n<10;++n)r.push(t.readByte());return r}(),this.charRange=function(){var n,r;for(r=[],n=0;n<4;++n)r.push(t.readInt());return r}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var n,r;for(r=[],n=0;n<2;n=++n)r.push(t.readInt());return r}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},e}(),n1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Au(e,pc),e.prototype.tag="post",e.prototype.parse=function(t){var n,r,i;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var s;for(r=t.readUInt16(),this.glyphNameIndex=[],s=0;0<=r?s<r:s>r;s=0<=r?++s:--s)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],i=[];t.pos<this.offset+this.length;)n=t.readByte(),i.push(this.names.push(t.readString(n)));return i;case 151552:return r=t.readUInt16(),this.offsets=t.read(r);case 262144:return this.map=(function(){var a,o,l;for(l=[],s=a=0,o=this.file.maxp.numGlyphs;0<=o?a<o:a>o;s=0<=o?++a:--a)l.push(t.readUInt32());return l}).call(this)}},e}(),r1t=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},i1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Au(e,pc),e.prototype.tag="name",e.prototype.parse=function(t){var n,r,i,s,a,o,l,u,d,A,f;for(t.pos=this.offset,t.readShort(),n=t.readShort(),o=t.readShort(),r=[],s=0;0<=n?s<n:s>n;s=0<=n?++s:--s)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(l={},s=d=0,A=r.length;d<A;s=++d)i=r[s],t.pos=i.offset,u=t.readString(i.length),a=new r1t(u,i),l[f=i.nameID]==null&&(l[f]=[]),l[i.nameID].push(a);this.strings=l,this.copyright=l[0],this.fontFamily=l[1],this.fontSubfamily=l[2],this.uniqueSubfamily=l[3],this.fontName=l[4],this.version=l[5];try{this.postscriptName=l[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=l[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=l[7],this.manufacturer=l[8],this.designer=l[9],this.description=l[10],this.vendorUrl=l[11],this.designerUrl=l[12],this.license=l[13],this.licenseUrl=l[14],this.preferredFamily=l[15],this.preferredSubfamily=l[17],this.compatibleFull=l[18],this.sampleText=l[19]},e}(),s1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Au(e,pc),e.prototype.tag="maxp",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},e}(),a1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Au(e,pc),e.prototype.tag="hmtx",e.prototype.parse=function(t){var n,r,i,s,a,o,l;for(t.pos=this.offset,this.metrics=[],n=0,o=this.file.hhea.numberOfMetrics;0<=o?n<o:n>o;n=0<=o?++n:--n)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var u,d;for(d=[],n=u=0;0<=i?u<i:u>i;n=0<=i?++u:--u)d.push(t.readInt16());return d}(),this.widths=(function(){var u,d,A,f;for(f=[],u=0,d=(A=this.metrics).length;u<d;u++)s=A[u],f.push(s.advance);return f}).call(this),r=this.widths[this.widths.length-1],l=[],n=a=0;0<=i?a<i:a>i;n=0<=i?++a:--a)l.push(this.widths.push(r));return l},e.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},e}(),Tge=[].slice,o1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Au(e,pc),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var n,r,i,s,a,o,l,u,d,A;return t in this.cache?this.cache[t]:(s=this.file.loca,n=this.file.contents,r=s.indexOf(t),(i=s.lengthOf(t))===0?this.cache[t]=null:(n.pos=this.offset+r,a=(o=new kh(n.read(i))).readShort(),u=o.readShort(),A=o.readShort(),l=o.readShort(),d=o.readShort(),this.cache[t]=a===-1?new c1t(o,u,A,l,d):new l1t(o,a,u,A,l,d),this.cache[t]))},e.prototype.encode=function(t,n,r){var i,s,a,o,l;for(a=[],s=[],o=0,l=n.length;o<l;o++)i=t[n[o]],s.push(a.length),i&&(a=a.concat(i.encode(r)));return s.push(a.length),{table:a,offsets:s}},e}(),l1t=function(){function e(t,n,r,i,s,a){this.raw=t,this.numberOfContours=n,this.xMin=r,this.yMin=i,this.xMax=s,this.yMax=a,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),c1t=function(){function e(t,n,r,i,s){var a,o;for(this.raw=t,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=s,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],a=this.raw;o=a.readShort(),this.glyphOffsets.push(a.pos),this.glyphIDs.push(a.readUInt16()),32&o;)a.pos+=1&o?4:2,128&o?a.pos+=8:64&o?a.pos+=4:8&o&&(a.pos+=2)}return e.prototype.encode=function(){var t,n,r;for(n=new kh(Tge.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)n.pos=this.glyphOffsets[t];return n.data},e}(),u1t=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Au(e,pc),e.prototype.tag="loca",e.prototype.parse=function(t){var n,r;return t.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var i,s;for(s=[],r=0,i=this.length;r<i;r+=2)s.push(2*t.readUInt16());return s}).call(this):(function(){var i,s;for(s=[],r=0,i=this.length;r<i;r+=4)s.push(t.readUInt32());return s}).call(this)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.prototype.encode=function(t,n){for(var r=new Uint32Array(this.offsets.length),i=0,s=0,a=0;a<r.length;++a)if(r[a]=i,s<n.length&&n[s]==a){++s,r[a]=i;var o=this.offsets[a],l=this.offsets[a+1]-o;l>0&&(i+=l)}for(var u=new Array(4*r.length),d=0;d<r.length;++d)u[4*d+3]=255&r[d],u[4*d+2]=(65280&r[d])>>8,u[4*d+1]=(16711680&r[d])>>16,u[4*d]=(4278190080&r[d])>>24;return u},e}(),d1t=function(){function e(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var t,n,r,i,s;for(n in i=this.font.cmap.tables[0].codeMap,t={},s=this.subset)r=s[n],t[n]=i[r];return t},e.prototype.glyphsFor=function(t){var n,r,i,s,a,o,l;for(i={},a=0,o=t.length;a<o;a++)i[s=t[a]]=this.font.glyf.glyphFor(s);for(s in n=[],i)(r=i[s])!=null&&r.compound&&n.push.apply(n,r.glyphIDs);if(n.length>0)for(s in l=this.glyphsFor(n))r=l[s],i[s]=r;return i},e.prototype.encode=function(t,n){var r,i,s,a,o,l,u,d,A,f,h,p,m,g,y;for(i in r=jge.encode(this.generateCmap(),"unicode"),a=this.glyphsFor(t),h={0:0},y=r.charMap)h[(l=y[i]).old]=l.new;for(p in f=r.maxGlyphID,a)p in h||(h[p]=f++);return d=function(v){var x,b;for(x in b={},v)b[v[x]]=x;return b}(h),A=Object.keys(d).sort(function(v,x){return v-x}),m=function(){var v,x,b;for(b=[],v=0,x=A.length;v<x;v++)o=A[v],b.push(d[o]);return b}(),s=this.font.glyf.encode(a,m,h),u=this.font.loca.encode(s.offsets,m),g={cmap:this.font.cmap.raw(),glyf:s.table,loca:u,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(n)},this.font.os2.exists&&(g["OS/2"]=this.font.os2.raw()),this.font.directory.encode(g)},e}();Et.API.PDFObject=function(){var e;function t(){}return e=function(n,r){return(Array(r+1).join("0")+n).slice(-r)},t.convert=function(n){var r,i,s,a;if(Array.isArray(n))return"["+function(){var o,l,u;for(u=[],o=0,l=n.length;o<l;o++)r=n[o],u.push(t.convert(r));return u}().join(" ")+"]";if(typeof n=="string")return"/"+n;if(n!=null&&n.isString)return"("+n+")";if(n instanceof Date)return"(D:"+e(n.getUTCFullYear(),4)+e(n.getUTCMonth(),2)+e(n.getUTCDate(),2)+e(n.getUTCHours(),2)+e(n.getUTCMinutes(),2)+e(n.getUTCSeconds(),2)+"Z)";if({}.toString.call(n)==="[object Object]"){for(i in s=["<<"],n)a=n[i],s.push("/"+i+" "+t.convert(a));return s.push(">>"),s.join(`
`)}return""+n},t}();/*!
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
* Released under MIT License
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var zL=function(e,t){return zL=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},zL(e,t)};function mc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");zL(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var VL=function(){return VL=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},VL.apply(this,arguments)};function ta(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(d){try{u(r.next(d))}catch(A){a(A)}}function l(d){try{u(r.throw(d))}catch(A){a(A)}}function u(d){d.done?s(d.value):i(d.value).then(o,l)}u((r=r.apply(e,[])).next())})}function Os(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(u){return function(d){return l([u,d])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){n.label=u[1];break}if(u[0]===6&&n.label<s[1]){n.label=s[1],s=u;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(u);break}s[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function QS(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||t)}var yd=function(){function e(t,n,r,i){this.left=t,this.top=n,this.width=r,this.height=i}return e.prototype.add=function(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)},e.fromClientRect=function(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)},e.fromDOMRectList=function(t,n){var r=Array.from(n).find(function(i){return i.width!==0});return r?new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),Ej=function(e,t){return yd.fromClientRect(e,t.getBoundingClientRect())},A1t=function(e){var t=e.body,n=e.documentElement;if(!t||!n)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),i=Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight));return new yd(0,0,r,i)},Nj=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var s=e.charCodeAt(n++);(s&64512)===56320?t.push(((i&1023)<<10)+(s&1023)+65536):(t.push(i),n--)}else t.push(i)}return t},ni=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],i=-1,s="";++i<n;){var a=e[i];a<=65535?r.push(a):(a-=65536,r.push((a>>10)+55296,a%1024+56320)),(i+1===n||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},yJ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h1t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var HS=0;HS<yJ.length;HS++)h1t[yJ.charCodeAt(HS)]=HS;var vJ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wx=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var $S=0;$S<vJ.length;$S++)Wx[vJ.charCodeAt($S)]=$S;var f1t=function(e){var t=e.length*.75,n=e.length,r,i=0,s,a,o,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var u=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),d=Array.isArray(u)?u:new Uint8Array(u);for(r=0;r<n;r+=4)s=Wx[e.charCodeAt(r)],a=Wx[e.charCodeAt(r+1)],o=Wx[e.charCodeAt(r+2)],l=Wx[e.charCodeAt(r+3)],d[i++]=s<<2|a>>4,d[i++]=(a&15)<<4|o>>2,d[i++]=(o&3)<<6|l&63;return u},p1t=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},m1t=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},Cp=5,_H=11,B4=2,g1t=_H-Cp,Pge=65536>>Cp,y1t=1<<Cp,_4=y1t-1,v1t=1024>>Cp,x1t=Pge+v1t,w1t=x1t,b1t=32,C1t=w1t+b1t,S1t=65536>>_H,B1t=1<<g1t,_1t=B1t-1,xJ=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},k1t=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},E1t=function(e,t){var n=f1t(e),r=Array.isArray(n)?m1t(n):new Uint32Array(n),i=Array.isArray(n)?p1t(n):new Uint16Array(n),s=24,a=xJ(i,s/2,r[4]/2),o=r[5]===2?xJ(i,(s+r[4])/2):k1t(r,Math.ceil((s+r[4])/4));return new N1t(r[0],r[1],r[2],r[3],a,o)},N1t=function(){function e(t,n,r,i,s,a){this.initialValue=t,this.errorValue=n,this.highStart=r,this.highValueIndex=i,this.index=s,this.data=a}return e.prototype.get=function(t){var n;if(t>=0){if(t<55296||t>56319&&t<=65535)return n=this.index[t>>Cp],n=(n<<B4)+(t&_4),this.data[n];if(t<=65535)return n=this.index[Pge+(t-55296>>Cp)],n=(n<<B4)+(t&_4),this.data[n];if(t<this.highStart)return n=C1t-S1t+(t>>_H),n=this.index[n],n+=t>>Cp&_1t,n=this.index[n],n=(n<<B4)+(t&_4),this.data[n];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),wJ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",j1t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var zS=0;zS<wJ.length;zS++)j1t[wJ.charCodeAt(zS)]=zS;var T1t="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",bJ=50,P1t=1,Ige=2,Oge=3,I1t=4,O1t=5,CJ=7,Fge=8,SJ=9,HA=10,KL=11,BJ=12,WL=13,F1t=14,qx=15,qL=16,VS=17,Bx=18,M1t=19,_J=20,GL=21,_x=22,k4=23,og=24,io=25,Gx=26,Yx=27,lg=28,L1t=29,Of=30,R1t=31,KS=32,WS=33,YL=34,XL=35,JL=36,U1=37,ZL=38,e_=39,t_=40,E4=41,Mge=42,U1t=43,D1t=[9001,65288],Lge="!",hn="×",qS="÷",eR=E1t(T1t),Iu=[Of,JL],tR=[P1t,Ige,Oge,O1t],Rge=[HA,Fge],kJ=[Yx,Gx],Q1t=tR.concat(Rge),EJ=[ZL,e_,t_,YL,XL],H1t=[qx,WL],$1t=function(e,t){t===void 0&&(t="strict");var n=[],r=[],i=[];return e.forEach(function(s,a){var o=eR.get(s);if(o>bJ?(i.push(!0),o-=bJ):i.push(!1),["normal","auto","loose"].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(s)!==-1)return r.push(a),n.push(qL);if(o===I1t||o===KL){if(a===0)return r.push(a),n.push(Of);var l=n[a-1];return Q1t.indexOf(l)===-1?(r.push(r[a-1]),n.push(l)):(r.push(a),n.push(Of))}if(r.push(a),o===R1t)return n.push(t==="strict"?GL:U1);if(o===Mge||o===L1t)return n.push(Of);if(o===U1t)return s>=131072&&s<=196605||s>=196608&&s<=262141?n.push(U1):n.push(Of);n.push(o)}),[r,n,i]},N4=function(e,t,n,r){var i=r[n];if(Array.isArray(e)?e.indexOf(i)!==-1:e===i)for(var s=n;s<=r.length;){s++;var a=r[s];if(a===t)return!0;if(a!==HA)break}if(i===HA)for(var s=n;s>0;){s--;var o=r[s];if(Array.isArray(e)?e.indexOf(o)!==-1:e===o)for(var l=n;l<=r.length;){l++;var a=r[l];if(a===t)return!0;if(a!==HA)break}if(o!==HA)break}return!1},NJ=function(e,t){for(var n=e;n>=0;){var r=t[n];if(r===HA)n--;else return r}return 0},z1t=function(e,t,n,r,i){if(n[r]===0)return hn;var s=r-1;if(Array.isArray(i)&&i[s]===!0)return hn;var a=s-1,o=s+1,l=t[s],u=a>=0?t[a]:0,d=t[o];if(l===Ige&&d===Oge)return hn;if(tR.indexOf(l)!==-1)return Lge;if(tR.indexOf(d)!==-1||Rge.indexOf(d)!==-1)return hn;if(NJ(s,t)===Fge)return qS;if(eR.get(e[s])===KL||(l===KS||l===WS)&&eR.get(e[o])===KL||l===CJ||d===CJ||l===SJ||[HA,WL,qx].indexOf(l)===-1&&d===SJ||[VS,Bx,M1t,og,lg].indexOf(d)!==-1||NJ(s,t)===_x||N4(k4,_x,s,t)||N4([VS,Bx],GL,s,t)||N4(BJ,BJ,s,t))return hn;if(l===HA)return qS;if(l===k4||d===k4)return hn;if(d===qL||l===qL)return qS;if([WL,qx,GL].indexOf(d)!==-1||l===F1t||u===JL&&H1t.indexOf(l)!==-1||l===lg&&d===JL||d===_J||Iu.indexOf(d)!==-1&&l===io||Iu.indexOf(l)!==-1&&d===io||l===Yx&&[U1,KS,WS].indexOf(d)!==-1||[U1,KS,WS].indexOf(l)!==-1&&d===Gx||Iu.indexOf(l)!==-1&&kJ.indexOf(d)!==-1||kJ.indexOf(l)!==-1&&Iu.indexOf(d)!==-1||[Yx,Gx].indexOf(l)!==-1&&(d===io||[_x,qx].indexOf(d)!==-1&&t[o+1]===io)||[_x,qx].indexOf(l)!==-1&&d===io||l===io&&[io,lg,og].indexOf(d)!==-1)return hn;if([io,lg,og,VS,Bx].indexOf(d)!==-1)for(var A=s;A>=0;){var f=t[A];if(f===io)return hn;if([lg,og].indexOf(f)!==-1)A--;else break}if([Yx,Gx].indexOf(d)!==-1)for(var A=[VS,Bx].indexOf(l)!==-1?a:s;A>=0;){var f=t[A];if(f===io)return hn;if([lg,og].indexOf(f)!==-1)A--;else break}if(ZL===l&&[ZL,e_,YL,XL].indexOf(d)!==-1||[e_,YL].indexOf(l)!==-1&&[e_,t_].indexOf(d)!==-1||[t_,XL].indexOf(l)!==-1&&d===t_||EJ.indexOf(l)!==-1&&[_J,Gx].indexOf(d)!==-1||EJ.indexOf(d)!==-1&&l===Yx||Iu.indexOf(l)!==-1&&Iu.indexOf(d)!==-1||l===og&&Iu.indexOf(d)!==-1||Iu.concat(io).indexOf(l)!==-1&&d===_x&&D1t.indexOf(e[o])===-1||Iu.concat(io).indexOf(d)!==-1&&l===Bx)return hn;if(l===E4&&d===E4){for(var h=n[s],p=1;h>0&&(h--,t[h]===E4);)p++;if(p%2!==0)return hn}return l===KS&&d===WS?hn:qS},V1t=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var n=$1t(e,t.lineBreak),r=n[0],i=n[1],s=n[2];(t.wordBreak==="break-all"||t.wordBreak==="break-word")&&(i=i.map(function(o){return[io,Of,Mge].indexOf(o)!==-1?U1:o}));var a=t.wordBreak==="keep-all"?s.map(function(o,l){return o&&e[l]>=19968&&e[l]<=40959}):void 0;return[r,i,a]},K1t=function(){function e(t,n,r,i){this.codePoints=t,this.required=n===Lge,this.start=r,this.end=i}return e.prototype.slice=function(){return ni.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),W1t=function(e,t){var n=Nj(e),r=V1t(n,t),i=r[0],s=r[1],a=r[2],o=n.length,l=0,u=0;return{next:function(){if(u>=o)return{done:!0,value:null};for(var d=hn;u<o&&(d=z1t(n,s,i,++u,a))===hn;);if(d!==hn||u===o){var A=new K1t(n,d,l,u);return l=u,{value:A,done:!1}}return{done:!0,value:null}}}},q1t=1,G1t=2,I2=4,jJ=8,nN=10,TJ=47,$w=92,Y1t=9,X1t=32,GS=34,kx=61,J1t=35,Z1t=36,e2t=37,YS=39,XS=40,Ex=41,t2t=95,ka=45,n2t=33,r2t=60,i2t=62,s2t=64,a2t=91,o2t=93,l2t=61,c2t=123,JS=63,u2t=125,PJ=124,d2t=126,A2t=128,IJ=65533,j4=42,Jf=43,h2t=44,f2t=58,p2t=59,D1=46,m2t=0,g2t=8,y2t=11,v2t=14,x2t=31,w2t=127,Ec=-1,Uge=48,Dge=97,Qge=101,b2t=102,C2t=117,S2t=122,Hge=65,$ge=69,zge=70,B2t=85,_2t=90,Ls=function(e){return e>=Uge&&e<=57},k2t=function(e){return e>=55296&&e<=57343},cg=function(e){return Ls(e)||e>=Hge&&e<=zge||e>=Dge&&e<=b2t},E2t=function(e){return e>=Dge&&e<=S2t},N2t=function(e){return e>=Hge&&e<=_2t},j2t=function(e){return E2t(e)||N2t(e)},T2t=function(e){return e>=A2t},ZS=function(e){return e===nN||e===Y1t||e===X1t},rN=function(e){return j2t(e)||T2t(e)||e===t2t},OJ=function(e){return rN(e)||Ls(e)||e===ka},P2t=function(e){return e>=m2t&&e<=g2t||e===y2t||e>=v2t&&e<=x2t||e===w2t},hA=function(e,t){return e!==$w?!1:t!==nN},eB=function(e,t,n){return e===ka?rN(t)||hA(t,n):rN(e)?!0:!!(e===$w&&hA(e,t))},T4=function(e,t,n){return e===Jf||e===ka?Ls(t)?!0:t===D1&&Ls(n):Ls(e===D1?t:e)},I2t=function(e){var t=0,n=1;(e[t]===Jf||e[t]===ka)&&(e[t]===ka&&(n=-1),t++);for(var r=[];Ls(e[t]);)r.push(e[t++]);var i=r.length?parseInt(ni.apply(void 0,r),10):0;e[t]===D1&&t++;for(var s=[];Ls(e[t]);)s.push(e[t++]);var a=s.length,o=a?parseInt(ni.apply(void 0,s),10):0;(e[t]===$ge||e[t]===Qge)&&t++;var l=1;(e[t]===Jf||e[t]===ka)&&(e[t]===ka&&(l=-1),t++);for(var u=[];Ls(e[t]);)u.push(e[t++]);var d=u.length?parseInt(ni.apply(void 0,u),10):0;return n*(i+o*Math.pow(10,-a))*Math.pow(10,l*d)},O2t={type:2},F2t={type:3},M2t={type:4},L2t={type:13},R2t={type:8},U2t={type:21},D2t={type:9},Q2t={type:10},H2t={type:11},$2t={type:12},z2t={type:14},tB={type:23},V2t={type:1},K2t={type:25},W2t={type:24},q2t={type:26},G2t={type:27},Y2t={type:28},X2t={type:29},J2t={type:31},nR={type:32},Vge=function(){function e(){this._value=[]}return e.prototype.write=function(t){this._value=this._value.concat(Nj(t))},e.prototype.read=function(){for(var t=[],n=this.consumeToken();n!==nR;)t.push(n),n=this.consumeToken();return t},e.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case GS:return this.consumeStringToken(GS);case J1t:var n=this.peekCodePoint(0),r=this.peekCodePoint(1),i=this.peekCodePoint(2);if(OJ(n)||hA(r,i)){var s=eB(n,r,i)?G1t:q1t,a=this.consumeName();return{type:5,value:a,flags:s}}break;case Z1t:if(this.peekCodePoint(0)===kx)return this.consumeCodePoint(),L2t;break;case YS:return this.consumeStringToken(YS);case XS:return O2t;case Ex:return F2t;case j4:if(this.peekCodePoint(0)===kx)return this.consumeCodePoint(),z2t;break;case Jf:if(T4(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case h2t:return M2t;case ka:var o=t,l=this.peekCodePoint(0),u=this.peekCodePoint(1);if(T4(o,l,u))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(eB(o,l,u))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(l===ka&&u===i2t)return this.consumeCodePoint(),this.consumeCodePoint(),W2t;break;case D1:if(T4(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case TJ:if(this.peekCodePoint(0)===j4)for(this.consumeCodePoint();;){var d=this.consumeCodePoint();if(d===j4&&(d=this.consumeCodePoint(),d===TJ))return this.consumeToken();if(d===Ec)return this.consumeToken()}break;case f2t:return q2t;case p2t:return G2t;case r2t:if(this.peekCodePoint(0)===n2t&&this.peekCodePoint(1)===ka&&this.peekCodePoint(2)===ka)return this.consumeCodePoint(),this.consumeCodePoint(),K2t;break;case s2t:var A=this.peekCodePoint(0),f=this.peekCodePoint(1),h=this.peekCodePoint(2);if(eB(A,f,h)){var a=this.consumeName();return{type:7,value:a}}break;case a2t:return Y2t;case $w:if(hA(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case o2t:return X2t;case l2t:if(this.peekCodePoint(0)===kx)return this.consumeCodePoint(),R2t;break;case c2t:return H2t;case u2t:return $2t;case C2t:case B2t:var p=this.peekCodePoint(0),m=this.peekCodePoint(1);return p===Jf&&(cg(m)||m===JS)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case PJ:if(this.peekCodePoint(0)===kx)return this.consumeCodePoint(),D2t;if(this.peekCodePoint(0)===PJ)return this.consumeCodePoint(),U2t;break;case d2t:if(this.peekCodePoint(0)===kx)return this.consumeCodePoint(),Q2t;break;case Ec:return nR}return ZS(t)?(this.consumeWhiteSpace(),J2t):Ls(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):rN(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:ni(t)}},e.prototype.consumeCodePoint=function(){var t=this._value.shift();return typeof t>"u"?-1:t},e.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},e.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},e.prototype.consumeUnicodeRangeToken=function(){for(var t=[],n=this.consumeCodePoint();cg(n)&&t.length<6;)t.push(n),n=this.consumeCodePoint();for(var r=!1;n===JS&&t.length<6;)t.push(n),n=this.consumeCodePoint(),r=!0;if(r){var i=parseInt(ni.apply(void 0,t.map(function(l){return l===JS?Uge:l})),16),s=parseInt(ni.apply(void 0,t.map(function(l){return l===JS?zge:l})),16);return{type:30,start:i,end:s}}var a=parseInt(ni.apply(void 0,t),16);if(this.peekCodePoint(0)===ka&&cg(this.peekCodePoint(1))){this.consumeCodePoint(),n=this.consumeCodePoint();for(var o=[];cg(n)&&o.length<6;)o.push(n),n=this.consumeCodePoint();var s=parseInt(ni.apply(void 0,o),16);return{type:30,start:a,end:s}}else return{type:30,start:a,end:a}},e.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return t.toLowerCase()==="url"&&this.peekCodePoint(0)===XS?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===XS?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},e.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ec)return{type:22,value:""};var n=this.peekCodePoint(0);if(n===YS||n===GS){var r=this.consumeStringToken(this.consumeCodePoint());return r.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ec||this.peekCodePoint(0)===Ex)?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),tB)}for(;;){var i=this.consumeCodePoint();if(i===Ec||i===Ex)return{type:22,value:ni.apply(void 0,t)};if(ZS(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ec||this.peekCodePoint(0)===Ex?(this.consumeCodePoint(),{type:22,value:ni.apply(void 0,t)}):(this.consumeBadUrlRemnants(),tB);if(i===GS||i===YS||i===XS||P2t(i))return this.consumeBadUrlRemnants(),tB;if(i===$w)if(hA(i,this.peekCodePoint(0)))t.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),tB;else t.push(i)}},e.prototype.consumeWhiteSpace=function(){for(;ZS(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(t===Ex||t===Ec)return;hA(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(t){for(var n=5e4,r="";t>0;){var i=Math.min(n,t);r+=ni.apply(void 0,this._value.splice(0,i)),t-=i}return this._value.shift(),r},e.prototype.consumeStringToken=function(t){var n="",r=0;do{var i=this._value[r];if(i===Ec||i===void 0||i===t)return n+=this.consumeStringSlice(r),{type:0,value:n};if(i===nN)return this._value.splice(0,r),V2t;if(i===$w){var s=this._value[r+1];s!==Ec&&s!==void 0&&(s===nN?(n+=this.consumeStringSlice(r),r=-1,this._value.shift()):hA(i,s)&&(n+=this.consumeStringSlice(r),n+=ni(this.consumeEscapedCodePoint()),r=-1))}r++}while(!0)},e.prototype.consumeNumber=function(){var t=[],n=I2,r=this.peekCodePoint(0);for((r===Jf||r===ka)&&t.push(this.consumeCodePoint());Ls(this.peekCodePoint(0));)t.push(this.consumeCodePoint());r=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(r===D1&&Ls(i))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),n=jJ;Ls(this.peekCodePoint(0));)t.push(this.consumeCodePoint());r=this.peekCodePoint(0),i=this.peekCodePoint(1);var s=this.peekCodePoint(2);if((r===$ge||r===Qge)&&((i===Jf||i===ka)&&Ls(s)||Ls(i)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),n=jJ;Ls(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[I2t(t),n]},e.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),n=t[0],r=t[1],i=this.peekCodePoint(0),s=this.peekCodePoint(1),a=this.peekCodePoint(2);if(eB(i,s,a)){var o=this.consumeName();return{type:15,number:n,flags:r,unit:o}}return i===e2t?(this.consumeCodePoint(),{type:16,number:n,flags:r}):{type:17,number:n,flags:r}},e.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(cg(t)){for(var n=ni(t);cg(this.peekCodePoint(0))&&n.length<6;)n+=ni(this.consumeCodePoint());ZS(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(n,16);return r===0||k2t(r)||r>1114111?IJ:r}return t===Ec?IJ:t},e.prototype.consumeName=function(){for(var t="";;){var n=this.consumeCodePoint();if(OJ(n))t+=ni(n);else if(hA(n,this.peekCodePoint(0)))t+=ni(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(n),t}},e}(),Kge=function(){function e(t){this._tokens=t}return e.create=function(t){var n=new Vge;return n.write(t),new e(n.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var t=this.consumeToken();t.type===31;)t=this.consumeToken();if(t.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var n=this.consumeComponentValue();do t=this.consumeToken();while(t.type===31);if(t.type===32)return n;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var t=[];;){var n=this.consumeComponentValue();if(n.type===32)return t;t.push(n),t.push()}},e.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},e.prototype.consumeSimpleBlock=function(t){for(var n={type:t,values:[]},r=this.consumeToken();;){if(r.type===32||eCt(r,t))return n;this.reconsumeToken(r),n.values.push(this.consumeComponentValue()),r=this.consumeToken()}},e.prototype.consumeFunction=function(t){for(var n={name:t.value,values:[],type:18};;){var r=this.consumeToken();if(r.type===32||r.type===3)return n;this.reconsumeToken(r),n.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var t=this._tokens.shift();return typeof t>"u"?nR:t},e.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},e}(),O2=function(e){return e.type===15},yv=function(e){return e.type===17},Vn=function(e){return e.type===20},Z2t=function(e){return e.type===0},rR=function(e,t){return Vn(e)&&e.value===t},Wge=function(e){return e.type!==31},T0=function(e){return e.type!==31&&e.type!==4},hu=function(e){var t=[],n=[];return e.forEach(function(r){if(r.type===4){if(n.length===0)throw new Error("Error parsing function args, zero tokens for arg");t.push(n),n=[];return}r.type!==31&&n.push(r)}),n.length&&t.push(n),t},eCt=function(e,t){return t===11&&e.type===12||t===28&&e.type===29?!0:t===2&&e.type===3},Eh=function(e){return e.type===17||e.type===15},xi=function(e){return e.type===16||Eh(e)},qge=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},vs={type:17,number:0,flags:I2},kH={type:16,number:50,flags:I2},$A={type:16,number:100,flags:I2},Xx=function(e,t,n){var r=e[0],i=e[1];return[sr(r,t),sr(typeof i<"u"?i:r,n)]},sr=function(e,t){if(e.type===16)return e.number/100*t;if(O2(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},Gge="deg",Yge="grad",Xge="rad",Jge="turn",jj={name:"angle",parse:function(e,t){if(t.type===15)switch(t.unit){case Gge:return Math.PI*t.number/180;case Yge:return Math.PI/200*t.number;case Xge:return t.number;case Jge:return Math.PI*2*t.number}throw new Error("Unsupported angle type")}},Zge=function(e){return e.type===15&&(e.unit===Gge||e.unit===Yge||e.unit===Xge||e.unit===Jge)},eye=function(e){var t=e.filter(Vn).map(function(n){return n.value}).join(" ");switch(t){case"to bottom right":case"to right bottom":case"left top":case"top left":return[vs,vs];case"to top":case"bottom":return el(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[vs,$A];case"to right":case"left":return el(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[$A,$A];case"to bottom":case"top":return el(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[$A,vs];case"to left":case"right":return el(270)}return 0},el=function(e){return Math.PI*e/180},Ah={name:"color",parse:function(e,t){if(t.type===18){var n=tCt[t.name];if(typeof n>"u")throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return n(e,t.values)}if(t.type===5){if(t.value.length===3){var r=t.value.substring(0,1),i=t.value.substring(1,2),s=t.value.substring(2,3);return zA(parseInt(r+r,16),parseInt(i+i,16),parseInt(s+s,16),1)}if(t.value.length===4){var r=t.value.substring(0,1),i=t.value.substring(1,2),s=t.value.substring(2,3),a=t.value.substring(3,4);return zA(parseInt(r+r,16),parseInt(i+i,16),parseInt(s+s,16),parseInt(a+a,16)/255)}if(t.value.length===6){var r=t.value.substring(0,2),i=t.value.substring(2,4),s=t.value.substring(4,6);return zA(parseInt(r,16),parseInt(i,16),parseInt(s,16),1)}if(t.value.length===8){var r=t.value.substring(0,2),i=t.value.substring(2,4),s=t.value.substring(4,6),a=t.value.substring(6,8);return zA(parseInt(r,16),parseInt(i,16),parseInt(s,16),parseInt(a,16)/255)}}if(t.type===20){var o=id[t.value.toUpperCase()];if(typeof o<"u")return o}return id.TRANSPARENT}},hh=function(e){return(255&e)===0},$i=function(e){var t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?"rgba("+i+","+r+","+n+","+t/255+")":"rgb("+i+","+r+","+n+")"},zA=function(e,t,n,r){return(e<<24|t<<16|n<<8|Math.round(r*255)<<0)>>>0},FJ=function(e,t){if(e.type===17)return e.number;if(e.type===16){var n=t===3?1:255;return t===3?e.number/100*n:Math.round(e.number/100*n)}return 0},MJ=function(e,t){var n=t.filter(T0);if(n.length===3){var r=n.map(FJ),i=r[0],s=r[1],a=r[2];return zA(i,s,a,1)}if(n.length===4){var o=n.map(FJ),i=o[0],s=o[1],a=o[2],l=o[3];return zA(i,s,a,l)}return 0};function P4(e,t,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(t-e)*n*6+e:n<1/2?t:n<2/3?(t-e)*6*(2/3-n)+e:e}var LJ=function(e,t){var n=t.filter(T0),r=n[0],i=n[1],s=n[2],a=n[3],o=(r.type===17?el(r.number):jj.parse(e,r))/(Math.PI*2),l=xi(i)?i.number/100:0,u=xi(s)?s.number/100:0,d=typeof a<"u"&&xi(a)?sr(a,1):1;if(l===0)return zA(u*255,u*255,u*255,1);var A=u<=.5?u*(l+1):u+l-u*l,f=u*2-A,h=P4(f,A,o+1/3),p=P4(f,A,o),m=P4(f,A,o-1/3);return zA(h*255,p*255,m*255,d)},tCt={hsl:LJ,hsla:LJ,rgb:MJ,rgba:MJ},zw=function(e,t){return Ah.parse(e,Kge.create(t).parseComponentValue())},id={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},nCt={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(n){if(Vn(n))switch(n.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},rCt={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Tj=function(e,t){var n=Ah.parse(e,t[0]),r=t[1];return r&&xi(r)?{color:n,stop:r}:{color:n,stop:null}},RJ=function(e,t){var n=e[0],r=e[e.length-1];n.stop===null&&(n.stop=vs),r.stop===null&&(r.stop=$A);for(var i=[],s=0,a=0;a<e.length;a++){var o=e[a].stop;if(o!==null){var l=sr(o,t);l>s?i.push(l):i.push(s),s=l}else i.push(null)}for(var u=null,a=0;a<i.length;a++){var d=i[a];if(d===null)u===null&&(u=a);else if(u!==null){for(var A=a-u,f=i[u-1],h=(d-f)/(A+1),p=1;p<=A;p++)i[u+p-1]=h*p;u=null}}return e.map(function(m,g){var y=m.color;return{color:y,stop:Math.max(Math.min(1,i[g]/t),0)}})},iCt=function(e,t,n){var r=t/2,i=n/2,s=sr(e[0],t)-r,a=i-sr(e[1],n);return(Math.atan2(a,s)+Math.PI*2)%(Math.PI*2)},sCt=function(e,t,n){var r=typeof e=="number"?e:iCt(e,t,n),i=Math.abs(t*Math.sin(r))+Math.abs(n*Math.cos(r)),s=t/2,a=n/2,o=i/2,l=Math.sin(r-Math.PI/2)*o,u=Math.cos(r-Math.PI/2)*o;return[i,s-u,s+u,a-l,a+l]},Il=function(e,t){return Math.sqrt(e*e+t*t)},UJ=function(e,t,n,r,i){var s=[[0,0],[0,t],[e,0],[e,t]];return s.reduce(function(a,o){var l=o[0],u=o[1],d=Il(n-l,r-u);return(i?d<a.optimumDistance:d>a.optimumDistance)?{optimumCorner:o,optimumDistance:d}:a},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},aCt=function(e,t,n,r,i){var s=0,a=0;switch(e.size){case 0:e.shape===0?s=a=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(s=Math.min(Math.abs(t),Math.abs(t-r)),a=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(e.shape===0)s=a=Math.min(Il(t,n),Il(t,n-i),Il(t-r,n),Il(t-r,n-i));else if(e.shape===1){var o=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),l=UJ(r,i,t,n,!0),u=l[0],d=l[1];s=Il(u-t,(d-n)/o),a=o*s}break;case 1:e.shape===0?s=a=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(s=Math.max(Math.abs(t),Math.abs(t-r)),a=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(e.shape===0)s=a=Math.max(Il(t,n),Il(t,n-i),Il(t-r,n),Il(t-r,n-i));else if(e.shape===1){var o=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r)),A=UJ(r,i,t,n,!1),u=A[0],d=A[1];s=Il(u-t,(d-n)/o),a=o*s}break}return Array.isArray(e.size)&&(s=sr(e.size[0],r),a=e.size.length===2?sr(e.size[1],i):s),[s,a]},oCt=function(e,t){var n=el(180),r=[];return hu(t).forEach(function(i,s){if(s===0){var a=i[0];if(a.type===20&&a.value==="to"){n=eye(i);return}else if(Zge(a)){n=jj.parse(e,a);return}}var o=Tj(e,i);r.push(o)}),{angle:n,stops:r,type:1}},nB=function(e,t){var n=el(180),r=[];return hu(t).forEach(function(i,s){if(s===0){var a=i[0];if(a.type===20&&["top","left","right","bottom"].indexOf(a.value)!==-1){n=eye(i);return}else if(Zge(a)){n=(jj.parse(e,a)+el(270))%el(360);return}}var o=Tj(e,i);r.push(o)}),{angle:n,stops:r,type:1}},lCt=function(e,t){var n=el(180),r=[],i=1,s=0,a=3,o=[];return hu(t).forEach(function(l,u){var d=l[0];if(u===0){if(Vn(d)&&d.value==="linear"){i=1;return}else if(Vn(d)&&d.value==="radial"){i=2;return}}if(d.type===18){if(d.name==="from"){var A=Ah.parse(e,d.values[0]);r.push({stop:vs,color:A})}else if(d.name==="to"){var A=Ah.parse(e,d.values[0]);r.push({stop:$A,color:A})}else if(d.name==="color-stop"){var f=d.values.filter(T0);if(f.length===2){var A=Ah.parse(e,f[1]),h=f[0];yv(h)&&r.push({stop:{type:16,number:h.number*100,flags:h.flags},color:A})}}}}),i===1?{angle:(n+el(180))%el(360),stops:r,type:i}:{size:a,shape:s,stops:r,position:o,type:i}},tye="closest-side",nye="farthest-side",rye="closest-corner",iye="farthest-corner",sye="circle",aye="ellipse",oye="cover",lye="contain",cCt=function(e,t){var n=0,r=3,i=[],s=[];return hu(t).forEach(function(a,o){var l=!0;if(o===0){var u=!1;l=a.reduce(function(A,f){if(u)if(Vn(f))switch(f.value){case"center":return s.push(kH),A;case"top":case"left":return s.push(vs),A;case"right":case"bottom":return s.push($A),A}else(xi(f)||Eh(f))&&s.push(f);else if(Vn(f))switch(f.value){case sye:return n=0,!1;case aye:return n=1,!1;case"at":return u=!0,!1;case tye:return r=0,!1;case oye:case nye:return r=1,!1;case lye:case rye:return r=2,!1;case iye:return r=3,!1}else if(Eh(f)||xi(f))return Array.isArray(r)||(r=[]),r.push(f),!1;return A},l)}if(l){var d=Tj(e,a);i.push(d)}}),{size:r,shape:n,stops:i,position:s,type:2}},rB=function(e,t){var n=0,r=3,i=[],s=[];return hu(t).forEach(function(a,o){var l=!0;if(o===0?l=a.reduce(function(d,A){if(Vn(A))switch(A.value){case"center":return s.push(kH),!1;case"top":case"left":return s.push(vs),!1;case"right":case"bottom":return s.push($A),!1}else if(xi(A)||Eh(A))return s.push(A),!1;return d},l):o===1&&(l=a.reduce(function(d,A){if(Vn(A))switch(A.value){case sye:return n=0,!1;case aye:return n=1,!1;case lye:case tye:return r=0,!1;case nye:return r=1,!1;case rye:return r=2,!1;case oye:case iye:return r=3,!1}else if(Eh(A)||xi(A))return Array.isArray(r)||(r=[]),r.push(A),!1;return d},l)),l){var u=Tj(e,a);i.push(u)}}),{size:r,shape:n,stops:i,position:s,type:2}},uCt=function(e){return e.type===1},dCt=function(e){return e.type===2},EH={name:"image",parse:function(e,t){if(t.type===22){var n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(t.type===18){var r=cye[t.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(e,t.values)}throw new Error("Unsupported image type "+t.type)}};function ACt(e){return!(e.type===20&&e.value==="none")&&(e.type!==18||!!cye[e.name])}var cye={"linear-gradient":oCt,"-moz-linear-gradient":nB,"-ms-linear-gradient":nB,"-o-linear-gradient":nB,"-webkit-linear-gradient":nB,"radial-gradient":cCt,"-moz-radial-gradient":rB,"-ms-radial-gradient":rB,"-o-radial-gradient":rB,"-webkit-radial-gradient":rB,"-webkit-gradient":lCt},hCt={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var n=t[0];return n.type===20&&n.value==="none"?[]:t.filter(function(r){return T0(r)&&ACt(r)}).map(function(r){return EH.parse(e,r)})}},fCt={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(n){if(Vn(n))switch(n.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},pCt={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return hu(t).map(function(n){return n.filter(xi)}).map(qge)}},mCt={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return hu(t).map(function(n){return n.filter(Vn).map(function(r){return r.value}).join(" ")}).map(gCt)}},gCt=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Sy;(function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"})(Sy||(Sy={}));var yCt={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return hu(t).map(function(n){return n.filter(vCt)})}},vCt=function(e){return Vn(e)||xi(e)},Pj=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},xCt=Pj("top"),wCt=Pj("right"),bCt=Pj("bottom"),CCt=Pj("left"),Ij=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(t,n){return qge(n.filter(xi))}}},SCt=Ij("top-left"),BCt=Ij("top-right"),_Ct=Ij("bottom-right"),kCt=Ij("bottom-left"),Oj=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,n){switch(n){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},ECt=Oj("top"),NCt=Oj("right"),jCt=Oj("bottom"),TCt=Oj("left"),Fj=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,n){return O2(n)?n.number:0}}},PCt=Fj("top"),ICt=Fj("right"),OCt=Fj("bottom"),FCt=Fj("left"),MCt={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},LCt={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){switch(t){case"rtl":return 1;case"ltr":default:return 0}}},RCt={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(Vn).reduce(function(n,r){return n|UCt(r.value)},0)}},UCt=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},DCt={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},QCt={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return t.type===20&&t.value==="normal"?0:t.type===17||t.type===15?t.number:0}},iN;(function(e){e.NORMAL="normal",e.STRICT="strict"})(iN||(iN={}));var HCt={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"strict":return iN.STRICT;case"normal":default:return iN.NORMAL}}},$Ct={name:"line-height",initialValue:"normal",prefix:!1,type:4},DJ=function(e,t){return Vn(e)&&e.value==="normal"?1.2*t:e.type===17?t*e.number:xi(e)?sr(e,t):t},zCt={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return t.type===20&&t.value==="none"?null:EH.parse(e,t)}},VCt={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){switch(t){case"inside":return 0;case"outside":default:return 1}}},iR={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Mj=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},KCt=Mj("top"),WCt=Mj("right"),qCt=Mj("bottom"),GCt=Mj("left"),YCt={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(Vn).map(function(n){switch(n.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},XCt={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-word":return"break-word";case"normal":default:return"normal"}}},Lj=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},JCt=Lj("top"),ZCt=Lj("right"),eSt=Lj("bottom"),tSt=Lj("left"),nSt={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},rSt={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},iSt={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.length===1&&rR(t[0],"none")?[]:hu(t).map(function(n){for(var r={color:id.TRANSPARENT,offsetX:vs,offsetY:vs,blur:vs},i=0,s=0;s<n.length;s++){var a=n[s];Eh(a)?(i===0?r.offsetX=a:i===1?r.offsetY=a:r.blur=a,i++):r.color=Ah.parse(e,a)}return r})}},sSt={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},aSt={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(t.type===20&&t.value==="none")return null;if(t.type===18){var n=cSt[t.name];if(typeof n>"u")throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return n(t.values)}return null}},oSt=function(e){var t=e.filter(function(n){return n.type===17}).map(function(n){return n.number});return t.length===6?t:null},lSt=function(e){var t=e.filter(function(l){return l.type===17}).map(function(l){return l.number}),n=t[0],r=t[1];t[2],t[3];var i=t[4],s=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var a=t[12],o=t[13];return t[14],t[15],t.length===16?[n,r,i,s,a,o]:null},cSt={matrix:oSt,matrix3d:lSt},QJ={type:16,number:50,flags:I2},uSt=[QJ,QJ],dSt={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var n=t.filter(xi);return n.length!==2?uSt:[n[0],n[1]]}},ASt={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Vw;(function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"})(Vw||(Vw={}));var hSt={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return Vw.BREAK_ALL;case"keep-all":return Vw.KEEP_ALL;case"normal":default:return Vw.NORMAL}}},fSt={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(t.type===20)return{auto:!0,order:0};if(yv(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},uye={name:"time",parse:function(e,t){if(t.type===15)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},pSt={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return yv(t)?t.number:1}},mSt={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},gSt={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(Vn).map(function(n){switch(n.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(n){return n!==0})}},ySt={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var n=[],r=[];return t.forEach(function(i){switch(i.type){case 20:case 0:n.push(i.value);break;case 17:n.push(i.number.toString());break;case 4:r.push(n.join(" ")),n.length=0;break}}),n.length&&r.push(n.join(" ")),r.map(function(i){return i.indexOf(" ")===-1?i:"'"+i+"'"})}},vSt={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},xSt={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){if(yv(t))return t.number;if(Vn(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},wSt={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(Vn).map(function(n){return n.value})}},bSt={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Oi=function(e,t){return(e&t)!==0},CSt={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var n=t[0];return n.type===20&&n.value==="none"?[]:t}},SSt={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(t.length===0)return null;var n=t[0];if(n.type===20&&n.value==="none")return null;for(var r=[],i=t.filter(Wge),s=0;s<i.length;s++){var a=i[s],o=i[s+1];if(a.type===20){var l=o&&yv(o)?o.number:1;r.push({counter:a.value,increment:l})}}return r}},BSt={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(t.length===0)return[];for(var n=[],r=t.filter(Wge),i=0;i<r.length;i++){var s=r[i],a=r[i+1];if(Vn(s)&&s.value!=="none"){var o=a&&yv(a)?a.number:0;n.push({counter:s.value,reset:o})}}return n}},_St={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(O2).map(function(n){return uye.parse(e,n)})}},kSt={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(t.length===0)return null;var n=t[0];if(n.type===20&&n.value==="none")return null;var r=[],i=t.filter(Z2t);if(i.length%2!==0)return null;for(var s=0;s<i.length;s+=2){var a=i[s].value,o=i[s+1].value;r.push({open:a,close:o})}return r}},HJ=function(e,t,n){if(!e)return"";var r=e[Math.min(t,e.length-1)];return r?n?r.open:r.close:""},ESt={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.length===1&&rR(t[0],"none")?[]:hu(t).map(function(n){for(var r={color:255,offsetX:vs,offsetY:vs,blur:vs,spread:vs,inset:!1},i=0,s=0;s<n.length;s++){var a=n[s];rR(a,"inset")?r.inset=!0:Eh(a)?(i===0?r.offsetX=a:i===1?r.offsetY=a:i===2?r.blur=a:r.spread=a,i++):r.color=Ah.parse(e,a)}return r})}},NSt={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var n=[0,1,2],r=[];return t.filter(Vn).forEach(function(i){switch(i.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2);break}}),n.forEach(function(i){r.indexOf(i)===-1&&r.push(i)}),r}},jSt={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},TSt={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return O2(t)?t.number:0}},PSt=function(){function e(t,n){var r,i;this.animationDuration=it(t,_St,n.animationDuration),this.backgroundClip=it(t,nCt,n.backgroundClip),this.backgroundColor=it(t,rCt,n.backgroundColor),this.backgroundImage=it(t,hCt,n.backgroundImage),this.backgroundOrigin=it(t,fCt,n.backgroundOrigin),this.backgroundPosition=it(t,pCt,n.backgroundPosition),this.backgroundRepeat=it(t,mCt,n.backgroundRepeat),this.backgroundSize=it(t,yCt,n.backgroundSize),this.borderTopColor=it(t,xCt,n.borderTopColor),this.borderRightColor=it(t,wCt,n.borderRightColor),this.borderBottomColor=it(t,bCt,n.borderBottomColor),this.borderLeftColor=it(t,CCt,n.borderLeftColor),this.borderTopLeftRadius=it(t,SCt,n.borderTopLeftRadius),this.borderTopRightRadius=it(t,BCt,n.borderTopRightRadius),this.borderBottomRightRadius=it(t,_Ct,n.borderBottomRightRadius),this.borderBottomLeftRadius=it(t,kCt,n.borderBottomLeftRadius),this.borderTopStyle=it(t,ECt,n.borderTopStyle),this.borderRightStyle=it(t,NCt,n.borderRightStyle),this.borderBottomStyle=it(t,jCt,n.borderBottomStyle),this.borderLeftStyle=it(t,TCt,n.borderLeftStyle),this.borderTopWidth=it(t,PCt,n.borderTopWidth),this.borderRightWidth=it(t,ICt,n.borderRightWidth),this.borderBottomWidth=it(t,OCt,n.borderBottomWidth),this.borderLeftWidth=it(t,FCt,n.borderLeftWidth),this.boxShadow=it(t,ESt,n.boxShadow),this.color=it(t,MCt,n.color),this.direction=it(t,LCt,n.direction),this.display=it(t,RCt,n.display),this.float=it(t,DCt,n.cssFloat),this.fontFamily=it(t,ySt,n.fontFamily),this.fontSize=it(t,vSt,n.fontSize),this.fontStyle=it(t,bSt,n.fontStyle),this.fontVariant=it(t,wSt,n.fontVariant),this.fontWeight=it(t,xSt,n.fontWeight),this.letterSpacing=it(t,QCt,n.letterSpacing),this.lineBreak=it(t,HCt,n.lineBreak),this.lineHeight=it(t,$Ct,n.lineHeight),this.listStyleImage=it(t,zCt,n.listStyleImage),this.listStylePosition=it(t,VCt,n.listStylePosition),this.listStyleType=it(t,iR,n.listStyleType),this.marginTop=it(t,KCt,n.marginTop),this.marginRight=it(t,WCt,n.marginRight),this.marginBottom=it(t,qCt,n.marginBottom),this.marginLeft=it(t,GCt,n.marginLeft),this.opacity=it(t,pSt,n.opacity);var s=it(t,YCt,n.overflow);this.overflowX=s[0],this.overflowY=s[s.length>1?1:0],this.overflowWrap=it(t,XCt,n.overflowWrap),this.paddingTop=it(t,JCt,n.paddingTop),this.paddingRight=it(t,ZCt,n.paddingRight),this.paddingBottom=it(t,eSt,n.paddingBottom),this.paddingLeft=it(t,tSt,n.paddingLeft),this.paintOrder=it(t,NSt,n.paintOrder),this.position=it(t,rSt,n.position),this.textAlign=it(t,nSt,n.textAlign),this.textDecorationColor=it(t,mSt,(r=n.textDecorationColor)!==null&&r!==void 0?r:n.color),this.textDecorationLine=it(t,gSt,(i=n.textDecorationLine)!==null&&i!==void 0?i:n.textDecoration),this.textShadow=it(t,iSt,n.textShadow),this.textTransform=it(t,sSt,n.textTransform),this.transform=it(t,aSt,n.transform),this.transformOrigin=it(t,dSt,n.transformOrigin),this.visibility=it(t,ASt,n.visibility),this.webkitTextStrokeColor=it(t,jSt,n.webkitTextStrokeColor),this.webkitTextStrokeWidth=it(t,TSt,n.webkitTextStrokeWidth),this.wordBreak=it(t,hSt,n.wordBreak),this.zIndex=it(t,fSt,n.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return hh(this.backgroundColor)},e.prototype.isTransformed=function(){return this.transform!==null},e.prototype.isPositioned=function(){return this.position!==0},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==0},e.prototype.isInlineLevel=function(){return Oi(this.display,4)||Oi(this.display,33554432)||Oi(this.display,268435456)||Oi(this.display,536870912)||Oi(this.display,67108864)||Oi(this.display,134217728)},e}(),ISt=function(){function e(t,n){this.content=it(t,CSt,n.content),this.quotes=it(t,kSt,n.quotes)}return e}(),$J=function(){function e(t,n){this.counterIncrement=it(t,SSt,n.counterIncrement),this.counterReset=it(t,BSt,n.counterReset)}return e}(),it=function(e,t,n){var r=new Vge,i=n!==null&&typeof n<"u"?n.toString():t.initialValue;r.write(i);var s=new Kge(r.read());switch(t.type){case 2:var a=s.parseComponentValue();return t.parse(e,Vn(a)?a.value:t.initialValue);case 0:return t.parse(e,s.parseComponentValue());case 1:return t.parse(e,s.parseComponentValues());case 4:return s.parseComponentValue();case 3:switch(t.format){case"angle":return jj.parse(e,s.parseComponentValue());case"color":return Ah.parse(e,s.parseComponentValue());case"image":return EH.parse(e,s.parseComponentValue());case"length":var o=s.parseComponentValue();return Eh(o)?o:vs;case"length-percentage":var l=s.parseComponentValue();return xi(l)?l:vs;case"time":return uye.parse(e,s.parseComponentValue())}break}},OSt="data-html2canvas-debug",FSt=function(e){var t=e.getAttribute(OSt);switch(t){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},sR=function(e,t){var n=FSt(e);return n===1||t===n},fu=function(){function e(t,n){if(this.context=t,this.textNodes=[],this.elements=[],this.flags=0,sR(n,3))debugger;this.styles=new PSt(t,window.getComputedStyle(n,null)),lR(n)&&(this.styles.animationDuration.some(function(r){return r>0})&&(n.style.animationDuration="0s"),this.styles.transform!==null&&(n.style.transform="none")),this.bounds=Ej(this.context,n),sR(n,4)&&(this.flags|=16)}return e}(),MSt="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",zJ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jx=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var iB=0;iB<zJ.length;iB++)Jx[zJ.charCodeAt(iB)]=iB;var LSt=function(e){var t=e.length*.75,n=e.length,r,i=0,s,a,o,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var u=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(t):new Array(t),d=Array.isArray(u)?u:new Uint8Array(u);for(r=0;r<n;r+=4)s=Jx[e.charCodeAt(r)],a=Jx[e.charCodeAt(r+1)],o=Jx[e.charCodeAt(r+2)],l=Jx[e.charCodeAt(r+3)],d[i++]=s<<2|a>>4,d[i++]=(a&15)<<4|o>>2,d[i++]=(o&3)<<6|l&63;return u},RSt=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},USt=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},Sp=5,NH=11,I4=2,DSt=NH-Sp,dye=65536>>Sp,QSt=1<<Sp,O4=QSt-1,HSt=1024>>Sp,$St=dye+HSt,zSt=$St,VSt=32,KSt=zSt+VSt,WSt=65536>>NH,qSt=1<<DSt,GSt=qSt-1,VJ=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},YSt=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},XSt=function(e,t){var n=LSt(e),r=Array.isArray(n)?USt(n):new Uint32Array(n),i=Array.isArray(n)?RSt(n):new Uint16Array(n),s=24,a=VJ(i,s/2,r[4]/2),o=r[5]===2?VJ(i,(s+r[4])/2):YSt(r,Math.ceil((s+r[4])/4));return new JSt(r[0],r[1],r[2],r[3],a,o)},JSt=function(){function e(t,n,r,i,s,a){this.initialValue=t,this.errorValue=n,this.highStart=r,this.highValueIndex=i,this.index=s,this.data=a}return e.prototype.get=function(t){var n;if(t>=0){if(t<55296||t>56319&&t<=65535)return n=this.index[t>>Sp],n=(n<<I4)+(t&O4),this.data[n];if(t<=65535)return n=this.index[dye+(t-55296>>Sp)],n=(n<<I4)+(t&O4),this.data[n];if(t<this.highStart)return n=KSt-WSt+(t>>NH),n=this.index[n],n+=t>>Sp&GSt,n=this.index[n],n=(n<<I4)+(t&O4),this.data[n];if(t<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),KJ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ZSt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var sB=0;sB<KJ.length;sB++)ZSt[KJ.charCodeAt(sB)]=sB;var eBt=1,F4=2,M4=3,WJ=4,qJ=5,tBt=7,GJ=8,L4=9,R4=10,YJ=11,XJ=12,JJ=13,ZJ=14,U4=15,nBt=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var s=e.charCodeAt(n++);(s&64512)===56320?t.push(((i&1023)<<10)+(s&1023)+65536):(t.push(i),n--)}else t.push(i)}return t},rBt=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],i=-1,s="";++i<n;){var a=e[i];a<=65535?r.push(a):(a-=65536,r.push((a>>10)+55296,a%1024+56320)),(i+1===n||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},iBt=XSt(MSt),Do="×",D4="÷",sBt=function(e){return iBt.get(e)},aBt=function(e,t,n){var r=n-2,i=t[r],s=t[n-1],a=t[n];if(s===F4&&a===M4)return Do;if(s===F4||s===M4||s===WJ||a===F4||a===M4||a===WJ)return D4;if(s===GJ&&[GJ,L4,YJ,XJ].indexOf(a)!==-1||(s===YJ||s===L4)&&(a===L4||a===R4)||(s===XJ||s===R4)&&a===R4||a===JJ||a===qJ||a===tBt||s===eBt)return Do;if(s===JJ&&a===ZJ){for(;i===qJ;)i=t[--r];if(i===ZJ)return Do}if(s===U4&&a===U4){for(var o=0;i===U4;)o++,i=t[--r];if(o%2===0)return Do}return D4},oBt=function(e){var t=nBt(e),n=t.length,r=0,i=0,s=t.map(sBt);return{next:function(){if(r>=n)return{done:!0,value:null};for(var a=Do;r<n&&(a=aBt(t,s,++r))===Do;);if(a!==Do||r===n){var o=rBt.apply(null,t.slice(i,r));return i=r,{value:o,done:!1}}return{done:!0,value:null}}}},lBt=function(e){for(var t=oBt(e),n=[],r;!(r=t.next()).done;)r.value&&n.push(r.value.slice());return n},cBt=function(e){var t=123;if(e.createRange){var n=e.createRange();if(n.getBoundingClientRect){var r=e.createElement("boundtest");r.style.height=t+"px",r.style.display="block",e.body.appendChild(r),n.selectNode(r);var i=n.getBoundingClientRect(),s=Math.round(i.height);if(e.body.removeChild(r),s===t)return!0}}return!1},uBt=function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var n=e.createRange();t.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var r=t.firstChild,i=Nj(r.data).map(function(l){return ni(l)}),s=0,a={},o=i.every(function(l,u){n.setStart(r,s),n.setEnd(r,s+l.length);var d=n.getBoundingClientRect();s+=l.length;var A=d.x>a.x||d.y>a.y;return a=d,u===0?!0:A});return e.body.removeChild(t),o},dBt=function(){return typeof new Image().crossOrigin<"u"},ABt=function(){return typeof new XMLHttpRequest().responseType=="string"},hBt=function(e){var t=new Image,n=e.createElement("canvas"),r=n.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),n.toDataURL()}catch{return!1}return!0},eZ=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},fBt=function(e){var t=e.createElement("canvas"),n=100;t.width=n,t.height=n;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,n,n);var i=new Image,s=t.toDataURL();i.src=s;var a=aR(n,n,0,0,i);return r.fillStyle="red",r.fillRect(0,0,n,n),tZ(a).then(function(o){r.drawImage(o,0,0);var l=r.getImageData(0,0,n,n).data;r.fillStyle="red",r.fillRect(0,0,n,n);var u=e.createElement("div");return u.style.backgroundImage="url("+s+")",u.style.height=n+"px",eZ(l)?tZ(aR(n,n,0,0,u)):Promise.reject(!1)}).then(function(o){return r.drawImage(o,0,0),eZ(r.getImageData(0,0,n,n).data)}).catch(function(){return!1})},aR=function(e,t,n,r,i){var s="http://www.w3.org/2000/svg",a=document.createElementNS(s,"svg"),o=document.createElementNS(s,"foreignObject");return a.setAttributeNS(null,"width",e.toString()),a.setAttributeNS(null,"height",t.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",n.toString()),o.setAttributeNS(null,"y",r.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),a.appendChild(o),o.appendChild(i),a},tZ=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},fs={get SUPPORT_RANGE_BOUNDS(){var e=cBt(document);return Object.defineProperty(fs,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=fs.SUPPORT_RANGE_BOUNDS&&uBt(document);return Object.defineProperty(fs,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=hBt(document);return Object.defineProperty(fs,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from=="function"&&typeof window.fetch=="function"?fBt(document):Promise.resolve(!1);return Object.defineProperty(fs,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=dBt();return Object.defineProperty(fs,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=ABt();return Object.defineProperty(fs,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(fs,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(fs,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},Kw=function(){function e(t,n){this.text=t,this.bounds=n}return e}(),pBt=function(e,t,n,r){var i=yBt(t,n),s=[],a=0;return i.forEach(function(o){if(n.textDecorationLine.length||o.trim().length>0)if(fs.SUPPORT_RANGE_BOUNDS){var l=nZ(r,a,o.length).getClientRects();if(l.length>1){var u=jH(o),d=0;u.forEach(function(f){s.push(new Kw(f,yd.fromDOMRectList(e,nZ(r,d+a,f.length).getClientRects()))),d+=f.length})}else s.push(new Kw(o,yd.fromDOMRectList(e,l)))}else{var A=r.splitText(o.length);s.push(new Kw(o,mBt(e,r))),r=A}else fs.SUPPORT_RANGE_BOUNDS||(r=r.splitText(o.length));a+=o.length}),s},mBt=function(e,t){var n=t.ownerDocument;if(n){var r=n.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(r,t);var s=Ej(e,r);return r.firstChild&&i.replaceChild(r.firstChild,r),s}}return yd.EMPTY},nZ=function(e,t,n){var r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");var i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),i},jH=function(e){if(fs.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map(function(n){return n.segment})}return lBt(e)},gBt=function(e,t){if(fs.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(n.segment(e)).map(function(r){return r.segment})}return xBt(e,t)},yBt=function(e,t){return t.letterSpacing!==0?jH(e):gBt(e,t)},vBt=[32,160,4961,65792,65793,4153,4241],xBt=function(e,t){for(var n=W1t(e,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap==="break-word"?"break-word":t.wordBreak}),r=[],i,s=function(){if(i.value){var a=i.value.slice(),o=Nj(a),l="";o.forEach(function(u){vBt.indexOf(u)===-1?l+=ni(u):(l.length&&r.push(l),r.push(ni(u)),l="")}),l.length&&r.push(l)}};!(i=n.next()).done;)s();return r},wBt=function(){function e(t,n,r){this.text=bBt(n.data,r.textTransform),this.textBounds=pBt(t,this.text,r,n)}return e}(),bBt=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(CBt,SBt);case 2:return e.toUpperCase();default:return e}},CBt=/(^|\s|:|-|\(|\))([a-z])/g,SBt=function(e,t,n){return e.length>0?t+n.toUpperCase():e},Aye=function(e){mc(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.src=r.currentSrc||r.src,i.intrinsicWidth=r.naturalWidth,i.intrinsicHeight=r.naturalHeight,i.context.cache.addImage(i.src),i}return t}(fu),hye=function(e){mc(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.canvas=r,i.intrinsicWidth=r.width,i.intrinsicHeight=r.height,i}return t}(fu),fye=function(e){mc(t,e);function t(n,r){var i=e.call(this,n,r)||this,s=new XMLSerializer,a=Ej(n,r);return r.setAttribute("width",a.width+"px"),r.setAttribute("height",a.height+"px"),i.svg="data:image/svg+xml,"+encodeURIComponent(s.serializeToString(r)),i.intrinsicWidth=r.width.baseVal.value,i.intrinsicHeight=r.height.baseVal.value,i.context.cache.addImage(i.svg),i}return t}(fu),pye=function(e){mc(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.value=r.value,i}return t}(fu),oR=function(e){mc(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.start=r.start,i.reversed=typeof r.reversed=="boolean"&&r.reversed===!0,i}return t}(fu),BBt=[{type:15,flags:0,unit:"px",number:3}],_Bt=[{type:16,flags:0,number:50}],kBt=function(e){return e.width>e.height?new yd(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new yd(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e},EBt=function(e){var t=e.type===NBt?new Array(e.value.length+1).join("•"):e.value;return t.length===0?e.placeholder||"":t},sN="checkbox",aN="radio",NBt="password",rZ=707406591,TH=function(e){mc(t,e);function t(n,r){var i=e.call(this,n,r)||this;switch(i.type=r.type.toLowerCase(),i.checked=r.checked,i.value=EBt(r),(i.type===sN||i.type===aN)&&(i.styles.backgroundColor=3739148031,i.styles.borderTopColor=i.styles.borderRightColor=i.styles.borderBottomColor=i.styles.borderLeftColor=2779096575,i.styles.borderTopWidth=i.styles.borderRightWidth=i.styles.borderBottomWidth=i.styles.borderLeftWidth=1,i.styles.borderTopStyle=i.styles.borderRightStyle=i.styles.borderBottomStyle=i.styles.borderLeftStyle=1,i.styles.backgroundClip=[0],i.styles.backgroundOrigin=[0],i.bounds=kBt(i.bounds)),i.type){case sN:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=BBt;break;case aN:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=_Bt;break}return i}return t}(fu),mye=function(e){mc(t,e);function t(n,r){var i=e.call(this,n,r)||this,s=r.options[r.selectedIndex||0];return i.value=s&&s.text||"",i}return t}(fu),gye=function(e){mc(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.value=r.value,i}return t}(fu),yye=function(e){mc(t,e);function t(n,r){var i=e.call(this,n,r)||this;i.src=r.src,i.width=parseInt(r.width,10)||0,i.height=parseInt(r.height,10)||0,i.backgroundColor=i.styles.backgroundColor;try{if(r.contentWindow&&r.contentWindow.document&&r.contentWindow.document.documentElement){i.tree=xye(n,r.contentWindow.document.documentElement);var s=r.contentWindow.document.documentElement?zw(n,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):id.TRANSPARENT,a=r.contentWindow.document.body?zw(n,getComputedStyle(r.contentWindow.document.body).backgroundColor):id.TRANSPARENT;i.backgroundColor=hh(s)?hh(a)?i.styles.backgroundColor:a:s}}catch{}return i}return t}(fu),jBt=["OL","UL","MENU"],n_=function(e,t,n,r){for(var i=t.firstChild,s=void 0;i;i=s)if(s=i.nextSibling,wye(i)&&i.data.trim().length>0)n.textNodes.push(new wBt(e,i,n.styles));else if(Vg(i))if(Bye(i)&&i.assignedNodes)i.assignedNodes().forEach(function(o){return n_(e,o,n,r)});else{var a=vye(e,i);a.styles.isVisible()&&(TBt(i,a,r)?a.flags|=4:PBt(a.styles)&&(a.flags|=2),jBt.indexOf(i.tagName)!==-1&&(a.flags|=8),n.elements.push(a),i.slot,i.shadowRoot?n_(e,i.shadowRoot,a,r):!oN(i)&&!bye(i)&&!lN(i)&&n_(e,i,a,r))}},vye=function(e,t){return cR(t)?new Aye(e,t):Cye(t)?new hye(e,t):bye(t)?new fye(e,t):IBt(t)?new pye(e,t):OBt(t)?new oR(e,t):FBt(t)?new TH(e,t):lN(t)?new mye(e,t):oN(t)?new gye(e,t):Sye(t)?new yye(e,t):new fu(e,t)},xye=function(e,t){var n=vye(e,t);return n.flags|=4,n_(e,t,n,n),n},TBt=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||PH(e)&&n.styles.isTransparent()},PBt=function(e){return e.isPositioned()||e.isFloating()},wye=function(e){return e.nodeType===Node.TEXT_NODE},Vg=function(e){return e.nodeType===Node.ELEMENT_NODE},lR=function(e){return Vg(e)&&typeof e.style<"u"&&!r_(e)},r_=function(e){return typeof e.className=="object"},IBt=function(e){return e.tagName==="LI"},OBt=function(e){return e.tagName==="OL"},FBt=function(e){return e.tagName==="INPUT"},MBt=function(e){return e.tagName==="HTML"},bye=function(e){return e.tagName==="svg"},PH=function(e){return e.tagName==="BODY"},Cye=function(e){return e.tagName==="CANVAS"},iZ=function(e){return e.tagName==="VIDEO"},cR=function(e){return e.tagName==="IMG"},Sye=function(e){return e.tagName==="IFRAME"},sZ=function(e){return e.tagName==="STYLE"},LBt=function(e){return e.tagName==="SCRIPT"},oN=function(e){return e.tagName==="TEXTAREA"},lN=function(e){return e.tagName==="SELECT"},Bye=function(e){return e.tagName==="SLOT"},aZ=function(e){return e.tagName.indexOf("-")>0},RBt=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(t){var n=this.counters[t];return n&&n.length?n[n.length-1]:1},e.prototype.getCounterValues=function(t){var n=this.counters[t];return n||[]},e.prototype.pop=function(t){var n=this;t.forEach(function(r){return n.counters[r].pop()})},e.prototype.parse=function(t){var n=this,r=t.counterIncrement,i=t.counterReset,s=!0;r!==null&&r.forEach(function(o){var l=n.counters[o.counter];l&&o.increment!==0&&(s=!1,l.length||l.push(1),l[Math.max(0,l.length-1)]+=o.increment)});var a=[];return s&&i.forEach(function(o){var l=n.counters[o.counter];a.push(o.counter),l||(l=n.counters[o.counter]=[]),l.push(o.reset)}),a},e}(),oZ={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},lZ={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},UBt={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},DBt={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},ug=function(e,t,n,r,i,s){return e<t||e>n?Q1(e,i,s.length>0):r.integers.reduce(function(a,o,l){for(;e>=o;)e-=o,a+=r.values[l];return a},"")+s},_ye=function(e,t,n,r){var i="";do n||e--,i=r(e)+i,e/=t;while(e*t>=t);return i},ti=function(e,t,n,r,i){var s=n-t+1;return(e<0?"-":"")+(_ye(Math.abs(e),s,r,function(a){return ni(Math.floor(a%s)+t)})+i)},vf=function(e,t,n){n===void 0&&(n=". ");var r=t.length;return _ye(Math.abs(e),r,!1,function(i){return t[Math.floor(i%r)]})+n},wg=1,iA=2,sA=4,Zx=8,Ou=function(e,t,n,r,i,s){if(e<-9999||e>9999)return Q1(e,4,i.length>0);var a=Math.abs(e),o=i;if(a===0)return t[0]+o;for(var l=0;a>0&&l<=4;l++){var u=a%10;u===0&&Oi(s,wg)&&o!==""?o=t[u]+o:u>1||u===1&&l===0||u===1&&l===1&&Oi(s,iA)||u===1&&l===1&&Oi(s,sA)&&e>100||u===1&&l>1&&Oi(s,Zx)?o=t[u]+(l>0?n[l-1]:"")+o:u===1&&l>0&&(o=n[l-1]+o),a=Math.floor(a/10)}return(e<0?r:"")+o},cZ="十百千萬",uZ="拾佰仟萬",dZ="マイナス",Q4="마이너스",Q1=function(e,t,n){var r=n?". ":"",i=n?"、":"",s=n?", ":"",a=n?" ":"";switch(t){case 0:return"•"+a;case 1:return"◦"+a;case 2:return"◾"+a;case 5:var o=ti(e,48,57,!0,r);return o.length<4?"0"+o:o;case 4:return vf(e,"〇一二三四五六七八九",i);case 6:return ug(e,1,3999,oZ,3,r).toLowerCase();case 7:return ug(e,1,3999,oZ,3,r);case 8:return ti(e,945,969,!1,r);case 9:return ti(e,97,122,!1,r);case 10:return ti(e,65,90,!1,r);case 11:return ti(e,1632,1641,!0,r);case 12:case 49:return ug(e,1,9999,lZ,3,r);case 35:return ug(e,1,9999,lZ,3,r).toLowerCase();case 13:return ti(e,2534,2543,!0,r);case 14:case 30:return ti(e,6112,6121,!0,r);case 15:return vf(e,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return vf(e,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return Ou(e,"零一二三四五六七八九",cZ,"負",i,iA|sA|Zx);case 47:return Ou(e,"零壹貳參肆伍陸柒捌玖",uZ,"負",i,wg|iA|sA|Zx);case 42:return Ou(e,"零一二三四五六七八九",cZ,"负",i,iA|sA|Zx);case 41:return Ou(e,"零壹贰叁肆伍陆柒捌玖",uZ,"负",i,wg|iA|sA|Zx);case 26:return Ou(e,"〇一二三四五六七八九","十百千万",dZ,i,0);case 25:return Ou(e,"零壱弐参四伍六七八九","拾百千万",dZ,i,wg|iA|sA);case 31:return Ou(e,"영일이삼사오육칠팔구","십백천만",Q4,s,wg|iA|sA);case 33:return Ou(e,"零一二三四五六七八九","十百千萬",Q4,s,0);case 32:return Ou(e,"零壹貳參四五六七八九","拾百千",Q4,s,wg|iA|sA);case 18:return ti(e,2406,2415,!0,r);case 20:return ug(e,1,19999,DBt,3,r);case 21:return ti(e,2790,2799,!0,r);case 22:return ti(e,2662,2671,!0,r);case 22:return ug(e,1,10999,UBt,3,r);case 23:return vf(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return vf(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return ti(e,3302,3311,!0,r);case 28:return vf(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return vf(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return ti(e,3792,3801,!0,r);case 37:return ti(e,6160,6169,!0,r);case 38:return ti(e,4160,4169,!0,r);case 39:return ti(e,2918,2927,!0,r);case 40:return ti(e,1776,1785,!0,r);case 43:return ti(e,3046,3055,!0,r);case 44:return ti(e,3174,3183,!0,r);case 45:return ti(e,3664,3673,!0,r);case 46:return ti(e,3872,3881,!0,r);case 3:default:return ti(e,48,57,!0,r)}},kye="data-html2canvas-ignore",AZ=function(){function e(t,n,r){if(this.context=t,this.options=r,this.scrolledElements=[],this.referenceElement=n,this.counters=new RBt,this.quoteDepth=0,!n.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(n.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(t,n){var r=this,i=QBt(t,n);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var s=t.defaultView.pageXOffset,a=t.defaultView.pageYOffset,o=i.contentWindow,l=o.document,u=zBt(i).then(function(){return ta(r,void 0,void 0,function(){var d,A;return Os(this,function(f){switch(f.label){case 0:return this.scrolledElements.forEach(qBt),o&&(o.scrollTo(n.left,n.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(o.scrollY!==n.top||o.scrollX!==n.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-n.left,o.scrollY-n.top,0,0))),d=this.options.onclone,A=this.clonedReferenceElement,typeof A>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:l.fonts&&l.fonts.ready?[4,l.fonts.ready]:[3,2];case 1:f.sent(),f.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,$Bt(l)]:[3,4];case 3:f.sent(),f.label=4;case 4:return typeof d=="function"?[2,Promise.resolve().then(function(){return d(l,A)}).then(function(){return i})]:[2,i]}})})});return l.open(),l.write(KBt(document.doctype)+"<html></html>"),WBt(this.referenceElement.ownerDocument,s,a),l.replaceChild(l.adoptNode(this.documentElement),l.documentElement),l.close(),u},e.prototype.createElementClone=function(t){if(sR(t,2))debugger;if(Cye(t))return this.createCanvasClone(t);if(iZ(t))return this.createVideoClone(t);if(sZ(t))return this.createStyleClone(t);var n=t.cloneNode(!1);return cR(n)&&(cR(t)&&t.currentSrc&&t.currentSrc!==t.src&&(n.src=t.currentSrc,n.srcset=""),n.loading==="lazy"&&(n.loading="eager")),aZ(n)?this.createCustomElementClone(n):n},e.prototype.createCustomElementClone=function(t){var n=document.createElement("html2canvascustomelement");return H4(t.style,n),n},e.prototype.createStyleClone=function(t){try{var n=t.sheet;if(n&&n.cssRules){var r=[].slice.call(n.cssRules,0).reduce(function(s,a){return a&&typeof a.cssText=="string"?s+a.cssText:s},""),i=t.cloneNode(!1);return i.textContent=r,i}}catch(s){if(this.context.logger.error("Unable to access cssRules property",s),s.name!=="SecurityError")throw s}return t.cloneNode(!1)},e.prototype.createCanvasClone=function(t){var n;if(this.options.inlineImages&&t.ownerDocument){var r=t.ownerDocument.createElement("img");try{return r.src=t.toDataURL(),r}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var i=t.cloneNode(!1);try{i.width=t.width,i.height=t.height;var s=t.getContext("2d"),a=i.getContext("2d");if(a)if(!this.options.allowTaint&&s)a.putImageData(s.getImageData(0,0,t.width,t.height),0,0);else{var o=(n=t.getContext("webgl2"))!==null&&n!==void 0?n:t.getContext("webgl");if(o){var l=o.getContextAttributes();(l==null?void 0:l.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}a.drawImage(t,0,0)}return i}catch{this.context.logger.info("Unable to clone canvas as it is tainted",t)}return i},e.prototype.createVideoClone=function(t){var n=t.ownerDocument.createElement("canvas");n.width=t.offsetWidth,n.height=t.offsetHeight;var r=n.getContext("2d");try{return r&&(r.drawImage(t,0,0,n.width,n.height),this.options.allowTaint||r.getImageData(0,0,n.width,n.height)),n}catch{this.context.logger.info("Unable to clone video as it is tainted",t)}var i=t.ownerDocument.createElement("canvas");return i.width=t.offsetWidth,i.height=t.offsetHeight,i},e.prototype.appendChildNode=function(t,n,r){(!Vg(n)||!LBt(n)&&!n.hasAttribute(kye)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(n)))&&(!this.options.copyStyles||!Vg(n)||!sZ(n))&&t.appendChild(this.cloneNode(n,r))},e.prototype.cloneChildNodes=function(t,n,r){for(var i=this,s=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;s;s=s.nextSibling)if(Vg(s)&&Bye(s)&&typeof s.assignedNodes=="function"){var a=s.assignedNodes();a.length&&a.forEach(function(o){return i.appendChildNode(n,o,r)})}else this.appendChildNode(n,s,r)},e.prototype.cloneNode=function(t,n){if(wye(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var r=t.ownerDocument.defaultView;if(r&&Vg(t)&&(lR(t)||r_(t))){var i=this.createElementClone(t);i.style.transitionProperty="none";var s=r.getComputedStyle(t),a=r.getComputedStyle(t,":before"),o=r.getComputedStyle(t,":after");this.referenceElement===t&&lR(i)&&(this.clonedReferenceElement=i),PH(i)&&XBt(i);var l=this.counters.parse(new $J(this.context,s)),u=this.resolvePseudoContent(t,i,a,Ww.BEFORE);aZ(t)&&(n=!0),iZ(t)||this.cloneChildNodes(t,i,n),u&&i.insertBefore(u,i.firstChild);var d=this.resolvePseudoContent(t,i,o,Ww.AFTER);return d&&i.appendChild(d),this.counters.pop(l),(s&&(this.options.copyStyles||r_(t))&&!Sye(t)||n)&&H4(s,i),(t.scrollTop!==0||t.scrollLeft!==0)&&this.scrolledElements.push([i,t.scrollLeft,t.scrollTop]),(oN(t)||lN(t))&&(oN(i)||lN(i))&&(i.value=t.value),i}return t.cloneNode(!1)},e.prototype.resolvePseudoContent=function(t,n,r,i){var s=this;if(r){var a=r.content,o=n.ownerDocument;if(!(!o||!a||a==="none"||a==="-moz-alt-content"||r.display==="none")){this.counters.parse(new $J(this.context,r));var l=new ISt(this.context,r),u=o.createElement("html2canvaspseudoelement");H4(r,u),l.content.forEach(function(A){if(A.type===0)u.appendChild(o.createTextNode(A.value));else if(A.type===22){var f=o.createElement("img");f.src=A.value,f.style.opacity="1",u.appendChild(f)}else if(A.type===18){if(A.name==="attr"){var h=A.values.filter(Vn);h.length&&u.appendChild(o.createTextNode(t.getAttribute(h[0].value)||""))}else if(A.name==="counter"){var p=A.values.filter(T0),m=p[0],g=p[1];if(m&&Vn(m)){var y=s.counters.getCounterValue(m.value),v=g&&Vn(g)?iR.parse(s.context,g.value):3;u.appendChild(o.createTextNode(Q1(y,v,!1)))}}else if(A.name==="counters"){var x=A.values.filter(T0),m=x[0],b=x[1],g=x[2];if(m&&Vn(m)){var w=s.counters.getCounterValues(m.value),B=g&&Vn(g)?iR.parse(s.context,g.value):3,k=b&&b.type===0?b.value:"",N=w.map(function(T){return Q1(T,B,!1)}).join(k);u.appendChild(o.createTextNode(N))}}}else if(A.type===20)switch(A.value){case"open-quote":u.appendChild(o.createTextNode(HJ(l.quotes,s.quoteDepth++,!0)));break;case"close-quote":u.appendChild(o.createTextNode(HJ(l.quotes,--s.quoteDepth,!1)));break;default:u.appendChild(o.createTextNode(A.value))}}),u.className=uR+" "+dR;var d=i===Ww.BEFORE?" "+uR:" "+dR;return r_(n)?n.className.baseValue+=d:n.className+=d,u}}},e.destroy=function(t){return t.parentNode?(t.parentNode.removeChild(t),!0):!1},e}(),Ww;(function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"})(Ww||(Ww={}));var QBt=function(e,t){var n=e.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=t.width.toString(),n.height=t.height.toString(),n.scrolling="no",n.setAttribute(kye,"true"),e.body.appendChild(n),n},HBt=function(e){return new Promise(function(t){if(e.complete){t();return}if(!e.src){t();return}e.onload=t,e.onerror=t})},$Bt=function(e){return Promise.all([].slice.call(e.images,0).map(HBt))},zBt=function(e){return new Promise(function(t,n){var r=e.contentWindow;if(!r)return n("No window assigned for iframe");var i=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var s=setInterval(function(){i.body.childNodes.length>0&&i.readyState==="complete"&&(clearInterval(s),t(e))},50)}})},VBt=["all","d","content"],H4=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e.item(n);VBt.indexOf(r)===-1&&t.style.setProperty(r,e.getPropertyValue(r))}return t},KBt=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},WBt=function(e,t,n){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},qBt=function(e){var t=e[0],n=e[1],r=e[2];t.scrollLeft=n,t.scrollTop=r},GBt=":before",YBt=":after",uR="___html2canvas___pseudoelement_before",dR="___html2canvas___pseudoelement_after",hZ=`{
content: "" !important;
display: none !important;
}`,XBt=function(e){JBt(e,"."+uR+GBt+hZ+`
.`+dR+YBt+hZ)},JBt=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement("style");r.textContent=t,e.appendChild(r)}},Eye=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),ZBt=function(){function e(t,n){this.context=t,this._options=n,this._cache={}}return e.prototype.addImage=function(t){var n=Promise.resolve();return this.has(t)||(z4(t)||r_t(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),n},e.prototype.match=function(t){return this._cache[t]},e.prototype.loadImage=function(t){return ta(this,void 0,void 0,function(){var n,r,i,s,a=this;return Os(this,function(o){switch(o.label){case 0:return n=Eye.isSameOrigin(t),r=!$4(t)&&this._options.useCORS===!0&&fs.SUPPORT_CORS_IMAGES&&!n,i=!$4(t)&&!n&&!z4(t)&&typeof this._options.proxy=="string"&&fs.SUPPORT_CORS_XHR&&!r,!n&&this._options.allowTaint===!1&&!$4(t)&&!z4(t)&&!i&&!r?[2]:(s=t,i?[4,this.proxy(s)]:[3,2]);case 1:s=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(l,u){var d=new Image;d.onload=function(){return l(d)},d.onerror=u,(i_t(s)||r)&&(d.crossOrigin="anonymous"),d.src=s,d.complete===!0&&setTimeout(function(){return l(d)},500),a._options.imageTimeout>0&&setTimeout(function(){return u("Timed out ("+a._options.imageTimeout+"ms) loading image")},a._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},e.prototype.has=function(t){return typeof this._cache[t]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(t){var n=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var i=t.substring(0,256);return new Promise(function(s,a){var o=fs.SUPPORT_RESPONSE_TYPE?"blob":"text",l=new XMLHttpRequest;l.onload=function(){if(l.status===200)if(o==="text")s(l.response);else{var A=new FileReader;A.addEventListener("load",function(){return s(A.result)},!1),A.addEventListener("error",function(f){return a(f)},!1),A.readAsDataURL(l.response)}else a("Failed to proxy resource "+i+" with status code "+l.status)},l.onerror=a;var u=r.indexOf("?")>-1?"&":"?";if(l.open("GET",""+r+u+"url="+encodeURIComponent(t)+"&responseType="+o),o!=="text"&&l instanceof XMLHttpRequest&&(l.responseType=o),n._options.imageTimeout){var d=n._options.imageTimeout;l.timeout=d,l.ontimeout=function(){return a("Timed out ("+d+"ms) proxying "+i)}}l.send()})},e}(),e_t=/^data:image\/svg\+xml/i,t_t=/^data:image\/.*;base64,/i,n_t=/^data:image\/.*/i,r_t=function(e){return fs.SUPPORT_SVG_DRAWING||!s_t(e)},$4=function(e){return n_t.test(e)},i_t=function(e){return t_t.test(e)},z4=function(e){return e.substr(0,4)==="blob"},s_t=function(e){return e.substr(-3).toLowerCase()==="svg"||e_t.test(e)},tt=function(){function e(t,n){this.type=0,this.x=t,this.y=n}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),dg=function(e,t,n){return new tt(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},aB=function(){function e(t,n,r,i){this.type=1,this.start=t,this.startControl=n,this.endControl=r,this.end=i}return e.prototype.subdivide=function(t,n){var r=dg(this.start,this.startControl,t),i=dg(this.startControl,this.endControl,t),s=dg(this.endControl,this.end,t),a=dg(r,i,t),o=dg(i,s,t),l=dg(a,o,t);return n?new e(this.start,r,a,l):new e(l,o,s,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),qo=function(e){return e.type===1},a_t=function(){function e(t){var n=t.styles,r=t.bounds,i=Xx(n.borderTopLeftRadius,r.width,r.height),s=i[0],a=i[1],o=Xx(n.borderTopRightRadius,r.width,r.height),l=o[0],u=o[1],d=Xx(n.borderBottomRightRadius,r.width,r.height),A=d[0],f=d[1],h=Xx(n.borderBottomLeftRadius,r.width,r.height),p=h[0],m=h[1],g=[];g.push((s+l)/r.width),g.push((p+A)/r.width),g.push((a+m)/r.height),g.push((u+f)/r.height);var y=Math.max.apply(Math,g);y>1&&(s/=y,a/=y,l/=y,u/=y,A/=y,f/=y,p/=y,m/=y);var v=r.width-l,x=r.height-f,b=r.width-A,w=r.height-m,B=n.borderTopWidth,k=n.borderRightWidth,N=n.borderBottomWidth,j=n.borderLeftWidth,L=sr(n.paddingTop,t.bounds.width),T=sr(n.paddingRight,t.bounds.width),E=sr(n.paddingBottom,t.bounds.width),F=sr(n.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||a>0?Cr(r.left+j/3,r.top+B/3,s-j/3,a-B/3,Fn.TOP_LEFT):new tt(r.left+j/3,r.top+B/3),this.topRightBorderDoubleOuterBox=s>0||a>0?Cr(r.left+v,r.top+B/3,l-k/3,u-B/3,Fn.TOP_RIGHT):new tt(r.left+r.width-k/3,r.top+B/3),this.bottomRightBorderDoubleOuterBox=A>0||f>0?Cr(r.left+b,r.top+x,A-k/3,f-N/3,Fn.BOTTOM_RIGHT):new tt(r.left+r.width-k/3,r.top+r.height-N/3),this.bottomLeftBorderDoubleOuterBox=p>0||m>0?Cr(r.left+j/3,r.top+w,p-j/3,m-N/3,Fn.BOTTOM_LEFT):new tt(r.left+j/3,r.top+r.height-N/3),this.topLeftBorderDoubleInnerBox=s>0||a>0?Cr(r.left+j*2/3,r.top+B*2/3,s-j*2/3,a-B*2/3,Fn.TOP_LEFT):new tt(r.left+j*2/3,r.top+B*2/3),this.topRightBorderDoubleInnerBox=s>0||a>0?Cr(r.left+v,r.top+B*2/3,l-k*2/3,u-B*2/3,Fn.TOP_RIGHT):new tt(r.left+r.width-k*2/3,r.top+B*2/3),this.bottomRightBorderDoubleInnerBox=A>0||f>0?Cr(r.left+b,r.top+x,A-k*2/3,f-N*2/3,Fn.BOTTOM_RIGHT):new tt(r.left+r.width-k*2/3,r.top+r.height-N*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||m>0?Cr(r.left+j*2/3,r.top+w,p-j*2/3,m-N*2/3,Fn.BOTTOM_LEFT):new tt(r.left+j*2/3,r.top+r.height-N*2/3),this.topLeftBorderStroke=s>0||a>0?Cr(r.left+j/2,r.top+B/2,s-j/2,a-B/2,Fn.TOP_LEFT):new tt(r.left+j/2,r.top+B/2),this.topRightBorderStroke=s>0||a>0?Cr(r.left+v,r.top+B/2,l-k/2,u-B/2,Fn.TOP_RIGHT):new tt(r.left+r.width-k/2,r.top+B/2),this.bottomRightBorderStroke=A>0||f>0?Cr(r.left+b,r.top+x,A-k/2,f-N/2,Fn.BOTTOM_RIGHT):new tt(r.left+r.width-k/2,r.top+r.height-N/2),this.bottomLeftBorderStroke=p>0||m>0?Cr(r.left+j/2,r.top+w,p-j/2,m-N/2,Fn.BOTTOM_LEFT):new tt(r.left+j/2,r.top+r.height-N/2),this.topLeftBorderBox=s>0||a>0?Cr(r.left,r.top,s,a,Fn.TOP_LEFT):new tt(r.left,r.top),this.topRightBorderBox=l>0||u>0?Cr(r.left+v,r.top,l,u,Fn.TOP_RIGHT):new tt(r.left+r.width,r.top),this.bottomRightBorderBox=A>0||f>0?Cr(r.left+b,r.top+x,A,f,Fn.BOTTOM_RIGHT):new tt(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=p>0||m>0?Cr(r.left,r.top+w,p,m,Fn.BOTTOM_LEFT):new tt(r.left,r.top+r.height),this.topLeftPaddingBox=s>0||a>0?Cr(r.left+j,r.top+B,Math.max(0,s-j),Math.max(0,a-B),Fn.TOP_LEFT):new tt(r.left+j,r.top+B),this.topRightPaddingBox=l>0||u>0?Cr(r.left+Math.min(v,r.width-k),r.top+B,v>r.width+k?0:Math.max(0,l-k),Math.max(0,u-B),Fn.TOP_RIGHT):new tt(r.left+r.width-k,r.top+B),this.bottomRightPaddingBox=A>0||f>0?Cr(r.left+Math.min(b,r.width-j),r.top+Math.min(x,r.height-N),Math.max(0,A-k),Math.max(0,f-N),Fn.BOTTOM_RIGHT):new tt(r.left+r.width-k,r.top+r.height-N),this.bottomLeftPaddingBox=p>0||m>0?Cr(r.left+j,r.top+Math.min(w,r.height-N),Math.max(0,p-j),Math.max(0,m-N),Fn.BOTTOM_LEFT):new tt(r.left+j,r.top+r.height-N),this.topLeftContentBox=s>0||a>0?Cr(r.left+j+F,r.top+B+L,Math.max(0,s-(j+F)),Math.max(0,a-(B+L)),Fn.TOP_LEFT):new tt(r.left+j+F,r.top+B+L),this.topRightContentBox=l>0||u>0?Cr(r.left+Math.min(v,r.width+j+F),r.top+B+L,v>r.width+j+F?0:l-j+F,u-(B+L),Fn.TOP_RIGHT):new tt(r.left+r.width-(k+T),r.top+B+L),this.bottomRightContentBox=A>0||f>0?Cr(r.left+Math.min(b,r.width-(j+F)),r.top+Math.min(x,r.height+B+L),Math.max(0,A-(k+T)),f-(N+E),Fn.BOTTOM_RIGHT):new tt(r.left+r.width-(k+T),r.top+r.height-(N+E)),this.bottomLeftContentBox=p>0||m>0?Cr(r.left+j+F,r.top+w,Math.max(0,p-(j+F)),m-(N+E),Fn.BOTTOM_LEFT):new tt(r.left+j+F,r.top+r.height-(N+E))}return e}(),Fn;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Fn||(Fn={}));var Cr=function(e,t,n,r,i){var s=4*((Math.sqrt(2)-1)/3),a=n*s,o=r*s,l=e+n,u=t+r;switch(i){case Fn.TOP_LEFT:return new aB(new tt(e,u),new tt(e,u-o),new tt(l-a,t),new tt(l,t));case Fn.TOP_RIGHT:return new aB(new tt(e,t),new tt(e+a,t),new tt(l,u-o),new tt(l,u));case Fn.BOTTOM_RIGHT:return new aB(new tt(l,t),new tt(l,t+o),new tt(e+a,u),new tt(e,u));case Fn.BOTTOM_LEFT:default:return new aB(new tt(l,u),new tt(l-a,u),new tt(e,t+o),new tt(e,t))}},cN=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},o_t=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},uN=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},l_t=function(){function e(t,n,r){this.offsetX=t,this.offsetY=n,this.matrix=r,this.type=0,this.target=6}return e}(),oB=function(){function e(t,n){this.path=t,this.target=n,this.type=1}return e}(),c_t=function(){function e(t){this.opacity=t,this.type=2,this.target=6}return e}(),u_t=function(e){return e.type===0},Nye=function(e){return e.type===1},d_t=function(e){return e.type===2},fZ=function(e,t){return e.length===t.length?e.some(function(n,r){return n===t[r]}):!1},A_t=function(e,t,n,r,i){return e.map(function(s,a){switch(a){case 0:return s.add(t,n);case 1:return s.add(t+r,n);case 2:return s.add(t+r,n+i);case 3:return s.add(t,n+i)}return s})},jye=function(){function e(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),Tye=function(){function e(t,n){if(this.container=t,this.parent=n,this.effects=[],this.curves=new a_t(this.container),this.container.styles.opacity<1&&this.effects.push(new c_t(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new l_t(r,i,s))}if(this.container.styles.overflowX!==0){var a=cN(this.curves),o=uN(this.curves);fZ(a,o)?this.effects.push(new oB(a,6)):(this.effects.push(new oB(a,2)),this.effects.push(new oB(o,4)))}}return e.prototype.getEffects=function(t){for(var n=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,i=this.effects.slice(0);r;){var s=r.effects.filter(function(l){return!Nye(l)});if(n||r.container.styles.position!==0||!r.parent){if(i.unshift.apply(i,s),n=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var a=cN(r.curves),o=uN(r.curves);fZ(a,o)||i.unshift(new oB(o,6))}}else i.unshift.apply(i,s);r=r.parent}return i.filter(function(l){return Oi(l.target,t)})},e}(),AR=function(e,t,n,r){e.container.elements.forEach(function(i){var s=Oi(i.flags,4),a=Oi(i.flags,2),o=new Tye(i,e);Oi(i.styles.display,2048)&&r.push(o);var l=Oi(i.flags,8)?[]:r;if(s||a){var u=s||i.styles.isPositioned()?n:t,d=new jye(o);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var A=i.styles.zIndex.order;if(A<0){var f=0;u.negativeZIndex.some(function(p,m){return A>p.element.container.styles.zIndex.order?(f=m,!1):f>0}),u.negativeZIndex.splice(f,0,d)}else if(A>0){var h=0;u.positiveZIndex.some(function(p,m){return A>=p.element.container.styles.zIndex.order?(h=m+1,!1):h>0}),u.positiveZIndex.splice(h,0,d)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(d)}else i.styles.isFloating()?u.nonPositionedFloats.push(d):u.nonPositionedInlineLevel.push(d);AR(o,d,s?d:n,l)}else i.styles.isInlineLevel()?t.inlineLevel.push(o):t.nonInlineLevel.push(o),AR(o,t,n,l);Oi(i.flags,8)&&Pye(i,l)})},Pye=function(e,t){for(var n=e instanceof oR?e.start:1,r=e instanceof oR?e.reversed:!1,i=0;i<t.length;i++){var s=t[i];s.container instanceof pye&&typeof s.container.value=="number"&&s.container.value!==0&&(n=s.container.value),s.listValue=Q1(n,s.container.styles.listStyleType,!0),n+=r?-1:1}},h_t=function(e){var t=new Tye(e,null),n=new jye(t),r=[];return AR(t,n,n,r),Pye(t.container,r),n},pZ=function(e,t){switch(t){case 0:return tl(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return tl(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return tl(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return tl(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},f_t=function(e,t){switch(t){case 0:return tl(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return tl(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return tl(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return tl(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},p_t=function(e,t){switch(t){case 0:return tl(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return tl(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return tl(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return tl(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},m_t=function(e,t){switch(t){case 0:return lB(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return lB(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return lB(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return lB(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},lB=function(e,t){var n=[];return qo(e)?n.push(e.subdivide(.5,!1)):n.push(e),qo(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},tl=function(e,t,n,r){var i=[];return qo(e)?i.push(e.subdivide(.5,!1)):i.push(e),qo(n)?i.push(n.subdivide(.5,!0)):i.push(n),qo(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),qo(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},Iye=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},dN=function(e){var t=e.styles,n=e.bounds,r=sr(t.paddingLeft,n.width),i=sr(t.paddingRight,n.width),s=sr(t.paddingTop,n.width),a=sr(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,s+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+s+a))},g_t=function(e,t){return e===0?t.bounds:e===2?dN(t):Iye(t)},y_t=function(e,t){return e===0?t.bounds:e===2?dN(t):Iye(t)},V4=function(e,t,n){var r=g_t(bg(e.styles.backgroundOrigin,t),e),i=y_t(bg(e.styles.backgroundClip,t),e),s=v_t(bg(e.styles.backgroundSize,t),n,r),a=s[0],o=s[1],l=Xx(bg(e.styles.backgroundPosition,t),r.width-a,r.height-o),u=x_t(bg(e.styles.backgroundRepeat,t),l,s,r,i),d=Math.round(r.left+l[0]),A=Math.round(r.top+l[1]);return[u,d,A,a,o]},Ag=function(e){return Vn(e)&&e.value===Sy.AUTO},cB=function(e){return typeof e=="number"},v_t=function(e,t,n){var r=t[0],i=t[1],s=t[2],a=e[0],o=e[1];if(!a)return[0,0];if(xi(a)&&o&&xi(o))return[sr(a,n.width),sr(o,n.height)];var l=cB(s);if(Vn(a)&&(a.value===Sy.CONTAIN||a.value===Sy.COVER)){if(cB(s)){var u=n.width/n.height;return u<s!=(a.value===Sy.COVER)?[n.width,n.width/s]:[n.height*s,n.height]}return[n.width,n.height]}var d=cB(r),A=cB(i),f=d||A;if(Ag(a)&&(!o||Ag(o))){if(d&&A)return[r,i];if(!l&&!f)return[n.width,n.height];if(f&&l){var h=d?r:i*s,p=A?i:r/s;return[h,p]}var m=d?r:n.width,g=A?i:n.height;return[m,g]}if(l){var y=0,v=0;return xi(a)?y=sr(a,n.width):xi(o)&&(v=sr(o,n.height)),Ag(a)?y=v*s:(!o||Ag(o))&&(v=y/s),[y,v]}var x=null,b=null;if(xi(a)?x=sr(a,n.width):o&&xi(o)&&(b=sr(o,n.height)),x!==null&&(!o||Ag(o))&&(b=d&&A?x/r*i:n.height),b!==null&&Ag(a)&&(x=d&&A?b/i*r:n.width),x!==null&&b!==null)return[x,b];throw new Error("Unable to calculate background-size for element")},bg=function(e,t){var n=e[t];return typeof n>"u"?e[0]:n},x_t=function(e,t,n,r,i){var s=t[0],a=t[1],o=n[0],l=n[1];switch(e){case 2:return[new tt(Math.round(r.left),Math.round(r.top+a)),new tt(Math.round(r.left+r.width),Math.round(r.top+a)),new tt(Math.round(r.left+r.width),Math.round(l+r.top+a)),new tt(Math.round(r.left),Math.round(l+r.top+a))];case 3:return[new tt(Math.round(r.left+s),Math.round(r.top)),new tt(Math.round(r.left+s+o),Math.round(r.top)),new tt(Math.round(r.left+s+o),Math.round(r.height+r.top)),new tt(Math.round(r.left+s),Math.round(r.height+r.top))];case 1:return[new tt(Math.round(r.left+s),Math.round(r.top+a)),new tt(Math.round(r.left+s+o),Math.round(r.top+a)),new tt(Math.round(r.left+s+o),Math.round(r.top+a+l)),new tt(Math.round(r.left+s),Math.round(r.top+a+l))];default:return[new tt(Math.round(i.left),Math.round(i.top)),new tt(Math.round(i.left+i.width),Math.round(i.top)),new tt(Math.round(i.left+i.width),Math.round(i.height+i.top)),new tt(Math.round(i.left),Math.round(i.height+i.top))]}},w_t="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",mZ="Hidden Text",b_t=function(){function e(t){this._data={},this._document=t}return e.prototype.parseMetrics=function(t,n){var r=this._document.createElement("div"),i=this._document.createElement("img"),s=this._document.createElement("span"),a=this._document.body;r.style.visibility="hidden",r.style.fontFamily=t,r.style.fontSize=n,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",a.appendChild(r),i.src=w_t,i.width=1,i.height=1,i.style.margin="0",i.style.padding="0",i.style.verticalAlign="baseline",s.style.fontFamily=t,s.style.fontSize=n,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(mZ)),r.appendChild(s),r.appendChild(i);var o=i.offsetTop-s.offsetTop+2;r.removeChild(s),r.appendChild(this._document.createTextNode(mZ)),r.style.lineHeight="normal",i.style.verticalAlign="super";var l=i.offsetTop-r.offsetTop+2;return a.removeChild(r),{baseline:o,middle:l}},e.prototype.getMetrics=function(t,n){var r=t+" "+n;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(t,n)),this._data[r]},e}(),Oye=function(){function e(t,n){this.context=t,this.options=n}return e}(),C_t=1e4,S_t=function(e){mc(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i._activeEffects=[],i.canvas=r.canvas?r.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),r.canvas||(i.canvas.width=Math.floor(r.width*r.scale),i.canvas.height=Math.floor(r.height*r.scale),i.canvas.style.width=r.width+"px",i.canvas.style.height=r.height+"px"),i.fontMetrics=new b_t(document),i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-r.x,-r.y),i.ctx.textBaseline="bottom",i._activeEffects=[],i.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),i}return t.prototype.applyEffects=function(n){for(var r=this;this._activeEffects.length;)this.popEffect();n.forEach(function(i){return r.applyEffect(i)})},t.prototype.applyEffect=function(n){this.ctx.save(),d_t(n)&&(this.ctx.globalAlpha=n.opacity),u_t(n)&&(this.ctx.translate(n.offsetX,n.offsetY),this.ctx.transform(n.matrix[0],n.matrix[1],n.matrix[2],n.matrix[3],n.matrix[4],n.matrix[5]),this.ctx.translate(-n.offsetX,-n.offsetY)),Nye(n)&&(this.path(n.path),this.ctx.clip()),this._activeEffects.push(n)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(n){return ta(this,void 0,void 0,function(){var r;return Os(this,function(i){switch(i.label){case 0:return r=n.element.container.styles,r.isVisible()?[4,this.renderStackContent(n)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(n){return ta(this,void 0,void 0,function(){return Os(this,function(r){switch(r.label){case 0:if(Oi(n.container.flags,16))debugger;return n.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(n)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(n)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(n,r,i){var s=this;if(r===0)this.ctx.fillText(n.text,n.bounds.left,n.bounds.top+i);else{var a=jH(n.text);a.reduce(function(o,l){return s.ctx.fillText(l,o,n.bounds.top+i),o+s.ctx.measureText(l).width},n.bounds.left)}},t.prototype.createFontStyle=function(n){var r=n.fontVariant.filter(function(a){return a==="normal"||a==="small-caps"}).join(""),i=N_t(n.fontFamily).join(", "),s=O2(n.fontSize)?""+n.fontSize.number+n.fontSize.unit:n.fontSize.number+"px";return[[n.fontStyle,r,n.fontWeight,s,i].join(" "),i,s]},t.prototype.renderTextNode=function(n,r){return ta(this,void 0,void 0,function(){var i,s,a,o,l,u,d,A,f=this;return Os(this,function(h){return i=this.createFontStyle(r),s=i[0],a=i[1],o=i[2],this.ctx.font=s,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",l=this.fontMetrics.getMetrics(a,o),u=l.baseline,d=l.middle,A=r.paintOrder,n.textBounds.forEach(function(p){A.forEach(function(m){switch(m){case 0:f.ctx.fillStyle=$i(r.color),f.renderTextWithLetterSpacing(p,r.letterSpacing,u);var g=r.textShadow;g.length&&p.text.trim().length&&(g.slice(0).reverse().forEach(function(y){f.ctx.shadowColor=$i(y.color),f.ctx.shadowOffsetX=y.offsetX.number*f.options.scale,f.ctx.shadowOffsetY=y.offsetY.number*f.options.scale,f.ctx.shadowBlur=y.blur.number,f.renderTextWithLetterSpacing(p,r.letterSpacing,u)}),f.ctx.shadowColor="",f.ctx.shadowOffsetX=0,f.ctx.shadowOffsetY=0,f.ctx.shadowBlur=0),r.textDecorationLine.length&&(f.ctx.fillStyle=$i(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(y){switch(y){case 1:f.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top+u),p.bounds.width,1);break;case 2:f.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top),p.bounds.width,1);break;case 3:f.ctx.fillRect(p.bounds.left,Math.ceil(p.bounds.top+d),p.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&p.text.trim().length&&(f.ctx.strokeStyle=$i(r.webkitTextStrokeColor),f.ctx.lineWidth=r.webkitTextStrokeWidth,f.ctx.lineJoin=window.chrome?"miter":"round",f.ctx.strokeText(p.text,p.bounds.left,p.bounds.top+u)),f.ctx.strokeStyle="",f.ctx.lineWidth=0,f.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(n,r,i){if(i&&n.intrinsicWidth>0&&n.intrinsicHeight>0){var s=dN(n),a=uN(r);this.path(a),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(i,0,0,n.intrinsicWidth,n.intrinsicHeight,s.left,s.top,s.width,s.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(n){return ta(this,void 0,void 0,function(){var r,i,s,a,o,l,v,v,u,d,A,f,b,h,p,w,m,g,y,v,x,b,w;return Os(this,function(B){switch(B.label){case 0:this.applyEffects(n.getEffects(4)),r=n.container,i=n.curves,s=r.styles,a=0,o=r.textNodes,B.label=1;case 1:return a<o.length?(l=o[a],[4,this.renderTextNode(l,s)]):[3,4];case 2:B.sent(),B.label=3;case 3:return a++,[3,1];case 4:if(!(r instanceof Aye))return[3,8];B.label=5;case 5:return B.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return v=B.sent(),this.renderReplacedElement(r,i,v),[3,8];case 7:return B.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof hye&&this.renderReplacedElement(r,i,r.canvas),!(r instanceof fye))return[3,12];B.label=9;case 9:return B.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return v=B.sent(),this.renderReplacedElement(r,i,v),[3,12];case 11:return B.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof yye&&r.tree?(u=new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,u.render(r.tree)]):[3,14];case 13:d=B.sent(),r.width&&r.height&&this.ctx.drawImage(d,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),B.label=14;case 14:if(r instanceof TH&&(A=Math.min(r.bounds.width,r.bounds.height),r.type===sN?r.checked&&(this.ctx.save(),this.path([new tt(r.bounds.left+A*.39363,r.bounds.top+A*.79),new tt(r.bounds.left+A*.16,r.bounds.top+A*.5549),new tt(r.bounds.left+A*.27347,r.bounds.top+A*.44071),new tt(r.bounds.left+A*.39694,r.bounds.top+A*.5649),new tt(r.bounds.left+A*.72983,r.bounds.top+A*.23),new tt(r.bounds.left+A*.84,r.bounds.top+A*.34085),new tt(r.bounds.left+A*.39363,r.bounds.top+A*.79)]),this.ctx.fillStyle=$i(rZ),this.ctx.fill(),this.ctx.restore()):r.type===aN&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+A/2,r.bounds.top+A/2,A/4,0,Math.PI*2,!0),this.ctx.fillStyle=$i(rZ),this.ctx.fill(),this.ctx.restore())),B_t(r)&&r.value.length){switch(f=this.createFontStyle(s),b=f[0],h=f[1],p=this.fontMetrics.getMetrics(b,h).baseline,this.ctx.font=b,this.ctx.fillStyle=$i(s.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=k_t(r.styles.textAlign),w=dN(r),m=0,r.styles.textAlign){case 1:m+=w.width/2;break;case 2:m+=w.width;break}g=w.add(m,0,0,-w.height/2+1),this.ctx.save(),this.path([new tt(w.left,w.top),new tt(w.left+w.width,w.top),new tt(w.left+w.width,w.top+w.height),new tt(w.left,w.top+w.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Kw(r.value,g),s.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Oi(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(y=r.styles.listStyleImage,y.type!==0)return[3,18];v=void 0,x=y.url,B.label=15;case 15:return B.trys.push([15,17,,18]),[4,this.context.cache.match(x)];case 16:return v=B.sent(),this.ctx.drawImage(v,r.bounds.left-(v.width+10),r.bounds.top),[3,18];case 17:return B.sent(),this.context.logger.error("Error loading list-style-image "+x),[3,18];case 18:return[3,20];case 19:n.listValue&&r.styles.listStyleType!==-1&&(b=this.createFontStyle(s)[0],this.ctx.font=b,this.ctx.fillStyle=$i(s.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",w=new yd(r.bounds.left,r.bounds.top+sr(r.styles.paddingTop,r.bounds.width),r.bounds.width,DJ(s.lineHeight,s.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Kw(n.listValue,w),s.letterSpacing,DJ(s.lineHeight,s.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),B.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(n){return ta(this,void 0,void 0,function(){var r,i,y,s,a,y,o,l,y,u,d,y,A,f,y,h,p,y,m,g,y;return Os(this,function(v){switch(v.label){case 0:if(Oi(n.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(n.element)];case 1:v.sent(),r=0,i=n.negativeZIndex,v.label=2;case 2:return r<i.length?(y=i[r],[4,this.renderStack(y)]):[3,5];case 3:v.sent(),v.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(n.element)];case 6:v.sent(),s=0,a=n.nonInlineLevel,v.label=7;case 7:return s<a.length?(y=a[s],[4,this.renderNode(y)]):[3,10];case 8:v.sent(),v.label=9;case 9:return s++,[3,7];case 10:o=0,l=n.nonPositionedFloats,v.label=11;case 11:return o<l.length?(y=l[o],[4,this.renderStack(y)]):[3,14];case 12:v.sent(),v.label=13;case 13:return o++,[3,11];case 14:u=0,d=n.nonPositionedInlineLevel,v.label=15;case 15:return u<d.length?(y=d[u],[4,this.renderStack(y)]):[3,18];case 16:v.sent(),v.label=17;case 17:return u++,[3,15];case 18:A=0,f=n.inlineLevel,v.label=19;case 19:return A<f.length?(y=f[A],[4,this.renderNode(y)]):[3,22];case 20:v.sent(),v.label=21;case 21:return A++,[3,19];case 22:h=0,p=n.zeroOrAutoZIndexOrTransformedOrOpacity,v.label=23;case 23:return h<p.length?(y=p[h],[4,this.renderStack(y)]):[3,26];case 24:v.sent(),v.label=25;case 25:return h++,[3,23];case 26:m=0,g=n.positiveZIndex,v.label=27;case 27:return m<g.length?(y=g[m],[4,this.renderStack(y)]):[3,30];case 28:v.sent(),v.label=29;case 29:return m++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(n){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(n.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(n){this.ctx.beginPath(),this.formatPath(n),this.ctx.closePath()},t.prototype.formatPath=function(n){var r=this;n.forEach(function(i,s){var a=qo(i)?i.start:i;s===0?r.ctx.moveTo(a.x,a.y):r.ctx.lineTo(a.x,a.y),qo(i)&&r.ctx.bezierCurveTo(i.startControl.x,i.startControl.y,i.endControl.x,i.endControl.y,i.end.x,i.end.y)})},t.prototype.renderRepeat=function(n,r,i,s){this.path(n),this.ctx.fillStyle=r,this.ctx.translate(i,s),this.ctx.fill(),this.ctx.translate(-i,-s)},t.prototype.resizeImage=function(n,r,i){var s;if(n.width===r&&n.height===i)return n;var a=(s=this.canvas.ownerDocument)!==null&&s!==void 0?s:document,o=a.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,i);var l=o.getContext("2d");return l.drawImage(n,0,0,n.width,n.height,0,0,r,i),o},t.prototype.renderBackgroundImage=function(n){return ta(this,void 0,void 0,function(){var r,i,s,a,o,l;return Os(this,function(u){switch(u.label){case 0:r=n.styles.backgroundImage.length-1,i=function(d){var A,f,h,L,H,q,F,M,N,p,L,H,q,F,M,m,g,y,v,x,b,w,B,k,N,j,L,T,E,F,M,D,H,q,$,z,Q,ce,R,O,Y,X;return Os(this,function(K){switch(K.label){case 0:if(d.type!==0)return[3,5];A=void 0,f=d.url,K.label=1;case 1:return K.trys.push([1,3,,4]),[4,s.context.cache.match(f)];case 2:return A=K.sent(),[3,4];case 3:return K.sent(),s.context.logger.error("Error loading background-image "+f),[3,4];case 4:return A&&(h=V4(n,r,[A.width,A.height,A.width/A.height]),L=h[0],H=h[1],q=h[2],F=h[3],M=h[4],N=s.ctx.createPattern(s.resizeImage(A,F,M),"repeat"),s.renderRepeat(L,N,H,q)),[3,6];case 5:uCt(d)?(p=V4(n,r,[null,null,null]),L=p[0],H=p[1],q=p[2],F=p[3],M=p[4],m=sCt(d.angle,F,M),g=m[0],y=m[1],v=m[2],x=m[3],b=m[4],w=document.createElement("canvas"),w.width=F,w.height=M,B=w.getContext("2d"),k=B.createLinearGradient(y,x,v,b),RJ(d.stops,g).forEach(function(Z){return k.addColorStop(Z.stop,$i(Z.color))}),B.fillStyle=k,B.fillRect(0,0,F,M),F>0&&M>0&&(N=s.ctx.createPattern(w,"repeat"),s.renderRepeat(L,N,H,q))):dCt(d)&&(j=V4(n,r,[null,null,null]),L=j[0],T=j[1],E=j[2],F=j[3],M=j[4],D=d.position.length===0?[kH]:d.position,H=sr(D[0],F),q=sr(D[D.length-1],M),$=aCt(d,H,q,F,M),z=$[0],Q=$[1],z>0&&Q>0&&(ce=s.ctx.createRadialGradient(T+H,E+q,0,T+H,E+q,z),RJ(d.stops,z*2).forEach(function(Z){return ce.addColorStop(Z.stop,$i(Z.color))}),s.path(L),s.ctx.fillStyle=ce,z!==Q?(R=n.bounds.left+.5*n.bounds.width,O=n.bounds.top+.5*n.bounds.height,Y=Q/z,X=1/Y,s.ctx.save(),s.ctx.translate(R,O),s.ctx.transform(1,0,0,Y,0,0),s.ctx.translate(-R,-O),s.ctx.fillRect(T,X*(E-O)+O,F,M*X),s.ctx.restore()):s.ctx.fill())),K.label=6;case 6:return r--,[2]}})},s=this,a=0,o=n.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return a<o.length?(l=o[a],[5,i(l)]):[3,4];case 2:u.sent(),u.label=3;case 3:return a++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(n,r,i){return ta(this,void 0,void 0,function(){return Os(this,function(s){return this.path(pZ(i,r)),this.ctx.fillStyle=$i(n),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(n,r,i,s){return ta(this,void 0,void 0,function(){var a,o;return Os(this,function(l){switch(l.label){case 0:return r<3?[4,this.renderSolidBorder(n,i,s)]:[3,2];case 1:return l.sent(),[2];case 2:return a=f_t(s,i),this.path(a),this.ctx.fillStyle=$i(n),this.ctx.fill(),o=p_t(s,i),this.path(o),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(n){return ta(this,void 0,void 0,function(){var r,i,s,a,o,l,u,d,A=this;return Os(this,function(f){switch(f.label){case 0:return this.applyEffects(n.getEffects(2)),r=n.container.styles,i=!hh(r.backgroundColor)||r.backgroundImage.length,s=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],a=__t(bg(r.backgroundClip,0),n.curves),i||r.boxShadow.length?(this.ctx.save(),this.path(a),this.ctx.clip(),hh(r.backgroundColor)||(this.ctx.fillStyle=$i(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(n.container)]):[3,2];case 1:f.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(h){A.ctx.save();var p=cN(n.curves),m=h.inset?0:C_t,g=A_t(p,-m+(h.inset?1:-1)*h.spread.number,(h.inset?1:-1)*h.spread.number,h.spread.number*(h.inset?-2:2),h.spread.number*(h.inset?-2:2));h.inset?(A.path(p),A.ctx.clip(),A.mask(g)):(A.mask(p),A.ctx.clip(),A.path(g)),A.ctx.shadowOffsetX=h.offsetX.number+m,A.ctx.shadowOffsetY=h.offsetY.number,A.ctx.shadowColor=$i(h.color),A.ctx.shadowBlur=h.blur.number,A.ctx.fillStyle=h.inset?$i(h.color):"rgba(0,0,0,1)",A.ctx.fill(),A.ctx.restore()}),f.label=2;case 2:o=0,l=0,u=s,f.label=3;case 3:return l<u.length?(d=u[l],d.style!==0&&!hh(d.color)&&d.width>0?d.style!==2?[3,5]:[4,this.renderDashedDottedBorder(d.color,d.width,o,n.curves,2)]:[3,11]):[3,13];case 4:return f.sent(),[3,11];case 5:return d.style!==3?[3,7]:[4,this.renderDashedDottedBorder(d.color,d.width,o,n.curves,3)];case 6:return f.sent(),[3,11];case 7:return d.style!==4?[3,9]:[4,this.renderDoubleBorder(d.color,d.width,o,n.curves)];case 8:return f.sent(),[3,11];case 9:return[4,this.renderSolidBorder(d.color,o,n.curves)];case 10:f.sent(),f.label=11;case 11:o++,f.label=12;case 12:return l++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(n,r,i,s,a){return ta(this,void 0,void 0,function(){var o,l,u,d,A,f,h,p,m,g,y,v,x,b,w,B,w,B;return Os(this,function(k){return this.ctx.save(),o=m_t(s,i),l=pZ(s,i),a===2&&(this.path(l),this.ctx.clip()),qo(l[0])?(u=l[0].start.x,d=l[0].start.y):(u=l[0].x,d=l[0].y),qo(l[1])?(A=l[1].end.x,f=l[1].end.y):(A=l[1].x,f=l[1].y),i===0||i===2?h=Math.abs(u-A):h=Math.abs(d-f),this.ctx.beginPath(),a===3?this.formatPath(o):this.formatPath(l.slice(0,2)),p=r<3?r*3:r*2,m=r<3?r*2:r,a===3&&(p=r,m=r),g=!0,h<=p*2?g=!1:h<=p*2+m?(y=h/(2*p+m),p*=y,m*=y):(v=Math.floor((h+m)/(p+m)),x=(h-v*p)/(v-1),b=(h-(v+1)*p)/v,m=b<=0||Math.abs(m-x)<Math.abs(m-b)?x:b),g&&(a===3?this.ctx.setLineDash([0,p+m]):this.ctx.setLineDash([p,m])),a===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=$i(n),this.ctx.stroke(),this.ctx.setLineDash([]),a===2&&(qo(l[0])&&(w=l[3],B=l[0],this.ctx.beginPath(),this.formatPath([new tt(w.end.x,w.end.y),new tt(B.start.x,B.start.y)]),this.ctx.stroke()),qo(l[1])&&(w=l[1],B=l[2],this.ctx.beginPath(),this.formatPath([new tt(w.end.x,w.end.y),new tt(B.start.x,B.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(n){return ta(this,void 0,void 0,function(){var r;return Os(this,function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=$i(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=h_t(n),[4,this.renderStack(r)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}})})},t}(Oye),B_t=function(e){return e instanceof gye||e instanceof mye?!0:e instanceof TH&&e.type!==aN&&e.type!==sN},__t=function(e,t){switch(e){case 0:return cN(t);case 2:return o_t(t);case 1:default:return uN(t)}},k_t=function(e){switch(e){case 1:return"center";case 2:return"right";case 0:default:return"left"}},E_t=["-apple-system","system-ui"],N_t=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(t){return E_t.indexOf(t)===-1}):e},j_t=function(e){mc(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.canvas=r.canvas?r.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),i.options=r,i.canvas.width=Math.floor(r.width*r.scale),i.canvas.height=Math.floor(r.height*r.scale),i.canvas.style.width=r.width+"px",i.canvas.style.height=r.height+"px",i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-r.x,-r.y),i.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),i}return t.prototype.render=function(n){return ta(this,void 0,void 0,function(){var r,i;return Os(this,function(s){switch(s.label){case 0:return r=aR(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,n),[4,T_t(r)];case 1:return i=s.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=$i(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(i,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(Oye),T_t=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},P_t=function(){function e(t){var n=t.id,r=t.enabled;this.id=n,this.enabled=r,this.start=Date.now()}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,QS([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,QS([this.id,this.getTime()+"ms"],t))},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,QS([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,QS([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.instances={},e}(),I_t=function(){function e(t,n){var r;this.windowBounds=n,this.instanceName="#"+e.instanceCount++,this.logger=new P_t({id:this.instanceName,enabled:t.logging}),this.cache=(r=t.cache)!==null&&r!==void 0?r:new ZBt(this,t)}return e.instanceCount=1,e}(),Fye=function(e,t){return t===void 0&&(t={}),O_t(e,t)};typeof window<"u"&&Eye.setContext(window);var O_t=function(e,t){return ta(void 0,void 0,void 0,function(){var n,r,i,s,a,o,l,u,d,A,f,h,p,m,g,y,v,x,b,w,k,B,k,N,j,L,T,E,F,M,D,H,q,$,z,Q,ce,R,O,Y;return Os(this,function(X){switch(X.label){case 0:if(!e||typeof e!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(n=e.ownerDocument,!n)throw new Error("Element is not attached to a Document");if(r=n.defaultView,!r)throw new Error("Document is not attached to a Window");return i={allowTaint:(N=t.allowTaint)!==null&&N!==void 0?N:!1,imageTimeout:(j=t.imageTimeout)!==null&&j!==void 0?j:15e3,proxy:t.proxy,useCORS:(L=t.useCORS)!==null&&L!==void 0?L:!1},s=VL({logging:(T=t.logging)!==null&&T!==void 0?T:!0,cache:t.cache},i),a={windowWidth:(E=t.windowWidth)!==null&&E!==void 0?E:r.innerWidth,windowHeight:(F=t.windowHeight)!==null&&F!==void 0?F:r.innerHeight,scrollX:(M=t.scrollX)!==null&&M!==void 0?M:r.pageXOffset,scrollY:(D=t.scrollY)!==null&&D!==void 0?D:r.pageYOffset},o=new yd(a.scrollX,a.scrollY,a.windowWidth,a.windowHeight),l=new I_t(s,o),u=(H=t.foreignObjectRendering)!==null&&H!==void 0?H:!1,d={allowTaint:(q=t.allowTaint)!==null&&q!==void 0?q:!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:u,copyStyles:u},l.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),A=new AZ(l,e,d),f=A.clonedReferenceElement,f?[4,A.toIFrame(n,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=X.sent(),p=PH(f)||MBt(f)?A1t(f.ownerDocument):Ej(l,f),m=p.width,g=p.height,y=p.left,v=p.top,x=F_t(l,f,t.backgroundColor),b={canvas:t.canvas,backgroundColor:x,scale:(z=($=t.scale)!==null&&$!==void 0?$:r.devicePixelRatio)!==null&&z!==void 0?z:1,x:((Q=t.x)!==null&&Q!==void 0?Q:0)+y,y:((ce=t.y)!==null&&ce!==void 0?ce:0)+v,width:(R=t.width)!==null&&R!==void 0?R:Math.ceil(m),height:(O=t.height)!==null&&O!==void 0?O:Math.ceil(g)},u?(l.logger.debug("Document cloned, using foreign object rendering"),k=new j_t(l,b),[4,k.render(f)]):[3,3];case 2:return w=X.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+y+","+v+" with size "+m+"x"+g+" using computed rendering"),l.logger.debug("Starting DOM parsing"),B=xye(l,f),x===B.styles.backgroundColor&&(B.styles.backgroundColor=id.TRANSPARENT),l.logger.debug("Starting renderer for element at "+b.x+","+b.y+" with size "+b.width+"x"+b.height),k=new S_t(l,b),[4,k.render(B)];case 4:w=X.sent(),X.label=5;case 5:return(!((Y=t.removeContainer)!==null&&Y!==void 0)||Y)&&(AZ.destroy(h)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,w]}})})},F_t=function(e,t,n){var r=t.ownerDocument,i=r.documentElement?zw(e,getComputedStyle(r.documentElement).backgroundColor):id.TRANSPARENT,s=r.body?zw(e,getComputedStyle(r.body).backgroundColor):id.TRANSPARENT,a=typeof n=="string"?zw(e,n):n===null?id.TRANSPARENT:4294967295;return t===r.documentElement?hh(i)?hh(s)?a:s:i:a};const M_t=Object.freeze(Object.defineProperty({__proto__:null,default:Fye},Symbol.toStringTag,{value:"Module"}));function L_t({payload:e,targetId:t}){const[n,r]=S.useState(!1),[i,s]=S.useState(!1),a=async()=>{r(!0);try{const l=document.getElementById(t);if(!l)throw new Error("Report container not found");const u=await Fye(l,{scale:2,useCORS:!0,backgroundColor:"#ffffff",windowWidth:l.scrollWidth}),d=u.toDataURL("image/png"),A=new Et({unit:"px",format:[u.width,u.height]});A.addImage(d,"PNG",0,0,u.width,u.height),A.save(`Holden_MarketPulse_${e.zip}_${new Date().toISOString().slice(0,10)}.pdf`)}catch(l){console.error(l),alert("Could not generate PDF. Try the HTML download instead.")}finally{r(!1)}},o=async()=>{s(!0);try{const{data:l,error:u}=await Re.functions.invoke("generate-market-pulse-html",{body:{payload:e}});if(u)throw u;const d=l==null?void 0:l.html;if(!d)throw new Error("No HTML returned");const A=new Blob([d],{type:"text/html"}),f=URL.createObjectURL(A),h=document.createElement("a");h.href=f,h.download=`Holden_MarketPulse_${e.zip}_${new Date().toISOString().slice(0,10)}.html`,h.click(),URL.revokeObjectURL(f)}catch(l){console.error(l),alert("Could not generate HTML. Please try again.")}finally{s(!1)}};return c.jsxs("div",{className:"flex flex-wrap gap-3",children:[c.jsxs("button",{onClick:a,disabled:n,className:"inline-flex items-center gap-2 px-4 py-2.5 bg-foreground text-background text-[11px] uppercase tracking-[0.2em] font-medium hover:opacity-90 disabled:opacity-50",children:[n?c.jsx(bo,{size:14,className:"animate-spin"}):c.jsx(rbe,{size:14})," Download PDF"]}),c.jsxs("button",{onClick:o,disabled:i,className:"inline-flex items-center gap-2 px-4 py-2.5 border border-border text-foreground text-[11px] uppercase tracking-[0.2em] font-medium hover:bg-muted disabled:opacity-50",children:[i?c.jsx(bo,{size:14,className:"animate-spin"}):c.jsx(zy,{size:14})," Download HTML"]})]})}function R_t({role:e,content:t}){const n=e==="user";return c.jsx("div",{className:`flex ${n?"justify-end":"justify-start"}`,children:c.jsx("div",{className:`max-w-[85%] px-3.5 py-2.5 text-sm leading-relaxed ${n?"bg-primary text-primary-foreground":"bg-muted text-foreground"}`,children:n?c.jsx("p",{className:"whitespace-pre-wrap",children:t}):c.jsx("div",{className:"prose prose-sm max-w-none prose-p:my-1.5 prose-p:text-foreground prose-strong:text-foreground prose-ul:my-1.5 prose-ol:my-1.5 prose-li:my-0",children:c.jsx(bme,{children:t||"…"})})})})}function U_t({chips:e,onPick:t}){return c.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(n=>c.jsx("button",{onClick:()=>t(n),className:"text-[11px] px-3 py-1.5 bg-background border border-border text-foreground/80 hover:bg-muted transition-colors text-left",children:n},n))})}function D_t({zip:e,lens:t,onDismiss:n}){const[r,i]=S.useState(""),[s,a]=S.useState(""),[o,l]=S.useState(""),[u,d]=S.useState(!1),[A,f]=S.useState(!1),h=async()=>{if(!(!r||!o)){d(!0);try{await Re.functions.invoke("aeo-lead-capture",{body:{name:r,phone:s,email:o,question:`Market Pulse chat — ${t} lens for ${e}`,source_page:`/market-pulse/${e}?lens=${t}`}}),f(!0)}catch(p){console.error(p),alert("Something went wrong sending your info. Please text Holden directly at (616) 403-6393.")}finally{d(!1)}}};return A?c.jsx("div",{className:"bg-muted border border-border p-4 my-2",children:c.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[c.jsx(qc,{size:16})," Thanks — Holden will reach out shortly."]})}):c.jsxs("div",{className:"bg-muted border border-border p-4 my-2 space-y-2",children:[c.jsx("div",{className:"text-[10px] uppercase tracking-[0.2em] text-muted-foreground",children:"Want Holden to follow up personally?"}),c.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.jsx("input",{value:r,onChange:p=>i(p.target.value),placeholder:"Name",className:"bg-background border border-border px-2.5 py-1.5 text-sm"}),c.jsx("input",{value:s,onChange:p=>a(p.target.value),placeholder:"Phone",className:"bg-background border border-border px-2.5 py-1.5 text-sm"})]}),c.jsx("input",{value:o,onChange:p=>l(p.target.value),placeholder:"Email",type:"email",className:"w-full bg-background border border-border px-2.5 py-1.5 text-sm"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("button",{onClick:h,disabled:u||!r||!o,className:"flex-1 inline-flex items-center justify-center gap-2 px-3 py-2 bg-primary text-primary-foreground text-[11px] uppercase tracking-[0.2em] font-medium disabled:opacity-50",children:[u?c.jsx(bo,{size:14,className:"animate-spin"}):null," Send"]}),c.jsx("button",{onClick:n,className:"px-3 py-2 text-[11px] uppercase tracking-[0.2em] text-muted-foreground hover:text-foreground",children:"Dismiss"})]})]})}const Q_t=/\b(tour|visit|see it|list|sell my|pre.?approval|preapproval|ready to buy|let.?s do|set up|book|schedule)\b/i;function H_t(e,t){const n=`mp_session_${e}_${t}`;let r=localStorage.getItem(n);return r||(r=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,localStorage.setItem(n,r)),r}function $_t({payload:e,rates:t}){const[n,r]=S.useState(!1),[i,s]=S.useState([]),[a,o]=S.useState(""),[l,u]=S.useState(!1),[d,A]=S.useState(!1),[f,h]=S.useState(!1),p=S.useRef(null),m=H_t(e.zip,e.lens);S.useEffect(()=>{(async()=>{const{data:v}=await Re.from("market_pulse_chats").select("role, content").eq("session_id",m).eq("zip",e.zip).eq("lens",e.lens).order("created_at",{ascending:!0});v&&v.length&&s(v.map(x=>({role:x.role,content:x.content})))})()},[m,e.zip,e.lens]),S.useEffect(()=>{var v;(v=p.current)==null||v.scrollTo({top:p.current.scrollHeight,behavior:"smooth"})},[i,n]);const g=e.lens==="seller"?[`Why is ${e.zip} ${e.heat_index>=60?"a strong":"this kind of"} market right now?`,`What would my net be at $${Math.round(e.snapshot.median_sale_price/1e3)}k?`,`How does ${e.zip} compare to nearby zips?`,"Should I list now or wait until spring?"]:[`Is now a good time to buy in ${e.zip}?`,`What does a $${Math.round(e.snapshot.median_sale_price/1e3)}k home cost monthly?`,`Where can I find more inventory near ${e.zip}?`,"What should my offer strategy be here?"];async function y(v){var N,j,L;const x=v.trim();if(!x||l)return;o("");const b={role:"user",content:x},w=[...i,b,{role:"assistant",content:""}];s(w),u(!0),Re.from("market_pulse_chats").insert({session_id:m,zip:e.zip,lens:e.lens,role:"user",content:x}).then(()=>{});const B=w.filter(T=>T.role==="user").length;!f&&(Q_t.test(x)||B>0&&B%4===0)&&A(!0);let k="";try{const E=await fetch("https://khmmwvmdbhaplcfcndjx.supabase.co/functions/v1/market-pulse-chat",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtobW13dm1kYmhhcGxjZmNuZGp4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzcwNTQ1MDcsImV4cCI6MjA5MjYzMDUwN30.c5aUVQ4shbnMOIIkDZRP7geMUb64HPKYg4jQFuBH52Q"},body:JSON.stringify({payload:e,rates:t,messages:[...i,b].map(q=>({role:q.role,content:q.content}))})});if(E.status===429)throw new Error("Too many requests — please wait a moment and try again.");if(E.status===402)throw new Error("AI credits exhausted. Please contact Holden directly.");if(!E.ok||!E.body)throw new Error(`Chat failed (${E.status})`);const F=E.body.getReader(),M=new TextDecoder;let D="",H=!1;for(;!H;){const{done:q,value:$}=await F.read();if(q)break;D+=M.decode($,{stream:!0});let z;for(;(z=D.indexOf(`
`))!==-1;){let Q=D.slice(0,z);if(D=D.slice(z+1),Q.endsWith("\r")&&(Q=Q.slice(0,-1)),!Q.startsWith("data: "))continue;const ce=Q.slice(6).trim();if(ce==="[DONE]"){H=!0;break}try{const O=(L=(j=(N=JSON.parse(ce).choices)==null?void 0:N[0])==null?void 0:j.delta)==null?void 0:L.content;O&&(k+=O,s(Y=>{const X=[...Y];return X[X.length-1]={role:"assistant",content:k},X}))}catch{D=Q+`
`+D;break}}}}catch(T){k=`_${T.message||"Sorry — something went wrong. Please try again."}_`,s(E=>{const F=[...E];return F[F.length-1]={role:"assistant",content:k},F})}finally{u(!1),k&&Re.from("market_pulse_chats").insert({session_id:m,zip:e.zip,lens:e.lens,role:"assistant",content:k}).then(()=>{})}}return c.jsxs(c.Fragment,{children:[!n&&c.jsxs("button",{onClick:()=>r(!0),className:"fixed bottom-20 right-4 md:bottom-24 md:right-6 z-50 inline-flex items-center gap-2 px-4 py-3 bg-primary text-primary-foreground shadow-2xl hover:bg-primary/90","aria-label":"Ask Holden's AI about this report",children:[c.jsx(dp,{size:16}),c.jsxs("span",{className:"text-[11px] uppercase tracking-[0.2em] font-medium",children:["Ask About ",e.zip]})]}),n&&c.jsxs("div",{className:"fixed inset-x-0 bottom-0 md:inset-auto md:bottom-20 md:right-6 z-50 md:w-[400px] md:h-[560px] bg-card border border-border shadow-2xl flex flex-col",children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-primary text-primary-foreground",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-[10px] uppercase tracking-[0.25em] opacity-80",children:"Ask Holden's AI"}),c.jsxs("div",{className:"text-sm font-semibold",children:["About ",e.zip," · ",e.area]})]}),c.jsx("button",{onClick:()=>r(!1),className:"p-1 hover:opacity-80","aria-label":"Close chat",children:c.jsx(Da,{size:18})})]}),c.jsxs("div",{ref:p,className:"flex-1 overflow-y-auto p-4 space-y-3",children:[i.length===0&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"text-sm text-muted-foreground",children:["Hey — I'm Holden's AI. Ask me anything about this report and I'll answer with what I'm seeing in ",e.zip,"."]}),c.jsx(U_t,{chips:g,onPick:y})]}),i.map((v,x)=>c.jsx(R_t,{role:v.role,content:v.content},x)),d&&!f&&c.jsx(D_t,{zip:e.zip,lens:e.lens,onDismiss:()=>{A(!1),h(!0)}})]}),c.jsxs("form",{onSubmit:v=>{v.preventDefault(),y(a)},className:"border-t border-border p-3 flex items-center gap-2",children:[c.jsx("input",{value:a,onChange:v=>o(v.target.value),placeholder:`Ask about ${e.zip}…`,className:"flex-1 bg-background border border-border px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-primary",disabled:l}),c.jsx("button",{type:"submit",disabled:l||!a.trim(),className:"inline-flex items-center justify-center w-9 h-9 bg-primary text-primary-foreground disabled:opacity-50","aria-label":"Send",children:l?c.jsx(bo,{size:14,className:"animate-spin"}):c.jsx(_be,{size:14})})]}),c.jsx("div",{className:"px-3 pb-2 text-[9px] uppercase tracking-[0.2em] text-muted-foreground/60 text-center",children:"AI assistant · Not a contractual response"})]})]})}function z_t(){var y,v;const{zip:e=""}=tm(),[t]=dBe(),n=t.get("lens")==="buyer"?"buyer":"seller",r=t.get("run")==="1",[i,s]=S.useState(null),[a,o]=S.useState(null),[l,u]=S.useState(!1),[d,A]=S.useState(null),[f,h]=S.useState(!1),p=Wse(e),m=p?((y=gPe(e))==null?void 0:y.city)||"Grand Rapids area":"",g=async()=>{if(!p){A("Invalid ZIP code");return}h(!0),u(!0),A(null),s(null);try{Re.functions.invoke("market-pulse-rates",{body:{}}).catch(()=>{});const{data:x,error:b}=await Re.functions.invoke("market-pulse-report",{body:{zip:e,lens:n}});if(b)throw new Error(b.message);if(x!=null&&x.error)throw new Error(x.error);const w=x==null?void 0:x.payload;if(!w)throw new Error("No report returned");s(w);const{data:B}=await Re.from("market_pulse_rates").select("rates, source, fetched_at").order("fetched_at",{ascending:!1}).limit(1).maybeSingle();B&&o({rates:B.rates,source:B.source,fetched_at:B.fetched_at})}catch(x){A(x.message||"Failed to generate report")}finally{u(!1)}};return S.useEffect(()=>{r&&p&&!f&&g()},[r,p]),c.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[c.jsxs(Mr,{children:[c.jsx("title",{children:`Market Pulse · ZIP ${e} · ${n==="seller"?"Seller":"Buyer"} Report · HoldenGR`}),c.jsx("meta",{name:"description",content:`Live market report for ZIP ${e} from Grand Rapids REALTOR® Holden Richardson. Heat index, price trends, mortgage rates, MI net sheet calculator, and personal AI chat.`})]}),c.jsx(SD,{}),c.jsx("main",{className:"flex-1 pt-20 pb-24",children:c.jsxs("div",{className:"container-page",children:[c.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4 py-6 border-b border-border",children:[c.jsxs("div",{children:[c.jsxs(Tt,{to:"/",className:"inline-flex items-center gap-1 text-[10px] uppercase tracking-[0.25em] text-muted-foreground hover:text-foreground",children:[c.jsx(Z1,{size:12})," Home"]}),c.jsxs("h1",{className:"text-3xl md:text-4xl font-bold mt-2",children:["Market Pulse · ZIP ",e]}),c.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[n==="seller"?"Seller report":"Buyer report"," · ",i?`${i.city} — ${i.area}`:m]})]}),c.jsx("div",{className:"w-full md:w-auto md:max-w-sm",children:c.jsx(qse,{compact:!0})})]}),!f&&!l&&!i&&!d&&c.jsxs("div",{className:"py-10 md:py-14 space-y-12",children:[c.jsxs("div",{className:"bg-card border border-border p-6 md:p-10 text-center max-w-3xl mx-auto",children:[c.jsxs("div",{className:"inline-flex items-center gap-2 mb-4 px-3 py-1 bg-primary/10 text-primary text-[10px] uppercase tracking-[0.25em] font-medium",children:[c.jsx($O,{size:12})," Live Report Ready"]}),c.jsxs("h2",{className:"text-2xl md:text-3xl font-bold mb-3",children:["Generate your ",n==="seller"?"seller":"buyer"," report for ZIP ",e]}),c.jsxs("p",{className:"text-sm md:text-base text-foreground/75 max-w-xl mx-auto mb-6 leading-relaxed",children:["I'll research ",c.jsx("span",{className:"font-medium text-foreground",children:m})," live — pulling current price trends, days on market, today's mortgage rates, and Michigan-specific closing costs. Takes about 20–40 seconds."]}),c.jsxs("button",{onClick:g,disabled:!p,className:"inline-flex items-center gap-2 px-6 py-3 bg-primary text-primary-foreground text-[11px] uppercase tracking-[0.25em] font-medium hover:bg-primary/90 transition-colors disabled:opacity-40",children:[c.jsx(yo,{size:14})," Run Report"]}),c.jsx("p",{className:"text-[10px] text-muted-foreground mt-4",children:"Free · No login · You can switch ZIP or buyer/seller anytime"})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"text-center mb-6",children:[c.jsx("div",{className:"text-[10px] uppercase tracking-[0.3em] text-primary font-semibold mb-2",children:"What's Inside"}),c.jsx("h3",{className:"text-xl md:text-2xl font-bold",children:"A snapshot of what you'll get"})]}),c.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:[{icon:obe,title:"Heat Index",body:"0–100 score telling you if this ZIP is a seller's, balanced, or buyer's market right now."},{icon:Xwe,title:"Price & Velocity Trends",body:"24 months of median price + 12 months of days-on-market and list-to-sale ratio."},{icon:$O,title:"Today's Mortgage Rates",body:"Live 30-yr, 15-yr, FHA, VA, and 7/1 ARM rates from FRED + Mortgage News Daily."},{icon:Gwe,title:n==="seller"?"MI Net Sheet":"PITI Calculator",body:n==="seller"?"Michigan transfer tax + Kent County + tiered title — see your net proceeds at the median price.":"Principal, interest, taxes, insurance, and auto-tiered PMI for the median home."},{icon:dp,title:"Chat With The Report",body:"Ask follow-up questions like 'what about ZIP 49503?' or 'should I list in March?' — context stays."},{icon:abe,title:"PDF + Standalone HTML",body:"Download the full report to share with your spouse, lender, or just keep for reference."}].map(({icon:x,title:b,body:w})=>c.jsxs("div",{className:"bg-card border border-border p-5",children:[c.jsx(x,{size:18,className:"text-primary mb-3"}),c.jsx("div",{className:"text-sm font-semibold mb-1.5",children:b}),c.jsx("div",{className:"text-xs text-foreground/70 leading-relaxed",children:w})]},b))})]}),c.jsxs("div",{className:"bg-muted/30 border border-border p-6 md:p-8",children:[c.jsx("div",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground mb-3",children:"Sample · Holden's Take"}),c.jsx("p",{className:"text-base md:text-lg leading-snug font-medium mb-4 italic text-foreground/85",children:`"Heritage Hill is still firmly a seller's market — homes are moving in 14 days at 99% of list, but new listings ticked up 18% this month. If you're selling, list before May. If you're buying, watch for price reductions on anything sitting over 21 days."`}),c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mt-5",children:[{l:"Median Price",v:"$385K",s:"+6.2% YoY"},{l:"Days on Market",v:"14",s:"vs 21 last yr"},{l:"List-to-Sale",v:"99.2%",s:"Strong"},{l:"Heat Index",v:"78/100",s:"Seller's market"}].map(({l:x,v:b,s:w})=>c.jsxs("div",{className:"bg-background border border-border p-3",children:[c.jsx("div",{className:"text-[9px] uppercase tracking-[0.2em] text-muted-foreground mb-1",children:x}),c.jsx("div",{className:"text-lg font-bold tabular-nums",children:b}),c.jsx("div",{className:"text-[10px] text-foreground/60",children:w})]},x))}),c.jsxs("p",{className:"text-[10px] text-muted-foreground/70 mt-4",children:["Sample only · Your report uses live data for ZIP ",e]})]})]}),l&&c.jsxs("div",{className:"py-24 flex flex-col items-center text-center",children:[c.jsx(bo,{size:32,className:"animate-spin text-primary mb-4"}),c.jsxs("p",{className:"text-sm text-muted-foreground max-w-md",children:["Researching ",e," live — gathering market data, mortgage rates, and Holden's take. This takes 20–40 seconds for fresh reports."]})]}),d&&!l&&c.jsxs("div",{className:"py-16 max-w-md mx-auto text-center",children:[c.jsx(Zwe,{size:32,className:"text-destructive mx-auto mb-3"}),c.jsx("p",{className:"text-sm text-foreground/80 mb-4",children:d}),c.jsx("button",{onClick:g,className:"inline-flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground text-[11px] uppercase tracking-[0.2em]",children:"Try Again"})]}),i&&!l&&c.jsxs("div",{id:"market-pulse-report",className:"py-8 space-y-8",children:[c.jsxs("div",{className:"bg-primary text-primary-foreground p-5 md:p-6",children:[c.jsx("div",{className:"text-[10px] uppercase tracking-[0.25em] opacity-70 mb-1",children:"Holden's Take"}),c.jsx("p",{className:"text-lg md:text-xl leading-snug",children:i.holdens_take})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[c.jsx("div",{className:"lg:col-span-1",children:c.jsx(spt,{value:i.heat_index,label:i.heat_label,lens:n})}),c.jsx("div",{className:"lg:col-span-2",children:c.jsx(lpt,{snapshot:i.snapshot,lens:n})})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[c.jsx(cpt,{data:i.price_trend_24mo}),c.jsx(upt,{data:i.velocity_trend_12mo})]}),c.jsx(dpt,{percentile:i.metro_score_percentile,comps:i.metro_comps,zip:i.zip}),c.jsxs("div",{className:"bg-card border border-border p-6",children:[c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium mb-2",children:n==="seller"?"Sell Now or Wait?":"Buy Now or Wait?"}),c.jsx("p",{className:"text-lg font-semibold mb-2",children:i.now_or_wait.verdict}),c.jsx("p",{className:"text-sm text-foreground/80 leading-relaxed",children:i.now_or_wait.reasoning})]}),c.jsx(nvt,{md:i.writeup_md,area:i.area}),c.jsx(Apt,{}),n==="seller"?c.jsx(fpt,{defaultPrice:i.snapshot.median_sale_price}):c.jsx(ppt,{defaultPrice:i.snapshot.median_sale_price}),c.jsx(svt,{lens:n}),((v=i.sources)==null?void 0:v.length)>0&&c.jsxs("div",{className:"bg-card border border-border p-5",children:[c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium mb-3",children:"Sources"}),c.jsx("ul",{className:"space-y-1.5 text-sm",children:i.sources.map((x,b)=>c.jsx("li",{children:c.jsx("a",{href:x.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:x.title})},b))}),c.jsx("p",{className:"text-[10px] text-muted-foreground/70 mt-3",children:"AI-researched · Not MLS-verified · Confirm with your agent before decisions."})]}),c.jsxs("div",{className:"bg-muted/30 border border-border p-5",children:[c.jsx("h3",{className:"text-[10px] uppercase tracking-[0.25em] text-muted-foreground font-medium mb-3",children:"Take This Report With You"}),c.jsx(L_t,{payload:i,targetId:"market-pulse-report"})]})]})]})}),i&&c.jsx(avt,{}),i&&c.jsx($_t,{payload:i,rates:a}),c.jsx(Kse,{})]})}const Mye=Object.assign({"../pages/groovy.html":()=>KB(()=>import("./groovy-C3QU58Km.js"),[]).then(e=>e.default)});function V_t(e){const t=`../pages/${e}.html`;return Object.prototype.hasOwnProperty.call(Mye,t)?t:null}function K_t({slug:e}={}){const{slug:t}=tm(),n=e??t??null,[r,i]=S.useState(null),[s,a]=S.useState(!1);if(S.useEffect(()=>{if(!n){a(!0);return}const u=V_t(n);if(!u){a(!0);return}const d=Mye[u];d().then(i).catch(()=>a(!0))},[n]),s||!n)return c.jsx(Lre,{to:"/",replace:!0});if(r===null)return c.jsx("div",{className:"p-8 text-center",children:"Loading…"});const o=r.match(/<body[^>]*>([\s\S]*)<\/body>/i),l=o?o[1].trim():r;return c.jsx("div",{className:"migration-page-contents",dangerouslySetInnerHTML:{__html:l}})}const W_t=c.jsx(c.Fragment,{children:c.jsx(Qt,{path:"groovy",element:c.jsx(K_t,{slug:"groovy"})})}),q_t=new qCe,G_t=()=>{const e=ml();return S.useEffect(()=>{QBe()},[e.pathname]),null},Y_t=()=>c.jsx(zre,{children:c.jsx(ZCe,{client:q_t,children:c.jsxs(IU,{children:[c.jsx(p1e,{}),c.jsx(W1e,{}),c.jsxs(oBe,{children:[c.jsx(HBe,{}),c.jsx(G_t,{}),c.jsxs(ZSe,{children:[c.jsx(Qt,{path:"/",element:c.jsx(JPe,{})}),c.jsx(Qt,{path:"/properties",element:c.jsx(SIe,{})}),c.jsx(Qt,{path:"/properties/:id",element:c.jsx(BIe,{})}),c.jsx(Qt,{path:"/about",element:c.jsx(PIe,{})}),c.jsx(Qt,{path:"/about/testimonials",element:c.jsx(RIe,{})}),c.jsx(Qt,{path:"/about/news",element:c.jsx(pL,{categoryOverride:"about",subcategorySlug:"news"})}),c.jsx(Qt,{path:"/about/:slug",element:c.jsx(fL,{})}),c.jsx(Qt,{path:"/contact",element:c.jsx(zIe,{})}),c.jsx(Qt,{path:"/home-valuation",element:c.jsx(KIe,{})}),c.jsx(Qt,{path:"/idx",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/idx/:a",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/idx/:a/:b",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/idx/:a/:b/:c",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/idx/:a/:b/:c/:d",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/idx/*",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/client",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/client/:a",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/client/:a/:b",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/client/:a/:b/:c",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/client/:a/:b/:c/:d",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/r",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/r/:a",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/r/:a/:b",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/r/:a/:b/:c",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/search",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/search/:a",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/search/:a/:b",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/search/:a/:b/:c",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/preview-property",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/preview-property/:a",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/preview-property/:a/:b",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/magic-redirect",element:c.jsx(Nr,{})}),c.jsx(Qt,{path:"/auth",element:c.jsx(t4e,{})}),c.jsx(Qt,{path:"/blog",element:c.jsx(i4e,{})}),c.jsx(Qt,{path:"/blog/:slug",element:c.jsx(s4e,{})}),c.jsx(Qt,{path:"/admin/blog",element:c.jsx(vQe,{})}),c.jsx(Qt,{path:"/admin/profile",element:c.jsx(xQe,{})}),c.jsx(Qt,{path:"/admin/aeo",element:c.jsx(zft,{})}),c.jsx(Qt,{path:"/reset-password",element:c.jsx(Vft,{})}),c.jsx(Qt,{path:"/privacy-policy",element:c.jsx(Kft,{})}),c.jsx(Qt,{path:"/terms-of-service",element:c.jsx(Wft,{})}),c.jsx(Qt,{path:"/accessibility",element:c.jsx(qft,{})}),c.jsx(Qt,{path:"/market-pulse/:zip",element:c.jsx(z_t,{})}),W_t,c.jsx(Qt,{path:"/:category",element:c.jsx(pL,{})}),c.jsx(Qt,{path:"/:category/:slug",element:c.jsx(ipt,{})}),c.jsx(Qt,{path:"/:category/:subcategory/:slug",element:c.jsx(fL,{})}),c.jsx(Qt,{path:"*",element:c.jsx(Gft,{})})]})]})]})})});Ute(document.getElementById("root")).render(c.jsx(Y_t,{}));export{TA as c,Bn as g};